summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_drv.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-01-05 08:31:08 +1000
committerDave Airlie <airlied@redhat.com>2011-01-05 08:31:08 +1000
commit4f125010d2d02c481a0fdf5aee23a9f937bc5de1 (patch)
treedcdcd2ba1d0bb980b57ced9a1b2b5b17c84c8f57 /drivers/gpu/drm/radeon/radeon_drv.c
parent204663c48711ddceee09df46269cd34d49d1f7be (diff)
parent989d873fc5b6a96695b97738dea8d9f02a60f8ab (diff)
Merge branch 'master' of /home/airlied/kernel/linux-2.6 into drm-core-next
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_drv.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 520b776b09f..18225f21ee0 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -239,9 +239,28 @@ static struct drm_driver driver_old = {
static struct drm_driver kms_driver;
+static void radeon_kick_out_firmware_fb(struct pci_dev *pdev)
+{
+ struct apertures_struct *ap;
+ bool primary = false;
+
+ ap = alloc_apertures(1);
+ ap->ranges[0].base = pci_resource_start(pdev, 0);
+ ap->ranges[0].size = pci_resource_len(pdev, 0);
+
+#ifdef CONFIG_X86
+ primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW;
+#endif
+ remove_conflicting_framebuffers(ap, "radeondrmfb", primary);
+ kfree(ap);
+}
+
static int __devinit
radeon_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
+ /* Get rid of things like offb */
+ radeon_kick_out_firmware_fb(pdev);
+
return drm_get_pci_dev(pdev, ent, &kms_driver);
}