aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_drv.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-08 09:41:17 -0400
committerDave Airlie <airlied@redhat.com>2013-08-18 20:03:49 -0400
commit3d914e8357256e7e92d1b7dd2dda9cf94e39c4e8 (patch)
tree252aea0277f6713ba7b57e7e6615f599e373186b /drivers/gpu/drm/drm_drv.c
parent45886af246d926304d5e990da63d55d9db3216c0 (diff)
drm: hide legacy sg cleanup better from common code
I've decided that some clear markers for what's legacy dri1/non-gem code is useful. I've opted to use the drm_legacy prefix and then hide all the checks in that function for better readability in the common code. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r--drivers/gpu/drm/drm_drv.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index dddd79988ffc..743b24d7918e 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -197,11 +197,7 @@ int drm_lastclose(struct drm_device * dev)
197 197
198 drm_agp_clear(dev); 198 drm_agp_clear(dev);
199 199
200 if (drm_core_check_feature(dev, DRIVER_SG) && dev->sg && 200 drm_legacy_sg_cleanup(dev);
201 !drm_core_check_feature(dev, DRIVER_MODESET)) {
202 drm_sg_cleanup(dev->sg);
203 dev->sg = NULL;
204 }
205 201
206 /* Clear vma list (only built for debugging) */ 202 /* Clear vma list (only built for debugging) */
207 list_for_each_entry_safe(vma, vma_temp, &dev->vmalist, head) { 203 list_for_each_entry_safe(vma, vma_temp, &dev->vmalist, head) {