drm/mediatek: Remove the pointer of struct cmdq_client
authorChun-Kuang Hu <chunkuang.hu@kernel.org>
Thu, 28 Oct 2021 10:19:08 +0000 (18:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:35:07 +0000 (16:35 +0200)
commit6f77386ddb1cca97da95fb116c2975cc529936f5
tree051b8a3c0e88072ba14be587edb3a6c3058d8067
parentd953c679022cb2c2cd58ebb5e09a47e4492c3744
drm/mediatek: Remove the pointer of struct cmdq_client

[ Upstream commit 563c9d4a5b117552150efbecbaf0877947e98a32 ]

In mailbox rx_callback, it pass struct mbox_client to callback
function, but it could not map back to mtk_drm_crtc instance
because struct cmdq_client use a pointer to struct mbox_client:

struct cmdq_client {
struct mbox_client client;
struct mbox_chan *chan;
};

struct mtk_drm_crtc {
/* client instance data */
struct cmdq_client *cmdq_client;
};

so remove the pointer of struct cmdq_client and let mtk_drm_crtc
instance define cmdq_client as:

struct mtk_drm_crtc {
/* client instance data */
struct cmdq_client cmdq_client;
};

and in rx_callback function, use struct mbox_client to get
struct mtk_drm_crtc.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: jason-jh.lin <jason-jh.lin@mediatek.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/mediatek/mtk_drm_crtc.c