* [PATCH 0/3] Support h264 encoder on MT8195
@ 2021-06-30 8:52 Irui Wang
2021-06-30 8:52 ` [PATCH 1/3] media: mtk-vcodec: Clean redundant encoder format definition Irui Wang
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Irui Wang @ 2021-06-30 8:52 UTC (permalink / raw)
To: Hans Verkuil, Tzung-Bi Shih, Alexandre Courbot, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: Hsin-Yi Wang, Maoguang Meng, Longfei Wang, Yunfei Dong,
Fritz Koenig, Irui Wang, linux-media, devicetree, linux-kernel,
linux-arm-kernel, srv_heupstream, linux-mediatek,
Project_Global_Chrome_Upstream_Group
Add MT8195 H264 venc driver
Irui Wang (3):
media: mtk-vcodec: Clean redundant encoder format definition
dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC
media: mtk-vcodec: Add MT8195 H264 venc driver
.../bindings/media/mediatek-vcodec.txt | 1 +
.../platform/mtk-vcodec/mtk_vcodec_drv.h | 1 +
.../platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 63 ++++++++++---------
3 files changed, 35 insertions(+), 30 deletions(-)
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] media: mtk-vcodec: Clean redundant encoder format definition
2021-06-30 8:52 [PATCH 0/3] Support h264 encoder on MT8195 Irui Wang
@ 2021-06-30 8:52 ` Irui Wang
2021-06-30 8:52 ` [PATCH 2/3] dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC Irui Wang
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Irui Wang @ 2021-06-30 8:52 UTC (permalink / raw)
To: Hans Verkuil, Tzung-Bi Shih, Alexandre Courbot, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: Hsin-Yi Wang, Maoguang Meng, Longfei Wang, Yunfei Dong,
Fritz Koenig, Irui Wang, linux-media, devicetree, linux-kernel,
linux-arm-kernel, srv_heupstream, linux-mediatek,
Project_Global_Chrome_Upstream_Group
The supported capture/output formats don't depend on models,
clean redundant definitions and nameing with type instead.
Signed-off-by: Irui Wang <irui.wang@mediatek.com>
---
.../platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 50 ++++++++-----------
1 file changed, 20 insertions(+), 30 deletions(-)
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
index 45d1870c83dd..4489a9744cd7 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
@@ -26,7 +26,7 @@
module_param(mtk_v4l2_dbg_level, int, S_IRUGO | S_IWUSR);
module_param(mtk_vcodec_dbg, bool, S_IRUGO | S_IWUSR);
-static const struct mtk_video_fmt mtk_video_formats_output_mt8173[] = {
+static const struct mtk_video_fmt mtk_video_formats_output[] = {
{
.fourcc = V4L2_PIX_FMT_NV12M,
.type = MTK_FMT_FRAME,
@@ -49,7 +49,7 @@ static const struct mtk_video_fmt mtk_video_formats_output_mt8173[] = {
},
};
-static const struct mtk_video_fmt mtk_video_formats_capture_mt8173_avc[] = {
+static const struct mtk_video_fmt mtk_video_formats_capture_h264[] = {
{
.fourcc = V4L2_PIX_FMT_H264,
.type = MTK_FMT_ENC,
@@ -57,7 +57,7 @@ static const struct mtk_video_fmt mtk_video_formats_capture_mt8173_avc[] = {
},
};
-static const struct mtk_video_fmt mtk_video_formats_capture_mt8173_vp8[] = {
+static const struct mtk_video_fmt mtk_video_formats_capture_vp8[] = {
{
.fourcc = V4L2_PIX_FMT_VP8,
.type = MTK_FMT_ENC,
@@ -65,14 +65,6 @@ static const struct mtk_video_fmt mtk_video_formats_capture_mt8173_vp8[] = {
},
};
-static const struct mtk_video_fmt mtk_video_formats_capture_mt8183[] = {
- {
- .fourcc = V4L2_PIX_FMT_H264,
- .type = MTK_FMT_ENC,
- .num_planes = 1,
- },
-};
-
/* Wake up context wait_queue */
static void wake_up_ctx(struct mtk_vcodec_ctx *ctx, unsigned int reason)
{
@@ -392,10 +384,10 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
static const struct mtk_vcodec_enc_pdata mt8173_avc_pdata = {
.chip = MTK_MT8173,
- .capture_formats = mtk_video_formats_capture_mt8173_avc,
- .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_mt8173_avc),
- .output_formats = mtk_video_formats_output_mt8173,
- .num_output_formats = ARRAY_SIZE(mtk_video_formats_output_mt8173),
+ .capture_formats = mtk_video_formats_capture_h264,
+ .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_h264),
+ .output_formats = mtk_video_formats_output,
+ .num_output_formats = ARRAY_SIZE(mtk_video_formats_output),
.min_bitrate = 1,
.max_bitrate = 4000000,
.core_id = VENC_SYS,
@@ -403,10 +395,10 @@ static const struct mtk_vcodec_enc_pdata mt8173_avc_pdata = {
static const struct mtk_vcodec_enc_pdata mt8173_vp8_pdata = {
.chip = MTK_MT8173,
- .capture_formats = mtk_video_formats_capture_mt8173_vp8,
- .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_mt8173_vp8),
- .output_formats = mtk_video_formats_output_mt8173,
- .num_output_formats = ARRAY_SIZE(mtk_video_formats_output_mt8173),
+ .capture_formats = mtk_video_formats_capture_vp8,
+ .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_vp8),
+ .output_formats = mtk_video_formats_output,
+ .num_output_formats = ARRAY_SIZE(mtk_video_formats_output),
.min_bitrate = 64,
.max_bitrate = 4000000,
.core_id = VENC_LT_SYS,
@@ -415,11 +407,10 @@ static const struct mtk_vcodec_enc_pdata mt8173_vp8_pdata = {
static const struct mtk_vcodec_enc_pdata mt8183_pdata = {
.chip = MTK_MT8183,
.uses_ext = true,
- .capture_formats = mtk_video_formats_capture_mt8183,
- .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_mt8183),
- /* MT8183 supports the same output formats as MT8173 */
- .output_formats = mtk_video_formats_output_mt8173,
- .num_output_formats = ARRAY_SIZE(mtk_video_formats_output_mt8173),
+ .capture_formats = mtk_video_formats_capture_h264,
+ .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_h264),
+ .output_formats = mtk_video_formats_output,
+ .num_output_formats = ARRAY_SIZE(mtk_video_formats_output),
.min_bitrate = 64,
.max_bitrate = 40000000,
.core_id = VENC_SYS,
@@ -428,16 +419,15 @@ static const struct mtk_vcodec_enc_pdata mt8183_pdata = {
static const struct mtk_vcodec_enc_pdata mt8192_pdata = {
.chip = MTK_MT8192,
.uses_ext = true,
- /* MT8192 supports the same capture formats as MT8183 */
- .capture_formats = mtk_video_formats_capture_mt8183,
- .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_mt8183),
- /* MT8192 supports the same output formats as MT8173 */
- .output_formats = mtk_video_formats_output_mt8173,
- .num_output_formats = ARRAY_SIZE(mtk_video_formats_output_mt8173),
+ .capture_formats = mtk_video_formats_capture_h264,
+ .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_h264),
+ .output_formats = mtk_video_formats_output,
+ .num_output_formats = ARRAY_SIZE(mtk_video_formats_output),
.min_bitrate = 64,
.max_bitrate = 100000000,
.core_id = VENC_SYS,
};
+
static const struct of_device_id mtk_vcodec_enc_match[] = {
{.compatible = "mediatek,mt8173-vcodec-enc",
.data = &mt8173_avc_pdata},
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC
2021-06-30 8:52 [PATCH 0/3] Support h264 encoder on MT8195 Irui Wang
2021-06-30 8:52 ` [PATCH 1/3] media: mtk-vcodec: Clean redundant encoder format definition Irui Wang
@ 2021-06-30 8:52 ` Irui Wang
2021-07-02 4:08 ` Tzung-Bi Shih
2021-07-14 21:25 ` Rob Herring
2021-06-30 8:52 ` [PATCH 3/3] media: mtk-vcodec: Add MT8195 H264 venc driver Irui Wang
2021-07-02 4:10 ` [PATCH 0/3] Support h264 encoder on MT8195 Tzung-Bi Shih
3 siblings, 2 replies; 7+ messages in thread
From: Irui Wang @ 2021-06-30 8:52 UTC (permalink / raw)
To: Hans Verkuil, Tzung-Bi Shih, Alexandre Courbot, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: Hsin-Yi Wang, Maoguang Meng, Longfei Wang, Yunfei Dong,
Fritz Koenig, Irui Wang, linux-media, devicetree, linux-kernel,
linux-arm-kernel, srv_heupstream, linux-mediatek,
Project_Global_Chrome_Upstream_Group
Updates binding document for mt8192 encoder driver.
Signed-off-by: Irui Wang <irui.wang@mediatek.com>
---
Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
index ad1321e5a22d..de961699ba0a 100644
--- a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
+++ b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
@@ -10,6 +10,7 @@ Required properties:
"mediatek,mt8183-vcodec-enc" for MT8183 encoder.
"mediatek,mt8173-vcodec-dec" for MT8173 decoder.
"mediatek,mt8192-vcodec-enc" for MT8192 encoder.
+ "mediatek,mt8195-vcodec-enc" for MT8195 encoder.
- reg : Physical base address of the video codec registers and length of
memory mapped region.
- interrupts : interrupt number to the cpu.
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] media: mtk-vcodec: Add MT8195 H264 venc driver
2021-06-30 8:52 [PATCH 0/3] Support h264 encoder on MT8195 Irui Wang
2021-06-30 8:52 ` [PATCH 1/3] media: mtk-vcodec: Clean redundant encoder format definition Irui Wang
2021-06-30 8:52 ` [PATCH 2/3] dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC Irui Wang
@ 2021-06-30 8:52 ` Irui Wang
2021-07-02 4:10 ` [PATCH 0/3] Support h264 encoder on MT8195 Tzung-Bi Shih
3 siblings, 0 replies; 7+ messages in thread
From: Irui Wang @ 2021-06-30 8:52 UTC (permalink / raw)
To: Hans Verkuil, Tzung-Bi Shih, Alexandre Courbot, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: Hsin-Yi Wang, Maoguang Meng, Longfei Wang, Yunfei Dong,
Fritz Koenig, Irui Wang, linux-media, devicetree, linux-kernel,
linux-arm-kernel, srv_heupstream, linux-mediatek,
Project_Global_Chrome_Upstream_Group
Add MT8195 venc driver's compatible and device private data.
Signed-off-by: Irui Wang <irui.wang@mediatek.com>
---
drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 1 +
.../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
index c6c7672fecfb..3f83710b4fa5 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
@@ -304,6 +304,7 @@ enum mtk_chip {
MTK_MT8173,
MTK_MT8183,
MTK_MT8192,
+ MTK_MT8195,
};
/**
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
index 4489a9744cd7..7b3e0ea4c410 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
@@ -428,6 +428,18 @@ static const struct mtk_vcodec_enc_pdata mt8192_pdata = {
.core_id = VENC_SYS,
};
+static const struct mtk_vcodec_enc_pdata mt8195_pdata = {
+ .chip = MTK_MT8195,
+ .uses_ext = true,
+ .capture_formats = mtk_video_formats_capture_h264,
+ .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_h264),
+ .output_formats = mtk_video_formats_output,
+ .num_output_formats = ARRAY_SIZE(mtk_video_formats_output),
+ .min_bitrate = 64,
+ .max_bitrate = 100000000,
+ .core_id = VENC_SYS,
+};
+
static const struct of_device_id mtk_vcodec_enc_match[] = {
{.compatible = "mediatek,mt8173-vcodec-enc",
.data = &mt8173_avc_pdata},
@@ -435,6 +447,7 @@ static const struct of_device_id mtk_vcodec_enc_match[] = {
.data = &mt8173_vp8_pdata},
{.compatible = "mediatek,mt8183-vcodec-enc", .data = &mt8183_pdata},
{.compatible = "mediatek,mt8192-vcodec-enc", .data = &mt8192_pdata},
+ {.compatible = "mediatek,mt8195-vcodec-enc", .data = &mt8195_pdata},
{},
};
MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC
2021-06-30 8:52 ` [PATCH 2/3] dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC Irui Wang
@ 2021-07-02 4:08 ` Tzung-Bi Shih
2021-07-14 21:25 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2021-07-02 4:08 UTC (permalink / raw)
To: Irui Wang
Cc: Hans Verkuil, Tzung-Bi Shih, Alexandre Courbot, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa, Hsin-Yi Wang, Maoguang Meng,
Longfei Wang, Yunfei Dong, Fritz Koenig, linux-media, devicetree,
linux-kernel, linux-arm-kernel, srv_heupstream, linux-mediatek,
Project_Global_Chrome_Upstream_Group
On Wed, Jun 30, 2021 at 4:54 PM Irui Wang <irui.wang@mediatek.com> wrote:
> Updates binding document for mt8192 encoder driver.
Typo in the commit message.
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Support h264 encoder on MT8195
2021-06-30 8:52 [PATCH 0/3] Support h264 encoder on MT8195 Irui Wang
` (2 preceding siblings ...)
2021-06-30 8:52 ` [PATCH 3/3] media: mtk-vcodec: Add MT8195 H264 venc driver Irui Wang
@ 2021-07-02 4:10 ` Tzung-Bi Shih
3 siblings, 0 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2021-07-02 4:10 UTC (permalink / raw)
To: Irui Wang
Cc: Hans Verkuil, Tzung-Bi Shih, Alexandre Courbot, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa, Hsin-Yi Wang, Maoguang Meng,
Longfei Wang, Yunfei Dong, Fritz Koenig, linux-media, devicetree,
linux-kernel, linux-arm-kernel, srv_heupstream, linux-mediatek,
Project_Global_Chrome_Upstream_Group
On Wed, Jun 30, 2021 at 4:52 PM Irui Wang <irui.wang@mediatek.com> wrote:
>
> Add MT8195 H264 venc driver
>
> Irui Wang (3):
> media: mtk-vcodec: Clean redundant encoder format definition
> dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC
> media: mtk-vcodec: Add MT8195 H264 venc driver
A typo in the commit message of DT binding patch. With that:
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC
2021-06-30 8:52 ` [PATCH 2/3] dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC Irui Wang
2021-07-02 4:08 ` Tzung-Bi Shih
@ 2021-07-14 21:25 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2021-07-14 21:25 UTC (permalink / raw)
To: Irui Wang
Cc: Hans Verkuil, linux-arm-kernel, devicetree, Tiffany Lin,
Maoguang Meng, Hsin-Yi Wang, Alexandre Courbot, Fritz Koenig,
linux-kernel, Mauro Carvalho Chehab, Tomasz Figa, Yunfei Dong,
Longfei Wang, Tzung-Bi Shih, Matthias Brugger, linux-media,
srv_heupstream, Rob Herring, Andrew-CT Chen,
Project_Global_Chrome_Upstream_Group, linux-mediatek
On Wed, 30 Jun 2021 16:52:46 +0800, Irui Wang wrote:
> Updates binding document for mt8192 encoder driver.
>
> Signed-off-by: Irui Wang <irui.wang@mediatek.com>
> ---
> Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-07-14 23:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 8:52 [PATCH 0/3] Support h264 encoder on MT8195 Irui Wang
2021-06-30 8:52 ` [PATCH 1/3] media: mtk-vcodec: Clean redundant encoder format definition Irui Wang
2021-06-30 8:52 ` [PATCH 2/3] dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC Irui Wang
2021-07-02 4:08 ` Tzung-Bi Shih
2021-07-14 21:25 ` Rob Herring
2021-06-30 8:52 ` [PATCH 3/3] media: mtk-vcodec: Add MT8195 H264 venc driver Irui Wang
2021-07-02 4:10 ` [PATCH 0/3] Support h264 encoder on MT8195 Tzung-Bi Shih
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).