summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_bios.c
diff options
context:
space:
mode:
authorDave Airlie2010-02-11 06:38:23 +0100
committerDave Airlie2010-02-11 10:04:07 +0100
commite34398952e056bbd99f9099fae77be26e5c6aa78 (patch)
tree387f9a56a630caee7754d3484ded8454edc5ec1f /drivers/gpu/drm/radeon/radeon_bios.c
parentdrm/radeon/kms: Test rdev->bios centrally in combios_get_table_offset(). (diff)
downloadkernel-qcow2-linux-e34398952e056bbd99f9099fae77be26e5c6aa78.tar.gz
kernel-qcow2-linux-e34398952e056bbd99f9099fae77be26e5c6aa78.tar.xz
kernel-qcow2-linux-e34398952e056bbd99f9099fae77be26e5c6aa78.zip
drm/radeon/kms: check for valid PCI bios and not OF rom
stops us trying to treat a OF rom as a PCI rom. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_bios.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_bios.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c
index 906921740c60..26856ed8d972 100644
--- a/drivers/gpu/drm/radeon/radeon_bios.c
+++ b/drivers/gpu/drm/radeon/radeon_bios.c
@@ -411,6 +411,12 @@ bool radeon_get_bios(struct radeon_device *rdev)
goto free_bios;
}
+ tmp = RBIOS16(0x18);
+ if (RBIOS8(tmp + 0x14) != 0x0) {
+ DRM_INFO("Not an x86 BIOS ROM, not using.\n");
+ goto free_bios;
+ }
+
rdev->bios_header_start = RBIOS16(0x48);
if (!rdev->bios_header_start) {
goto free_bios;