summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mediatek
diff options
context:
space:
mode:
authorjason-jh.lin <jason-jh.lin@mediatek.com>2021-10-28 18:19:11 +0800
committerChun-Kuang Hu <chunkuang.hu@kernel.org>2021-11-18 07:35:14 +0800
commit593b655f05238536d476b2f872b8a1488700fa18 (patch)
tree5395faf91f22160348035a98b20ba2275ec7c78b /drivers/gpu/drm/mediatek
parent7627122fd1c06800a1fe624e9fb3c269796115e8 (diff)
drm/mediatek: Add mbox_free_channel in mtk_drm_crtc_destroy
Add mbox_free_channel in mtk_drm_crtc_destroy. Signed-off-by: jason-jh.lin <jason-jh.lin@mediatek.com> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/mediatek')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_crtc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
index ffa54b416ca7..b48b76b796a6 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
@@ -156,6 +156,11 @@ static void mtk_drm_crtc_destroy(struct drm_crtc *crtc)
mtk_mutex_put(mtk_crtc->mutex);
#if IS_REACHABLE(CONFIG_MTK_CMDQ)
mtk_drm_cmdq_pkt_destroy(&mtk_crtc->cmdq_handle);
+
+ if (mtk_crtc->cmdq_client.chan) {
+ mbox_free_channel(mtk_crtc->cmdq_client.chan);
+ mtk_crtc->cmdq_client.chan = NULL;
+ }
#endif
drm_crtc_cleanup(crtc);
}