mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Jianhua Lin <jianhua.lin@mediatek.com>,
	daniel.almeida@collabora.com, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH v4 1/1] media: mediatek: jpeg: support 34bits
Date: Mon, 5 Aug 2024 13:03:07 +0200	[thread overview]
Message-ID: <2035c6ef-ff91-43d6-8270-7dcb3ae6fbfc@collabora.com> (raw)
In-Reply-To: <20240801031012.31053-1-jianhua.lin@mediatek.com>

Il 01/08/24 05:10, Jianhua Lin ha scritto:
> the iommu HW supported 34bits iova space(16GB),
> but mediatek jpeg enc/dec driver still is 32bit,
> then need to set the bit32/bit33 iova to jpeg HW.
> 
> Signed-off-by: Jianhua Lin <jianhua.lin@mediatek.com>
> ---
> Changes compared with v3:
> - remove of_property_read_bool() for 34bit supporting check.
> - move the support_34bit into the platform data(mtk_jpeg_variant)
>    for the specific SoC supporting.
> - add mtk8188 SoC to compatible list.
> 
>   .../platform/mediatek/jpeg/mtk_jpeg_core.c    | 55 ++++++++++++++++-
>   .../platform/mediatek/jpeg/mtk_jpeg_core.h    |  4 ++
>   .../platform/mediatek/jpeg/mtk_jpeg_dec_hw.c  | 59 +++++++++++++++----
>   .../platform/mediatek/jpeg/mtk_jpeg_dec_hw.h  |  1 +
>   .../platform/mediatek/jpeg/mtk_jpeg_dec_reg.h |  8 +++
>   .../platform/mediatek/jpeg/mtk_jpeg_enc_hw.c  | 44 ++++++++++++--
>   .../platform/mediatek/jpeg/mtk_jpeg_enc_hw.h  |  7 ++-
>   7 files changed, 158 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
> index ac48658e2de4..101c509ab2ab 100644
> --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
> +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c

..snip..

> @@ -1860,6 +1863,10 @@ static struct clk_bulk_data mtk_jpeg_clocks[] = {
>       { .id = "jpgenc" },
>   };
>   +static struct clk_bulk_data mtk_jpeg_dec_clocks[] = {
> +    { .id = "jpgdec" },
> +};
> +
>   static struct clk_bulk_data mt8173_jpeg_dec_clocks[] = {
>       { .id = "jpgdec-smi" },
>       { .id = "jpgdec" },
> @@ -1878,6 +1885,7 @@ static const struct mtk_jpeg_variant mt8173_jpeg_drvdata = {
>       .ioctl_ops = &mtk_jpeg_dec_ioctl_ops,
>       .out_q_default_fourcc = V4L2_PIX_FMT_JPEG,
>       .cap_q_default_fourcc = V4L2_PIX_FMT_YUV420M,
> +    .support_34bit = false,

You don't need to set this to false, as the default value is already 0 (false).

Please remove all instances of `.support_34bit = false`, and keep only the true
assignments, after which, and *only after*, on your v5:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

>   };
>     static const struct mtk_jpeg_variant mtk_jpeg_drvdata = {
> @@ -1894,6 +1902,7 @@ static const struct mtk_jpeg_variant mtk_jpeg_drvdata = {
>       .out_q_default_fourcc = V4L2_PIX_FMT_YUYV,
>       .cap_q_default_fourcc = V4L2_PIX_FMT_JPEG,
>       .multi_core = false,
> +    .support_34bit = false,
>   };
>     static struct mtk_jpeg_variant mtk8195_jpegenc_drvdata = {
> @@ -1907,6 +1916,7 @@ static struct mtk_jpeg_variant mtk8195_jpegenc_drvdata = {
>       .cap_q_default_fourcc = V4L2_PIX_FMT_JPEG,
>       .multi_core = true,
>       .jpeg_worker = mtk_jpegenc_worker,
> +    .support_34bit = false,
>   };
>     static const struct mtk_jpeg_variant mtk8195_jpegdec_drvdata = {
> @@ -1920,6 +1930,41 @@ static const struct mtk_jpeg_variant mtk8195_jpegdec_drvdata = {
>       .cap_q_default_fourcc = V4L2_PIX_FMT_YUV420M,
>       .multi_core = true,
>       .jpeg_worker = mtk_jpegdec_worker,
> +    .support_34bit = false,
> +};
> +
> +static const struct mtk_jpeg_variant mtk8188_jpegenc_drvdata = {
> +    .clks = mtk_jpeg_clocks,
> +    .num_clks = ARRAY_SIZE(mtk_jpeg_clocks),
> +    .formats = mtk_jpeg_enc_formats,
> +    .num_formats = MTK_JPEG_ENC_NUM_FORMATS,
> +    .qops = &mtk_jpeg_enc_qops,
> +    .irq_handler = mtk_jpeg_enc_irq,
> +    .hw_reset = mtk_jpeg_enc_reset,
> +    .m2m_ops = &mtk_jpeg_enc_m2m_ops,
> +    .dev_name = "mtk-jpeg-enc",
> +    .ioctl_ops = &mtk_jpeg_enc_ioctl_ops,
> +    .out_q_default_fourcc = V4L2_PIX_FMT_YUYV,
> +    .cap_q_default_fourcc = V4L2_PIX_FMT_JPEG,
> +    .multi_core = false,
> +    .support_34bit = true,
> +};
> +
> +static const struct mtk_jpeg_variant mtk8188_jpegdec_drvdata = {
> +    .clks = mtk_jpeg_dec_clocks,
> +    .num_clks = ARRAY_SIZE(mtk_jpeg_dec_clocks),
> +    .formats = mtk_jpeg_dec_formats,
> +    .num_formats = MTK_JPEG_DEC_NUM_FORMATS,
> +    .qops = &mtk_jpeg_dec_qops,
> +    .irq_handler = mtk_jpeg_dec_irq,
> +    .hw_reset = mtk_jpeg_dec_reset,
> +    .m2m_ops = &mtk_jpeg_dec_m2m_ops,
> +    .dev_name = "mtk-jpeg-dec",
> +    .ioctl_ops = &mtk_jpeg_dec_ioctl_ops,
> +    .out_q_default_fourcc = V4L2_PIX_FMT_JPEG,
> +    .cap_q_default_fourcc = V4L2_PIX_FMT_YUV420M,
> +    .multi_core = false,
> +    .support_34bit = true,
>   };
>   

      reply	other threads:[~2024-08-05 11:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01  3:10 Jianhua Lin
2024-08-05 11:03 ` AngeloGioacchino Del Regno [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2035c6ef-ff91-43d6-8270-7dcb3ae6fbfc@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=daniel.almeida@collabora.com \
    --cc=jianhua.lin@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®