public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 10/14] drm/i915: Populate possible_crtcs correctly
Date: Mon, 25 Jun 2018 11:37:27 -0700	[thread overview]
Message-ID: <1529951847.22930.8.camel@intel.com> (raw)
In-Reply-To: <20180625111018.GV20518@intel.com>

On Mon, 2018-06-25 at 14:10 +0300, Ville Syrjälä wrote:
> On Thu, Jun 21, 2018 at 06:26:04PM -0700, Dhinakaran Pandiyan wrote:
> > 
> > On Fri, 2018-06-15 at 19:49 +0300, Ville Syrjala wrote:
> > > 
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Don't advertize non-exisiting crtcs in the encoder possible_crtcs
> > > bitmask.
> > > 
> > How do we end up advertising non-existing CRTCs? encoder->crtc_mask
> > seems to be populated in the encoder init functions based on
> > possible
> > pipes. Do you mean pipe and crtc->index can potentially differ?
> No. Just that we may sometimes set BIT(PIPE_C) in crtc_mask when
> there are only two pipes on the device.
> 
Got it, thanks.
Since crtc_mask seems to be initialized based on the platform, we
should probably warn if we find out a bit is set incorrectly.

With or without that, this patch is
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>



> > 
> > 
> > 
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_display.c | 17 ++++++++++++++++-
> > >  1 file changed, 16 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > > b/drivers/gpu/drm/i915/intel_display.c
> > > index b095899d68a9..3fa9da714403 100644
> > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > @@ -13959,6 +13959,20 @@ static int intel_encoder_clones(struct
> > > intel_encoder *encoder)
> > >  	return index_mask;
> > >  }
> > >  
> > > +static int intel_encoder_crtcs(struct intel_encoder *encoder)
> > > +{
> > > +	struct drm_device *dev = encoder->base.dev;
> > > +	struct intel_crtc *crtc;
> > > +	int index_mask = 0;
> > > +
> > > +	for_each_intel_crtc(dev, crtc) {
> > > +		if (encoder->crtc_mask & BIT(crtc->pipe))
> > > +			index_mask |= drm_crtc_mask(&crtc-
> > > >base);
> > > +	}
> > > +
> > > +	return index_mask;
> > > +}
> > > +
> > >  static bool has_edp_a(struct drm_i915_private *dev_priv)
> > >  {
> > >  	if (!IS_MOBILE(dev_priv))
> > > @@ -14211,7 +14225,8 @@ static void intel_setup_outputs(struct
> > > drm_i915_private *dev_priv)
> > >  	intel_psr_init(dev_priv);
> > >  
> > >  	for_each_intel_encoder(&dev_priv->drm, encoder) {
> > > -		encoder->base.possible_crtcs = encoder-
> > > >crtc_mask;
> > > +		encoder->base.possible_crtcs =
> > > +			intel_encoder_crtcs(encoder);
> > >  		encoder->base.possible_clones =
> > >  			intel_encoder_clones(encoder);
> > >  	}
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-06-25 18:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-15 16:49 [PATCH 00/14] drm: Try to fix encoder possible_clones/crtcs Ville Syrjala
2018-06-15 16:49 ` [PATCH 01/14] drm: Add drm_encoder_mask() Ville Syrjala
2018-06-15 16:49 ` [PATCH 02/14] drm: Include the encoder itself in possible_clones Ville Syrjala
2018-06-15 16:49 ` [PATCH 03/14] drm/gma500: Sanitize possible_clones Ville Syrjala
2018-06-15 16:49 ` [PATCH 04/14] drm/sti: Remove pointless casts Ville Syrjala
2018-06-18  7:53   ` Benjamin Gaignard
2018-06-15 16:49 ` [PATCH 05/14] drm/sti: Try to fix up the tvout possible clones Ville Syrjala
2018-06-18  8:16   ` Benjamin Gaignard
2018-06-18 12:38   ` [PATCH v2 " Ville Syrjala
2018-06-20  9:02     ` Benjamin Gaignard
2018-06-15 16:49 ` [PATCH 06/14] drm/exynos: Use drm_encoder_mask() Ville Syrjala
2018-06-15 16:49 ` [PATCH 07/14] drm/imx: Remove the bogus possible_clones setup Ville Syrjala
2018-06-15 16:49 ` [PATCH 08/14] drm: Validate encoder->possible_clones Ville Syrjala
2018-06-15 16:49 ` [PATCH 09/14] drm/i915: Use drm_encoder_mask() Ville Syrjala
2018-06-15 16:49 ` [PATCH 10/14] drm/i915: Populate possible_crtcs correctly Ville Syrjala
2018-06-22  1:26   ` Dhinakaran Pandiyan
2018-06-25 11:10     ` Ville Syrjälä
2018-06-25 18:37       ` Dhinakaran Pandiyan [this message]
2018-06-15 16:49 ` [PATCH 11/14] drm/i915: Fix DP-MST crtc_mask Ville Syrjala
2018-06-15 18:33   ` Dhinakaran Pandiyan
2018-06-15 18:43     ` Ville Syrjälä
2018-06-22  0:36       ` [Intel-gfx] " Dhinakaran Pandiyan
2018-06-15 16:49 ` [PATCH 12/14] drm/i915: Clean up encoder->crtc_mask setup Ville Syrjala
2018-06-18 18:27   ` Jani Nikula
2018-06-15 16:49 ` [PATCH 13/14] drm/i915: Simplfy LVDS crtc_mask setup Ville Syrjala
2018-06-15 16:49 ` [PATCH 14/14] drm: Validate encoder->possible_crtcs Ville Syrjala

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=1529951847.22930.8.camel@intel.com \
    --to=dhinakaran.pandiyan@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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