From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: Chen-Yu Tsai <wenst@chromium.org>,
Tiffany Lin <tiffany.lin@mediatek.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Yunfei Dong <yunfei.dong@mediatek.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mediatek@lists.infradead.org,
Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH 4/6] media: mediatek: vcodec: Revert driver name change in encoder capabilities
Date: Fri, 8 Jul 2022 11:19:19 +0200 [thread overview]
Message-ID: <daf5e3e6-8a13-3c16-5fa6-9c4e69883c49@xs4all.nl> (raw)
In-Reply-To: <20220701105237.932332-5-wenst@chromium.org>
On 7/1/22 12:52, Chen-Yu Tsai wrote:
> This partially reverts commit fd9f8050e355d7fd1e126cd207b06c96cde7f783.
>
> The driver name field should contain the actual driver name, not some
> otherwise unused string macro from the driver. To make this clear,
> copy the name from the driver's name field.
>
> Fixes: fd9f8050e355 ("media: mediatek: vcodec: Change encoder v4l2 capability value")
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
> drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 +
> drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 6 ++++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
> index 4140b4dd85bf..dc6aada882d9 100644
> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
> @@ -22,6 +22,7 @@
> #define MTK_VCODEC_DRV_NAME "mtk_vcodec_drv"
Note that this patch removes the last user of this define, so
you can drop that define as well.
> #define MTK_VCODEC_DEC_NAME "mtk-vcodec-dec"
> #define MTK_VCODEC_ENC_NAME "mtk-vcodec-enc"
> +#define MTK_PLATFORM_STR "platform:mt8173"
Why add this?
>
> #define MTK_VCODEC_MAX_PLANES 3
> #define MTK_V4L2_BENCHMARK 0
> diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c
> index ccc753074816..30aac54d97fa 100644
> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c
> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c
> @@ -232,11 +232,13 @@ static int mtk_vcodec_enc_get_chip_name(void *priv)
> static int vidioc_venc_querycap(struct file *file, void *priv,
> struct v4l2_capability *cap)
> {
> + struct mtk_vcodec_ctx *ctx = fh_to_ctx(priv);
> + struct device *dev = &ctx->dev->plat_dev->dev;
> int platform_name = mtk_vcodec_enc_get_chip_name(priv);
>
> - strscpy(cap->driver, MTK_VCODEC_DRV_NAME, sizeof(cap->driver));
> - strscpy(cap->card, MTK_VCODEC_ENC_NAME, sizeof(cap->card));
> + strscpy(cap->driver, dev->driver->name, sizeof(cap->driver));
> snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:mt%d-enc", platform_name);
> + strscpy(cap->card, MTK_PLATFORM_STR, sizeof(cap->card));
The next patch changes cap->card again, and leaves MTK_PLATFORM_STR unused.
>
> return 0;
> }
I think it makes more sense to combine patches 1-3 and 4-6 into single
patches, one for the decoder, one for the encoder. It's easier to follow
since they all touch on the same querycap function.
Regards,
Hans
next prev parent reply other threads:[~2022-07-08 9:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 10:52 [PATCH 0/6] media: mediatek-vcodec: Fix capability fields again Chen-Yu Tsai
2022-07-01 10:52 ` [PATCH 1/6] media: mediatek: vcodec: Revert driver name change in decoder capabilities Chen-Yu Tsai
2022-07-01 10:52 ` [PATCH 2/6] media: mediatek: vcodec: Use meaningful decoder card name including chip name Chen-Yu Tsai
2022-07-01 10:52 ` [PATCH 3/6] media: mediatek: vcodec: Use default bus_info for decoder capability Chen-Yu Tsai
2022-07-01 10:52 ` [PATCH 4/6] media: mediatek: vcodec: Revert driver name change in encoder capabilities Chen-Yu Tsai
2022-07-08 9:19 ` Hans Verkuil [this message]
2022-07-08 9:25 ` Chen-Yu Tsai
2022-07-01 10:52 ` [PATCH 5/6] media: mediatek: vcodec: Use meaningful encoder card name including chip name Chen-Yu Tsai
2022-07-01 10:52 ` [PATCH 6/6] media: mediatek: vcodec: Use default bus_info for encoder capability Chen-Yu Tsai
[not found] ` <e601a375-cc80-40cd-9791-e44e9d37cec0@email.android.com>
2022-07-01 13:10 ` [PATCH 0/6] media: mediatek-vcodec: Fix capability fields again Chen-Yu Tsai
2022-07-04 19:01 ` Nicolas Dufresne
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=daf5e3e6-8a13-3c16-5fa6-9c4e69883c49@xs4all.nl \
--to=hverkuil-cisco@xs4all.nl \
--cc=andrew-ct.chen@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=tiffany.lin@mediatek.com \
--cc=wenst@chromium.org \
--cc=yunfei.dong@mediatek.com \
/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®