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:
parent
7766484b4a
commit
9e7204beae
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user