]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/radeon/kms: don't read attempt to read bios from VRAM on unposted GPU.
authorDave Airlie <airlied@redhat.com>
Mon, 21 Jun 2010 03:31:38 +0000 (13:31 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 1 Jul 2010 01:59:30 +0000 (11:59 +1000)
Since the VGA switcheroo, we'd attempt to read the BIOS from VRAM on startup
but on some unposted cards this can cause hangs/crashes.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28592
(further problem pointed out by agd5f on IGP systems)

Reported-by: Reilithion on #radeon
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_bios.c

index fbba938f80481a422418fc3f095b7eef3519c212..2c92137399995f17d9df664c2ae28aa9ad8bbefa 100644 (file)
@@ -48,6 +48,10 @@ static bool igp_read_bios_from_vram(struct radeon_device *rdev)
        resource_size_t vram_base;
        resource_size_t size = 256 * 1024; /* ??? */
 
+       if (!(rdev->flags & RADEON_IS_IGP))
+               if (!radeon_card_posted(rdev))
+                       return false;
+
        rdev->bios = NULL;
        vram_base = drm_get_resource_start(rdev->ddev, 0);
        bios = ioremap(vram_base, size);