RE: [PATCH 2/2] drm/i915/display: Don't wait for vblank for LUT DSB programming

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

 



Hi Ville

> -----Original Message-----
> From: Borah, Chaitanya Kumar
> Sent: Tuesday, March 4, 2025 8:02 PM
> To: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Cc: intel-xe@xxxxxxxxxxxxxxxxxxxxx; intel-gfx@xxxxxxxxxxxxxxxxxxxxx; Shankar,
> Uma <uma.shankar@xxxxxxxxx>
> Subject: RE: [PATCH 2/2] drm/i915/display: Don't wait for vblank for LUT DSB
> programming
> 
> > -----Original Message-----
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > Sent: Friday, February 28, 2025 10:02 PM
> > To: Borah, Chaitanya Kumar <chaitanya.kumar.borah@xxxxxxxxx>
> > Cc: intel-xe@xxxxxxxxxxxxxxxxxxxxx; intel-gfx@xxxxxxxxxxxxxxxxxxxxx;
> > Shankar, Uma <uma.shankar@xxxxxxxxx>
> > Subject: Re: [PATCH 2/2] drm/i915/display: Don't wait for vblank for
> > LUT DSB programming
> >
> > On Tue, Feb 25, 2025 at 11:39:05PM +0530, Chaitanya Kumar Borah wrote:
> > > >From PTL, LUT registers are made double buffered. With this change,
> > > we don't need to wait for vblank to program them. Start DSB1 for
> > > programming them without waiting for vblank.
> > >
> > > Signed-off-by: Chaitanya Kumar Borah
> > > <chaitanya.kumar.borah@xxxxxxxxx>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_display.c | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> > > b/drivers/gpu/drm/i915/display/intel_display.c
> > > index 919e236a9650..9c3fdfcd6759 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > > @@ -7352,6 +7352,7 @@ static void intel_atomic_dsb_finish(struct
> > > intel_atomic_state *state,  {
> > >  	struct intel_crtc_state *new_crtc_state =
> > >  		intel_atomic_get_new_crtc_state(state, crtc);
> > > +	struct intel_display *display = to_intel_display(state);
> > >
> > >  	if (!new_crtc_state->use_dsb && !new_crtc_state->dsb_color_vblank)
> > >  		return;
> > > @@ -7408,7 +7409,8 @@ static void intel_atomic_dsb_finish(struct
> > > intel_atomic_state *state,
> > >
> > >  	if (new_crtc_state->dsb_color_vblank)
> > >  		intel_dsb_chain(state, new_crtc_state->dsb_commit,
> > > -				new_crtc_state->dsb_color_vblank, true);
> > > +				new_crtc_state->dsb_color_vblank,
> > > +				HAS_DOUBLE_BUFFERED_LUT(display) ? false
> > : true);
> >
> > Using chaining for this is a bit ugly. GOSUB would seem more appropriate.
> > Here's a quick 1h effort to implement the basics for that (completely
> > untested):
> > https://github.com/vsyrjala/linux.git dsb_gosub
> >
> 
> Thank you, Ville, for sharing this, I will give it a try.
> 

While I fix the MMIO path, here is a working implementation of gosub

https://github.com/ckborah/drm-tip-sandbox/tree/db_gamma_v3

Change made on top of patches in [1]

-  Correct head/tail pointer alignment for GOSUB command
-  Add intel_gosub_dsb_finish() to align and flush the GOSUB buffer
-  Add handling of DSB_GOSUB_INT_STATUS

Regards

Chaitanya


[1] https://github.com/vsyrjala/linux.git dsb_gosub

> Regards
> 
> Chaitanya
> 
> > >
> > >  	intel_dsb_finish(new_crtc_state->dsb_commit);
> > >  }
> > > --
> > > 2.25.1
> >
> > --
> > Ville Syrjälä
> > Intel




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

  Powered by Linux