[PATCH] soc: mediatek: cmdq: Remove unused helper funciton

Chun-Kuang Hu chunkuang.hu at kernel.org
Mon Feb 20 08:39:43 PST 2023


Hi, Angelo:

AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com> 於
2023年2月20日 週一 下午7:31寫道:
>
> Il 20/02/23 00:34, Chun-Kuang Hu ha scritto:
> > cmdq_pkt_create(), cmdq_pkt_destroy(), and cmdq_pkt_flush_async()
> > are not used by all client drivers (MediaTek drm driver and
> > MediaTek mdp3 driver), so remove them.
> >
> > Signed-off-by: Chun-Kuang Hu <chunkuang.hu at kernel.org>
>
> My next cleanup step would be to migrate both the MediaTek DRM driver
> and MDP3 to use the common functions present in mtk-cmdq-helper.
> Function mtk_drm_cmdq_pkt_create() is (almost) a clone of cmdq_pkt_create().

It's good to hear that you have plan to refine cmdq_pkt_create(). I
have one plan and wish you may consider in your patch. The plan is to
remove cl in struct cmdq_pkt because cl is used for channel
information and the client would have the channel information, so it's
not necessary to store the channel information in every packet. In
cmdq_pkt_jump() and cmdq_pkt_finalize() use cl to get
cmdq_get_shift_pa(), I think it's not necessary to get shift pa every
cmdq_pkt_jump() and every cmdq_pkt_finalize(), so client could
cmdq_get_shift_pa() once and pass this information to cmdq_pkt_jump()
and cmdq_pkt_finalize().

Regards,
Chun-Kuang.

>
> NACK.
>
> Regards,
> Angelo



More information about the linux-arm-kernel mailing list