Commit d321634b authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Manasi Navare

drm/i915: Add crtcs affected by bigjoiner to the state

Make sure both crtcs participating in the bigjoiner stuff
are in the state.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
Signed-off-by: default avatarManasi Navare <manasi.d.navare@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-8-manasi.d.navare@intel.com
parent 0385ecea
...@@ -15461,6 +15461,27 @@ static int intel_atomic_check_async(struct intel_atomic_state *state) ...@@ -15461,6 +15461,27 @@ static int intel_atomic_check_async(struct intel_atomic_state *state)
return 0; return 0;
} }
static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
{
const struct intel_crtc_state *crtc_state;
struct intel_crtc *crtc;
int i;
for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
struct intel_crtc_state *linked_crtc_state;
if (!crtc_state->bigjoiner)
continue;
linked_crtc_state = intel_atomic_get_crtc_state(&state->base,
crtc_state->bigjoiner_linked_crtc);
if (IS_ERR(linked_crtc_state))
return PTR_ERR(linked_crtc_state);
}
return 0;
}
/** /**
* intel_atomic_check - validate state object * intel_atomic_check - validate state object
* @dev: drm device * @dev: drm device
...@@ -15486,6 +15507,10 @@ static int intel_atomic_check(struct drm_device *dev, ...@@ -15486,6 +15507,10 @@ static int intel_atomic_check(struct drm_device *dev,
if (ret) if (ret)
goto fail; goto fail;
ret = intel_bigjoiner_add_affected_crtcs(state);
if (ret)
goto fail;
for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
new_crtc_state, i) { new_crtc_state, i) {
if (!needs_modeset(new_crtc_state)) { if (!needs_modeset(new_crtc_state)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment