[Intel-gfx] [PATCH] drm/i915: Add two-stage ILK-style watermark programming (v10)
maarten.lankhorst at linux.intel.com
Thu Jan 7 03:29:12 PST 2016
Op 06-01-16 om 20:34 schreef Matt Roper:
> 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
> v2: Significant rebasing/rewriting.
> - Move 'need_postvbl_update' flag to CRTC state (Daniel)
> - Don't forget to check intermediate watermark values for validity
> - Don't due async watermark optimization; just do it at the end of the
> atomic transaction, after waiting for vblanks. We do want it to be
> async eventually, but adding that now will cause more trouble for
> Maarten's in-progress work. (Maarten)
> - Don't allocate space in crtc_state for intermediate watermarks on
> platforms that don't need it (gen9+).
> - Move WaCxSRDisabledForSpriteScaling:ivb into intel_begin_crtc_commit
> now that ilk_update_wm is gone.
> - Add a wm_mutex to cover updates to intel_crtc->active and the
> need_postvbl_update flag. Since we don't have async yet it isn't
> terribly important yet, but might as well add it now.
> - Change interface to program watermarks. Platforms will now expose
> .initial_watermarks() and .optimize_watermarks() functions to do
> watermark programming. These should lock wm_mutex, copy the
> appropriate state values into intel_crtc->active, and then call
> the internal program watermarks function.
> - Skip intermediate watermark calculation/check during initial hardware
> readout since we don't trust the existing HW values (and don't have
> valid values of our own yet).
> - Don't try to call .optimize_watermarks() on platforms that don't have
> atomic watermarks yet. (Maarten)
> - Rebase
> - Further rebase
> - A few minor indentation and line length fixes
> - Yet another rebase since Maarten's patches reworked a bunch of the
> code (wm_pre, wm_post, etc.) that this was previously based on.
> - Move wm_mutex to dev_priv to protect against racing commits against
> disjoint CRTC sets. (Maarten)
> - Drop unnecessary clearing of cstate->wm.need_postvbl_update (Maarten)
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
More information about the Intel-gfx