Skip to contentSkip to conversation

drm/vmwgfx: Don't look at state->allow_modeset

PATCH In review Daniel Vetter 3 participants 3 messages May 20, 2019 – Jun 28, 2019

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

PATCH 1/1 drm/vmwgfx: Don't look at state->allow_modeset

That's purely for the uapi layer to implement the ALLOW_MODESET flag.

Drivers should instead look at the state, e.g. through drm_atomic_crtc_needs_modeset(), which vmwgfx already does. Also remove the confusing comment, since checking allow_modeset is at best a micro optimization.

v2: Rebase

Cc VMware Graphics <[email protected]>
Cc Thomas Hellstrom <[email protected]>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +0 -8
index b97bc8e5944b..34284f0f5084 100644
@@ -1704,14 +1704,6 @@ vmw_kms_atomic_check_modeset(struct drm_device *dev,
 	if (ret)
 		return ret;
 
-	if (!state->allow_modeset)
-		return ret;
-
-	/*
-	 * Legacy path do not set allow_modeset properly like
-	 * @drm_atomic_helper_update_plane, This will result in unnecessary call
-	 * to vmw_kms_check_topology. So extra set of check.
-	 */
 	for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
 		if (drm_atomic_crtc_needs_modeset(crtc_state))
 			need_modeset = true;
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 35 lines · Daniel Vetter

That's purely for the uapi layer to implement the ALLOW_MODESET flag.

Drivers should instead look at the state, e.g. through drm_atomic_crtc_needs_modeset(), which vmwgfx already does. Also remove
the confusing comment, since checking allow_modeset is at best a micro
optimization.

v2: Rebase

Cc VMware Graphics <[email protected]>
Cc Thomas Hellstrom <[email protected]>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +0 -6
index b97bc8e5944b..34284f0f5084 100644
@@ -1704,14 +1704,6 @@ vmw_kms_atomic_check_modeset(struct drm_device
 *dev,
 	if (ret)
 		return ret;
 
-	if (!state->allow_modeset)
-		return ret;
-
-	/*
-	 * Legacy path do not set allow_modeset properly like
-	 * @drm_atomic_helper_update_plane, This will result in

unnecessary call

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c vmw_kms_atomic_check_modeset(struct drm_device *dev, · line 1709

Quoted 5 lines
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +0 -2
-	 * to vmw_kms_check_topology. So extra set of check.
-	 */
 	for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
 		if (drm_atomic_crtc_needs_modeset(crtc_state))
 			need_modeset = true;

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 1 line · Deepak Singh Rawat

Thanks for your review, I've merged this into drm-misc-next so it won't get lost again. Should land for 5.4.
-Daniel

Quoted 43 lines · Daniel Vetter
Quoted 40 lines

That's purely for the uapi layer to implement the ALLOW_MODESET flag.

Drivers should instead look at the state, e.g. through drm_atomic_crtc_needs_modeset(), which vmwgfx already does. Also remove
the confusing comment, since checking allow_modeset is at best a micro
optimization.

v2: Rebase

Cc VMware Graphics <[email protected]>
Cc Thomas Hellstrom <[email protected]>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +0 -6
index b97bc8e5944b..34284f0f5084 100644
@@ -1704,14 +1704,6 @@ vmw_kms_atomic_check_modeset(struct drm_device
 *dev,
 	if (ret)
 		return ret;
 
-	if (!state->allow_modeset)
-		return ret;
-
-	/*
-	 * Legacy path do not set allow_modeset properly like
-	 * @drm_atomic_helper_update_plane, This will result in

unnecessary call

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +0 -2
-	 * to vmw_kms_check_topology. So extra set of check.
-	 */
 	for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
 		if (drm_atomic_crtc_needs_modeset(crtc_state))
 			need_modeset = true;
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel