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: Jim Qu <Jim.Qu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Deucher 2018-07-19 09:17:02 -05:00
parent 7766484b4a
commit 9e7204beae

View File

@ -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