> -----Original Message-----
> From: Ville Syrjälä <[email protected]>
> Sent: Friday, February 28, 2025 10:02 PM
> To: Borah, Chaitanya Kumar <[email protected]>
> Cc: [email protected]; [email protected]; Shankar,
> Uma <[email protected]>
> 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 <[email protected]>
> > ---
> >  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.

Regards

Chaitanya

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

Reply via email to