[libcamera-devel,libcamera-devel,v2,1/1] pipeline: simple: Add support for MediaTek MT8365 platforms
diff mbox series

Message ID 20230717232328.98247-2-suhrid.subramaniam@mediatek.com
State Accepted
Commit c64446c226d4e629884d2f5b148a01969e8ee84a
Headers show
Series
  • pipeline: simple: Add support for MediaTek MT8365 platforms
Related show

Commit Message

Suhrid Subramaniam July 17, 2023, 11:23 p.m. UTC
The camera pipeline for MediaTek MT8365 consists of the following:
Raw sensor (+ external ISP) --> SENINF --> CAMSV30 --> DRAM

SENINF (SENsor INterFace) is a CSI-2 receiver.
CAMSV30 (Camera Simple Version) is a DMA Engine which bypasses
ISP3.0 and writes directly to DRAM.
Both SENINF and CAMSV30 are supported by V4L2 drivers.

MT8365 platform consists of a hardware converter called MDP which
supports up to three streams.

Signed-off-by: Suhrid Subramaniam <suhrid.subramaniam@mediatek.com>
---
 src/libcamera/converter/converter_v4l2_m2m.cpp | 1 +
 src/libcamera/pipeline/simple/simple.cpp       | 1 +
 2 files changed, 2 insertions(+)

Comments

Jacopo Mondi July 18, 2023, 7:26 a.m. UTC | #1
Hello Suhrid

On Mon, Jul 17, 2023 at 04:23:28PM -0700, Suhrid Subramaniam via libcamera-devel wrote:
> The camera pipeline for MediaTek MT8365 consists of the following:
> Raw sensor (+ external ISP) --> SENINF --> CAMSV30 --> DRAM
>
> SENINF (SENsor INterFace) is a CSI-2 receiver.
> CAMSV30 (Camera Simple Version) is a DMA Engine which bypasses
> ISP3.0 and writes directly to DRAM.
> Both SENINF and CAMSV30 are supported by V4L2 drivers.
>
> MT8365 platform consists of a hardware converter called MDP which
> supports up to three streams.

I presume this is the driver that lives in
drivers/media/platform/mediatek/mdp/

which is different than the one that lives in
drivers/media/platform/mediatek/mdp3/

whose driver is named in facts "mtk-mdp3" ?

>
> Signed-off-by: Suhrid Subramaniam <suhrid.subramaniam@mediatek.com>

This seems fine to me!

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j



> ---
>  src/libcamera/converter/converter_v4l2_m2m.cpp | 1 +
>  src/libcamera/pipeline/simple/simple.cpp       | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp
> index 2a4d1d99..a5fc979b 100644
> --- a/src/libcamera/converter/converter_v4l2_m2m.cpp
> +++ b/src/libcamera/converter/converter_v4l2_m2m.cpp
> @@ -445,6 +445,7 @@ int V4L2M2MConverter::queueBuffers(FrameBuffer *input,
>  }
>
>  static std::initializer_list<std::string> compatibles = {
> +	"mtk-mdp",
>  	"pxp",
>  };
>
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index 05ba76bc..24835d50 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -193,6 +193,7 @@ static const SimplePipelineInfo supportedDevices[] = {
>  	{ "dcmipp", {} },
>  	{ "imx7-csi", { { "pxp", 1 } } },
>  	{ "j721e-csi2rx", {} },
> +	{ "mtk-seninf", { { "mtk-mdp", 3 } } },
>  	{ "mxc-isi", {} },
>  	{ "qcom-camss", {} },
>  	{ "sun6i-csi", {} },
> --
> 2.41.0
>
Kieran Bingham July 18, 2023, 8:54 a.m. UTC | #2
Quoting Suhrid Subramaniam via libcamera-devel (2023-07-18 00:23:28)
> The camera pipeline for MediaTek MT8365 consists of the following:
> Raw sensor (+ external ISP) --> SENINF --> CAMSV30 --> DRAM
> 
> SENINF (SENsor INterFace) is a CSI-2 receiver.
> CAMSV30 (Camera Simple Version) is a DMA Engine which bypasses
> ISP3.0 and writes directly to DRAM.
> Both SENINF and CAMSV30 are supported by V4L2 drivers.
> 
> MT8365 platform consists of a hardware converter called MDP which
> supports up to three streams.
> 
> Signed-off-by: Suhrid Subramaniam <suhrid.subramaniam@mediatek.com>
> ---
>  src/libcamera/converter/converter_v4l2_m2m.cpp | 1 +
>  src/libcamera/pipeline/simple/simple.cpp       | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp
> index 2a4d1d99..a5fc979b 100644
> --- a/src/libcamera/converter/converter_v4l2_m2m.cpp
> +++ b/src/libcamera/converter/converter_v4l2_m2m.cpp
> @@ -445,6 +445,7 @@ int V4L2M2MConverter::queueBuffers(FrameBuffer *input,
>  }
>  
>  static std::initializer_list<std::string> compatibles = {
> +       "mtk-mdp",

This addresses my comment from the previous version so:

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

And I believe this is still fine to go in, but I'm weary about testing.

Have you been able to run cam or another libcamera application and make
use of the convertor for multiple streams?

What testing have you performed on the platform with the simple pipeline
handler?

--
Kieran


>         "pxp",
>  };
>  
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index 05ba76bc..24835d50 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -193,6 +193,7 @@ static const SimplePipelineInfo supportedDevices[] = {
>         { "dcmipp", {} },
>         { "imx7-csi", { { "pxp", 1 } } },
>         { "j721e-csi2rx", {} },
> +       { "mtk-seninf", { { "mtk-mdp", 3 } } },
>         { "mxc-isi", {} },
>         { "qcom-camss", {} },
>         { "sun6i-csi", {} },
> -- 
> 2.41.0
>

Patch
diff mbox series

diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp
index 2a4d1d99..a5fc979b 100644
--- a/src/libcamera/converter/converter_v4l2_m2m.cpp
+++ b/src/libcamera/converter/converter_v4l2_m2m.cpp
@@ -445,6 +445,7 @@  int V4L2M2MConverter::queueBuffers(FrameBuffer *input,
 }
 
 static std::initializer_list<std::string> compatibles = {
+	"mtk-mdp",
 	"pxp",
 };
 
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 05ba76bc..24835d50 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -193,6 +193,7 @@  static const SimplePipelineInfo supportedDevices[] = {
 	{ "dcmipp", {} },
 	{ "imx7-csi", { { "pxp", 1 } } },
 	{ "j721e-csi2rx", {} },
+	{ "mtk-seninf", { { "mtk-mdp", 3 } } },
 	{ "mxc-isi", {} },
 	{ "qcom-camss", {} },
 	{ "sun6i-csi", {} },