提交 114d7dc0 编写于 作者: V Ville Syrjälä

drm/i915: Rename bunch of vlv_ watermark structures to g4x_

We'll be wanting to share some of these watermark structures on g4x,
so let's rename them to have a g4x_ prefix instead of vlv_.
Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170421181432.15216-5-ville.syrjala@linux.intel.comReviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
上级 6d5019b6
...@@ -1652,11 +1652,11 @@ struct ilk_wm_values { ...@@ -1652,11 +1652,11 @@ struct ilk_wm_values {
enum intel_ddb_partitioning partitioning; enum intel_ddb_partitioning partitioning;
}; };
struct vlv_pipe_wm { struct g4x_pipe_wm {
uint16_t plane[I915_MAX_PLANES]; uint16_t plane[I915_MAX_PLANES];
}; };
struct vlv_sr_wm { struct g4x_sr_wm {
uint16_t plane; uint16_t plane;
uint16_t cursor; uint16_t cursor;
}; };
...@@ -1666,8 +1666,8 @@ struct vlv_wm_ddl_values { ...@@ -1666,8 +1666,8 @@ struct vlv_wm_ddl_values {
}; };
struct vlv_wm_values { struct vlv_wm_values {
struct vlv_pipe_wm pipe[3]; struct g4x_pipe_wm pipe[3];
struct vlv_sr_wm sr; struct g4x_sr_wm sr;
struct vlv_wm_ddl_values ddl[3]; struct vlv_wm_ddl_values ddl[3];
uint8_t level; uint8_t level;
bool cxsr; bool cxsr;
......
...@@ -512,8 +512,8 @@ enum vlv_wm_level { ...@@ -512,8 +512,8 @@ enum vlv_wm_level {
}; };
struct vlv_wm_state { struct vlv_wm_state {
struct vlv_pipe_wm wm[NUM_VLV_WM_LEVELS]; struct g4x_pipe_wm wm[NUM_VLV_WM_LEVELS];
struct vlv_sr_wm sr[NUM_VLV_WM_LEVELS]; struct g4x_sr_wm sr[NUM_VLV_WM_LEVELS];
uint8_t num_levels; uint8_t num_levels;
bool cxsr; bool cxsr;
}; };
...@@ -549,7 +549,7 @@ struct intel_crtc_wm_state { ...@@ -549,7 +549,7 @@ struct intel_crtc_wm_state {
struct { struct {
/* "raw" watermarks (not inverted) */ /* "raw" watermarks (not inverted) */
struct vlv_pipe_wm raw[NUM_VLV_WM_LEVELS]; struct g4x_pipe_wm raw[NUM_VLV_WM_LEVELS];
/* intermediate watermarks (inverted) */ /* intermediate watermarks (inverted) */
struct vlv_wm_state intermediate; struct vlv_wm_state intermediate;
/* optimal watermarks (inverted) */ /* optimal watermarks (inverted) */
......
...@@ -1062,7 +1062,7 @@ static bool vlv_need_sprite0_fifo_workaround(unsigned int active_planes) ...@@ -1062,7 +1062,7 @@ static bool vlv_need_sprite0_fifo_workaround(unsigned int active_planes)
static int vlv_compute_fifo(struct intel_crtc_state *crtc_state) static int vlv_compute_fifo(struct intel_crtc_state *crtc_state)
{ {
struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
const struct vlv_pipe_wm *raw = const struct g4x_pipe_wm *raw =
&crtc_state->wm.vlv.raw[VLV_WM_LEVEL_PM2]; &crtc_state->wm.vlv.raw[VLV_WM_LEVEL_PM2];
struct vlv_fifo_state *fifo_state = &crtc_state->wm.vlv.fifo_state; struct vlv_fifo_state *fifo_state = &crtc_state->wm.vlv.fifo_state;
unsigned int active_planes = crtc_state->active_planes & ~BIT(PLANE_CURSOR); unsigned int active_planes = crtc_state->active_planes & ~BIT(PLANE_CURSOR);
...@@ -1178,7 +1178,7 @@ static bool vlv_raw_plane_wm_set(struct intel_crtc_state *crtc_state, ...@@ -1178,7 +1178,7 @@ static bool vlv_raw_plane_wm_set(struct intel_crtc_state *crtc_state,
bool dirty = false; bool dirty = false;
for (; level < num_levels; level++) { for (; level < num_levels; level++) {
struct vlv_pipe_wm *raw = &crtc_state->wm.vlv.raw[level]; struct g4x_pipe_wm *raw = &crtc_state->wm.vlv.raw[level];
dirty |= raw->plane[plane_id] != value; dirty |= raw->plane[plane_id] != value;
raw->plane[plane_id] = value; raw->plane[plane_id] = value;
...@@ -1202,7 +1202,7 @@ static bool vlv_raw_plane_wm_compute(struct intel_crtc_state *crtc_state, ...@@ -1202,7 +1202,7 @@ static bool vlv_raw_plane_wm_compute(struct intel_crtc_state *crtc_state,
} }
for (level = 0; level < num_levels; level++) { for (level = 0; level < num_levels; level++) {
struct vlv_pipe_wm *raw = &crtc_state->wm.vlv.raw[level]; struct g4x_pipe_wm *raw = &crtc_state->wm.vlv.raw[level];
int wm = vlv_compute_wm_level(crtc_state, plane_state, level); int wm = vlv_compute_wm_level(crtc_state, plane_state, level);
int max_wm = plane_id == PLANE_CURSOR ? 63 : 511; int max_wm = plane_id == PLANE_CURSOR ? 63 : 511;
...@@ -1230,7 +1230,7 @@ static bool vlv_raw_plane_wm_compute(struct intel_crtc_state *crtc_state, ...@@ -1230,7 +1230,7 @@ static bool vlv_raw_plane_wm_compute(struct intel_crtc_state *crtc_state,
static bool vlv_raw_plane_wm_is_valid(const struct intel_crtc_state *crtc_state, static bool vlv_raw_plane_wm_is_valid(const struct intel_crtc_state *crtc_state,
enum plane_id plane_id, int level) enum plane_id plane_id, int level)
{ {
const struct vlv_pipe_wm *raw = const struct g4x_pipe_wm *raw =
&crtc_state->wm.vlv.raw[level]; &crtc_state->wm.vlv.raw[level];
const struct vlv_fifo_state *fifo_state = const struct vlv_fifo_state *fifo_state =
&crtc_state->wm.vlv.fifo_state; &crtc_state->wm.vlv.fifo_state;
...@@ -1315,7 +1315,7 @@ static int vlv_compute_pipe_wm(struct intel_crtc_state *crtc_state) ...@@ -1315,7 +1315,7 @@ static int vlv_compute_pipe_wm(struct intel_crtc_state *crtc_state)
wm_state->cxsr = crtc->pipe != PIPE_C && num_active_planes == 1; wm_state->cxsr = crtc->pipe != PIPE_C && num_active_planes == 1;
for (level = 0; level < wm_state->num_levels; level++) { for (level = 0; level < wm_state->num_levels; level++) {
const struct vlv_pipe_wm *raw = &crtc_state->wm.vlv.raw[level]; const struct g4x_pipe_wm *raw = &crtc_state->wm.vlv.raw[level];
const int sr_fifo_size = INTEL_INFO(dev_priv)->num_pipes * 512 - 1; const int sr_fifo_size = INTEL_INFO(dev_priv)->num_pipes * 512 - 1;
if (!vlv_raw_crtc_wm_is_valid(crtc_state, level)) if (!vlv_raw_crtc_wm_is_valid(crtc_state, level))
...@@ -4785,7 +4785,7 @@ void vlv_wm_get_hw_state(struct drm_device *dev) ...@@ -4785,7 +4785,7 @@ void vlv_wm_get_hw_state(struct drm_device *dev)
active->cxsr = wm->cxsr; active->cxsr = wm->cxsr;
for (level = 0; level < active->num_levels; level++) { for (level = 0; level < active->num_levels; level++) {
struct vlv_pipe_wm *raw = struct g4x_pipe_wm *raw =
&crtc_state->wm.vlv.raw[level]; &crtc_state->wm.vlv.raw[level];
active->sr[level].plane = wm->sr.plane; active->sr[level].plane = wm->sr.plane;
...@@ -4845,7 +4845,7 @@ void vlv_wm_sanitize(struct drm_i915_private *dev_priv) ...@@ -4845,7 +4845,7 @@ void vlv_wm_sanitize(struct drm_i915_private *dev_priv)
continue; continue;
for (level = 0; level < wm_state->num_levels; level++) { for (level = 0; level < wm_state->num_levels; level++) {
struct vlv_pipe_wm *raw = struct g4x_pipe_wm *raw =
&crtc_state->wm.vlv.raw[level]; &crtc_state->wm.vlv.raw[level];
raw->plane[plane_id] = 0; raw->plane[plane_id] = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册