提交 9e7204be 编写于 作者: A 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: NJim Qu <Jim.Qu@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册