misc improvment for j721e csi2rx
Subsystems (3)
cover misc improvment for j721e csi2rx
This small series:
- Fix media link issue when the remote subdevice has multiple output ports
- add support for Grey format patch 2 and 3
Julien Massot (3):
media: cadence: csi2rx: use match fwnode for media link
media: cadence: csi2rx: add Y8_1X8 format
media: ti: j721e-csi2rx: add GREY format
drivers/media/platform/cadence/cdns-csi2rx.c | 3 ++- drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
PATCH 1/3 media: cadence: csi2rx: use match fwnode for media link
On some subdev the fwnode is the device node and not the endpoint node. Using the subdev fwnode doesn't allow to fetch the subdev pad we are connected to when the remote subdev has multiple output pads.
--- drivers/media/platform/cadence/cdns-csi2rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/cadence/cdns-csi2rx.c +1 -1
@@ -464,7 +464,7 @@ static int csi2rx_async_bound(struct v4l2_async_notifier *notifier,struct csi2rx_priv *csi2rx =v4l2_subdev_to_csi2rx (subdev); csi2rx->source_pad =media_entity_get_fwnode_pad (&s_subdev->entity, - s_subdev->fwnode, + asd->match.fwnode,MEDIA_PAD_FL_SOURCE );if (csi2rx->source_pad <0 ) { dev_err(csi2rx->dev, "Couldn't find output pad for subdev %s\n",
Signature · 1 line
2.43.0
Re: [PATCH 1/3] media: cadence: csi2rx: use match fwnode for media link
Hi Julien,
Thanks for the patch.
Please make sure to add the media maintainers in To/Cc, you can use get_maintainers.pl script for the full list.
Quoted 15 lines · Julien Massot
On some subdev the fwnode is the device node and not the endpoint node. Using the subdev fwnode doesn't allow to fetch the subdev pad we are connected to when the remote subdev has multiple output pads.
Signed-off-by Julien Massot <[email protected]>--- drivers/media/platform/cadence/cdns-csi2rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/platform/cadence/cdns-csi2rx.c +0
-0
drivers/media/platform/cadence/cdns-csi2rx.c static int csi2rx_async_bound(struct v4l2_async_notifier *notifier, · line 468
Quoted 6 lines
drivers/media/platform/cadence/cdns-csi2rx.c +1
-1@@ -464,7 +464,7 @@ static int csi2rx_async_bound(struct v4l2_async_notifier *notifier,struct csi2rx_priv *csi2rx =v4l2_subdev_to_csi2rx (subdev); csi2rx->source_pad =media_entity_get_fwnode_pad (&s_subdev->entity, - s_subdev->fwnode, + asd->match.fwnode,MEDIA_PAD_FL_SOURCE );
LGTM, this also fixes a similar issue I was seeing with getting fwnode pad ds90ub960 source which has multiple output pads.
Quoted 5 lines
drivers/media/platform/cadence/cdns-csi2rx.c +0
-0if (csi2rx->source_pad <0 ) { dev_err(csi2rx->dev, "Couldn't find output pad for subdev %s\n",Signature · 1 line
2.43.0
Signature · 4 lines
Thanks, Jai GPG Fingerprint: 4DE0 D818 E5D5 75E8 D45A AFC5 43DE 91F9 249A 7145
Re: [PATCH 1/3] media: cadence: csi2rx: use match fwnode for media link
Quoted 33 lines · Jai Luthra
Hi Julien,
Thanks for the patch.
Please make sure to add the media maintainers in To/Cc, you can use get_maintainers.pl script for the full list.
Quoted 15 lines · Julien Massot
On some subdev the fwnode is the device node and not the endpoint node. Using the subdev fwnode doesn't allow to fetch the subdev pad we are connected to when the remote subdev has multiple output pads.
Signed-off-by Julien Massot <[email protected]>--- drivers/media/platform/cadence/cdns-csi2rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/platform/cadence/cdns-csi2rx.c +0
-0drivers/media/platform/cadence/cdns-csi2rx.c static int csi2rx_async_bound(struct v4l2_async_notifier *notifier, · line 468
Quoted 6 lines
drivers/media/platform/cadence/cdns-csi2rx.c +1
-1@@ -464,7 +464,7 @@ static int csi2rx_async_bound(struct v4l2_async_notifier *notifier,struct csi2rx_priv *csi2rx =v4l2_subdev_to_csi2rx (subdev); csi2rx->source_pad =media_entity_get_fwnode_pad (&s_subdev->entity, - s_subdev->fwnode, + asd->match.fwnode,MEDIA_PAD_FL_SOURCE );LGTM, this also fixes a similar issue I was seeing with getting fwnode pad ds90ub960 source which has multiple output pads.
Quoted 1 line
Reviewed-by Jai Luthra <[email protected]>
This should probably carry a fixes tag as well:
Quoted 12 lines
Quoted 6 lines
drivers/media/platform/cadence/cdns-csi2rx.c +0
-0if (csi2rx->source_pad <0 ) { dev_err(csi2rx->dev, "Couldn't find output pad for subdev %s\n",Signature · 1 line
2.43.0Signature · 4 lines
Thanks, Jai GPG Fingerprint: 4DE0 D818 E5D5 75E8 D45A AFC5 43DE 91F9 249A 7145
Signature · 4 lines
Thanks, Jai GPG Fingerprint: 4DE0 D818 E5D5 75E8 D45A AFC5 43DE 91F9 249A 7145
PATCH 2/3 media: cadence: csi2rx: add Y8_1X8 format
In reply to Julien MassotAdd support for MEDIA_BUS_FMT_Y8_1X8 format.
--- drivers/media/platform/cadence/cdns-csi2rx.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/platform/cadence/cdns-csi2rx.c +1 -0
@@ -114,6 +114,7 @@ static const struct csi2rx_fmt formats[] = { { .code = MEDIA_BUS_FMT_SGBRG8_1X8, .bpp = 8, }, { .code = MEDIA_BUS_FMT_SGRBG8_1X8, .bpp = 8, }, { .code = MEDIA_BUS_FMT_SRGGB8_1X8, .bpp = 8, }, + { .code = MEDIA_BUS_FMT_Y8_1X8, .bpp = 8, }, { .code = MEDIA_BUS_FMT_SBGGR10_1X10, .bpp = 10, }, { .code = MEDIA_BUS_FMT_SGBRG10_1X10, .bpp = 10, }, { .code = MEDIA_BUS_FMT_SGRBG10_1X10, .bpp = 10, },
Signature · 1 line
2.43.0
Re: [PATCH 2/3] media: cadence: csi2rx: add Y8_1X8 format
Quoted 22 lines · Julien Massot
Add support for
MEDIA_BUS_FMT_Y8_1X8format.Signed-off-by Julien Massot <[email protected]>--- drivers/media/platform/cadence/cdns-csi2rx.c | 1 + 1 file changed, 1 insertion(+)drivers/media/platform/cadence/cdns-csi2rx.c +1
-0@@ -114,6 +114,7 @@ static const struct csi2rx_fmt formats[] = { { .code = MEDIA_BUS_FMT_SGBRG8_1X8, .bpp = 8, }, { .code = MEDIA_BUS_FMT_SGRBG8_1X8, .bpp = 8, }, { .code = MEDIA_BUS_FMT_SRGGB8_1X8, .bpp = 8, }, + { .code = MEDIA_BUS_FMT_Y8_1X8, .bpp = 8, }, { .code = MEDIA_BUS_FMT_SBGGR10_1X10, .bpp = 10, }, { .code = MEDIA_BUS_FMT_SGBRG10_1X10, .bpp = 10, }, { .code = MEDIA_BUS_FMT_SGRBG10_1X10, .bpp = 10, },Signature · 1 line
2.43.0
Signature · 4 lines
Thanks, Jai GPG Fingerprint: 4DE0 D818 E5D5 75E8 D45A AFC5 43DE 91F9 249A 7145
PATCH 3/3 media: ti: j721e-csi2rx: add GREY format
In reply to Julien MassotAdd Grey format to properly select RAW8 data type.
Tested with a ST VG5661 sensor.
--- drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +6 -0
@@ -158,6 +158,12 @@ static const struct ti_csi2rx_fmt ti_csi2rx_formats[] = { .csi_dt = MIPI_CSI2_DT_RAW8, .bpp = 8, .size = SHIM_DMACNTX_SIZE_8, + }, { + .fourcc = V4L2_PIX_FMT_GREY, + .code = MEDIA_BUS_FMT_Y8_1X8, + .csi_dt = MIPI_CSI2_DT_RAW8, + .bpp = 8, + .size = SHIM_DMACNTX_SIZE_8, }, { .fourcc = V4L2_PIX_FMT_SBGGR10, .code = MEDIA_BUS_FMT_SBGGR10_1X10,
Signature · 1 line
2.43.0
Re: [PATCH 3/3] media: ti: j721e-csi2rx: add GREY format
Quoted 29 lines · Julien Massot
Add Grey format to properly select RAW8 data type.
Tested with a ST VG5661 sensor.
Signed-off-by Julien Massot <[email protected]>--- drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +6
-0@@ -158,6 +158,12 @@ static const struct ti_csi2rx_fmt ti_csi2rx_formats[] = { .csi_dt = MIPI_CSI2_DT_RAW8, .bpp = 8, .size = SHIM_DMACNTX_SIZE_8, + }, { + .fourcc = V4L2_PIX_FMT_GREY, + .code = MEDIA_BUS_FMT_Y8_1X8, + .csi_dt = MIPI_CSI2_DT_RAW8, + .bpp = 8, + .size = SHIM_DMACNTX_SIZE_8, }, { .fourcc = V4L2_PIX_FMT_SBGGR10, .code = MEDIA_BUS_FMT_SBGGR10_1X10,Signature · 1 line
2.43.0
Signature · 4 lines
Thanks, Jai GPG Fingerprint: 4DE0 D818 E5D5 75E8 D45A AFC5 43DE 91F9 249A 7145