From: Daniel Vetter Date: Mon, 20 May 2019 22:35:00 +0000 (+0200) Subject: drm/vmwgfx: Don't look at state->allow_modeset X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=52500de68fbb0c11403fd8db13aace99e5ef4f40;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Deepak Rawat Signed-off-by: Daniel Vetter Cc: VMware Graphics Cc: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/20190520223500.6032-1-daniel.vetter@ffwll.ch --- diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index b97bc8e5944b..34284f0f5084 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -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;