瀏覽代碼

drm/atomic: Clear crtc_state->active in drm_atomic_helper_set_config.

This fixes some regressions in i915 when converting to atomic.
set_config failed with -EINVAL, and I received the following warning
in dmesg:

[drm:drm_atomic_crtc_check] [CRTC:20] active without enabled

Solve this by clearing active when a crtc is disabled.

Because crtc_state->enable implies that connectors are active the
change from disabled->enabled can only happen for the crtc that's
being set_config'd, and checking for !crtc_state->enable is sufficient
here.

Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Maarten Lankhorst 10 年之前
父節點
當前提交
9b5edbf7a4
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/gpu/drm/drm_atomic_helper.c

+ 2 - 0
drivers/gpu/drm/drm_atomic_helper.c

@@ -1563,6 +1563,8 @@ static int update_output_state(struct drm_atomic_state *state,
 
 
 		crtc_state->enable =
 		crtc_state->enable =
 			drm_atomic_connectors_for_crtc(state, crtc);
 			drm_atomic_connectors_for_crtc(state, crtc);
+		if (!crtc_state->enable)
+			crtc_state->active = false;
 	}
 	}
 
 
 	return 0;
 	return 0;