FAILED: patch "[PATCH] media: imx219: Fix maximum frame length in lines" failed to apply to 6.12-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 2c4f1ba7354312ad2d6e34e70a518a51a9344715
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072955-secret-automaker-f113@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 2c4f1ba7354312ad2d6e34e70a518a51a9344715 Mon Sep 17 00:00:00 2001
From: Sakari Ailus <[email protected]>
Date: Sat, 21 Feb 2026 01:38:15 +0200
Subject: [PATCH] media: imx219: Fix maximum frame length in lines
The driver used the maximum frame length in lines value of 0xffff, but the maximum appears to be 0xfffe instead. Fix it.
drivers/media/i2c/imx219.c +1 -1
@@ -72,7 +72,7 @@/* V_TIMING internal */ #define IMX219_REG_FRM_LENGTH_A CCI_REG16(0x0160) -#define IMX219_FLL_MAX 0xffff +#define IMX219_FLL_MAX 0xfffe#define IMX219_VBLANK_MIN 32#define IMX219_REG_LINE_LENGTH_A CCI_REG16(0x0162)#define IMX219_LLP_MIN 0x0d78
Sasha Levin
maintainerPATCH 1/2 media: i2c: imx219: Rename VTS to FRM_LENGTH
From: Jai Luthra <[email protected]>
[ Upstream commit 04f78503f99ae7e9887c7fe5e4bc54a7cfb10fe0 ]
The IMX219 datasheet refers to the vertical length + blanking as FRM_LENGTH instead of VTS.
Stable-dep-of: 2c4f1ba73543 ("media: imx219: Fix maximum frame length in lines")
--- drivers/media/i2c/imx219.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-)
drivers/media/i2c/imx219.c +15 -16
@@ -71,9 +71,8 @@#define IMX219_EXPOSURE_MAX 65535/* V_TIMING internal */ -#define IMX219_REG_VTS CCI_REG16(0x0160) -#define IMX219_VTS_MAX 0xffff - +#define IMX219_REG_FRM_LENGTH_A CCI_REG16(0x0160) +#define IMX219_FLL_MAX 0xffff#define IMX219_VBLANK_MIN 32/* HBLANK control - read only */
@@ -156,7 +155,7 @@ struct imx219_mode {unsigned int height;/* V-timing */ -unsigned int vts_def; +unsigned int fll_def; };static const struct cci_reg_sequence imx219_common_regs[] = {
@@ -315,25 +314,25 @@ static const struct imx219_mode supported_modes[] = {/* 8MPix 15fps mode */ .width = 3280, .height = 2464, - .vts_def = 3526, + .fll_def = 3526, }, { /* 1080P 30fps cropped */ .width = 1920, .height = 1080, - .vts_def = 1763, + .fll_def = 1763, }, { /* 2x2 binned 30fps mode */ .width = 1640, .height = 1232, - .vts_def = 1763, + .fll_def = 1763, }, { /* 640x480 30fps mode */ .width = 640, .height = 480, - .vts_def = 1763, + .fll_def = 1763, }, };
@@ -444,7 +443,7 @@ static int imx219_set_ctrl(struct v4l2_ctrl *ctrl) imx219->hflip->val | imx219->vflip->val << 1, &ret);break ;case V4L2_CID_VBLANK : -cci_write (imx219->regmap,IMX219_REG_VTS , +cci_write (imx219->regmap,IMX219_REG_FRM_LENGTH_A , format->height + ctrl->val, &ret);break ;case V4L2_CID_TEST_PATTERN_RED :
@@ -519,15 +518,15 @@ static int imx219_init_controls(struct imx219 *imx219)/* Initial vblank/hblank/exposure parameters based on current mode */ imx219->vblank =v4l2_ctrl_new_std (ctrl_hdlr, &imx219_ctrl_ops,V4L2_CID_VBLANK ,IMX219_VBLANK_MIN , -IMX219_VTS_MAX - mode->height,1 , - mode->vts_def - mode->height); +IMX219_FLL_MAX - mode->height,1 , + mode->fll_def - mode->height); hblank =IMX219_PPL_DEFAULT - mode->width; imx219->hblank =v4l2_ctrl_new_std (ctrl_hdlr, &imx219_ctrl_ops,V4L2_CID_HBLANK , hblank, hblank,1 , hblank);if (imx219->hblank) imx219->hblank->flags |=V4L2_CTRL_FLAG_READ_ONLY ; - exposure_max = mode->vts_def -4 ; + exposure_max = mode->fll_def -4 ; exposure_def = (exposure_max <IMX219_EXPOSURE_DEFAULT ) ? exposure_max :IMX219_EXPOSURE_DEFAULT ; imx219->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &imx219_ctrl_ops,
@@ -878,12 +877,12 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,/* Update limits and set FPS to default */ __v4l2_ctrl_modify_range (imx219->vblank,IMX219_VBLANK_MIN , -IMX219_VTS_MAX - mode->height,1 , - mode->vts_def - mode->height); +IMX219_FLL_MAX - mode->height,1 , + mode->fll_def - mode->height);__v4l2_ctrl_s_ctrl (imx219->vblank, - mode->vts_def - mode->height); + mode->fll_def - mode->height);/* Update max exposure while meeting expected vblanking */ - exposure_max = mode->vts_def -4 ; + exposure_max = mode->fll_def -4 ; exposure_def = (exposure_max <IMX219_EXPOSURE_DEFAULT ) ? exposure_max :IMX219_EXPOSURE_DEFAULT ; __v4l2_ctrl_modify_range(imx219->exposure,
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/2 media: imx219: Fix maximum frame length in lines
From: Sakari Ailus <[email protected]>
[ Upstream commit 2c4f1ba7354312ad2d6e34e70a518a51a9344715 ]
The driver used the maximum frame length in lines value of 0xffff, but the maximum appears to be 0xfffe instead. Fix it.
--- drivers/media/i2c/imx219.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/imx219.c +1 -1
@@ -72,7 +72,7 @@/* V_TIMING internal */ #define IMX219_REG_FRM_LENGTH_A CCI_REG16(0x0160) -#define IMX219_FLL_MAX 0xffff +#define IMX219_FLL_MAX 0xfffe#define IMX219_VBLANK_MIN 32/* HBLANK control - read only */
Signature · 1 line
2.53.0