Re: [PATCH 05/15] drm/i915: Drop schedule_back from psr_exit

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

 



On Mon, Jun 16, 2014 at 05:06:06PM -0700, Rodrigo Vivi wrote:
> There were more reasons for disabling it on Baytrail... but you are right..
> disable sequence should be better for those cases.
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

Well I should mention that later on we'll split this into psr_invalidate
and psr_flush again. But meanwhile this helps to simplify the code a bit
for the transition. I'll improve the commit message a bit.
-Daniel

> 
> 
> On Mon, Jun 16, 2014 at 10:51 AM, Daniel Vetter <daniel.vetter@xxxxxxxx>
> wrote:
> 
> > It doesn't make sense to never again schedule the work, since by the
> > time we might want to re-enable psr the world might have changed and
> > we can do it again.
> >
> > The only exception is when we shut down the pipe, but that's an
> > entirely different thing and needs to be handled in psr_disable.
> >
> > Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c      | 6 +++---
> >  drivers/gpu/drm/i915/intel_display.c | 4 ++--
> >  drivers/gpu/drm/i915/intel_dp.c      | 7 +++----
> >  drivers/gpu/drm/i915/intel_drv.h     | 2 +-
> >  drivers/gpu/drm/i915/intel_sprite.c  | 2 +-
> >  5 files changed, 10 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c
> > b/drivers/gpu/drm/i915/i915_gem.c
> > index 1794a041c13c..f22b4aabb945 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -1395,7 +1395,7 @@ i915_gem_set_domain_ioctl(struct drm_device *dev,
> > void *data,
> >                 goto unlock;
> >         }
> >
> > -       intel_edp_psr_exit(dev, true);
> > +       intel_edp_psr_exit(dev);
> >
> >         /* Try to flush the object off the GPU without holding the lock.
> >          * We will repeat the flush holding the lock in the normal manner
> > @@ -1442,7 +1442,7 @@ i915_gem_sw_finish_ioctl(struct drm_device *dev,
> > void *data,
> >         if (ret)
> >                 return ret;
> >
> > -       intel_edp_psr_exit(dev, true);
> > +       intel_edp_psr_exit(dev);
> >
> >         obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle));
> >         if (&obj->base == NULL) {
> > @@ -4240,7 +4240,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void
> > *data,
> >         if (ret)
> >                 return ret;
> >
> > -       intel_edp_psr_exit(dev, true);
> > +       intel_edp_psr_exit(dev);
> >
> >         obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle));
> >         if (&obj->base == NULL) {
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index c27dadebd0dc..6f2588c95248 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -8823,7 +8823,7 @@ void intel_mark_fb_busy(struct drm_i915_gem_object
> > *obj,
> >         struct drm_device *dev = obj->base.dev;
> >         struct drm_crtc *crtc;
> >
> > -       intel_edp_psr_exit(dev, true);
> > +       intel_edp_psr_exit(dev);
> >
> >         if (!i915.powersave)
> >                 return;
> > @@ -9292,7 +9292,7 @@ static int intel_crtc_page_flip(struct drm_crtc
> > *crtc,
> >                 return -ENOMEM;
> >
> >         /* Exit PSR early in page flip */
> > -       intel_edp_psr_exit(dev, true);
> > +       intel_edp_psr_exit(dev);
> >
> >         work->event = event;
> >         work->crtc = crtc;
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c
> > b/drivers/gpu/drm/i915/intel_dp.c
> > index 4ab4757fb53d..c7d625040e3d 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -1899,7 +1899,7 @@ static void intel_edp_psr_inactivate(struct
> > drm_device *dev)
> >                    & ~EDP_PSR_ENABLE);
> >  }
> >
> > -void intel_edp_psr_exit(struct drm_device *dev, bool schedule_back)
> > +void intel_edp_psr_exit(struct drm_device *dev)
> >  {
> >         struct drm_i915_private *dev_priv = dev->dev_private;
> >
> > @@ -1911,9 +1911,8 @@ void intel_edp_psr_exit(struct drm_device *dev, bool
> > schedule_back)
> >         if (dev_priv->psr.active)
> >                 intel_edp_psr_inactivate(dev);
> >
> > -       if (schedule_back)
> > -               schedule_delayed_work(&dev_priv->psr.work,
> > -                                     msecs_to_jiffies(100));
> > +       schedule_delayed_work(&dev_priv->psr.work,
> > +                             msecs_to_jiffies(100));
> >  }
> >
> >  void intel_edp_psr_init(struct drm_device *dev)
> > diff --git a/drivers/gpu/drm/i915/intel_drv.h
> > b/drivers/gpu/drm/i915/intel_drv.h
> > index 87e83c315c4b..1d45629a6483 100644
> > --- a/drivers/gpu/drm/i915/intel_drv.h
> > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > @@ -829,7 +829,7 @@ void intel_edp_panel_off(struct intel_dp *intel_dp);
> >  void intel_edp_psr_enable(struct intel_dp *intel_dp);
> >  void intel_edp_psr_disable(struct intel_dp *intel_dp);
> >  void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate);
> > -void intel_edp_psr_exit(struct drm_device *dev, bool schedule_back);
> > +void intel_edp_psr_exit(struct drm_device *dev);
> >  void intel_edp_psr_init(struct drm_device *dev);
> >
> >
> > diff --git a/drivers/gpu/drm/i915/intel_sprite.c
> > b/drivers/gpu/drm/i915/intel_sprite.c
> > index 2a211c64ec8d..9038e2ab73c8 100644
> > --- a/drivers/gpu/drm/i915/intel_sprite.c
> > +++ b/drivers/gpu/drm/i915/intel_sprite.c
> > @@ -1051,7 +1051,7 @@ intel_update_plane(struct drm_plane *plane, struct
> > drm_crtc *crtc,
> >                 mutex_unlock(&dev->struct_mutex);
> >         }
> >
> > -       intel_edp_psr_exit(dev, true);
> > +       intel_edp_psr_exit(dev);
> >
> >         return 0;
> >  }
> > --
> > 2.0.0
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >
> 
> 
> 
> -- 
> Rodrigo Vivi
> Blog: http://blog.vivi.eng.br

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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