Skip to contentSkip to conversation

gpu/drm: remove drm_modeset_lock protection for drm_error

PATCH New Bernard Zhao 1 participant 1 message Jun 17, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu/drm: remove drm_modeset_lock protection for drm_error

In function drm_atomic_helper_shutdown, maybe there is no need to protect DRM_ERROR log in DRM_MODESET_LOCK_ALL_BEGIN & DRM_MODESET_LOCK_ALL_END. This change is to make code run a bit fast.

---
 drivers/gpu/drm/drm_atomic_helper.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +1 -3
index 85d163f16801..8902fd6316fc 100644
@@ -3100,12 +3100,10 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
 	int ret;
 
 	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
-
 	ret = drm_atomic_helper_disable_all(dev, &ctx);
+	DRM_MODESET_LOCK_ALL_END(ctx, ret);
 	if (ret)
 		DRM_ERROR("Disabling all crtc's during unload failed with %i\n", ret);
-
-	DRM_MODESET_LOCK_ALL_END(ctx, ret);
 }
 EXPORT_SYMBOL(drm_atomic_helper_shutdown);
 
Signature · 1 line
2.17.1