Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Navare, Manasi" <manasi.d.navare@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/4] drm/i915: Call kill_bigjoiner_slave() earlier
Date: Mon, 30 Nov 2020 14:50:22 -0800	[thread overview]
Message-ID: <20201130225022.GB17815@labuser-Z97X-UD5H> (raw)
In-Reply-To: <20201124201156.17095-4-ville.syrjala@linux.intel.com>

On Tue, Nov 24, 2020 at 10:11:56PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Let's do the kill_bigjoiner_slave() thing from
> intel_bigjoiner_add_affected_crtcs() since it's related to
> what we do there. This cleans up the logic in the
> compute_config() loop a bit.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 25 ++++++++------------
>  1 file changed, 10 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 04dad3baf8a0..a1eed30b2e0c 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -15373,21 +15373,16 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  	return -EINVAL;
>  }
>  
> -static int kill_bigjoiner_slave(struct intel_atomic_state *state,
> -				struct intel_crtc_state *master_crtc_state)
> +static void kill_bigjoiner_slave(struct intel_atomic_state *state,
> +				 struct intel_crtc_state *master_crtc_state)
>  {
>  	struct intel_crtc_state *slave_crtc_state =
> -		intel_atomic_get_crtc_state(&state->base,
> -					    master_crtc_state->bigjoiner_linked_crtc);
> -
> -	if (IS_ERR(slave_crtc_state))
> -		return PTR_ERR(slave_crtc_state);
> +		intel_atomic_get_new_crtc_state(state, master_crtc_state->bigjoiner_linked_crtc);
>  
>  	slave_crtc_state->bigjoiner = master_crtc_state->bigjoiner = false;
>  	slave_crtc_state->bigjoiner_slave = master_crtc_state->bigjoiner_slave = false;
>  	slave_crtc_state->bigjoiner_linked_crtc = master_crtc_state->bigjoiner_linked_crtc = NULL;
>  	intel_crtc_copy_uapi_to_hw_state(state, slave_crtc_state);
> -	return 0;
>  }
>  
>  /**
> @@ -15557,6 +15552,13 @@ static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
>  			return ret;
>  	}
>  
> +	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
> +		/* Kill old bigjoiner link, we may re-establish afterwards */
> +		if (needs_modeset(crtc_state) &&
> +		    crtc_state->bigjoiner && !crtc_state->bigjoiner_slave)
> +			kill_bigjoiner_slave(state, crtc_state);
> +	}
> +
>  	return 0;
>  }
>  
> @@ -15598,13 +15600,6 @@ static int intel_atomic_check(struct drm_device *dev,
>  			continue;
>  		}
>  
> -		/* Kill old bigjoiner link, we may re-establish afterwards */
> -		if (old_crtc_state->bigjoiner && !old_crtc_state->bigjoiner_slave) {
> -			ret = kill_bigjoiner_slave(state, new_crtc_state);
> -			if (ret)
> -				goto fail;
> -		}
> -
>  		if (!new_crtc_state->uapi.enable) {
>  			if (!new_crtc_state->bigjoiner_slave) {
>  				intel_crtc_copy_uapi_to_hw_state(state, new_crtc_state);
> -- 
> 2.26.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-11-30 22:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 20:11 [Intel-gfx] [PATCH 1/4] drm/i915: Track logically enabled planes for hw state Ville Syrjala
2020-11-24 20:11 ` [Intel-gfx] [PATCH 2/4] drm/i915: Add intel_atomic_add_affected_planes() Ville Syrjala
2020-11-30 22:51   ` Navare, Manasi
2020-11-24 20:11 ` [Intel-gfx] [PATCH 3/4] drm/i915: Properly flag modesets for all bigjoiner pipes Ville Syrjala
2020-11-30 22:49   ` Navare, Manasi
2020-11-24 20:11 ` [Intel-gfx] [PATCH 4/4] drm/i915: Call kill_bigjoiner_slave() earlier Ville Syrjala
2020-11-30 22:50   ` Navare, Manasi [this message]
2020-11-24 21:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Track logically enabled planes for hw state Patchwork
2020-11-24 21:58 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-11-24 22:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-11-25  4:00 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-11-30 22:53 ` [Intel-gfx] [PATCH 1/4] " Navare, Manasi
2020-12-01 17:17   ` Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201130225022.GB17815@labuser-Z97X-UD5H \
    --to=manasi.d.navare@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox