diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 6488e90ec948..7f0afc526419 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | |||
@@ -359,7 +359,9 @@ out: | |||
359 | * | 359 | * |
360 | * Checks the acpi event and if it matches an atif event, | 360 | * Checks the acpi event and if it matches an atif event, |
361 | * handles it. | 361 | * handles it. |
362 | * Returns NOTIFY code | 362 | * |
363 | * Returns: | ||
364 | * NOTIFY_BAD or NOTIFY_DONE, depending on the event. | ||
363 | */ | 365 | */ |
364 | static int amdgpu_atif_handler(struct amdgpu_device *adev, | 366 | static int amdgpu_atif_handler(struct amdgpu_device *adev, |
365 | struct acpi_bus_event *event) | 367 | struct acpi_bus_event *event) |
@@ -373,11 +375,16 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev, | |||
373 | if (strcmp(event->device_class, ACPI_VIDEO_CLASS) != 0) | 375 | if (strcmp(event->device_class, ACPI_VIDEO_CLASS) != 0) |
374 | return NOTIFY_DONE; | 376 | return NOTIFY_DONE; |
375 | 377 | ||
378 | /* Is this actually our event? */ | ||
376 | if (!atif || | 379 | if (!atif || |
377 | !atif->notification_cfg.enabled || | 380 | !atif->notification_cfg.enabled || |
378 | event->type != atif->notification_cfg.command_code) | 381 | event->type != atif->notification_cfg.command_code) { |
379 | /* Not our event */ | 382 | /* These events will generate keypresses otherwise */ |
380 | return NOTIFY_DONE; | 383 | if (event->type == ACPI_VIDEO_NOTIFY_PROBE) |
384 | return NOTIFY_BAD; | ||
385 | else | ||
386 | return NOTIFY_DONE; | ||
387 | } | ||
381 | 388 | ||
382 | if (atif->functions.sbios_requests) { | 389 | if (atif->functions.sbios_requests) { |
383 | struct atif_sbios_requests req; | 390 | struct atif_sbios_requests req; |
@@ -386,7 +393,7 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev, | |||
386 | count = amdgpu_atif_get_sbios_requests(atif, &req); | 393 | count = amdgpu_atif_get_sbios_requests(atif, &req); |
387 | 394 | ||
388 | if (count <= 0) | 395 | if (count <= 0) |
389 | return NOTIFY_DONE; | 396 | return NOTIFY_BAD; |
390 | 397 | ||
391 | DRM_DEBUG_DRIVER("ATIF: %d pending SBIOS requests\n", count); | 398 | DRM_DEBUG_DRIVER("ATIF: %d pending SBIOS requests\n", count); |
392 | 399 | ||