Skip to contentSkip to conversation

Revert "media: staging/intel-ipu3: make imgu use fixed running mode"

PATCH RESEND New Bingbu Cao 1 participant 1 message Jan 17, 2020

Subsystems (4)
lore
Share & tools
lore

Bingbu Cao

author
#0 lore raw

PATCH RESEND 1/1 Revert "media: staging/intel-ipu3: make imgu use fixed running mode"

This reverts commit e878742c83ec26ef256ebb6b36a4d44644548f25.

Imgu should still keep the capability and flexibility to allow user to run 2 video pipes, as the user may use the video pipe to capture still frames with less system load and power than still pipe.

---
 Documentation/media/v4l-drivers/ipu3.rst        |  6 +-
 drivers/staging/media/ipu3/include/intel-ipu3.h |  4 ++
 drivers/staging/media/ipu3/ipu3-v4l2.c          | 74 ++++++++++++++++++++++---
 drivers/staging/media/ipu3/ipu3.h               |  5 +-
 4 files changed, 77 insertions(+), 12 deletions(-)
Documentation/media/v4l-drivers/ipu3.rst +3 -3
index 50bd264a3408..e4904ab44e60 100644
@@ -234,9 +234,9 @@ The IPU3 ImgU pipelines can be configured using the Media Controller, defined at
 Firmware binary selection
 -------------------------
 
-The firmware binary is selected according to the running mode of imgu. There are
-2 modes are available - "video" and "still". "ipu3-imgu video" are running under
-"video" mode and "ipu3-imgu still" is running under "still" mode.
+The firmware binary is selected using the V4L2_CID_INTEL_IPU3_MODE, currently
+defined in drivers/staging/media/ipu3/include/intel-ipu3.h . "VIDEO" and "STILL"
+modes are available.
 
 Processing the image in raw Bayer format
 ----------------------------------------
drivers/staging/media/ipu3/include/intel-ipu3.h +4 -0
index 37afb8d596d0..1c9c3ba4d518 100644
@@ -12,6 +12,10 @@
 #define V4L2_META_FMT_IPU3_PARAMS	v4l2_fourcc('i', 'p', '3', 'p') /* IPU3 processing parameters */
 #define V4L2_META_FMT_IPU3_STAT_3A	v4l2_fourcc('i', 'p', '3', 's') /* IPU3 3A statistics */
 
+/* from include/uapi/linux/v4l2-controls.h */
+#define V4L2_CID_INTEL_IPU3_BASE	(V4L2_CID_USER_BASE + 0x10c0)
+#define V4L2_CID_INTEL_IPU3_MODE	(V4L2_CID_INTEL_IPU3_BASE + 1)
+
 /******************* ipu3_uapi_stats_3a *******************/
 
 #define IPU3_UAPI_MAX_STRIPES				2
drivers/staging/media/ipu3/ipu3-v4l2.c +66 -8

142 lines not on this page · raw message

drivers/staging/media/ipu3/ipu3.h +4 -1
index de02a244732e..73b123b2b8a2 100644
@@ -7,6 +7,7 @@
 #include <linux/iova.h>
 #include <linux/pci.h>
 
+#include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 #include <media/videobuf2-dma-sg.h>
 
@@ -95,7 +96,9 @@ struct imgu_v4l2_subdev {
 		struct v4l2_rect bds; /* bayer-domain scaled resolution*/
 		struct v4l2_rect gdc; /* gdc output resolution */
 	} rect;
-	unsigned int running_mode;
+	struct v4l2_ctrl_handler ctrl_handler;
+	struct v4l2_ctrl *ctrl;
+	atomic_t running_mode;
 	bool active;
 };
 
Signature · 1 line
2.7.4