[PATCH 06/16] drm/i915: Ensure intel_state->active_crtcs is always set

Matt Roper
2016-04-01T01:47:48Z

We currently only setup intel_state->active_crtcs if we plan to modify
it and write the modification back to dev_priv. Let's ensure that
this value is always valid, even when it isn't changing as part of an
atomic transaction.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e6b5ee5..ab1fc3d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13185,7 +13185,6 @@ static int intel_modeset_checks(struct drm_atomic_state *state)
}

intel_state->modeset = true;
- intel_state->active_crtcs = dev_priv->active_crtcs;

for_each_crtc_in_state(state, crtc, crtc_state, i) {
if (crtc_state->active)
@@ -13281,6 +13280,8 @@ static int intel_atomic_check(struct drm_device *dev,
if (ret)
return ret;

+ intel_state->active_crtcs = dev_priv->active_crtcs;
+
for_each_crtc_in_state(state, crtc, crtc_state, i) {
struct intel_crtc_state *pipe_config =
to_intel_crtc_state(crtc_state);