drm/i915: Sanitize ->lastclose
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 19 Nov 2014 19:36:49 +0000 (20:36 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 20 Nov 2014 12:03:30 +0000 (13:03 +0100)
With this all the ums nonsense around gem setup/teardown has
disappeared, yay!

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c

index c20fa303365f16a7f599207272806d72bbffeba4..f5ded5c7daeb01c666a54a3106d9e3ea3bb49e93 100644 (file)
@@ -980,21 +980,8 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file)
  */
 void i915_driver_lastclose(struct drm_device *dev)
 {
-       struct drm_i915_private *dev_priv = dev->dev_private;
-
-       /* On gen6+ we refuse to init without kms enabled, but then the drm core
-        * goes right around and calls lastclose. Check for this and don't clean
-        * up anything. */
-       if (!dev_priv)
-               return;
-
-       if (drm_core_check_feature(dev, DRIVER_MODESET)) {
-               intel_fbdev_restore_mode(dev);
-               vga_switcheroo_process_delayed_switch();
-               return;
-       }
-
-       i915_gem_lastclose(dev);
+       intel_fbdev_restore_mode(dev);
+       vga_switcheroo_process_delayed_switch();
 }
 
 void i915_driver_preclose(struct drm_device *dev, struct drm_file *file)
index 3d572a6023e667ced806f3063fee08c97255f141..230a17211d768df03e0dbdedac61612b538aa128 100644 (file)
@@ -2468,7 +2468,6 @@ int __must_check i915_vma_unbind(struct i915_vma *vma);
 int i915_gem_object_put_pages(struct drm_i915_gem_object *obj);
 void i915_gem_release_all_mmaps(struct drm_i915_private *dev_priv);
 void i915_gem_release_mmap(struct drm_i915_gem_object *obj);
-void i915_gem_lastclose(struct drm_device *dev);
 
 int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj,
                                    int *needs_clflush);
index af30283db628e6da1160e10e46e64a44b7d34cbb..f2d7ce5e4bfb207a33842b09120f050f3994706d 100644 (file)
@@ -4964,19 +4964,6 @@ i915_gem_cleanup_ringbuffer(struct drm_device *dev)
                dev_priv->gt.cleanup_ring(ring);
 }
 
-void
-i915_gem_lastclose(struct drm_device *dev)
-{
-       int ret;
-
-       if (drm_core_check_feature(dev, DRIVER_MODESET))
-               return;
-
-       ret = i915_gem_suspend(dev);
-       if (ret)
-               DRM_ERROR("failed to idle hardware: %d\n", ret);
-}
-
 static void
 init_ring_lists(struct intel_engine_cs *ring)
 {