All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Gupta <anshuman.gupta@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/7] drm/i915: Fix wrongly populated plane possible_crtcs bit mask
Date: Thu, 6 Feb 2020 15:45:38 +0530	[thread overview]
Message-ID: <20200206101537.GK24118@intel.com> (raw)
In-Reply-To: <20200204164432.GB13686@intel.com>

On 2020-02-04 at 18:44:32 +0200, Ville Syrjälä wrote:
> On Tue, Feb 04, 2020 at 04:30:16PM +0200, Ville Syrjälä wrote:
> > On Tue, Feb 04, 2020 at 04:59:24PM +0530, Anshuman Gupta wrote:
> > > As a disabled pipe in pipe_mask is not having a valid intel crtc,
> > > driver wrongly populates the possible_crtcs mask while initializing
> > > the plane for a CRTC. Fixing up the plane possible_crtc mask.
> > > 
> > > changes since RFC:
> > > - Simplify the possible_crtcs initialization. [Ville]
> > > 
> > > 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 | 12 ++++++++++++
> > >  drivers/gpu/drm/i915/display/intel_sprite.c  |  2 --
> > >  2 files changed, 12 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > > index cf36c3d0f8fc..7c51eb3faeb3 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > > @@ -16407,6 +16407,17 @@ static void intel_crtc_free(struct intel_crtc *crtc)
> > >  	kfree(crtc);
> > >  }
> > >  
> > > +static void intel_plane_possible_crtc_init(struct drm_i915_private *dev_priv)
> > > +{
> > > +	struct intel_crtc *crtc;
> > 
> > Move this declaration into the loop body.
> > 
> > With that
> > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Thanks Ville for review, I will move it to loop body.
Thanks,
Anshuman
> > 
> > > +	struct intel_plane *plane;
> > > +
> > > +	for_each_intel_plane(&dev_priv->drm, plane) {
> > > +		crtc = intel_get_crtc_for_pipe(dev_priv, plane->pipe);
> > > +		plane->base.possible_crtcs = drm_crtc_mask(&crtc->base);
> > > +	}
> > > +}
> > > +
> > >  static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
> > >  {
> > >  	struct intel_plane *primary, *cursor;
> > > @@ -17546,6 +17557,7 @@ int intel_modeset_init(struct drm_i915_private *i915)
> > >  		}
> > >  	}
> > >  
> > > +	intel_plane_possible_crtc_init(i915);
> > >  	intel_shared_dpll_init(dev);
> > >  	intel_update_fdi_pll_freq(i915);
> > >  
> > > diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
> > > index fca77ec1e0dd..4a5b192678bf 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_sprite.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
> > > @@ -3023,8 +3023,6 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
> > >  	else
> > >  		plane_type = DRM_PLANE_TYPE_OVERLAY;
> > >  
> > > -	possible_crtcs = BIT(pipe);
> > > -
> 
> Actually that now contains stack garbage. Pls remove the variable
> entire and just pass zero to the thing.
> 
> > >  	ret = drm_universal_plane_init(&dev_priv->drm, &plane->base,
> > >  				       possible_crtcs, plane_funcs,
> > >  				       formats, num_formats, modifiers,
> > > -- 
> > > 2.24.0
> > 
> > -- 
> > Ville Syrjälä
> > Intel
> 
> -- 
> 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-02-06 10:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 11:29 [Intel-gfx] [PATCH 0/7] 3 display pipes combination system support Anshuman Gupta
2020-02-04 11:29 ` [Intel-gfx] [PATCH 1/7] drm/i915: Iterate over pipe and skip the disabled one Anshuman Gupta
2020-02-04 11:29 ` [Intel-gfx] [PATCH 2/7] drm/i915: Remove (pipe == crtc->index) assumption Anshuman Gupta
2020-02-04 11:52   ` Jani Nikula
2020-02-04 14:36   ` Ville Syrjälä
2020-02-05  8:02     ` Anshuman Gupta
2020-02-05 11:07       ` Ville Syrjälä
2020-02-04 11:29 ` [Intel-gfx] [PATCH 3/7] drm/i915: Fix broken transcoder err state Anshuman Gupta
2020-02-04 14:28   ` Ville Syrjälä
2020-02-04 16:37     ` Jani Nikula
2020-02-06 10:23       ` Anshuman Gupta
2020-02-04 11:29 ` [Intel-gfx] [PATCH 4/7] drm/i915: Fix wrongly populated plane possible_crtcs bit mask Anshuman Gupta
2020-02-04 14:30   ` Ville Syrjälä
2020-02-04 16:44     ` Ville Syrjälä
2020-02-06 10:15       ` Anshuman Gupta [this message]
2020-02-04 11:29 ` [Intel-gfx] [PATCH 5/7] drm/i915: Get right max plane stride Anshuman Gupta
2020-02-04 14:30   ` Ville Syrjälä
2020-02-04 11:29 ` [Intel-gfx] [PATCH 6/7] drm/i915: Add WARN_ON in intel_get_crtc_for_pipe() Anshuman Gupta
2020-02-04 11:29 ` [Intel-gfx] [PATCH 7/7] drm/i915: Enable 3 display pipes support Anshuman Gupta
2020-02-04 14:35   ` Ville Syrjälä
2020-02-05  1:36 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for 3 display pipes combination system support (rev2) 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=20200206101537.GK24118@intel.com \
    --to=anshuman.gupta@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.