drm/fb-helper: Stop using trylocks in force_restore
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 28 Jul 2015 11:18:41 +0000 (13:18 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Aug 2015 12:13:01 +0000 (14:13 +0200)
Since the panic handling is gone this is only used for force-restoring
the fbdev/fbcon from sysrq, and that's done with a work item. No need
any more to do trylocks, we can just do normal locking.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/drm_fb_helper.c

index f16eed0489f8043b8cd5c9de3bbad9ca1aa37d36..e4bbb53096029718b62e07b9f6d65f4976078b32 100644 (file)
@@ -416,19 +416,10 @@ static bool drm_fb_helper_force_kernel_mode(void)
                if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
                        continue;
 
-               /*
-                * NOTE: Use trylock mode to avoid deadlocks and sleeping in
-                * panic context.
-                */
-               if (__drm_modeset_lock_all(dev, true) != 0) {
-                       error = true;
-                       continue;
-               }
-
+               drm_modeset_lock_all(dev);
                ret = drm_fb_helper_restore_fbdev_mode(helper);
                if (ret)
                        error = true;
-
                drm_modeset_unlock_all(dev);
        }
        return error;