BACKPORT: DISP: set cmdq_mbox_enable/disable with crtc control

[Detail]
enable cmdq mbox before utilizing cmdq api and disable cmdq mbox
during display suspend

MTK-Commit-Id: d5d2a8299215eb31b411d81c365fe54843142c5f

CR-Id: ALPS05659211
Feature: [Module]Display Driver
Signed-off-by: tai-hua.tseng <tai-hua.tseng@mediatek.com>
Change-Id: I04cb7418506ae1952f48144c397b19ca7e7166e5
This commit is contained in:
tai-hua.tseng
2023-12-19 23:35:03 +00:00
committed by nisel
parent 9de7240762
commit fcd3fb7be0

View File

@@ -4659,11 +4659,9 @@ void mtk_drm_crtc_enable(struct drm_crtc *crtc)
#endif
/* 3. power on cmdq client */
if (crtc_id == 2) {
client = mtk_crtc->gce_obj.client[CLIENT_CFG];
cmdq_mbox_enable(client->chan);
CRTC_MMP_MARK(crtc_id, enable, 1, 1);
}
client = mtk_crtc->gce_obj.client[CLIENT_CFG];
cmdq_mbox_enable(client->chan);
CRTC_MMP_MARK(crtc_id, enable, 1, 1);
/* 4. start trigger loop first to keep gce alive */
if (mtk_crtc_with_trigger_loop(crtc)) {
@@ -5025,6 +5023,9 @@ void mtk_crtc_first_enable_ddp_config(struct mtk_drm_crtc *mtk_crtc)
}
cfg.p_golden_setting_context =
__get_golden_setting_context(mtk_crtc);
cmdq_mbox_enable(mtk_crtc->gce_obj.client[CLIENT_CFG]->chan);
mtk_crtc_pkt_create(&cmdq_handle, &mtk_crtc->base,
mtk_crtc->gce_obj.client[CLIENT_CFG]);
cmdq_pkt_clear_event(cmdq_handle,
@@ -5191,11 +5192,9 @@ void mtk_drm_crtc_disable(struct drm_crtc *crtc, bool need_wait)
drm_crtc_vblank_off(crtc);
/* 8. power off cmdq client */
if (crtc_id == 2) {
client = mtk_crtc->gce_obj.client[CLIENT_CFG];
cmdq_mbox_disable(client->chan);
CRTC_MMP_MARK(crtc_id, disable, 1, 2);
}
client = mtk_crtc->gce_obj.client[CLIENT_CFG];
cmdq_mbox_disable(client->chan);
CRTC_MMP_MARK(crtc_id, disable, 1, 2);
/* If open dynamic OVL 4+2, need switch ovl back to main disp */
if (!private) {