@@ -267,6 +267,36 @@ static void ddp_cmdq_cb(struct mbox_client *cl, void *mssg)
267
267
{
268
268
struct mtk_drm_crtc * mtk_crtc = container_of (cl , struct mtk_drm_crtc , cmdq_cl );
269
269
struct cmdq_cb_data * data = mssg ;
270
+ struct mtk_crtc_state * state ;
271
+ unsigned int i ;
272
+
273
+ state = to_mtk_crtc_state (mtk_crtc -> base .state );
274
+
275
+ state -> pending_config = false;
276
+
277
+ if (mtk_crtc -> pending_planes ) {
278
+ for (i = 0 ; i < mtk_crtc -> layer_nr ; i ++ ) {
279
+ struct drm_plane * plane = & mtk_crtc -> planes [i ];
280
+ struct mtk_plane_state * plane_state ;
281
+
282
+ plane_state = to_mtk_plane_state (plane -> state );
283
+
284
+ plane_state -> pending .config = false;
285
+ }
286
+ mtk_crtc -> pending_planes = false;
287
+ }
288
+
289
+ if (mtk_crtc -> pending_async_planes ) {
290
+ for (i = 0 ; i < mtk_crtc -> layer_nr ; i ++ ) {
291
+ struct drm_plane * plane = & mtk_crtc -> planes [i ];
292
+ struct mtk_plane_state * plane_state ;
293
+
294
+ plane_state = to_mtk_plane_state (plane -> state );
295
+
296
+ plane_state -> pending .async_config = false;
297
+ }
298
+ mtk_crtc -> pending_async_planes = false;
299
+ }
270
300
271
301
mtk_crtc -> cmdq_vblank_cnt = 0 ;
272
302
mtk_drm_cmdq_pkt_destroy (mtk_crtc -> cmdq_chan , data -> pkt );
@@ -423,7 +453,8 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc,
423
453
state -> pending_vrefresh , 0 ,
424
454
cmdq_handle );
425
455
426
- state -> pending_config = false;
456
+ if (!cmdq_handle )
457
+ state -> pending_config = false;
427
458
}
428
459
429
460
if (mtk_crtc -> pending_planes ) {
@@ -443,9 +474,12 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc,
443
474
mtk_ddp_comp_layer_config (comp , local_layer ,
444
475
plane_state ,
445
476
cmdq_handle );
446
- plane_state -> pending .config = false;
477
+ if (!cmdq_handle )
478
+ plane_state -> pending .config = false;
447
479
}
448
- mtk_crtc -> pending_planes = false;
480
+
481
+ if (!cmdq_handle )
482
+ mtk_crtc -> pending_planes = false;
449
483
}
450
484
451
485
if (mtk_crtc -> pending_async_planes ) {
@@ -465,9 +499,12 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc,
465
499
mtk_ddp_comp_layer_config (comp , local_layer ,
466
500
plane_state ,
467
501
cmdq_handle );
468
- plane_state -> pending .async_config = false;
502
+ if (!cmdq_handle )
503
+ plane_state -> pending .async_config = false;
469
504
}
470
- mtk_crtc -> pending_async_planes = false;
505
+
506
+ if (!cmdq_handle )
507
+ mtk_crtc -> pending_async_planes = false;
471
508
}
472
509
}
473
510
0 commit comments