[Intel-gfx] [RFC 8/8] drm/i915: Add two-stage ILK-style watermark programming (v2)

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon Jul 6 05:20:00 PDT 2015


Op 02-07-15 om 04:26 schreef Matt Roper:
> From: Matt Roper <matt at mattrope.com>
>
> In addition to calculating final watermarks, let's also pre-calculate a
> set of intermediate watermark values at atomic check time.  These
> intermediate watermarks are a combination of the watermarks for the old
> state and the new state; they should satisfy the requirements of both
> states which means they can be programmed immediately when we commit the
> atomic state (without waiting for a vblank).  Once the vblank does
> happen, we can then re-program watermarks to the more optimal final
> value.
>
> v2: Significant rebasing/rewriting.
>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h      |  9 +++++
>  drivers/gpu/drm/i915/i915_irq.c      |  7 ++++
>  drivers/gpu/drm/i915/intel_display.c | 34 +++++++++++++++-
>  drivers/gpu/drm/i915/intel_drv.h     | 26 +++++++++----
>  drivers/gpu/drm/i915/intel_pm.c      | 75 ++++++++++++++++++++++++++++++------
>  5 files changed, 130 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 5ad942e..42397e2 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -623,6 +623,9 @@ struct drm_i915_display_funcs {
>  			  struct dpll *best_clock);
>  	int (*compute_pipe_wm)(struct drm_crtc *crtc,
>  			       struct drm_atomic_state *state);
> +	void (*compute_intermediate_wm)(struct drm_device *dev,
> +					struct intel_crtc_state *newstate,
> +					const struct intel_crtc_state *oldstate);
>
If this is can't fail anyway could we please do this at runtime instead of precalculating?

Something like this:

commit_intermediate_wm
vblank_evade
plane_update
vblank_end
(wait for vblank)
commit_final_wm

Of course for skylake just hammer in the final wm during vblank evasion. :-)


More information about the Intel-gfx mailing list