Commit fe30bae
drm/mediatek: Fix missing configuration flags in mtk_crtc_ddp_config()
In mtk_crtc_ddp_config(), mtk_crtc will use some configuration flags to
generate instructions to cmdq_handle, such as:
state->pending_config
mtk_crtc->pending_planes
plane_state->pending.config
mtk_crtc->pending_async_planes
plane_state->pending.async_config
These configuration flags may be set to false when a GCE IRQ comes calling
ddp_cmdq_cb(). This may result in missing prepare instructions,
especially if mtk_crtc_update_config() with the flase need_vblank (no need
to wait for vblank) cases.
Therefore, the mtk_crtc->config_updating flag is set at the beginning of
mtk_crtc_update_config() to ensure that these configuration flags won't be
changed when the mtk_crtc_ddp_config() is preparing instructions.
But somehow the ddp_cmdq_cb() didn't use the mtk_crtc->config_updating
flag to prevent those pending config flags from being cleared.
To avoid missing the configuration when generating the config instruction,
the config_updating flag should be added into ddp_cmdq_cb() and be
protected with spin_lock.
Fixes: 7f82d9c ("drm/mediatek: Clear pending flag when cmdq packet is done")
Signed-off-by: Jason-JH.Lin <[email protected]>
Reviewed-by: CK Hu <[email protected]>
Reviewed-by: Fei Shao <[email protected]>
Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
Signed-off-by: Chun-Kuang Hu <[email protected]>1 parent d79ae47 commit fe30bae
1 file changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| 111 | + | |
| 112 | + | |
109 | 113 | | |
| 114 | + | |
| 115 | + | |
110 | 116 | | |
111 | 117 | | |
112 | 118 | | |
113 | 119 | | |
| 120 | + | |
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
| |||
270 | 277 | | |
271 | 278 | | |
272 | 279 | | |
| 280 | + | |
273 | 281 | | |
274 | 282 | | |
275 | 283 | | |
276 | 284 | | |
277 | 285 | | |
278 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
279 | 293 | | |
280 | 294 | | |
281 | 295 | | |
| |||
302 | 316 | | |
303 | 317 | | |
304 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
305 | 323 | | |
306 | 324 | | |
307 | 325 | | |
| |||
531 | 549 | | |
532 | 550 | | |
533 | 551 | | |
| 552 | + | |
534 | 553 | | |
535 | 554 | | |
| 555 | + | |
| 556 | + | |
536 | 557 | | |
| 558 | + | |
| 559 | + | |
537 | 560 | | |
538 | 561 | | |
539 | 562 | | |
| |||
587 | 610 | | |
588 | 611 | | |
589 | 612 | | |
| 613 | + | |
590 | 614 | | |
| 615 | + | |
| 616 | + | |
591 | 617 | | |
592 | 618 | | |
593 | 619 | | |
| |||
1030 | 1056 | | |
1031 | 1057 | | |
1032 | 1058 | | |
| 1059 | + | |
1033 | 1060 | | |
1034 | 1061 | | |
1035 | 1062 | | |
| |||
0 commit comments