Re: [PATCH v3 09/16] drm/i915: Fix MTL initial plane readout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 22, 2024 at 03:09:23PM +0000, Shankar, Uma wrote:
> 
> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Ville
> > Syrjala
> > Sent: Tuesday, January 16, 2024 1:26 PM
> > To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > Subject: [PATCH v3 09/16] drm/i915: Fix MTL initial plane readout
> > 
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > MTL stolen memory looks more like local memory, so use the (now fixed) lmem
> > path when doing the initial plane readout.
> 
> Looks Good to me.
> Reviewed-by: Uma Shankar <uma.shankar@xxxxxxxxx>
> 
> > Cc: Paz Zcharya <pazz@xxxxxxxxxxxx>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Hi Ville,

Thank you so much for this incredible series.
It solves the issue regarding MTL initial plane readout
that Andrzej Hajda and I worked on in
https://patchwork.freedesktop.org/patch/570811/?series=127130&rev=2
In addition, it solved the issue with the new GOP.

I tested it on two different devices with Meteor Lake and it worked perfectly:
no i915 errors, no flickers or observable issues.

Tested-by: Paz Zcharya <pazz@xxxxxxxxxxxx>

> > ---
> >  .../drm/i915/display/intel_plane_initial.c    | 25 +++++++++++++------
> >  1 file changed, 18 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c
> > b/drivers/gpu/drm/i915/display/intel_plane_initial.c
> > index db594ccf0323..c72d4cacf631 100644
> > --- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
> > +++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
> > @@ -59,7 +59,7 @@ initial_plane_vma(struct drm_i915_private *i915,
> >  		return NULL;
> > 
> >  	base = round_down(plane_config->base, I915_GTT_MIN_ALIGNMENT);
> > -	if (IS_DGFX(i915)) {
> > +	if (IS_DGFX(i915) || HAS_LMEMBAR_SMEM_STOLEN(i915)) {
> >  		gen8_pte_t __iomem *gte = to_gt(i915)->ggtt->gsm;
> >  		gen8_pte_t pte;
> > 
> > @@ -73,11 +73,20 @@ initial_plane_vma(struct drm_i915_private *i915,
> >  		}
> > 
> >  		phys_base = pte & GEN12_GGTT_PTE_ADDR_MASK;
> > -		mem = i915->mm.regions[INTEL_REGION_LMEM_0];
> > +
> > +		if (IS_DGFX(i915))
> > +			mem = i915->mm.regions[INTEL_REGION_LMEM_0];
> > +		else
> > +			mem = i915->mm.stolen_region;
> > +		if (!mem) {
> > +			drm_dbg_kms(&i915->drm,
> > +				    "Initial plane memory region not
> > initialized\n");
> > +			return NULL;
> > +		}
> > 
> >  		/*
> > -		 * We don't currently expect this to ever be placed in the
> > -		 * stolen portion.
> > +		 * On lmem we don't currently expect this to
> > +		 * ever be placed in the stolen portion.
> >  		 */
> >  		if (phys_base < mem->region.start || phys_base > mem-
> > >region.end) {
> >  			drm_err(&i915->drm,
> > @@ -94,11 +103,13 @@ initial_plane_vma(struct drm_i915_private *i915,
> >  	} else {
> >  		phys_base = base;
> >  		mem = i915->mm.stolen_region;
> > +		if (!mem) {
> > +			drm_dbg_kms(&i915->drm,
> > +				    "Initial plane memory region not
> > initialized\n");
> > +			return NULL;
> > +		}
> >  	}
> > 
> > -	if (!mem)
> > -		return NULL;
> > -
> >  	size = round_up(plane_config->base + plane_config->size,
> >  			mem->min_page_size);
> >  	size -= base;
> > --
> > 2.41.0
> 



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux