Commit 9e7204be authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/apci: don't call sbios request function if it's not supported

Check the supported functions mask before calling the bios
requests method.
Reviewed-by: default avatarJim Qu <Jim.Qu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7766484b
......@@ -364,7 +364,6 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
struct acpi_bus_event *event)
{
struct amdgpu_atif *atif = adev->atif;
struct atif_sbios_requests req;
int count;
DRM_DEBUG_DRIVER("event, device_class = %s, type = %#x\n",
......@@ -379,6 +378,9 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
/* Not our event */
return NOTIFY_DONE;
if (atif->functions.sbios_requests) {
struct atif_sbios_requests req;
/* Check pending SBIOS requests */
count = amdgpu_atif_get_sbios_requests(atif, &req);
......@@ -415,6 +417,7 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
}
}
/* TODO: check other events */
}
/* We've handled the event, stop the notifier chain. The ACPI interface
* overloads ACPI_VIDEO_NOTIFY_PROBE, we don't want to send that to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment