aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-layerscape/patches
Commit message (Expand)AuthorAgeFilesLines
* uboot-layerscape: Bump to lf-6.1.1-1.0.0 and switch to githubWojciech Dubowik2023-05-202-41/+0
* uboot-layerscape: Add ls1028ardb supportWojciech Dubowik2023-05-071-0/+8
* uboot-layerscape: Don't fixup kaslr seed when no nodeWojciech Dubowik2023-05-071-0/+33
* uboot-layerscape: adjust LS1012A-IOT config and envPawel Dembicki2022-11-051-0/+45
* uboot-layerscape: bump to LSDK-21.08Martin Schiller2021-12-133-46/+67
* uboot-layerscape: fix dtc compilation on host gcc 10Hauke Mehrtens2021-08-091-0/+46
* layerscape: update u-boot to LSDK-20.04Yangbo Lu2020-05-073-84/+0
* layerscape: fix u-boot bootcmdBiwen Li2019-06-063-0/+84
* layerscape: drop uboot-layerscape patchesYangbo Lu2018-09-226-320/+0
* layerscape: support ubifs rootfs in u-boot envYangbo Lu2018-02-134-12/+12
* layerscape: update u-boot to LSDK1712Yangbo Lu2018-02-132-26/+26
* layerscape: add ls1012afrdm device supportYangbo Lu2017-11-101-0/+49
* layerscape: enlarge ext4 rootfs size to 30MBYangbo Lu2017-11-103-3/+3
* layerscape: stop pfe before starting up kernelYangbo Lu2017-11-101-1/+1
* layerscape: support LEDE boot for ls1088ardb/ls2088ardbYangbo Lu2017-11-102-0/+112
* layerscape: update packages with LSDK git treesYangbo Lu2017-10-073-0/+159
* layerscape: uboot-layerscape: prefer github over git.freescale.comYutang Jiang2016-12-1294-18492/+0
* layerscape: uboot: using perl script:byte_swap.pl to replace tcl script:byte_...Yutang Jiang2016-11-161-0/+72
* layerscape: add 64b/32b target for ls1012ardb deviceYutang Jiang2016-10-3188-0/+17936
* layerscape: add 64b/32b target for ls1043ardb deviceYutang Jiang2016-10-315-0/+484
ghlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
From e783c62652ae18705f1a9cfeaa5c830c76e7facc Mon Sep 17 00:00:00 2001
From: Naushir Patuck <naush@raspberrypi.com>
Date: Wed, 10 Feb 2021 10:18:53 +0000
Subject: [PATCH] media: i2c: imx477: Remove auto frame length
 adjusting

The V4L2_CID_EXPOSURE_AUTO_PRIORITY was used to let the sensor control
frame length (effectively framerate) based on the requested exposure
time requested. Remove this feature as it is never used, and goes
against how V4L2 likes to handle exposure and vblank controls.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 drivers/media/i2c/imx477.c | 83 +++-----------------------------------
 1 file changed, 6 insertions(+), 77 deletions(-)

--- a/drivers/media/i2c/imx477.c
+++ b/drivers/media/i2c/imx477.c
@@ -1082,8 +1082,6 @@ struct imx477 {
 	struct v4l2_ctrl *hflip;
 	struct v4l2_ctrl *vblank;
 	struct v4l2_ctrl *hblank;
-	/* This ctrl allows automatic variable framerate */
-	struct v4l2_ctrl *exposure_auto;
 
 	/* Current mode */
 	const struct imx477_mode *mode;
@@ -1280,66 +1278,14 @@ static int imx477_open(struct v4l2_subde
 	return 0;
 }
 
-static int imx477_set_exposure(struct imx477 *imx477, unsigned int val)
-{
-	int ret;
-
-	ret = imx477_write_reg(imx477, IMX477_REG_EXPOSURE,
-			       IMX477_REG_VALUE_16BIT, val);
-
-	/* Setup the frame length in the case of auto framerate mode. */
-	if (imx477->exposure_auto->val) {
-		unsigned int frame_length, frame_length_max, frame_length_min;
-
-		frame_length_min = imx477->vblank->minimum +
-				   imx477->mode->height;
-		frame_length_max = imx477->vblank->maximum +
-				   imx477->mode->height;
-		frame_length = max(frame_length_min,
-				   val + IMX477_EXPOSURE_OFFSET);
-		frame_length = min(frame_length_max, frame_length);
-		ret += imx477_write_reg(imx477, IMX477_REG_FRAME_LENGTH,
-					IMX477_REG_VALUE_16BIT, frame_length);
-	}
-
-	return ret;
-}
-
 static void imx477_adjust_exposure_range(struct imx477 *imx477,
 					 struct v4l2_ctrl *ctrl)
 {
 	int exposure_max, exposure_def;
 
-	if (ctrl->id == V4L2_CID_VBLANK || !ctrl->val) {
-		/*
-		 * Either VBLANK has been changed or auto framerate
-		 * adjusting has been disabled. Honour the VBLANK limits
-		 * when setting exposure.
-		 */
-		exposure_max = imx477->mode->height + imx477->vblank->val -
-						      IMX477_EXPOSURE_OFFSET;
-
-		if (ctrl->id == V4L2_CID_EXPOSURE_AUTO_PRIORITY) {
-			/*
-			 * Allow VBLANK adjustments since the driver is not
-			 * handling frame length control automatically.
-			 */
-			__v4l2_ctrl_grab(imx477->vblank, false);
-		}
-	} else {
-		/*
-		 * Auto framerate adjusting has been enabled. VBLANK
-		 * ctrl has been disabled and exposure can ramp up
-		 * to the maximum allowable value.
-		 */
-		exposure_max = IMX477_EXPOSURE_MAX;
-		/*
-		 * Do not allow VBLANK adjustments if the driver is
-		 * handling it frame length control automatically.
-		 */
-		__v4l2_ctrl_grab(imx477->vblank, true);
-	}
-
+	/* Honour the VBLANK limits when setting exposure. */
+	exposure_max = imx477->mode->height + imx477->vblank->val -
+						IMX477_EXPOSURE_OFFSET;
 	exposure_def = min(exposure_max, imx477->exposure->val);
 	__v4l2_ctrl_modify_range(imx477->exposure, imx477->exposure->minimum,
 				 exposure_max, imx477->exposure->step,
@@ -1353,14 +1299,8 @@ static int imx477_set_ctrl(struct v4l2_c
 	struct i2c_client *client = v4l2_get_subdevdata(&imx477->sd);
 	int ret = 0;
 
-	if (ctrl->id == V4L2_CID_VBLANK ||
-	    ctrl->id == V4L2_CID_EXPOSURE_AUTO_PRIORITY) {
-		/*
-		 * These controls may change the limits of usable exposure,
-		 * so check and adjust if necessary.
-		 */
+	if (ctrl->id == V4L2_CID_VBLANK)
 		imx477_adjust_exposure_range(imx477, ctrl);
-	}
 
 	/*
 	 * Applying V4L2 control value only happens
@@ -1375,14 +1315,8 @@ static int imx477_set_ctrl(struct v4l2_c
 				       IMX477_REG_VALUE_16BIT, ctrl->val);
 		break;
 	case V4L2_CID_EXPOSURE:
-		ret = imx477_set_exposure(imx477, ctrl->val);
-		break;
-	case V4L2_CID_EXPOSURE_AUTO_PRIORITY:
-		/*
-		 * imx477_set_exposure() will recalculate the frame length
-		 * to adjust the framerate to match the exposure.
-		 */
-		ret = imx477_set_exposure(imx477, imx477->exposure->val);
+		ret = imx477_write_reg(imx477, IMX477_REG_EXPOSURE,
+				       IMX477_REG_VALUE_16BIT, ctrl->val);
 		break;
 	case V4L2_CID_DIGITAL_GAIN:
 		ret = imx477_write_reg(imx477, IMX477_REG_DIGITAL_GAIN,
@@ -2005,11 +1939,6 @@ static int imx477_init_controls(struct i
 			  IMX477_DGTL_GAIN_MIN, IMX477_DGTL_GAIN_MAX,
 			  IMX477_DGTL_GAIN_STEP, IMX477_DGTL_GAIN_DEFAULT);
 
-	imx477->exposure_auto =
-			v4l2_ctrl_new_std(ctrl_hdlr, &imx477_ctrl_ops,
-					  V4L2_CID_EXPOSURE_AUTO_PRIORITY,
-					  0, 1, 1, 0);
-
 	imx477->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx477_ctrl_ops,
 					  V4L2_CID_HFLIP, 0, 1, 1, 0);
 	if (imx477->hflip)