Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: jani.nikula@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [RFC 4/6] drm/i915: Get right max plane stride
Date: Thu, 23 Jan 2020 15:50:54 +0200	[thread overview]
Message-ID: <20200123135054.GN13686@intel.com> (raw)
In-Reply-To: <20200123132659.725-5-anshuman.gupta@intel.com>

On Thu, Jan 23, 2020 at 06:56:57PM +0530, Anshuman Gupta wrote:
> intel_plane_fb_max_stride should return the max stride of
> primary plane for first available pipe in intel device info
> pipe_mask.
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index b250b31f6000..b9209b7e71d7 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -2703,12 +2703,15 @@ u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
>  {
>  	struct intel_crtc *crtc;
>  	struct intel_plane *plane;
> +	enum pipe pipe;
>  
>  	/*
>  	 * We assume the primary plane for pipe A has
> -	 * the highest stride limits of them all.
> +	 * the highest stride limits of them all,
> +	 * if in case pipe A is disabled, use the first pipe from pipe_mask.
>  	 */
> -	crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_A);
> +	pipe = ffs(INTEL_INFO(dev_priv)->pipe_mask) - 1;
> +	crtc = intel_get_crtc_for_pipe(dev_priv, pipe);

I'd probably just add a small helper for this. Eg.:

intel_get_first_crtc()
{
	return to_intel_crtc(drm_crtc_from_index(0))
}

>  	if (!crtc)
>  		return 0;
>  
> -- 
> 2.24.0

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-01-23 13:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 13:26 [Intel-gfx] [RFC 0/6] 3 display pipes combination system support Anshuman Gupta
2020-01-23 13:26 ` [Intel-gfx] [RFC 1/6] drm/i915: Iterate over pipe and skip the disabled one Anshuman Gupta
2020-01-23 13:48   ` Jani Nikula
2020-01-24 11:59     ` Anshuman Gupta
2020-01-24 12:15       ` Jani Nikula
2020-01-24 12:19         ` Anshuman Gupta
2020-01-24 13:34           ` Jani Nikula
2020-01-23 13:26 ` [Intel-gfx] [RFC 2/6] drm/i915: Remove (pipe == crtc->index) asummption Anshuman Gupta
2020-01-23 13:40   ` Ville Syrjälä
2020-01-30 12:02     ` Anshuman Gupta
2020-01-30 13:35       ` Ville Syrjälä
2020-01-30 15:27         ` Ville Syrjälä
2020-01-23 13:49   ` Jani Nikula
2020-01-23 13:26 ` [Intel-gfx] [RFC 3/6] drm/i915: Fix wrongly populated plane possible_crtcs bit mask Anshuman Gupta
2020-01-23 13:47   ` Ville Syrjälä
2020-01-23 13:26 ` [Intel-gfx] [RFC 4/6] drm/i915: Get right max plane stride Anshuman Gupta
2020-01-23 13:50   ` Ville Syrjälä [this message]
2020-01-23 13:26 ` [Intel-gfx] [RFC 5/6] drm/i915: Add WARN_ON in intel_get_crtc_for_pipe() Anshuman Gupta
2020-01-23 13:52   ` Ville Syrjälä
2020-01-23 13:26 ` [Intel-gfx] [RFC 6/6] drm/i915: Enable 3 display pipes support Anshuman Gupta
2020-01-23 13:53   ` Ville Syrjälä
2020-01-23 21:38 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for 3 display pipes combination system support Patchwork
2020-01-23 22:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-01-25 13:08 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=20200123135054.GN13686@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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