@@ -6283,6 +6283,51 @@ static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
6283
6283
return 0 ;
6284
6284
}
6285
6285
6286
+ static int intel_atomic_check_config (struct intel_atomic_state * state )
6287
+ {
6288
+ struct drm_i915_private * i915 = to_i915 (state -> base .dev );
6289
+ struct intel_crtc_state * new_crtc_state ;
6290
+ struct intel_crtc * crtc ;
6291
+ int ret ;
6292
+ int i ;
6293
+
6294
+ ret = intel_bigjoiner_add_affected_crtcs (state );
6295
+ if (ret )
6296
+ return ret ;
6297
+
6298
+ for_each_new_intel_crtc_in_state (state , crtc , new_crtc_state , i ) {
6299
+ if (!intel_crtc_needs_modeset (new_crtc_state )) {
6300
+ if (intel_crtc_is_bigjoiner_slave (new_crtc_state ))
6301
+ copy_bigjoiner_crtc_state_nomodeset (state , crtc );
6302
+ else
6303
+ intel_crtc_copy_uapi_to_hw_state_nomodeset (state , crtc );
6304
+ continue ;
6305
+ }
6306
+
6307
+ if (intel_crtc_is_bigjoiner_slave (new_crtc_state )) {
6308
+ drm_WARN_ON (& i915 -> drm , new_crtc_state -> uapi .enable );
6309
+ continue ;
6310
+ }
6311
+
6312
+ ret = intel_crtc_prepare_cleared_state (state , crtc );
6313
+ if (ret )
6314
+ break ;
6315
+
6316
+ if (!new_crtc_state -> hw .enable )
6317
+ continue ;
6318
+
6319
+ ret = intel_modeset_pipe_config (state , crtc );
6320
+ if (ret )
6321
+ break ;
6322
+
6323
+ ret = intel_atomic_check_bigjoiner (state , crtc );
6324
+ if (ret )
6325
+ break ;
6326
+ }
6327
+
6328
+ return ret ;
6329
+ }
6330
+
6286
6331
/**
6287
6332
* intel_atomic_check - validate state object
6288
6333
* @dev: drm device
@@ -6327,41 +6372,10 @@ int intel_atomic_check(struct drm_device *dev,
6327
6372
return ret ;
6328
6373
}
6329
6374
6330
- ret = intel_bigjoiner_add_affected_crtcs (state );
6375
+ ret = intel_atomic_check_config (state );
6331
6376
if (ret )
6332
6377
goto fail ;
6333
6378
6334
- for_each_oldnew_intel_crtc_in_state (state , crtc , old_crtc_state ,
6335
- new_crtc_state , i ) {
6336
- if (!intel_crtc_needs_modeset (new_crtc_state )) {
6337
- if (intel_crtc_is_bigjoiner_slave (new_crtc_state ))
6338
- copy_bigjoiner_crtc_state_nomodeset (state , crtc );
6339
- else
6340
- intel_crtc_copy_uapi_to_hw_state_nomodeset (state , crtc );
6341
- continue ;
6342
- }
6343
-
6344
- if (intel_crtc_is_bigjoiner_slave (new_crtc_state )) {
6345
- drm_WARN_ON (& dev_priv -> drm , new_crtc_state -> uapi .enable );
6346
- continue ;
6347
- }
6348
-
6349
- ret = intel_crtc_prepare_cleared_state (state , crtc );
6350
- if (ret )
6351
- goto fail ;
6352
-
6353
- if (!new_crtc_state -> hw .enable )
6354
- continue ;
6355
-
6356
- ret = intel_modeset_pipe_config (state , crtc );
6357
- if (ret )
6358
- goto fail ;
6359
-
6360
- ret = intel_atomic_check_bigjoiner (state , crtc );
6361
- if (ret )
6362
- goto fail ;
6363
- }
6364
-
6365
6379
for_each_oldnew_intel_crtc_in_state (state , crtc , old_crtc_state ,
6366
6380
new_crtc_state , i ) {
6367
6381
if (!intel_crtc_needs_modeset (new_crtc_state ))
0 commit comments