* Re: [PATCH v1 3/4] media: platform: mtk-mdp3: Set dma_set_mask_and_coherent
[not found] ` <20211021063414.23663-4-roy-cw.yeh@mediatek.com>
@ 2021-10-21 10:28 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2021-10-21 10:28 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 21/10/21 08:34, roy-cw.yeh ha scritto:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
>
> Set dma_set_mask_and_coherent
>
Please explain why you're setting that and why 34 bits in the commit description.
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
> ---
> drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c b/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c
> index 1e61ac7ca790..875326afb686 100644
> --- a/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c
> +++ b/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c
> @@ -1141,6 +1141,8 @@ static int mdp_probe(struct platform_device *pdev)
> mdp->pdev = pdev;
> mdp->mdp_data = of_device_get_match_data(&pdev->dev);
>
> + dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34));
> +
> ret = of_property_read_u32(dev->of_node, "mediatek,mdp3-id", &id);
> if (ret) {
> dev_err(dev, "Failed to get mdp-id\n");
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1 4/4] media: platform: mtk-mdp3: Set rdma compression reg in each frame
[not found] ` <20211021063414.23663-5-roy-cw.yeh@mediatek.com>
@ 2021-10-21 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2021-10-21 10:44 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 21/10/21 08:34, roy-cw.yeh ha scritto:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
>
> Set rdma compression reg in each frame
>
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
> ---
> drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c | 10 ++++++----
> drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c | 2 +-
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c b/drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c
> index 12d6c88c68d2..dc0d1b3ff218 100644
> --- a/drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c
> +++ b/drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c
> @@ -178,15 +178,17 @@ static int config_rdma_frame(struct mdp_comp_ctx *ctx,
> /* Setup Compression Control */
> MM_REG_WRITE(cmd, subsys_id, base, MDP_RDMA_COMP_CON,
> rdma->comp_ctrl, write_mask);
> - }
> -
> - if (mdp_cfg->rdma_support_afbc &&
> - (MDP_COLOR_IS_COMPRESS(colorformat))) {
> + } else if (mdp_cfg->rdma_support_afbc &&
> + (MDP_COLOR_IS_COMPRESS(colorformat))) {
Looks like you're unconditionally writing to the compression control register,
so you can just...
> MM_REG_WRITE(cmd, subsys_id, base, MDP_RDMA_MF_BKGD_SIZE_IN_PXL,
> ((width + 31) >> 5) << 5, 0x001FFFFF);
> MM_REG_WRITE(cmd, subsys_id, base, MDP_RDMA_MF_BKGD_H_SIZE_IN_PXL,
> ((height + 7) >> 3) << 3, 0x001FFFFF);
>
}
/* Setup Compression Control */
MM_REG_WRITE(cmd, subsys_id, base, MDP_RDMA_COMP_CON,
rdma->comp_ctrl, write_mask);
... and avoid repeating the same thing over and over in all of the conditionals.
> + /* Setup Compression Control */
> + MM_REG_WRITE(cmd, subsys_id, base, MDP_RDMA_COMP_CON,
> + rdma->comp_ctrl, write_mask);
> + } else {
> /* Setup Compression Control */
> MM_REG_WRITE(cmd, subsys_id, base, MDP_RDMA_COMP_CON,
> rdma->comp_ctrl, write_mask);
> diff --git a/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c b/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c
> index 875326afb686..1a15490d45e7 100644
> --- a/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c
> +++ b/drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c
> @@ -34,7 +34,7 @@ static const struct mdp_platform_config mt8195_plat_cfg = {
> .rdma_support_afbc = true,
> .rdma_esl_setting = true,
> .rdma_rsz1_sram_sharing = false,
> - .rdma_upsample_repeat_only = true,
> + .rdma_upsample_repeat_only = false,
> .rsz_disable_dcm_small_sample = false,
> .rsz_etc_control = true,
> .wrot_filter_constraint = false,
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-21 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20211021063414.23663-1-roy-cw.yeh@mediatek.com>
[not found] ` <20211021063414.23663-4-roy-cw.yeh@mediatek.com>
2021-10-21 10:28 ` [PATCH v1 3/4] media: platform: mtk-mdp3: Set dma_set_mask_and_coherent AngeloGioacchino Del Regno
[not found] ` <20211021063414.23663-5-roy-cw.yeh@mediatek.com>
2021-10-21 10:44 ` [PATCH v1 4/4] media: platform: mtk-mdp3: Set rdma compression reg in each frame 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).