From: Alex Deucher Date: Fri, 9 May 2014 00:04:03 +0000 (-0400) Subject: drm/radeon: handle non-VGA class pci devices with ATRM X-Git-Tag: accepted/tizen/common/20141203.182822~94^2~54^2^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8ade3526b2aa0505132c404c05a38b73ea15490;p=platform%2Fkernel%2Flinux-arm64.git drm/radeon: handle non-VGA class pci devices with ATRM Newer PX systems have non-VGA pci class dGPUs. Update the ATRM fetch method to handle those cases. bug: https://bugzilla.kernel.org/show_bug.cgi?id=75401 Signed-off-by: Alex Deucher Signed-off-by: Christian König Cc: stable@vger.kernel.org --- diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c index b3633d9..9ab3097 100644 --- a/drivers/gpu/drm/radeon/radeon_bios.c +++ b/drivers/gpu/drm/radeon/radeon_bios.c @@ -196,6 +196,20 @@ static bool radeon_atrm_get_bios(struct radeon_device *rdev) } } + if (!found) { + while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) { + dhandle = ACPI_HANDLE(&pdev->dev); + if (!dhandle) + continue; + + status = acpi_get_handle(dhandle, "ATRM", &atrm_handle); + if (!ACPI_FAILURE(status)) { + found = true; + break; + } + } + } + if (!found) return false;