Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+28 −25
Original line number Diff line number Diff line
@@ -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