Skip to content

Commit ae2b1c3

Browse files
committed
drm/i915: s/dev_priv/i915/ in the state checker
Switch the state checker over to using the new 'i915' variable name insteda of the old 'dev_priv'. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-13-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
1 parent 3ce6ac8 commit ae2b1c3

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

drivers/gpu/drm/i915/display/intel_modeset_verify.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ verify_connector_state(struct intel_atomic_state *state,
8888

8989
static void intel_pipe_config_sanity_check(const struct intel_crtc_state *crtc_state)
9090
{
91-
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
91+
struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
9292

9393
if (crtc_state->has_pch_encoder) {
94-
int fdi_dotclock = intel_dotclock_calculate(intel_fdi_link_freq(dev_priv, crtc_state),
94+
int fdi_dotclock = intel_dotclock_calculate(intel_fdi_link_freq(i915, crtc_state),
9595
&crtc_state->fdi_m_n);
9696
int dotclock = crtc_state->hw.adjusted_mode.crtc_clock;
9797

@@ -100,7 +100,7 @@ static void intel_pipe_config_sanity_check(const struct intel_crtc_state *crtc_s
100100
* Yell if the encoder disagrees. Allow for slight
101101
* rounding differences.
102102
*/
103-
drm_WARN(&dev_priv->drm, abs(fdi_dotclock - dotclock) > 1,
103+
drm_WARN(&i915->drm, abs(fdi_dotclock - dotclock) > 1,
104104
"FDI dotclock and encoder dotclock mismatch, fdi: %i, encoder: %i\n",
105105
fdi_dotclock, dotclock);
106106
}
@@ -109,17 +109,17 @@ static void intel_pipe_config_sanity_check(const struct intel_crtc_state *crtc_s
109109
static void
110110
verify_encoder_state(struct intel_atomic_state *state)
111111
{
112-
struct drm_i915_private *dev_priv = to_i915(state->base.dev);
112+
struct drm_i915_private *i915 = to_i915(state->base.dev);
113113
struct intel_encoder *encoder;
114114
struct drm_connector *connector;
115115
const struct drm_connector_state *old_conn_state, *new_conn_state;
116116
int i;
117117

118-
for_each_intel_encoder(&dev_priv->drm, encoder) {
118+
for_each_intel_encoder(&i915->drm, encoder) {
119119
bool enabled = false, found = false;
120120
enum pipe pipe;
121121

122-
drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s]\n",
122+
drm_dbg_kms(&i915->drm, "[ENCODER:%d:%s]\n",
123123
encoder->base.base.id,
124124
encoder->base.name);
125125

@@ -134,23 +134,23 @@ verify_encoder_state(struct intel_atomic_state *state)
134134
found = true;
135135
enabled = true;
136136

137-
I915_STATE_WARN(dev_priv,
137+
I915_STATE_WARN(i915,
138138
new_conn_state->crtc != encoder->base.crtc,
139139
"connector's crtc doesn't match encoder crtc\n");
140140
}
141141

142142
if (!found)
143143
continue;
144144

145-
I915_STATE_WARN(dev_priv, !!encoder->base.crtc != enabled,
145+
I915_STATE_WARN(i915, !!encoder->base.crtc != enabled,
146146
"encoder's enabled state mismatch (expected %i, found %i)\n",
147147
!!encoder->base.crtc, enabled);
148148

149149
if (!encoder->base.crtc) {
150150
bool active;
151151

152152
active = encoder->get_hw_state(encoder, &pipe);
153-
I915_STATE_WARN(dev_priv, active,
153+
I915_STATE_WARN(i915, active,
154154
"encoder detached but still enabled on pipe %c.\n",
155155
pipe_name(pipe));
156156
}
@@ -162,7 +162,7 @@ verify_crtc_state(struct intel_atomic_state *state,
162162
struct intel_crtc *crtc)
163163
{
164164
struct drm_device *dev = crtc->base.dev;
165-
struct drm_i915_private *dev_priv = to_i915(dev);
165+
struct drm_i915_private *i915 = to_i915(dev);
166166
const struct intel_crtc_state *sw_crtc_state =
167167
intel_atomic_get_new_crtc_state(state, crtc);
168168
struct intel_crtc_state *hw_crtc_state;
@@ -173,23 +173,23 @@ verify_crtc_state(struct intel_atomic_state *state,
173173
if (!hw_crtc_state)
174174
return;
175175

176-
drm_dbg_kms(&dev_priv->drm, "[CRTC:%d:%s]\n", crtc->base.base.id,
176+
drm_dbg_kms(&i915->drm, "[CRTC:%d:%s]\n", crtc->base.base.id,
177177
crtc->base.name);
178178

179179
hw_crtc_state->hw.enable = sw_crtc_state->hw.enable;
180180

181181
intel_crtc_get_pipe_config(hw_crtc_state);
182182

183183
/* we keep both pipes enabled on 830 */
184-
if (IS_I830(dev_priv) && hw_crtc_state->hw.active)
184+
if (IS_I830(i915) && hw_crtc_state->hw.active)
185185
hw_crtc_state->hw.active = sw_crtc_state->hw.active;
186186

187-
I915_STATE_WARN(dev_priv,
187+
I915_STATE_WARN(i915,
188188
sw_crtc_state->hw.active != hw_crtc_state->hw.active,
189189
"crtc active state doesn't match with hw state (expected %i, found %i)\n",
190190
sw_crtc_state->hw.active, hw_crtc_state->hw.active);
191191

192-
I915_STATE_WARN(dev_priv, crtc->active != sw_crtc_state->hw.active,
192+
I915_STATE_WARN(i915, crtc->active != sw_crtc_state->hw.active,
193193
"transitional active state does not match atomic hw state (expected %i, found %i)\n",
194194
sw_crtc_state->hw.active, crtc->active);
195195

@@ -200,12 +200,12 @@ verify_crtc_state(struct intel_atomic_state *state,
200200
bool active;
201201

202202
active = encoder->get_hw_state(encoder, &pipe);
203-
I915_STATE_WARN(dev_priv, active != sw_crtc_state->hw.active,
203+
I915_STATE_WARN(i915, active != sw_crtc_state->hw.active,
204204
"[ENCODER:%i] active %i with crtc active %i\n",
205205
encoder->base.base.id, active,
206206
sw_crtc_state->hw.active);
207207

208-
I915_STATE_WARN(dev_priv, active && master_crtc->pipe != pipe,
208+
I915_STATE_WARN(i915, active && master_crtc->pipe != pipe,
209209
"Encoder connected to wrong pipe %c\n",
210210
pipe_name(pipe));
211211

@@ -220,7 +220,7 @@ verify_crtc_state(struct intel_atomic_state *state,
220220

221221
if (!intel_pipe_config_compare(sw_crtc_state,
222222
hw_crtc_state, false)) {
223-
I915_STATE_WARN(dev_priv, 1, "pipe state doesn't match!\n");
223+
I915_STATE_WARN(i915, 1, "pipe state doesn't match!\n");
224224
intel_crtc_state_dump(hw_crtc_state, NULL, "hw state");
225225
intel_crtc_state_dump(sw_crtc_state, NULL, "sw state");
226226
}

0 commit comments

Comments
 (0)