drm/vmwgfx: Also check for crtc status while checking for DU active
authorDeepak Rawat <drawat@vmware.com>
Fri, 21 Dec 2018 22:38:35 +0000 (14:38 -0800)
committerThomas Hellstrom <thellstrom@vmware.com>
Tue, 5 Feb 2019 12:53:28 +0000 (13:53 +0100)
During modeset check it is possible to have all crtc_state's in atomic
state. Check for crtc enable status while checking for display unit
active status. Only error if enabling a crtc while display unit is not
active.

Cc: <stable@vger.kernel.org>
Fixes: 9da6e26c0aae: ("drm/vmwgfx: Fix a layout race condition")
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

index 5e257a600ceaa2fa934f2e5cc26cb9b9d351c9d9..ed2f67822f45912557d08c26ff46d10c57473af9 100644 (file)
@@ -1646,7 +1646,7 @@ static int vmw_kms_check_topology(struct drm_device *dev,
                struct drm_connector_state *conn_state;
                struct vmw_connector_state *vmw_conn_state;
 
-               if (!du->pref_active) {
+               if (!du->pref_active && new_crtc_state->enable) {
                        ret = -EINVAL;
                        goto clean;
                }