[Intel-gfx] [PATCH 15/23] drm/i915: Add crtcs affected by bigjoiner to the state
Navare, Manasi
manasi.d.navare at intel.com
Mon Nov 16 23:37:32 UTC 2020
On Sat, Nov 14, 2020 at 12:03:50AM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Make sure both crtcs participating in the bigjoiner stuff
> are in the state.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare at intel.com>
Manasi
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 25 ++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 07bee5caacfe..465877097582 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -15422,6 +15422,27 @@ static int intel_atomic_check_async(struct intel_atomic_state *state)
> 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
> * @dev: drm device
> @@ -15447,6 +15468,10 @@ static int intel_atomic_check(struct drm_device *dev,
> if (ret)
> 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,
> new_crtc_state, i) {
> if (!needs_modeset(new_crtc_state)) {
> --
> 2.26.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list