[Intel-gfx] [PATCH] drm/i915: Wait until after wm optimization to drop runtime PM reference

Matt Roper matthew.d.roper at intel.com
Mon Mar 7 16:26:01 UTC 2016

On Mon, Mar 07, 2016 at 12:53:38PM +0100, Maarten Lankhorst wrote:
> Op 05-03-16 om 00:59 schreef Matt Roper:
> > At the end of an atomic commit, we currently wait for vblanks to
> > complete, call put() on the various runtime PM references, and then try
> > to optimize our watermarks (on platforms that need two-step watermark
> > programming).  This can lead to watermark registers being programmed
> > while the power well is powered down.  We need to wait until after
> > watermark optimization is complete before dropping our runtime power
> > references.
> >
> > Note that in the future the watermark optimization is probably going to
> > move to an asynchronous workqueue task that happens at some arbitrary
> > point after vblank.  When we make that change, we'll no longer
> > necessarily be operating under the power reference held here, so we'll
> > need to wrap the watermark register programmin in a call to
> > intel_runtime_pm_get_if_in_use() or similar.
> >
> > Cc: arun.siluvery at linux.intel.com
> > Cc: ville.syrjala at linux.intel.com
> > Cc: maarten.lankhorst at linux.intel.com
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94349
> > Fixes: ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)")
> > Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> post_plane_update can call intel_update_watermarks, will this cause any unintended behavioral changes
> if intel_update_watermarks is called before optimize_watermarks?

It shouldn't; intel_update_watermarks is the legacy watermark
programming function.  Any platform that that's been converted to atomic
shouldn't have a dev_priv->display.update_wm vfunc, so
intel_update_watermarks will be a noop.


> ~Maarten

Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795

More information about the Intel-gfx mailing list