linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for MT8173 codec driver
@ 2016-09-07  6:56 Tiffany Lin
  2016-09-07  6:56 ` [PATCH 1/4] v4l: add Mediatek compressed video block format Tiffany Lin
  2016-09-08  7:21 ` [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for " Hans Verkuil
  0 siblings, 2 replies; 11+ messages in thread
From: Tiffany Lin @ 2016-09-07  6:56 UTC (permalink / raw)
  To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
	Matthias Brugger, Daniel Kurtz, Pawel Osciak
  Cc: Eddie Huang, Yingjoe Chen, linux-kernel, linux-media,
	linux-mediatek, Tiffany.lin, Tiffany Lin

This patch series add Mediatek compressed block format V4L2_PIX_FMT_MT21C, the
decoder driver will decoded bitstream to V4L2_PIX_FMT_MT21C format.

User space applications could use MT8173 MDP driver to convert V4L2_PIX_FMT_MT21C to
V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M and V4L2_PIX_FMT_YVU420.

MDP driver[1] is stand alone driver.

Usage:
MT21C -> MT8173 MDP -> NV12M/YUV420M/YVU420
NV12M/NV21M/YUV420M/YVU420M -> mt8173 Encoder -> H264/VP8
H264/VP8/VP9 -> mtk8173 Decoder -> MT21C

When encode with MT21 source, the pipeline will be:
MT21C -> MDP driver-> NV12M/NV21M/YUV420M/YVU420M -> Encoder -> H264/VP8

When playback, the pipeline will be:
H264/VP8/VP9 -> Decoder driver -> MT21C -> MDP Driver -> DRM

[1]https://patchwork.kernel.org/patch/9305329/

Tiffany Lin (4):
  v4l: add Mediatek compressed video block format
  docs-rst: Add compressed video formats used on MT8173 codec driver
  vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder
  arm64: dts: mediatek: Add Video Decoder for MT8173

 Documentation/media/uapi/v4l/pixfmt-reserved.rst   |    6 +++
 arch/arm64/boot/dts/mediatek/mt8173.dtsi           |   44 ++++++++++++++++++++
 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c |    7 +++-
 drivers/media/v4l2-core/v4l2-ioctl.c               |    1 +
 include/uapi/linux/videodev2.h                     |    1 +
 5 files changed, 58 insertions(+), 1 deletion(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] v4l: add Mediatek compressed video block format
  2016-09-07  6:56 [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for MT8173 codec driver Tiffany Lin
@ 2016-09-07  6:56 ` Tiffany Lin
  2016-09-07  6:56   ` [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver Tiffany Lin
  2016-09-08  7:21 ` [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for " Hans Verkuil
  1 sibling, 1 reply; 11+ messages in thread
From: Tiffany Lin @ 2016-09-07  6:56 UTC (permalink / raw)
  To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
	Matthias Brugger, Daniel Kurtz, Pawel Osciak
  Cc: Eddie Huang, Yingjoe Chen, linux-kernel, linux-media,
	linux-mediatek, Tiffany.lin, Tiffany Lin

Add V4L2_PIX_FMT_MT21C format used on MT8173 driver.
It is compressed format and need MT8173 MDP driver to transfer to other
standard format.

Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
---
 drivers/media/v4l2-core/v4l2-ioctl.c |    1 +
 include/uapi/linux/videodev2.h       |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 2bd1581..1d45c58 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1288,6 +1288,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 		case V4L2_PIX_FMT_JPGL:		descr = "JPEG Lite"; break;
 		case V4L2_PIX_FMT_SE401:	descr = "GSPCA SE401"; break;
 		case V4L2_PIX_FMT_S5C_UYVY_JPG:	descr = "S5C73MX interleaved UYVY/JPEG"; break;
+		case V4L2_PIX_FMT_MT21C:	descr = "Mediatek Compressed Format"; break;
 		default:
 			WARN(1, "Unknown pixelformat 0x%08x\n", fmt->pixelformat);
 			if (fmt->description[0])
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 43326c3..ddd0083 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -635,6 +635,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_Y8I      v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */
 #define V4L2_PIX_FMT_Y12I     v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */
 #define V4L2_PIX_FMT_Z16      v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */
+#define V4L2_PIX_FMT_MT21C    v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode  */
 
 /* SDR formats - used only for Software Defined Radio devices */
 #define V4L2_SDR_FMT_CU8          v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver
  2016-09-07  6:56 ` [PATCH 1/4] v4l: add Mediatek compressed video block format Tiffany Lin
@ 2016-09-07  6:56   ` Tiffany Lin
  2016-09-07  6:56     ` [PATCH 3/4] vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder Tiffany Lin
  2016-09-07  9:23     ` [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver Hans Verkuil
  0 siblings, 2 replies; 11+ messages in thread
From: Tiffany Lin @ 2016-09-07  6:56 UTC (permalink / raw)
  To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
	Matthias Brugger, Daniel Kurtz, Pawel Osciak
  Cc: Eddie Huang, Yingjoe Chen, linux-kernel, linux-media,
	linux-mediatek, Tiffany.lin, Tiffany Lin

Add V4L2_PIX_FMT_MT21C documentation

Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
---
 Documentation/media/uapi/v4l/pixfmt-reserved.rst |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/media/uapi/v4l/pixfmt-reserved.rst b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
index 0dd2f7f..2e21fbc 100644
--- a/Documentation/media/uapi/v4l/pixfmt-reserved.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
@@ -339,7 +339,13 @@ please make a proposal on the linux-media mailing list.
 	  array. Anything what's in between the UYVY lines is JPEG data and
 	  should be concatenated to form the JPEG stream.
 
+    -  .. _V4L2-PIX-FMT-MT21C:
 
+       -  ``V4L2_PIX_FMT_MT21C``
+
+       -  'MT21C'
+
+       -  Compressed two-planar YVU420 format used by Mediatek MT8173.
 
 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder
  2016-09-07  6:56   ` [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver Tiffany Lin
@ 2016-09-07  6:56     ` Tiffany Lin
  2016-09-07  6:56       ` [PATCH 4/4] arm64: dts: mediatek: Add Video Decoder for MT8173 Tiffany Lin
  2016-09-07  9:23     ` [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver Hans Verkuil
  1 sibling, 1 reply; 11+ messages in thread
From: Tiffany Lin @ 2016-09-07  6:56 UTC (permalink / raw)
  To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
	Matthias Brugger, Daniel Kurtz, Pawel Osciak
  Cc: Eddie Huang, Yingjoe Chen, linux-kernel, linux-media,
	linux-mediatek, Tiffany.lin, Tiffany Lin

Add V4L2_PIX_FMT_MT21C support

Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
---
 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
index 28a8453..fd3befc 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
@@ -25,7 +25,7 @@
 #include "mtk_vcodec_dec_pm.h"
 
 #define OUT_FMT_IDX	0
-#define CAP_FMT_IDX	0
+#define CAP_FMT_IDX	3
 
 #define MTK_VDEC_MIN_W	64U
 #define MTK_VDEC_MIN_H	64U
@@ -48,6 +48,11 @@ static struct mtk_video_fmt mtk_video_formats[] = {
 		.type = MTK_FMT_DEC,
 		.num_planes = 1,
 	},
+	{
+		.fourcc = V4L2_PIX_FMT_MT21C,
+		.type = MTK_FMT_FRAME,
+		.num_planes = 2,
+	},
 };
 
 static const struct mtk_codec_framesizes mtk_vdec_framesizes[] = {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] arm64: dts: mediatek: Add Video Decoder for MT8173
  2016-09-07  6:56     ` [PATCH 3/4] vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder Tiffany Lin
@ 2016-09-07  6:56       ` Tiffany Lin
  0 siblings, 0 replies; 11+ messages in thread
From: Tiffany Lin @ 2016-09-07  6:56 UTC (permalink / raw)
  To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
	Matthias Brugger, Daniel Kurtz, Pawel Osciak
  Cc: Eddie Huang, Yingjoe Chen, linux-kernel, linux-media,
	linux-mediatek, Tiffany.lin, Tiffany Lin

Add video decoder node for MT8173

Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8173.dtsi |   44 ++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 10f638f..2872cd7 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -974,6 +974,50 @@
 			#clock-cells = <1>;
 		};
 
+		vcodec_dec: vcodec@16000000 {
+			compatible = "mediatek,mt8173-vcodec-dec";
+			reg = <0 0x16000000 0 0x100>,	/* VDEC_SYS */
+			      <0 0x16020000 0 0x1000>,	/* VDEC_MISC */
+			      <0 0x16021000 0 0x800>,	/* VDEC_LD */
+			      <0 0x16021800 0 0x800>,	/* VDEC_TOP */
+			      <0 0x16022000 0 0x1000>,	/* VDEC_CM */
+			      <0 0x16023000 0 0x1000>,	/* VDEC_AD */
+			      <0 0x16024000 0 0x1000>,	/* VDEC_AV */
+			      <0 0x16025000 0 0x1000>,	/* VDEC_PP */
+			      <0 0x16026800 0 0x800>,	/* VDEC_HWD */
+			      <0 0x16027000 0 0x800>,	/* VDEC_HWQ */
+			      <0 0x16027800 0 0x800>,	/* VDEC_HWB */
+			      <0 0x16028400 0 0x400>;	/* VDEC_HWG */
+			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_LOW>;
+			mediatek,larb = <&larb1>;
+			iommus = <&iommu M4U_PORT_HW_VDEC_MC_EXT>,
+				 <&iommu M4U_PORT_HW_VDEC_PP_EXT>,
+				 <&iommu M4U_PORT_HW_VDEC_AVC_MV_EXT>,
+				 <&iommu M4U_PORT_HW_VDEC_PRED_RD_EXT>,
+				 <&iommu M4U_PORT_HW_VDEC_PRED_WR_EXT>,
+				 <&iommu M4U_PORT_HW_VDEC_UFO_EXT>,
+				 <&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
+				 <&iommu M4U_PORT_HW_VDEC_VLD2_EXT>;
+			mediatek,vpu = <&vpu>;
+			power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
+			clocks = <&apmixedsys CLK_APMIXED_VCODECPLL>,
+				 <&topckgen CLK_TOP_UNIVPLL_D2>,
+				 <&topckgen CLK_TOP_CCI400_SEL>,
+				 <&topckgen CLK_TOP_VDEC_SEL>,
+				 <&topckgen CLK_TOP_VCODECPLL>,
+				 <&apmixedsys CLK_APMIXED_VENCPLL>,
+				 <&topckgen CLK_TOP_VENC_LT_SEL>,
+				 <&topckgen CLK_TOP_VCODECPLL_370P5>;
+			clock-names = "vcodecpll",
+				      "univpll_d2",
+				      "clk_cci400_sel",
+				      "vdec_sel",
+				      "vdecpll",
+				      "vencpll",
+				      "venc_lt_sel",
+				      "vdec_bus_clk_src";
+		};
+
 		larb1: larb@16010000 {
 			compatible = "mediatek,mt8173-smi-larb";
 			reg = <0 0x16010000 0 0x1000>;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver
  2016-09-07  6:56   ` [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver Tiffany Lin
  2016-09-07  6:56     ` [PATCH 3/4] vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder Tiffany Lin
@ 2016-09-07  9:23     ` Hans Verkuil
  2016-09-08  6:44       ` Tiffany Lin
  1 sibling, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2016-09-07  9:23 UTC (permalink / raw)
  To: Tiffany Lin, Hans Verkuil, Laurent Pinchart,
	Mauro Carvalho Chehab, Matthias Brugger, Daniel Kurtz,
	Pawel Osciak
  Cc: Eddie Huang, Yingjoe Chen, linux-kernel, linux-media, linux-mediatek

On 09/07/16 08:56, Tiffany Lin wrote:
> Add V4L2_PIX_FMT_MT21C documentation
>
> Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
> ---
>  Documentation/media/uapi/v4l/pixfmt-reserved.rst |    6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/media/uapi/v4l/pixfmt-reserved.rst b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
> index 0dd2f7f..2e21fbc 100644
> --- a/Documentation/media/uapi/v4l/pixfmt-reserved.rst
> +++ b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
> @@ -339,7 +339,13 @@ please make a proposal on the linux-media mailing list.
>  	  array. Anything what's in between the UYVY lines is JPEG data and
>  	  should be concatenated to form the JPEG stream.
>
> +    -  .. _V4L2-PIX-FMT-MT21C:
>
> +       -  ``V4L2_PIX_FMT_MT21C``
> +
> +       -  'MT21C'
> +
> +       -  Compressed two-planar YVU420 format used by Mediatek MT8173.

This really needs to be expanded.

Ideally this should reference the precise specification of this format if
available.

It certainly should explain which HW blocks of the mediatek SoC use this
format, it should explain that is it meant as an opaque intermediate format
between those blocks.

If you have some characteristics (i.e. is it lossy or lossless 
compression, I
presume it's lossless), then that will be useful to add as well.

We like to have as much information about formats as possible.

Regards,

	Hans

>
>  .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver
  2016-09-07  9:23     ` [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver Hans Verkuil
@ 2016-09-08  6:44       ` Tiffany Lin
  0 siblings, 0 replies; 11+ messages in thread
From: Tiffany Lin @ 2016-09-08  6:44 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
	Matthias Brugger, Daniel Kurtz, Pawel Osciak, Eddie Huang,
	Yingjoe Chen, linux-kernel, linux-media, linux-mediatek

Hi Hans,

On Wed, 2016-09-07 at 11:23 +0200, Hans Verkuil wrote:
> On 09/07/16 08:56, Tiffany Lin wrote:
> > Add V4L2_PIX_FMT_MT21C documentation
> >
> > Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
> > ---
> >  Documentation/media/uapi/v4l/pixfmt-reserved.rst |    6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/Documentation/media/uapi/v4l/pixfmt-reserved.rst b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
> > index 0dd2f7f..2e21fbc 100644
> > --- a/Documentation/media/uapi/v4l/pixfmt-reserved.rst
> > +++ b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
> > @@ -339,7 +339,13 @@ please make a proposal on the linux-media mailing list.
> >  	  array. Anything what's in between the UYVY lines is JPEG data and
> >  	  should be concatenated to form the JPEG stream.
> >
> > +    -  .. _V4L2-PIX-FMT-MT21C:
> >
> > +       -  ``V4L2_PIX_FMT_MT21C``
> > +
> > +       -  'MT21C'
> > +
> > +       -  Compressed two-planar YVU420 format used by Mediatek MT8173.
> 
> This really needs to be expanded.
> 
> Ideally this should reference the precise specification of this format if
> available.
> 

> It certainly should explain which HW blocks of the mediatek SoC use this
> format, it should explain that is it meant as an opaque intermediate format
> between those blocks.
> 

Yes. it is an opaque intermediate format.
VDEC HW only output MT21C format, and it need MDP HW to convert to other
standard format.

At first, we plan to put "convert MT21C to other standard format" in our
v4l2 decoder driver, actually in VPU firmware.
In this case, there is no need to expose MT21C format to user space.

But consider that MDP is a stand alone HW (interrupt, power, clk),
combine decode and format convert in one decode step impact performance.
VDEC HW and MDP HW could process different frame at same time.
MDP may also used by other modules to do format convert, not only VDEC.

That's why we need to expose MT21C to user space.
When user space application enumerate VDEC and display HW and found that
the format is not match.
It need to use MDP driver to do format convert.


> If you have some characteristics (i.e. is it lossy or lossless 
> compression, I
> presume it's lossless), then that will be useful to add as well.
> 
I will update this in next version.


best regards,
Tiffany

> We like to have as much information about formats as possible.
> 
> Regards,
> 
> 	Hans
> 
> >
> >  .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
> >
> >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for MT8173 codec driver
  2016-09-07  6:56 [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for MT8173 codec driver Tiffany Lin
  2016-09-07  6:56 ` [PATCH 1/4] v4l: add Mediatek compressed video block format Tiffany Lin
@ 2016-09-08  7:21 ` Hans Verkuil
  2016-09-08  9:11   ` Tiffany Lin
  1 sibling, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2016-09-08  7:21 UTC (permalink / raw)
  To: Tiffany Lin, Hans Verkuil, Laurent Pinchart,
	Mauro Carvalho Chehab, Matthias Brugger, Daniel Kurtz,
	Pawel Osciak
  Cc: Eddie Huang, Yingjoe Chen, linux-kernel, linux-media, linux-mediatek

Hi Tiffany,

On 09/07/2016 08:56 AM, Tiffany Lin wrote:
> This patch series add Mediatek compressed block format V4L2_PIX_FMT_MT21C, the
> decoder driver will decoded bitstream to V4L2_PIX_FMT_MT21C format.
> 
> User space applications could use MT8173 MDP driver to convert V4L2_PIX_FMT_MT21C to
> V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M and V4L2_PIX_FMT_YVU420.
> 
> MDP driver[1] is stand alone driver.
> 
> Usage:
> MT21C -> MT8173 MDP -> NV12M/YUV420M/YVU420
> NV12M/NV21M/YUV420M/YVU420M -> mt8173 Encoder -> H264/VP8
> H264/VP8/VP9 -> mtk8173 Decoder -> MT21C
> 
> When encode with MT21 source, the pipeline will be:
> MT21C -> MDP driver-> NV12M/NV21M/YUV420M/YVU420M -> Encoder -> H264/VP8
> 
> When playback, the pipeline will be:
> H264/VP8/VP9 -> Decoder driver -> MT21C -> MDP Driver -> DRM
> 
> [1]https://patchwork.kernel.org/patch/9305329/
> 
> Tiffany Lin (4):
>   v4l: add Mediatek compressed video block format
>   docs-rst: Add compressed video formats used on MT8173 codec driver
>   vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder
>   arm64: dts: mediatek: Add Video Decoder for MT8173
> 
>  Documentation/media/uapi/v4l/pixfmt-reserved.rst   |    6 +++
>  arch/arm64/boot/dts/mediatek/mt8173.dtsi           |   44 ++++++++++++++++++++
>  drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c |    7 +++-
>  drivers/media/v4l2-core/v4l2-ioctl.c               |    1 +
>  include/uapi/linux/videodev2.h                     |    1 +
>  5 files changed, 58 insertions(+), 1 deletion(-)
> 

So basically the video decoder is useless without support for this format and
without the MDP driver, right?

I'm wondering if I should hold off on merging the decoder driver until these two
are in. What is the timeline for v6 of the MDP driver?

If a v6 is posted early next week, then I have time to review and (assuming it is
OK) I can make a pull request for both this driver and the MDP driver.

If it takes longer, then there is a good chance that it will slip to 4.10. I will
have very little time in the period September 20 - October 14.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for MT8173 codec driver
  2016-09-08  7:21 ` [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for " Hans Verkuil
@ 2016-09-08  9:11   ` Tiffany Lin
  2016-09-08  9:27     ` Hans Verkuil
  0 siblings, 1 reply; 11+ messages in thread
From: Tiffany Lin @ 2016-09-08  9:11 UTC (permalink / raw)
  To: Hans Verkuil, Andrew-CT Chen
  Cc: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
	Matthias Brugger, Daniel Kurtz, Pawel Osciak, Eddie Huang,
	Yingjoe Chen, linux-kernel, linux-media, linux-mediatek

Hi Hans,

On Thu, 2016-09-08 at 09:21 +0200, Hans Verkuil wrote:
> Hi Tiffany,
> 
> On 09/07/2016 08:56 AM, Tiffany Lin wrote:
> > This patch series add Mediatek compressed block format V4L2_PIX_FMT_MT21C, the
> > decoder driver will decoded bitstream to V4L2_PIX_FMT_MT21C format.
> > 
> > User space applications could use MT8173 MDP driver to convert V4L2_PIX_FMT_MT21C to
> > V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M and V4L2_PIX_FMT_YVU420.
> > 
> > MDP driver[1] is stand alone driver.
> > 
> > Usage:
> > MT21C -> MT8173 MDP -> NV12M/YUV420M/YVU420
> > NV12M/NV21M/YUV420M/YVU420M -> mt8173 Encoder -> H264/VP8
> > H264/VP8/VP9 -> mtk8173 Decoder -> MT21C
> > 
> > When encode with MT21 source, the pipeline will be:
> > MT21C -> MDP driver-> NV12M/NV21M/YUV420M/YVU420M -> Encoder -> H264/VP8
> > 
> > When playback, the pipeline will be:
> > H264/VP8/VP9 -> Decoder driver -> MT21C -> MDP Driver -> DRM
> > 
> > [1]https://patchwork.kernel.org/patch/9305329/
> > 
> > Tiffany Lin (4):
> >   v4l: add Mediatek compressed video block format
> >   docs-rst: Add compressed video formats used on MT8173 codec driver
> >   vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder
> >   arm64: dts: mediatek: Add Video Decoder for MT8173
> > 
> >  Documentation/media/uapi/v4l/pixfmt-reserved.rst   |    6 +++
> >  arch/arm64/boot/dts/mediatek/mt8173.dtsi           |   44 ++++++++++++++++++++
> >  drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c |    7 +++-
> >  drivers/media/v4l2-core/v4l2-ioctl.c               |    1 +
> >  include/uapi/linux/videodev2.h                     |    1 +
> >  5 files changed, 58 insertions(+), 1 deletion(-)
> > 
> 
> So basically the video decoder is useless without support for this format and
> without the MDP driver, right?
> 
Yes. It also require new vpu firmware.
Andrew will help release new vpu firmware include encode/decode/mdp
capability.

best regards,
Tiffany


> I'm wondering if I should hold off on merging the decoder driver until these two
> are in. What is the timeline for v6 of the MDP driver?
> 
> If a v6 is posted early next week, then I have time to review and (assuming it is
> OK) I can make a pull request for both this driver and the MDP driver.
> 
> If it takes longer, then there is a good chance that it will slip to 4.10. I will
> have very little time in the period September 20 - October 14.
> 
> Regards,
> 
> 	Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for MT8173 codec driver
  2016-09-08  9:11   ` Tiffany Lin
@ 2016-09-08  9:27     ` Hans Verkuil
  2016-09-14  4:52       ` Tiffany Lin
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2016-09-08  9:27 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen
  Cc: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
	Matthias Brugger, Daniel Kurtz, Pawel Osciak, Eddie Huang,
	Yingjoe Chen, linux-kernel, linux-media, linux-mediatek

On 09/08/16 11:11, Tiffany Lin wrote:
> Hi Hans,
>
> On Thu, 2016-09-08 at 09:21 +0200, Hans Verkuil wrote:
>> Hi Tiffany,
>>
>> On 09/07/2016 08:56 AM, Tiffany Lin wrote:
>>> This patch series add Mediatek compressed block format V4L2_PIX_FMT_MT21C, the
>>> decoder driver will decoded bitstream to V4L2_PIX_FMT_MT21C format.
>>>
>>> User space applications could use MT8173 MDP driver to convert V4L2_PIX_FMT_MT21C to
>>> V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M and V4L2_PIX_FMT_YVU420.
>>>
>>> MDP driver[1] is stand alone driver.
>>>
>>> Usage:
>>> MT21C -> MT8173 MDP -> NV12M/YUV420M/YVU420
>>> NV12M/NV21M/YUV420M/YVU420M -> mt8173 Encoder -> H264/VP8
>>> H264/VP8/VP9 -> mtk8173 Decoder -> MT21C
>>>
>>> When encode with MT21 source, the pipeline will be:
>>> MT21C -> MDP driver-> NV12M/NV21M/YUV420M/YVU420M -> Encoder -> H264/VP8
>>>
>>> When playback, the pipeline will be:
>>> H264/VP8/VP9 -> Decoder driver -> MT21C -> MDP Driver -> DRM
>>>
>>> [1]https://patchwork.kernel.org/patch/9305329/
>>>
>>> Tiffany Lin (4):
>>>   v4l: add Mediatek compressed video block format
>>>   docs-rst: Add compressed video formats used on MT8173 codec driver
>>>   vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder
>>>   arm64: dts: mediatek: Add Video Decoder for MT8173
>>>
>>>  Documentation/media/uapi/v4l/pixfmt-reserved.rst   |    6 +++
>>>  arch/arm64/boot/dts/mediatek/mt8173.dtsi           |   44 ++++++++++++++++++++
>>>  drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c |    7 +++-
>>>  drivers/media/v4l2-core/v4l2-ioctl.c               |    1 +
>>>  include/uapi/linux/videodev2.h                     |    1 +
>>>  5 files changed, 58 insertions(+), 1 deletion(-)
>>>
>>
>> So basically the video decoder is useless without support for this format and
>> without the MDP driver, right?
>>
> Yes. It also require new vpu firmware.
> Andrew will help release new vpu firmware include encode/decode/mdp
> capability.

OK, then I'll park this until:

- the MT21C patch series is OK
- the MDP patch series is OK
- the new firmware is released

For the record: the decoder patch series is OK as far as I am concerned.
It's in my mtkdec branch.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for MT8173 codec driver
  2016-09-08  9:27     ` Hans Verkuil
@ 2016-09-14  4:52       ` Tiffany Lin
  0 siblings, 0 replies; 11+ messages in thread
From: Tiffany Lin @ 2016-09-14  4:52 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Andrew-CT Chen, Hans Verkuil, Laurent Pinchart,
	Mauro Carvalho Chehab, Matthias Brugger, Daniel Kurtz,
	Pawel Osciak, Eddie Huang, Yingjoe Chen, linux-kernel,
	linux-media, linux-mediatek

Hi Hans,

On Thu, 2016-09-08 at 11:27 +0200, Hans Verkuil wrote:
> On 09/08/16 11:11, Tiffany Lin wrote:
> > Hi Hans,
> >
> > On Thu, 2016-09-08 at 09:21 +0200, Hans Verkuil wrote:
> >> Hi Tiffany,
> >>
> >> On 09/07/2016 08:56 AM, Tiffany Lin wrote:
> >>> This patch series add Mediatek compressed block format V4L2_PIX_FMT_MT21C, the
> >>> decoder driver will decoded bitstream to V4L2_PIX_FMT_MT21C format.
> >>>
> >>> User space applications could use MT8173 MDP driver to convert V4L2_PIX_FMT_MT21C to
> >>> V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M and V4L2_PIX_FMT_YVU420.
> >>>
> >>> MDP driver[1] is stand alone driver.
> >>>
> >>> Usage:
> >>> MT21C -> MT8173 MDP -> NV12M/YUV420M/YVU420
> >>> NV12M/NV21M/YUV420M/YVU420M -> mt8173 Encoder -> H264/VP8
> >>> H264/VP8/VP9 -> mtk8173 Decoder -> MT21C
> >>>
> >>> When encode with MT21 source, the pipeline will be:
> >>> MT21C -> MDP driver-> NV12M/NV21M/YUV420M/YVU420M -> Encoder -> H264/VP8
> >>>
> >>> When playback, the pipeline will be:
> >>> H264/VP8/VP9 -> Decoder driver -> MT21C -> MDP Driver -> DRM
> >>>
> >>> [1]https://patchwork.kernel.org/patch/9305329/
> >>>
> >>> Tiffany Lin (4):
> >>>   v4l: add Mediatek compressed video block format
> >>>   docs-rst: Add compressed video formats used on MT8173 codec driver
> >>>   vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder
> >>>   arm64: dts: mediatek: Add Video Decoder for MT8173
> >>>
> >>>  Documentation/media/uapi/v4l/pixfmt-reserved.rst   |    6 +++
> >>>  arch/arm64/boot/dts/mediatek/mt8173.dtsi           |   44 ++++++++++++++++++++
> >>>  drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c |    7 +++-
> >>>  drivers/media/v4l2-core/v4l2-ioctl.c               |    1 +
> >>>  include/uapi/linux/videodev2.h                     |    1 +
> >>>  5 files changed, 58 insertions(+), 1 deletion(-)
> >>>
> >>
> >> So basically the video decoder is useless without support for this format and
> >> without the MDP driver, right?
> >>
> > Yes. It also require new vpu firmware.
> > Andrew will help release new vpu firmware include encode/decode/mdp
> > capability.
> 
> OK, then I'll park this until:
> 
> - the MT21C patch series is OK
> - the MDP patch series is OK
> - the new firmware is released
> 

> For the record: the decoder patch series is OK as far as I am concerned.
> It's in my mtkdec branch.
> 

Appreciated for your help.
We had upstream new MT21C, MDP and new VPU firmware.

MT21C patch series: https://patchwork.kernel.org/patch/9323883/
MDP patch series: https://patchwork.kernel.org/patch/9321343/
VPU firmware: https://patchwork.linuxtv.org/patch/36968/


best regards,
Tiffany



> Regards,
> 
> 	Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-09-14  4:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-07  6:56 [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for MT8173 codec driver Tiffany Lin
2016-09-07  6:56 ` [PATCH 1/4] v4l: add Mediatek compressed video block format Tiffany Lin
2016-09-07  6:56   ` [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver Tiffany Lin
2016-09-07  6:56     ` [PATCH 3/4] vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder Tiffany Lin
2016-09-07  6:56       ` [PATCH 4/4] arm64: dts: mediatek: Add Video Decoder for MT8173 Tiffany Lin
2016-09-07  9:23     ` [PATCH 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver Hans Verkuil
2016-09-08  6:44       ` Tiffany Lin
2016-09-08  7:21 ` [PATCH 0/4] Add V4L2_PIX_FMT_MT21C format for " Hans Verkuil
2016-09-08  9:11   ` Tiffany Lin
2016-09-08  9:27     ` Hans Verkuil
2016-09-14  4:52       ` Tiffany Lin

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).