FROMGIT: 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: 7f82d9c4 ("drm/mediatek: Clear pending flag when cmdq packet is done") Signed-off-by:Jason-JH.Lin <jason-jh.lin@mediatek.com> Reviewed-by:
CK Hu <ck.hu@mediatek.com> Reviewed-by:
Fei Shao <fshao@chromium.org> Link: https://patchwork.kernel.org/project/dri-devel/patch/20240827-drm-fixup-0819-v3-1-4761005211ec@mediatek.com/ Link: https://patchwork.kernel.org/project/dri-devel/patch/20240827-drm-fixup-0819-v3-2-4761005211ec@mediatek.com/ Signed-off-by:
Chun-Kuang Hu <chunkuang.hu@kernel.org> (cherry picked from commit fe30bae5 https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git mediatek-drm-next) BUG=b:346360182 TEST=emerge-rauru sys-kernel/chromeos-kernel-6_6 UPSTREAM-TASK=b:326884508 Change-Id: Ifeabf53f6b40bf9ff2d3ac9512a8a69ce43e0626 Signed-off-by:
Jason-jh Lin <jason-jh.lin@mediatek.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5825844 Reviewed-by:
Hsin-Yi Wang <hsinyi@chromium.org> Commit-Queue: Hsin-Yi Wang <hsinyi@chromium.org> Reviewed-by:
Sean Paul <sean@poorly.run> Signed-off-by:
Hubert Mazur <hmazur@google.com>
Loading
Please sign in to comment