diff options
author | Dave Airlie <airlied@redhat.com> | 2014-04-30 19:32:21 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-04-30 19:32:21 -0400 |
commit | 444c9a08bf787e8236e132fab7eceeb2f065aa4c (patch) | |
tree | 52a117f1531f8fcc7f775cacd309d92e64c27a10 /drivers/gpu/drm/radeon | |
parent | 7e9ab4081e646fc317d0a87929a352f0e5082190 (diff) | |
parent | 3c8413951cbd8a2d855740823fc547c97b845f6f (diff) |
Merge branch 'drm-init-cleanup' of git://people.freedesktop.org/~danvet/drm into drm-next
Next pull request, this time more of the drm de-midlayering work. The big
thing is that his patch series here removes everything from drm_bus except
the set_busid callback. Thierry has a few more patches on top of this to
make that one optional to.
With that we can ditch all the non-pci drm_bus implementations, which
Thierry has already done for the fake tegra host1x drm_bus.
Reviewed by Thierry, Laurent and David and now also survived some testing
on my intel boxes to make sure the irq fumble is fixed correctly ;-) The
last minute rebase was just to add the r-b tags from Thierry for the 2
patches I've redone.
* 'drm-init-cleanup' of git://people.freedesktop.org/~danvet/drm:
drm/<drivers>: don't set driver->dev_priv_size to 0
drm: Remove dev->kdriver
drm: remove drm_bus->get_name
drm: rip out dev->devname
drm: inline drm_pci_set_unique
drm: remove bus->get_irq implementations
drm: pass the irq explicitly to drm_irq_install
drm/irq: Look up the pci irq directly in the drm_control ioctl
drm/irq: track the irq installed in drm_irq_install in dev->irq
drm: rename dev->count_lock to dev->buf_lock
drm: Rip out totally bogus vga_switcheroo->can_switch locking
drm: kill drm_bus->bus_type
drm: remove drm_dev_to_irq from drivers
drm/irq: remove cargo-culted locking from irq_install/uninstall
drm/irq: drm_control is a legacy ioctl, so pci devices only
drm/pci: fold in irq_by_busid support
drm/irq: simplify irq checks in drm_wait_vblank
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_irq_kms.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_state.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 511fe26198e4..9aa1afd1786e 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
@@ -1125,12 +1125,13 @@ static void radeon_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero | |||
1125 | static bool radeon_switcheroo_can_switch(struct pci_dev *pdev) | 1125 | static bool radeon_switcheroo_can_switch(struct pci_dev *pdev) |
1126 | { | 1126 | { |
1127 | struct drm_device *dev = pci_get_drvdata(pdev); | 1127 | struct drm_device *dev = pci_get_drvdata(pdev); |
1128 | bool can_switch; | ||
1129 | 1128 | ||
1130 | spin_lock(&dev->count_lock); | 1129 | /* |
1131 | can_switch = (dev->open_count == 0); | 1130 | * FIXME: open_count is protected by drm_global_mutex but that would lead to |
1132 | spin_unlock(&dev->count_lock); | 1131 | * locking inversion with the driver load path. And the access here is |
1133 | return can_switch; | 1132 | * completely racy anyway. So don't bother with locking for now. |
1133 | */ | ||
1134 | return dev->open_count == 0; | ||
1134 | } | 1135 | } |
1135 | 1136 | ||
1136 | static const struct vga_switcheroo_client_ops radeon_switcheroo_ops = { | 1137 | static const struct vga_switcheroo_client_ops radeon_switcheroo_ops = { |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index c00a2f585185..15447a4119f4 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -519,7 +519,6 @@ static struct drm_driver kms_driver = { | |||
519 | DRIVER_USE_AGP | | 519 | DRIVER_USE_AGP | |
520 | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | | 520 | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | |
521 | DRIVER_PRIME | DRIVER_RENDER, | 521 | DRIVER_PRIME | DRIVER_RENDER, |
522 | .dev_priv_size = 0, | ||
523 | .load = radeon_driver_load_kms, | 522 | .load = radeon_driver_load_kms, |
524 | .open = radeon_driver_open_kms, | 523 | .open = radeon_driver_open_kms, |
525 | .preclose = radeon_driver_preclose_kms, | 524 | .preclose = radeon_driver_preclose_kms, |
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index 089c9ffb0aa9..16807afab362 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c | |||
@@ -287,7 +287,7 @@ int radeon_irq_kms_init(struct radeon_device *rdev) | |||
287 | INIT_WORK(&rdev->reset_work, radeon_irq_reset_work_func); | 287 | INIT_WORK(&rdev->reset_work, radeon_irq_reset_work_func); |
288 | 288 | ||
289 | rdev->irq.installed = true; | 289 | rdev->irq.installed = true; |
290 | r = drm_irq_install(rdev->ddev); | 290 | r = drm_irq_install(rdev->ddev, rdev->ddev->pdev->irq); |
291 | if (r) { | 291 | if (r) { |
292 | rdev->irq.installed = false; | 292 | rdev->irq.installed = false; |
293 | flush_work(&rdev->hotplug_work); | 293 | flush_work(&rdev->hotplug_work); |
diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c index 956ab7f14e16..b576549fc783 100644 --- a/drivers/gpu/drm/radeon/radeon_state.c +++ b/drivers/gpu/drm/radeon/radeon_state.c | |||
@@ -3054,7 +3054,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil | |||
3054 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) | 3054 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) |
3055 | value = 0; | 3055 | value = 0; |
3056 | else | 3056 | else |
3057 | value = drm_dev_to_irq(dev); | 3057 | value = dev->pdev->irq; |
3058 | break; | 3058 | break; |
3059 | case RADEON_PARAM_GART_BASE: | 3059 | case RADEON_PARAM_GART_BASE: |
3060 | value = dev_priv->gart_vm_start; | 3060 | value = dev_priv->gart_vm_start; |