Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd908c86 authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm/fb-helper: Stop using trylocks in force_restore



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: default avatarRob Clark <robdclark@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent c50bfd08
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -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;