Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345333
b: refs/heads/master
c: 3023815
h: refs/heads/master
i:
  345331: 7a5fb66
v: v3
  • Loading branch information
Tommi Rantala authored and Dave Airlie committed Nov 20, 2012
1 parent 7a344b4 commit c15940d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b0e77f45a6da3f361d69680baeb0e133d0bc46c0
refs/heads/master: 302381511f4b1bc98c6f61ccaec5d8e98ccd0365
13 changes: 11 additions & 2 deletions trunk/drivers/gpu/drm/radeon/radeon_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,15 @@ static struct drm_driver driver_old = {

static struct drm_driver kms_driver;

static void radeon_kick_out_firmware_fb(struct pci_dev *pdev)
static int radeon_kick_out_firmware_fb(struct pci_dev *pdev)
{
struct apertures_struct *ap;
bool primary = false;

ap = alloc_apertures(1);
if (!ap)
return -ENOMEM;

ap->ranges[0].base = pci_resource_start(pdev, 0);
ap->ranges[0].size = pci_resource_len(pdev, 0);

Expand All @@ -295,13 +298,19 @@ static void radeon_kick_out_firmware_fb(struct pci_dev *pdev)
#endif
remove_conflicting_framebuffers(ap, "radeondrmfb", primary);
kfree(ap);

return 0;
}

static int __devinit
radeon_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int ret;

/* Get rid of things like offb */
radeon_kick_out_firmware_fb(pdev);
ret = radeon_kick_out_firmware_fb(pdev);
if (ret)
return ret;

return drm_get_pci_dev(pdev, ent, &kms_driver);
}
Expand Down

0 comments on commit c15940d

Please sign in to comment.