Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: imx335: Update the native pixel array width

The sensor datasheet reports actual total number of pixels as 2696x2044.

This becomes important for supporting 2x2 binning modes that can go
beyond the current maximum pixel array width set here.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Jai Luthra and committed by
Hans Verkuil
b82801a1 2581a401

+16 -16
+16 -16
drivers/media/i2c/imx335.c
··· 124 124 #define IMX335_NUM_DATA_LANES 4 125 125 126 126 /* IMX335 native and active pixel array size. */ 127 - #define IMX335_NATIVE_WIDTH 2616U 128 - #define IMX335_NATIVE_HEIGHT 1964U 129 - #define IMX335_PIXEL_ARRAY_LEFT 12U 130 - #define IMX335_PIXEL_ARRAY_TOP 12U 131 - #define IMX335_PIXEL_ARRAY_WIDTH 2592U 132 - #define IMX335_PIXEL_ARRAY_HEIGHT 1944U 127 + static const struct v4l2_rect imx335_native_area = { 128 + .top = 0, 129 + .left = 0, 130 + .width = 2696, 131 + .height = 2044, 132 + }; 133 + 134 + static const struct v4l2_rect imx335_active_area = { 135 + .top = 50, 136 + .left = 52, 137 + .width = 2592, 138 + .height = 1944, 139 + }; 140 + 133 141 134 142 /** 135 143 * struct imx335_reg_list - imx335 sensor register list ··· 870 862 { 871 863 switch (sel->target) { 872 864 case V4L2_SEL_TGT_NATIVE_SIZE: 873 - sel->r.top = 0; 874 - sel->r.left = 0; 875 - sel->r.width = IMX335_NATIVE_WIDTH; 876 - sel->r.height = IMX335_NATIVE_HEIGHT; 877 - 865 + sel->r = imx335_native_area; 878 866 return 0; 879 867 880 868 case V4L2_SEL_TGT_CROP: 881 869 case V4L2_SEL_TGT_CROP_DEFAULT: 882 870 case V4L2_SEL_TGT_CROP_BOUNDS: 883 - sel->r.top = IMX335_PIXEL_ARRAY_TOP; 884 - sel->r.left = IMX335_PIXEL_ARRAY_LEFT; 885 - sel->r.width = IMX335_PIXEL_ARRAY_WIDTH; 886 - sel->r.height = IMX335_PIXEL_ARRAY_HEIGHT; 887 - 871 + sel->r = imx335_active_area; 888 872 return 0; 889 873 } 890 874