Commit 7eb4941f authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Move vlv wms from crtc->wm_state to crtc->wm.active.vlv

In an effort to make the vlv/chv wm code look and behave more like the
ilk+ code, let's move the current active wms next to the
corresponding ilk wms.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-4-ville.syrjala@linux.intel.com
parent f07d43d2
...@@ -758,6 +758,7 @@ struct intel_crtc { ...@@ -758,6 +758,7 @@ struct intel_crtc {
/* watermarks currently being used */ /* watermarks currently being used */
union { union {
struct intel_pipe_wm ilk; struct intel_pipe_wm ilk;
struct vlv_wm_state vlv;
} active; } active;
/* allow CxSR on this pipe */ /* allow CxSR on this pipe */
...@@ -777,8 +778,6 @@ struct intel_crtc { ...@@ -777,8 +778,6 @@ struct intel_crtc {
/* scalers available on this crtc */ /* scalers available on this crtc */
int num_scalers; int num_scalers;
struct vlv_wm_state wm_state;
}; };
struct intel_plane { struct intel_plane {
......
...@@ -1035,7 +1035,7 @@ static uint16_t vlv_compute_wm_level(const struct intel_crtc_state *crtc_state, ...@@ -1035,7 +1035,7 @@ static uint16_t vlv_compute_wm_level(const struct intel_crtc_state *crtc_state,
static void vlv_compute_fifo(struct intel_crtc *crtc) static void vlv_compute_fifo(struct intel_crtc *crtc)
{ {
struct vlv_wm_state *wm_state = &crtc->wm_state; struct vlv_wm_state *wm_state = &crtc->wm.active.vlv;
struct vlv_fifo_state *fifo_state = &crtc->wm.fifo_state; struct vlv_fifo_state *fifo_state = &crtc->wm.fifo_state;
struct drm_device *dev = crtc->base.dev; struct drm_device *dev = crtc->base.dev;
struct intel_plane *plane; struct intel_plane *plane;
...@@ -1111,7 +1111,7 @@ static u16 vlv_invert_wm_value(u16 wm, u16 fifo_size) ...@@ -1111,7 +1111,7 @@ static u16 vlv_invert_wm_value(u16 wm, u16 fifo_size)
static void vlv_invert_wms(struct intel_crtc *crtc) static void vlv_invert_wms(struct intel_crtc *crtc)
{ {
struct vlv_wm_state *wm_state = &crtc->wm_state; struct vlv_wm_state *wm_state = &crtc->wm.active.vlv;
int level; int level;
for (level = 0; level < wm_state->num_levels; level++) { for (level = 0; level < wm_state->num_levels; level++) {
...@@ -1139,7 +1139,7 @@ static void vlv_invert_wms(struct intel_crtc *crtc) ...@@ -1139,7 +1139,7 @@ static void vlv_invert_wms(struct intel_crtc *crtc)
static void vlv_compute_wm(struct intel_crtc *crtc) static void vlv_compute_wm(struct intel_crtc *crtc)
{ {
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
struct vlv_wm_state *wm_state = &crtc->wm_state; struct vlv_wm_state *wm_state = &crtc->wm.active.vlv;
const struct vlv_fifo_state *fifo_state = &crtc->wm.fifo_state; const struct vlv_fifo_state *fifo_state = &crtc->wm.fifo_state;
struct intel_plane *plane; struct intel_plane *plane;
int level; int level;
...@@ -1302,7 +1302,7 @@ static void vlv_merge_wm(struct drm_i915_private *dev_priv, ...@@ -1302,7 +1302,7 @@ static void vlv_merge_wm(struct drm_i915_private *dev_priv,
wm->cxsr = true; wm->cxsr = true;
for_each_intel_crtc(&dev_priv->drm, crtc) { for_each_intel_crtc(&dev_priv->drm, crtc) {
const struct vlv_wm_state *wm_state = &crtc->wm_state; const struct vlv_wm_state *wm_state = &crtc->wm.active.vlv;
if (!crtc->active) if (!crtc->active)
continue; continue;
...@@ -1321,7 +1321,7 @@ static void vlv_merge_wm(struct drm_i915_private *dev_priv, ...@@ -1321,7 +1321,7 @@ static void vlv_merge_wm(struct drm_i915_private *dev_priv,
wm->level = VLV_WM_LEVEL_PM2; wm->level = VLV_WM_LEVEL_PM2;
for_each_intel_crtc(&dev_priv->drm, crtc) { for_each_intel_crtc(&dev_priv->drm, crtc) {
struct vlv_wm_state *wm_state = &crtc->wm_state; const struct vlv_wm_state *wm_state = &crtc->wm.active.vlv;
enum pipe pipe = crtc->pipe; enum pipe pipe = crtc->pipe;
if (!crtc->active) if (!crtc->active)
......
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