Commit ec193640 authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/i915: Use intel state as much as possible in wm code

Instead of directly referencing drm_crtc_state, convert to
intel_ctc_state and use the base struct. This is useful when we're
making the split between uapi and hw state, and also makes the
code slightly more readable.

A lot of places also use cstate, instead of the more common crtc_state.
Clean those up to use crtc_state. Same for pstate vs plane_state. (Ville)
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190628085517.31886-7-maarten.lankhorst@linux.intel.com
parent 4f25720b
...@@ -287,14 +287,14 @@ struct drm_i915_display_funcs { ...@@ -287,14 +287,14 @@ struct drm_i915_display_funcs {
enum pipe pipe); enum pipe pipe);
int (*get_fifo_size)(struct drm_i915_private *dev_priv, int (*get_fifo_size)(struct drm_i915_private *dev_priv,
enum i9xx_plane_id i9xx_plane); enum i9xx_plane_id i9xx_plane);
int (*compute_pipe_wm)(struct intel_crtc_state *cstate); int (*compute_pipe_wm)(struct intel_crtc_state *crtc_state);
int (*compute_intermediate_wm)(struct intel_crtc_state *newstate); int (*compute_intermediate_wm)(struct intel_crtc_state *crtc_state);
void (*initial_watermarks)(struct intel_atomic_state *state, void (*initial_watermarks)(struct intel_atomic_state *state,
struct intel_crtc_state *cstate); struct intel_crtc_state *crtc_state);
void (*atomic_update_watermarks)(struct intel_atomic_state *state, void (*atomic_update_watermarks)(struct intel_atomic_state *state,
struct intel_crtc_state *cstate); struct intel_crtc_state *crtc_state);
void (*optimize_watermarks)(struct intel_atomic_state *state, void (*optimize_watermarks)(struct intel_atomic_state *state,
struct intel_crtc_state *cstate); struct intel_crtc_state *crtc_state);
int (*compute_global_watermarks)(struct intel_atomic_state *state); int (*compute_global_watermarks)(struct intel_atomic_state *state);
void (*update_wm)(struct intel_crtc *crtc); void (*update_wm)(struct intel_crtc *crtc);
int (*modeset_calc_cdclk)(struct intel_atomic_state *state); int (*modeset_calc_cdclk)(struct intel_atomic_state *state);
...@@ -1646,7 +1646,7 @@ struct drm_i915_private { ...@@ -1646,7 +1646,7 @@ struct drm_i915_private {
/* /*
* Should be held around atomic WM register writing; also * Should be held around atomic WM register writing; also
* protects * intel_crtc->wm.active and * protects * intel_crtc->wm.active and
* cstate->wm.need_postvbl_update. * crtc_state->wm.need_postvbl_update.
*/ */
struct mutex wm_mutex; struct mutex wm_mutex;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment