@@ -86,14 +86,14 @@ verify_connector_state(struct intel_atomic_state *state,
8686 }
8787}
8888
89- static void intel_pipe_config_sanity_check (const struct intel_crtc_state * pipe_config )
89+ static void intel_pipe_config_sanity_check (const struct intel_crtc_state * crtc_state )
9090{
91- struct drm_i915_private * dev_priv = to_i915 (pipe_config -> uapi .crtc -> dev );
91+ struct drm_i915_private * dev_priv = to_i915 (crtc_state -> uapi .crtc -> dev );
9292
93- if (pipe_config -> has_pch_encoder ) {
94- int fdi_dotclock = intel_dotclock_calculate (intel_fdi_link_freq (dev_priv , pipe_config ),
95- & pipe_config -> fdi_m_n );
96- int dotclock = pipe_config -> hw .adjusted_mode .crtc_clock ;
93+ if (crtc_state -> has_pch_encoder ) {
94+ int fdi_dotclock = intel_dotclock_calculate (intel_fdi_link_freq (dev_priv , crtc_state ),
95+ & crtc_state -> fdi_m_n );
96+ int dotclock = crtc_state -> hw .adjusted_mode .crtc_clock ;
9797
9898 /*
9999 * FDI already provided one idea for the dotclock.
@@ -163,66 +163,66 @@ verify_crtc_state(struct intel_atomic_state *state,
163163{
164164 struct drm_device * dev = crtc -> base .dev ;
165165 struct drm_i915_private * dev_priv = to_i915 (dev );
166- const struct intel_crtc_state * new_crtc_state =
166+ const struct intel_crtc_state * sw_crtc_state =
167167 intel_atomic_get_new_crtc_state (state , crtc );
168- struct intel_crtc_state * pipe_config ;
168+ struct intel_crtc_state * hw_crtc_state ;
169169 struct intel_crtc * master_crtc ;
170170 struct intel_encoder * encoder ;
171171
172- pipe_config = intel_crtc_state_alloc (crtc );
173- if (!pipe_config )
172+ hw_crtc_state = intel_crtc_state_alloc (crtc );
173+ if (!hw_crtc_state )
174174 return ;
175175
176176 drm_dbg_kms (& dev_priv -> drm , "[CRTC:%d:%s]\n" , crtc -> base .base .id ,
177177 crtc -> base .name );
178178
179- pipe_config -> hw .enable = new_crtc_state -> hw .enable ;
179+ hw_crtc_state -> hw .enable = sw_crtc_state -> hw .enable ;
180180
181- intel_crtc_get_pipe_config (pipe_config );
181+ intel_crtc_get_pipe_config (hw_crtc_state );
182182
183183 /* we keep both pipes enabled on 830 */
184- if (IS_I830 (dev_priv ) && pipe_config -> hw .active )
185- pipe_config -> hw .active = new_crtc_state -> hw .active ;
184+ if (IS_I830 (dev_priv ) && hw_crtc_state -> hw .active )
185+ hw_crtc_state -> hw .active = sw_crtc_state -> hw .active ;
186186
187187 I915_STATE_WARN (dev_priv ,
188- new_crtc_state -> hw .active != pipe_config -> hw .active ,
188+ 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" ,
190- new_crtc_state -> hw .active , pipe_config -> hw .active );
190+ sw_crtc_state -> hw .active , hw_crtc_state -> hw .active );
191191
192- I915_STATE_WARN (dev_priv , crtc -> active != new_crtc_state -> hw .active ,
192+ I915_STATE_WARN (dev_priv , crtc -> active != sw_crtc_state -> hw .active ,
193193 "transitional active state does not match atomic hw state (expected %i, found %i)\n" ,
194- new_crtc_state -> hw .active , crtc -> active );
194+ sw_crtc_state -> hw .active , crtc -> active );
195195
196- master_crtc = intel_master_crtc (new_crtc_state );
196+ master_crtc = intel_master_crtc (sw_crtc_state );
197197
198198 for_each_encoder_on_crtc (dev , & master_crtc -> base , encoder ) {
199199 enum pipe pipe ;
200200 bool active ;
201201
202202 active = encoder -> get_hw_state (encoder , & pipe );
203- I915_STATE_WARN (dev_priv , active != new_crtc_state -> hw .active ,
203+ I915_STATE_WARN (dev_priv , active != sw_crtc_state -> hw .active ,
204204 "[ENCODER:%i] active %i with crtc active %i\n" ,
205205 encoder -> base .base .id , active ,
206- new_crtc_state -> hw .active );
206+ sw_crtc_state -> hw .active );
207207
208208 I915_STATE_WARN (dev_priv , active && master_crtc -> pipe != pipe ,
209209 "Encoder connected to wrong pipe %c\n" ,
210210 pipe_name (pipe ));
211211
212212 if (active )
213- intel_encoder_get_config (encoder , pipe_config );
213+ intel_encoder_get_config (encoder , hw_crtc_state );
214214 }
215215
216- if (!new_crtc_state -> hw .active )
216+ if (!sw_crtc_state -> hw .active )
217217 return ;
218218
219- intel_pipe_config_sanity_check (pipe_config );
219+ intel_pipe_config_sanity_check (hw_crtc_state );
220220
221- if (!intel_pipe_config_compare (new_crtc_state ,
222- pipe_config , false)) {
221+ if (!intel_pipe_config_compare (sw_crtc_state ,
222+ hw_crtc_state , false)) {
223223 I915_STATE_WARN (dev_priv , 1 , "pipe state doesn't match!\n" );
224- intel_crtc_state_dump (pipe_config , NULL , "hw state" );
225- intel_crtc_state_dump (new_crtc_state , NULL , "sw state" );
224+ intel_crtc_state_dump (hw_crtc_state , NULL , "hw state" );
225+ intel_crtc_state_dump (sw_crtc_state , NULL , "sw state" );
226226 }
227227}
228228
0 commit comments