* Re: [PATCH v2 3/9] media: platform: mtk-mdp3: add chip independence architecture
[not found] ` <20211020071448.14187-4-roy-cw.yeh@mediatek.com>
@ 2021-10-20 9:29 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2021-10-20 9:29 UTC (permalink / raw)
To: roy-cw.yeh, Rob Herring, Matthias Brugger, Chun-Kuang Hu
Cc: Mauro Carvalho Chehab, Fabien Parent, jason-jh . lin,
daoyuan huang, Ping-Hsun Wu, Moudy Ho, river . cheng,
Yongqiang Niu, devicetree, linux-kernel, linux-media,
linux-arm-kernel, linux-mediatek
Il 20/10/21 09:14, roy-cw.yeh ha scritto:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
>
> Add chip independence architecture
> - Add hal architecture for mt8183
> - Add driver data to adapt other soc
>
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
> ---
> .../media/platform/mtk-mdp3/mtk-mdp3-cmdq.c | 154 ++++---
> .../media/platform/mtk-mdp3/mtk-mdp3-comp.c | 181 ++++-----
> .../media/platform/mtk-mdp3/mtk-mdp3-comp.h | 193 ++++++++-
> .../media/platform/mtk-mdp3/mtk-mdp3-core.c | 383 +++++++++++++++++-
> .../media/platform/mtk-mdp3/mtk-mdp3-core.h | 19 +
> .../media/platform/mtk-mdp3/mtk-mdp3-m2m.c | 10 +-
> .../media/platform/mtk-mdp3/mtk-mdp3-regs.c | 259 +-----------
> .../media/platform/mtk-mdp3/mtk-mdp3-regs.h | 268 ++++++------
> 8 files changed, 925 insertions(+), 542 deletions(-)
>
snip...
> diff --git a/drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c b/drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c
> index a6caefb097be..50fd5430a565 100644
> --- a/drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c
> +++ b/drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c
snip..
> @@ -732,7 +514,7 @@ int mdp_frameparam_init(struct mdp_frameparam *param)
> param->num_captures = 1;
> frame = ¶m->captures[0];
> frame->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
> - frame->mdp_fmt = mdp_try_fmt_mplane(&frame->format, param, 0);
> + frame->mdp_fmt = mdp_try_fmt_mplane(mdp, &frame->format, param, 0);
> frame->ycbcr_prof =
> mdp_map_ycbcr_prof_mplane(&frame->format,
> frame->mdp_fmt->mdp_color);
> @@ -744,3 +526,4 @@ int mdp_frameparam_init(struct mdp_frameparam *param)
>
> return 0;
> }
> +
Please remove this empty new line.
Apart from that,
Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2 2/9] soc: mediatek: mutex: expand parameter for mdp mutex function
[not found] ` <20211020071448.14187-3-roy-cw.yeh@mediatek.com>
@ 2021-10-20 9:29 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2021-10-20 9:29 UTC (permalink / raw)
To: roy-cw.yeh, Rob Herring, Matthias Brugger, Chun-Kuang Hu
Cc: Mauro Carvalho Chehab, Fabien Parent, jason-jh . lin,
daoyuan huang, Ping-Hsun Wu, Moudy Ho, river . cheng,
Yongqiang Niu, devicetree, linux-kernel, linux-media,
linux-arm-kernel, linux-mediatek
Il 20/10/21 09:14, roy-cw.yeh ha scritto:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
>
> Expand parameter for mdp mutex function
>
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> drivers/soc/mediatek/mtk-mutex.c | 26 ++++++++++++++++++--------
> include/linux/soc/mediatek/mtk-mutex.h | 2 +-
> 2 files changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
> index 814f58f692cf..c100a5249016 100644
> --- a/drivers/soc/mediatek/mtk-mutex.c
> +++ b/drivers/soc/mediatek/mtk-mutex.c
> @@ -25,8 +25,9 @@
> #define DISP_REG_MUTEX_EN(n) (0x20 + 0x20 * (n))
> #define DISP_REG_MUTEX(n) (0x24 + 0x20 * (n))
> #define DISP_REG_MUTEX_RST(n) (0x28 + 0x20 * (n))
> -#define DISP_REG_MUTEX_MOD(mutex_mod_reg, n) (mutex_mod_reg + 0x20 * (n))
> -#define DISP_REG_MUTEX_SOF(mutex_sof_reg, n) (mutex_sof_reg + 0x20 * (n))
> +#define DISP_REG_MUTEX_MOD(mutex_mod_reg, n) ((mutex_mod_reg) + 0x20 * (n))
> +#define DISP_REG_MUTEX_MOD1(mutex_mod_reg, n) ((mutex_mod_reg) + 0x20 * (n) + 0x4)
> +#define DISP_REG_MUTEX_SOF(mutex_sof_reg, n) ((mutex_sof_reg) + 0x20 * (n))
> #define DISP_REG_MUTEX_MOD2(n) (0x34 + 0x20 * (n))
>
> #define INT_MUTEX BIT(1)
> @@ -116,6 +117,11 @@
> #define MT8183_MUTEX_MDP_MOD_MASK 0x07FFFFFF
> #define MT8183_MUTEX_MDP_SOF_MASK 0x00000007
>
> +#define MT8183_MDP_PIPE_IMGI MT8183_MUTEX_MDP_START
> +#define MT8183_MDP_PIPE_RDMA0 (MT8183_MUTEX_MDP_START + 1)
> +#define MT8183_MDP_PIPE_WPEI (MT8183_MUTEX_MDP_START + 2)
> +#define MT8183_MDP_PIPE_WPEI2 (MT8183_MUTEX_MDP_START + 3)
> +
> struct mtk_mutex {
> int id;
> bool claimed;
> @@ -254,10 +260,10 @@ static const unsigned int mt8183_mutex_sof[MUTEX_SOF_DSI3 + 1] = {
>
> /* indicate which mutex is used by each pipepline */
> static const unsigned int mt8183_mutex_mdp_offset[MDP_PIPE_MAX] = {
> - [MDP_PIPE_IMGI] = MT8183_MUTEX_MDP_START,
> - [MDP_PIPE_RDMA0] = MT8183_MUTEX_MDP_START + 1,
> - [MDP_PIPE_WPEI] = MT8183_MUTEX_MDP_START + 2,
> - [MDP_PIPE_WPEI2] = MT8183_MUTEX_MDP_START + 3
> + [MDP_PIPE_IMGI] = MT8183_MDP_PIPE_IMGI,
> + [MDP_PIPE_RDMA0] = MT8183_MDP_PIPE_RDMA0,
> + [MDP_PIPE_WPEI] = MT8183_MDP_PIPE_WPEI,
> + [MDP_PIPE_WPEI2] = MT8183_MDP_PIPE_WPEI2,
> };
>
> static const struct mtk_mutex_data mt2701_mutex_driver_data = {
> @@ -410,7 +416,7 @@ void mtk_mutex_add_comp(struct mtk_mutex *mutex,
> EXPORT_SYMBOL_GPL(mtk_mutex_add_comp);
>
> void mtk_mutex_add_mdp_mod(struct mtk_mutex *mutex, u32 mod,
> - struct mmsys_cmdq_cmd *cmd)
> + u32 mod1, u32 sof, struct mmsys_cmdq_cmd *cmd)
> {
> struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx,
> mutex[mutex->id]);
> @@ -422,9 +428,13 @@ void mtk_mutex_add_mdp_mod(struct mtk_mutex *mutex, u32 mod,
> cmdq_pkt_write_mask(cmd->pkt, mtx->subsys_id, mtx->addr + offset,
> mod, mtx->data->mutex_mdp_mod_mask);
>
> + offset = DISP_REG_MUTEX_MOD1(mtx->data->mutex_mod_reg, mutex->id);
> + cmdq_pkt_write_mask(cmd->pkt, mtx->subsys_id, mtx->addr + offset,
> + mod1, mtx->data->mutex_mdp_mod_mask);
> +
> offset = DISP_REG_MUTEX_SOF(mtx->data->mutex_sof_reg, mutex->id);
> cmdq_pkt_write_mask(cmd->pkt, mtx->subsys_id, mtx->addr + offset,
> - 0, mtx->data->mutex_mdp_sof_mask);
> + sof, mtx->data->mutex_mdp_sof_mask);
> }
> EXPORT_SYMBOL_GPL(mtk_mutex_add_mdp_mod);
>
> diff --git a/include/linux/soc/mediatek/mtk-mutex.h b/include/linux/soc/mediatek/mtk-mutex.h
> index d08b98419dd9..a2b81ce55b5d 100644
> --- a/include/linux/soc/mediatek/mtk-mutex.h
> +++ b/include/linux/soc/mediatek/mtk-mutex.h
> @@ -17,7 +17,7 @@ int mtk_mutex_prepare(struct mtk_mutex *mutex);
> void mtk_mutex_add_comp(struct mtk_mutex *mutex,
> enum mtk_ddp_comp_id id);
> void mtk_mutex_add_mdp_mod(struct mtk_mutex *mutex, u32 mod,
> - struct mmsys_cmdq_cmd *cmd);
> + u32 mod1, u32 sof, struct mmsys_cmdq_cmd *cmd);
> void mtk_mutex_enable(struct mtk_mutex *mutex);
> void mtk_mutex_enable_by_cmdq(struct mtk_mutex *mutex,
> struct mmsys_cmdq_cmd *cmd);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-20 9:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20211020071448.14187-1-roy-cw.yeh@mediatek.com>
[not found] ` <20211020071448.14187-4-roy-cw.yeh@mediatek.com>
2021-10-20 9:29 ` [PATCH v2 3/9] media: platform: mtk-mdp3: add chip independence architecture AngeloGioacchino Del Regno
[not found] ` <20211020071448.14187-3-roy-cw.yeh@mediatek.com>
2021-10-20 9:29 ` [PATCH v2 2/9] soc: mediatek: mutex: expand parameter for mdp mutex function AngeloGioacchino Del Regno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).