Re: [PATCH v2 4/4] drm/i915/fbc: Use PLANE_HAS_FENCE to determine if the plane is fenced

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

 



Quoting Ville Syrjälä (2018-02-20 13:59:53)
> On Tue, Feb 20, 2018 at 01:42:08PM +0000, Chris Wilson wrote:
> > Rather than trusting the cached value of plane_state->vma->fence to
> > imply whether the plane_state itself holds a reference on the
> > framebuffer's fence, use the information provided in the
> > plane_state->flags (PLANE_HAS_FENCE). Note that we still assume that FBC
> > is entirely bounded by the plane_state active life span; it's not clear
> > if that is a safe assumption.
> > 
> > Suggested-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.h  |  2 ++
> >  drivers/gpu/drm/i915/intel_fbc.c | 13 +++++++++----
> >  2 files changed, 11 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 20575b3ee406..848dc8f68b47 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -667,6 +667,7 @@ struct intel_fbc {
> >        */
> >       struct intel_fbc_state_cache {
> >               struct i915_vma *vma;
> > +             unsigned long flags;
> >  
> >               struct {
> >                       unsigned int mode_flags;
> > @@ -705,6 +706,7 @@ struct intel_fbc {
> >        */
> >       struct intel_fbc_reg_params {
> >               struct i915_vma *vma;
> > +             unsigned long flags;
> >  
> >               struct {
> >                       enum pipe pipe;
> > diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
> > index d7d1ac79c38a..f66f6fb5743d 100644
> > --- a/drivers/gpu/drm/i915/intel_fbc.c
> > +++ b/drivers/gpu/drm/i915/intel_fbc.c
> > @@ -183,7 +183,7 @@ static void g4x_fbc_activate(struct drm_i915_private *dev_priv)
> >       else
> >               dpfc_ctl |= DPFC_CTL_LIMIT_1X;
> >  
> > -     if (params->vma->fence) {
> > +     if (params->flags & PLANE_HAS_FENCE) {
> 
> These checks seem redundant now that we shouldn't even try to enable fbc
> without the fence. But they're not harming anyone (well, apart from making
> the code a bit inconsistent by not having the check in the fbc1 codepath).

I'm always optimistic fenceless FBC will make a comeback.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux