Skip to contentSkip to conversation

MEDIA-STAGING: Remove unneeded geometry restrictions from i.MX CSI driver

PATCH In review Krzysztof Hałasa 3 participants 3 messages May 14, 2020 – Jun 26, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MEDIA-STAGING: Remove unneeded geometry restrictions from i.MX CSI driver

I don't know what minimal image dimensions are, but 32x32 appears to be ok according to the docs.
This is needed for small sensors like 80x80 thermal imagers.

drivers/staging/media/imx/imx-ic-prp.c +2 -2
index 2a4f77e83ed3..622a52c46229 100644
@@ -26,8 +26,8 @@
 /*
  * Min/Max supported width and heights.
  */
-#define MIN_W       176
-#define MIN_H       144
+#define MIN_W        32
+#define MIN_H        32
 #define MAX_W      4096
 #define MAX_H      4096
 #define W_ALIGN    4 /* multiple of 16 pixels */
drivers/staging/media/imx/imx-ic-prpencvf.c +2 -2
index 09c4e3f33807..cb46455a1a36 100644
@@ -35,8 +35,8 @@
  * has not requested a planar format, we should allow 8 pixel
  * alignment at the source pad.
  */
-#define MIN_W_SINK  176
-#define MIN_H_SINK  144
+#define MIN_W_SINK   32
+#define MIN_H_SINK   32
 #define MAX_W_SINK 4096
 #define MAX_H_SINK 4096
 #define W_ALIGN_SINK  3 /* multiple of 8 pixels */
drivers/staging/media/imx/imx-media-csi.c +2 -2
index e76a6a85baa3..d9e5388ffeb5 100644
@@ -33,8 +33,8 @@
  * has not requested planar formats, we should allow 8 pixel
  * alignment.
  */
-#define MIN_W       176
-#define MIN_H       144
+#define MIN_W       32
+#define MIN_H       32
 #define MAX_W      4096
 #define MAX_H      4096
 #define W_ALIGN    1 /* multiple of 2 pixels */
drivers/staging/media/imx/imx-media-vdic.c +2 -2
index 0d83c2c41606..ee71b70d3544 100644
@@ -49,8 +49,8 @@ struct vdic_pipeline_ops {
 /*
  * Min/Max supported width and heights.
  */
-#define MIN_W       176
-#define MIN_H       144
+#define MIN_W        32
+#define MIN_H        32
 #define MAX_W_VDIC  968
 #define MAX_H_VDIC 2048
 #define W_ALIGN    4 /* multiple of 16 pixels */
Signature · 5 lines
Krzysztof Halasa

ŁUKASIEWICZ Research Network
Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland
maintainer Reviewed-by Tested-by on v1 1/1
#1 lore raw

Hi Krzysztof,

thank you for the patch.

Quoted 5 lines · Krzysztof Hałasa

I don't know what minimal image dimensions are, but 32x32 appears to be ok according to the docs.
This is needed for small sensors like 80x80 thermal imagers.

This looks fine to me for the CSI. Steve, are you aware of any limitations?

(with CSI crop to 32x32, I have no 32x32 sensors at hand)

regards
Philipp

Quoted 61 lines
drivers/staging/media/imx/imx-ic-prp.c +2 -2
index 2a4f77e83ed3..622a52c46229 100644
@@ -26,8 +26,8 @@
 /*
  * Min/Max supported width and heights.
  */
-#define MIN_W       176
-#define MIN_H       144
+#define MIN_W        32
+#define MIN_H        32
 #define MAX_W      4096
 #define MAX_H      4096
 #define W_ALIGN    4 /* multiple of 16 pixels */
drivers/staging/media/imx/imx-ic-prpencvf.c +2 -2
index 09c4e3f33807..cb46455a1a36 100644
@@ -35,8 +35,8 @@
  * has not requested a planar format, we should allow 8 pixel
  * alignment at the source pad.
  */
-#define MIN_W_SINK  176
-#define MIN_H_SINK  144
+#define MIN_W_SINK   32
+#define MIN_H_SINK   32
 #define MAX_W_SINK 4096
 #define MAX_H_SINK 4096
 #define W_ALIGN_SINK  3 /* multiple of 8 pixels */
drivers/staging/media/imx/imx-media-csi.c +2 -2
index e76a6a85baa3..d9e5388ffeb5 100644
@@ -33,8 +33,8 @@
  * has not requested planar formats, we should allow 8 pixel
  * alignment.
  */
-#define MIN_W       176
-#define MIN_H       144
+#define MIN_W       32
+#define MIN_H       32
 #define MAX_W      4096
 #define MAX_H      4096
 #define W_ALIGN    1 /* multiple of 2 pixels */
drivers/staging/media/imx/imx-media-vdic.c +2 -2
index 0d83c2c41606..ee71b70d3544 100644
@@ -49,8 +49,8 @@ struct vdic_pipeline_ops {
 /*
  * Min/Max supported width and heights.
  */
-#define MIN_W       176
-#define MIN_H       144
+#define MIN_W        32
+#define MIN_H        32
 #define MAX_W_VDIC  968
 #define MAX_H_VDIC 2048
 #define W_ALIGN    4 /* multiple of 16 pixels */
maintainer Acked-by
#2 lore raw

Hi Krzysztof, Philipp,

Quoted 4 lines · Philipp Zabel

Hi Krzysztof,

thank you for the patch.

Quoted 8 lines
Quoted 5 lines · Krzysztof Hałasa

I don't know what minimal image dimensions are, but 32x32 appears to be ok according to the docs.
This is needed for small sensors like 80x80 thermal imagers.

This looks fine to me for the CSI. Steve, are you aware of any limitations?

I looked at the imx6 ref manual and don't see any limitations in IC or VDIC or IDMAC or CPMEM, so this is fine to me as well.

One nitpick, please change the all-caps commit subject to

media: imx: Remove unneeded geometry restrictions from i.MX CSI driver

After that,

Quoted 68 lines

(with CSI crop to 32x32, I have no 32x32 sensors at hand)

regards
Philipp

Quoted 61 lines
drivers/staging/media/imx/imx-ic-prp.c +2 -2
index 2a4f77e83ed3..622a52c46229 100644
@@ -26,8 +26,8 @@
  /*
   * Min/Max supported width and heights.
   */
-#define MIN_W       176
-#define MIN_H       144
+#define MIN_W        32
+#define MIN_H        32
  #define MAX_W      4096
  #define MAX_H      4096
  #define W_ALIGN    4 /* multiple of 16 pixels */
drivers/staging/media/imx/imx-ic-prpencvf.c +2 -2
index 09c4e3f33807..cb46455a1a36 100644
@@ -35,8 +35,8 @@
   * has not requested a planar format, we should allow 8 pixel
   * alignment at the source pad.
   */
-#define MIN_W_SINK  176
-#define MIN_H_SINK  144
+#define MIN_W_SINK   32
+#define MIN_H_SINK   32
  #define MAX_W_SINK 4096
  #define MAX_H_SINK 4096
  #define W_ALIGN_SINK  3 /* multiple of 8 pixels */
drivers/staging/media/imx/imx-media-csi.c +2 -2
index e76a6a85baa3..d9e5388ffeb5 100644
@@ -33,8 +33,8 @@
   * has not requested planar formats, we should allow 8 pixel
   * alignment.
   */
-#define MIN_W       176
-#define MIN_H       144
+#define MIN_W       32
+#define MIN_H       32
  #define MAX_W      4096
  #define MAX_H      4096
  #define W_ALIGN    1 /* multiple of 2 pixels */
drivers/staging/media/imx/imx-media-vdic.c +2 -2
index 0d83c2c41606..ee71b70d3544 100644
@@ -49,8 +49,8 @@ struct vdic_pipeline_ops {
  /*
   * Min/Max supported width and heights.
   */
-#define MIN_W       176
-#define MIN_H       144
+#define MIN_W        32
+#define MIN_H        32
  #define MAX_W_VDIC  968
  #define MAX_H_VDIC 2048
  #define W_ALIGN    4 /* multiple of 16 pixels */