Skip to content

Commit 48cc9b2

Browse files
jdelvareairlied
authored andcommitted
drm/radeon/kms: Skip ACPI call to ATIF when possible
I am under the impression that it only makes sense to call the ATIF method if the graphics device has an ACPI handle attached. So we could skip the call altogether if there is no such handle. Signed-off-by: Jean Delvare <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent bc96f94 commit 48cc9b2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/gpu/drm/radeon/radeon_acpi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ int radeon_acpi_init(struct radeon_device *rdev)
5151
acpi_handle handle;
5252
int ret;
5353

54-
/* No need to proceed if we're sure that ATIF is not supported */
55-
if (!ASIC_IS_AVIVO(rdev) || !rdev->bios)
56-
return 0;
57-
5854
/* Get the device handle */
5955
handle = DEVICE_ACPI_HANDLE(&rdev->pdev->dev);
6056

57+
/* No need to proceed if we're sure that ATIF is not supported */
58+
if (!ASIC_IS_AVIVO(rdev) || !rdev->bios || !handle)
59+
return 0;
60+
6161
/* Call the ATIF method */
6262
ret = radeon_atif_call(handle);
6363
if (ret)

0 commit comments

Comments
 (0)