diff options
author | Dave Airlie <airlied@panoply-rh.(none)> | 2008-03-05 15:28:38 +1000 |
---|---|---|
committer | Dave Airlie <airlied@panoply-rh.(none)> | 2008-03-05 15:28:38 +1000 |
commit | 4dbf447f4305e3c2aa8914b5ccfc07d9bf8ef28e (patch) | |
tree | 67d3e7e653bf174b11f39e491fc96a49490dd21d /linux-core/drm_drv.c | |
parent | 4aa7efe398911bd58fb348703444a92114e45114 (diff) |
drm: fixup compat with old x.org drivers
Diffstat (limited to 'linux-core/drm_drv.c')
-rw-r--r-- | linux-core/drm_drv.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index dd76421f..434789dd 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -187,7 +187,9 @@ int drm_lastclose(struct drm_device * dev) DRM_DEBUG("\n"); -/* return 0; */ + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + drm_bo_driver_finish(dev); + /* * We can't do much about this function failing. */ @@ -425,13 +427,20 @@ int drm_minors_cleanup(int id, void *ptr, void *data) struct drm_minor *minor = ptr; struct drm_device *dev; struct drm_driver *driver = data; - if (id < 127 || id > 192) - return 0; dev = minor->dev; if (minor->dev->driver != driver) return 0; + if (drm_core_check_feature(dev, DRIVER_MODESET)) { + if (minor->type != DRM_MINOR_CONTROL) + return 0; + } else { + if (minor->type != DRM_MINOR_LEGACY) + return 0; + } + + if (dev) pci_dev_put(dev->pdev); drm_cleanup(dev); |