All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-media@vger.kernel.org
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>, Benoit Parrot <bparrot@ti.com>
Subject: [PATCH v2 108/108] media: ti-vpe: cal: Implement media controller centric API
Date: Mon,  6 Jul 2020 21:37:09 +0300	[thread overview]
Message-ID: <20200706183709.12238-109-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20200706183709.12238-1-laurent.pinchart@ideasonboard.com>

The CAL driver is video node centric, it controls the whole device
through the video device nodes. This limits the possible use cases as it
can't support sources that are more complex than a single subdev. To
support more complex hardware pipelines, implement support for the media
controller centric API. The exposed API can be selected through a module
parameter.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v1:

- Fix parameter name and description in MODULE_PARM_DESC()
---
 drivers/media/platform/ti-vpe/cal-camerarx.c |   1 +
 drivers/media/platform/ti-vpe/cal-video.c    | 358 ++++++++++++++-----
 drivers/media/platform/ti-vpe/cal.c          |  10 +-
 drivers/media/platform/ti-vpe/cal.h          |   2 +
 4 files changed, 289 insertions(+), 82 deletions(-)

diff --git a/drivers/media/platform/ti-vpe/cal-camerarx.c b/drivers/media/platform/ti-vpe/cal-camerarx.c
index 1920f36137b8..8abf887c47d6 100644
--- a/drivers/media/platform/ti-vpe/cal-camerarx.c
+++ b/drivers/media/platform/ti-vpe/cal-camerarx.c
@@ -830,6 +830,7 @@ struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal,
 	sd = &phy->subdev;
 	v4l2_subdev_init(sd, &cal_camerarx_subdev_ops);
 	sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
+	sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
 	snprintf(sd->name, sizeof(sd->name), "CAMERARX%u", instance);
 	sd->dev = cal->dev;
 
diff --git a/drivers/media/platform/ti-vpe/cal-video.c b/drivers/media/platform/ti-vpe/cal-video.c
index 0f8702bd77db..5f9cd449f027 100644
--- a/drivers/media/platform/ti-vpe/cal-video.c
+++ b/drivers/media/platform/ti-vpe/cal-video.c
@@ -40,40 +40,10 @@ static char *fourcc_to_str(u32 fmt)
 }
 
 /* ------------------------------------------------------------------
- *	V4L2 Video IOCTLs
+ *	V4L2 Common IOCTLs
  * ------------------------------------------------------------------
  */
 
-static const struct cal_format_info *find_format_by_pix(struct cal_ctx *ctx,
-							u32 pixelformat)
-{
-	const struct cal_format_info *fmtinfo;
-	unsigned int k;
-
-	for (k = 0; k < ctx->num_active_fmt; k++) {
-		fmtinfo = ctx->active_fmt[k];
-		if (fmtinfo->fourcc == pixelformat)
-			return fmtinfo;
-	}
-
-	return NULL;
-}
-
-static const struct cal_format_info *find_format_by_code(struct cal_ctx *ctx,
-							 u32 code)
-{
-	const struct cal_format_info *fmtinfo;
-	unsigned int k;
-
-	for (k = 0; k < ctx->num_active_fmt; k++) {
-		fmtinfo = ctx->active_fmt[k];
-		if (fmtinfo->code == code)
-			return fmtinfo;
-	}
-
-	return NULL;
-}
-
 static int cal_querycap(struct file *file, void *priv,
 			struct v4l2_capability *cap)
 {
@@ -87,6 +57,51 @@ static int cal_querycap(struct file *file, void *priv,
 	return 0;
 }
 
+static int cal_g_fmt_vid_cap(struct file *file, void *priv,
+			     struct v4l2_format *f)
+{
+	struct cal_ctx *ctx = video_drvdata(file);
+
+	*f = ctx->v_fmt;
+
+	return 0;
+}
+
+/* ------------------------------------------------------------------
+ *	V4L2 Video Node Centric IOCTLs
+ * ------------------------------------------------------------------
+ */
+
+static const struct cal_format_info *find_format_by_pix(struct cal_ctx *ctx,
+							u32 pixelformat)
+{
+	const struct cal_format_info *fmtinfo;
+	unsigned int k;
+
+	for (k = 0; k < ctx->num_active_fmt; k++) {
+		fmtinfo = ctx->active_fmt[k];
+		if (fmtinfo->fourcc == pixelformat)
+			return fmtinfo;
+	}
+
+	return NULL;
+}
+
+static const struct cal_format_info *find_format_by_code(struct cal_ctx *ctx,
+							 u32 code)
+{
+	const struct cal_format_info *fmtinfo;
+	unsigned int k;
+
+	for (k = 0; k < ctx->num_active_fmt; k++) {
+		fmtinfo = ctx->active_fmt[k];
+		if (fmtinfo->code == code)
+			return fmtinfo;
+	}
+
+	return NULL;
+}
+
 static int cal_enum_fmt_vid_cap(struct file *file, void  *priv,
 				struct v4l2_fmtdesc *f)
 {
@@ -174,16 +189,6 @@ static void cal_calc_format_size(struct cal_ctx *ctx,
 		f->fmt.pix.bytesperline, f->fmt.pix.sizeimage);
 }
 
-static int cal_g_fmt_vid_cap(struct file *file, void *priv,
-			     struct v4l2_format *f)
-{
-	struct cal_ctx *ctx = video_drvdata(file);
-
-	*f = ctx->v_fmt;
-
-	return 0;
-}
-
 static int cal_try_fmt_vid_cap(struct file *file, void *priv,
 			       struct v4l2_format *f)
 {
@@ -383,17 +388,7 @@ static int cal_enum_frameintervals(struct file *file, void *priv,
 	return 0;
 }
 
-static const struct v4l2_file_operations cal_fops = {
-	.owner		= THIS_MODULE,
-	.open           = v4l2_fh_open,
-	.release        = vb2_fop_release,
-	.read           = vb2_fop_read,
-	.poll		= vb2_fop_poll,
-	.unlocked_ioctl = video_ioctl2, /* V4L2 ioctl handler */
-	.mmap           = vb2_fop_mmap,
-};
-
-static const struct v4l2_ioctl_ops cal_ioctl_ops = {
+static const struct v4l2_ioctl_ops cal_ioctl_video_ops = {
 	.vidioc_querycap      = cal_querycap,
 	.vidioc_enum_fmt_vid_cap  = cal_enum_fmt_vid_cap,
 	.vidioc_g_fmt_vid_cap     = cal_g_fmt_vid_cap,
@@ -419,7 +414,153 @@ static const struct v4l2_ioctl_ops cal_ioctl_ops = {
 };
 
 /* ------------------------------------------------------------------
- *	videobuf2 Operations
+ *	V4L2 Media Controller Centric IOCTLs
+ * ------------------------------------------------------------------
+ */
+
+static int cal_mc_enum_fmt_vid_cap(struct file *file, void  *priv,
+				   struct v4l2_fmtdesc *f)
+{
+	if (f->index >= cal_num_formats)
+		return -EINVAL;
+
+	f->pixelformat = cal_formats[f->index].fourcc;
+	f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+	return 0;
+}
+
+static void cal_mc_try_fmt(struct cal_ctx *ctx, struct v4l2_format *f,
+			   const struct cal_format_info **info)
+{
+	struct v4l2_pix_format *format = &f->fmt.pix;
+	const struct cal_format_info *fmtinfo;
+	unsigned int bpp;
+
+	/*
+	 * Default to the first format is the requested pixel format code isn't
+	 * supported.
+	 */
+	fmtinfo = cal_format_by_fourcc(f->fmt.pix.pixelformat);
+	if (!fmtinfo)
+		fmtinfo = &cal_formats[0];
+
+	/*
+	 * Clamp the size, update the pixel format. The field and colorspace are
+	 * accepted as-is, except for V4L2_FIELD_ANY that is turned into
+	 * V4L2_FIELD_NONE.
+	 */
+	bpp = ALIGN(fmtinfo->bpp, 8);
+
+	format->width = clamp_t(unsigned int, format->width,
+				CAL_MIN_WIDTH_BYTES * 8 / bpp,
+				CAL_MAX_WIDTH_BYTES * 8 / bpp);
+	format->height = clamp_t(unsigned int, format->height,
+				 CAL_MIN_HEIGHT_LINES, CAL_MAX_HEIGHT_LINES);
+	format->pixelformat = fmtinfo->fourcc;
+
+	if (format->field == V4L2_FIELD_ANY)
+		format->field = V4L2_FIELD_NONE;
+
+	/*
+	 * Calculate the number of bytes per line and the image size. The
+	 * hardware stores the stride as a number of 16 bytes words, in a
+	 * signed 15-bit value. Only 14 bits are thus usable.
+	 */
+	format->bytesperline = ALIGN(clamp(format->bytesperline,
+					   format->width * bpp / 8,
+					   ((1U << 14) - 1) * 16), 16);
+
+	format->sizeimage = format->height * format->bytesperline;
+
+	if (info)
+		*info = fmtinfo;
+
+	ctx_dbg(3, ctx, "%s: %s %ux%u (bytesperline %u sizeimage %u)\n",
+		__func__, fourcc_to_str(format->pixelformat),
+		format->width, format->height,
+		format->bytesperline, format->sizeimage);
+}
+
+static int cal_mc_try_fmt_vid_cap(struct file *file, void *priv,
+				  struct v4l2_format *f)
+{
+	struct cal_ctx *ctx = video_drvdata(file);
+
+	cal_mc_try_fmt(ctx, f, NULL);
+	return 0;
+}
+
+static int cal_mc_s_fmt_vid_cap(struct file *file, void *priv,
+				struct v4l2_format *f)
+{
+	struct cal_ctx *ctx = video_drvdata(file);
+	const struct cal_format_info *fmtinfo;
+
+	if (vb2_is_busy(&ctx->vb_vidq)) {
+		ctx_dbg(3, ctx, "%s device busy\n", __func__);
+		return -EBUSY;
+	}
+
+	cal_mc_try_fmt(ctx, f, &fmtinfo);
+
+	ctx->v_fmt = *f;
+	ctx->fmtinfo = fmtinfo;
+
+	return 0;
+}
+
+static int cal_mc_enum_framesizes(struct file *file, void *fh,
+				  struct v4l2_frmsizeenum *fsize)
+{
+	struct cal_ctx *ctx = video_drvdata(file);
+	const struct cal_format_info *fmtinfo;
+	unsigned int bpp;
+
+	if (fsize->index > 0)
+		return -EINVAL;
+
+	fmtinfo = cal_format_by_fourcc(fsize->pixel_format);
+	if (!fmtinfo) {
+		ctx_dbg(3, ctx, "Invalid pixel format 0x%08x\n",
+			fsize->pixel_format);
+		return -EINVAL;
+	}
+
+	bpp = ALIGN(fmtinfo->bpp, 8);
+
+	fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE;
+	fsize->stepwise.min_width = CAL_MIN_WIDTH_BYTES * 8 / bpp;
+	fsize->stepwise.max_width = CAL_MAX_WIDTH_BYTES * 8 / bpp;
+	fsize->stepwise.step_width = 64 / bpp;
+	fsize->stepwise.min_height = CAL_MIN_HEIGHT_LINES;
+	fsize->stepwise.max_height = CAL_MAX_HEIGHT_LINES;
+	fsize->stepwise.step_height = 1;
+
+	return 0;
+}
+
+static const struct v4l2_ioctl_ops cal_ioctl_mc_ops = {
+	.vidioc_querycap      = cal_querycap,
+	.vidioc_enum_fmt_vid_cap  = cal_mc_enum_fmt_vid_cap,
+	.vidioc_g_fmt_vid_cap     = cal_g_fmt_vid_cap,
+	.vidioc_try_fmt_vid_cap   = cal_mc_try_fmt_vid_cap,
+	.vidioc_s_fmt_vid_cap     = cal_mc_s_fmt_vid_cap,
+	.vidioc_enum_framesizes   = cal_mc_enum_framesizes,
+	.vidioc_reqbufs       = vb2_ioctl_reqbufs,
+	.vidioc_create_bufs   = vb2_ioctl_create_bufs,
+	.vidioc_prepare_buf   = vb2_ioctl_prepare_buf,
+	.vidioc_querybuf      = vb2_ioctl_querybuf,
+	.vidioc_qbuf          = vb2_ioctl_qbuf,
+	.vidioc_dqbuf         = vb2_ioctl_dqbuf,
+	.vidioc_expbuf        = vb2_ioctl_expbuf,
+	.vidioc_streamon      = vb2_ioctl_streamon,
+	.vidioc_streamoff     = vb2_ioctl_streamoff,
+	.vidioc_log_status    = v4l2_ctrl_log_status,
+};
+
+/* ------------------------------------------------------------------
+ *	videobuf2 Common Operations
  * ------------------------------------------------------------------
  */
 
@@ -505,6 +646,26 @@ static void cal_release_buffers(struct cal_ctx *ctx,
 	spin_unlock_irq(&ctx->dma.lock);
 }
 
+/* ------------------------------------------------------------------
+ *	videobuf2 Operations
+ * ------------------------------------------------------------------
+ */
+
+static int cal_video_check_format(struct cal_ctx *ctx)
+{
+	const struct v4l2_mbus_framefmt *format;
+
+	format = &ctx->phy->formats[CAL_CAMERARX_PAD_SOURCE];
+
+	if (ctx->fmtinfo->code != format->code ||
+	    ctx->v_fmt.fmt.pix.height != format->height ||
+	    ctx->v_fmt.fmt.pix.width != format->width ||
+	    ctx->v_fmt.fmt.pix.field != format->field)
+		return -EPIPE;
+
+	return 0;
+}
+
 static int cal_start_streaming(struct vb2_queue *vq, unsigned int count)
 {
 	struct cal_ctx *ctx = vb2_get_drv_priv(vq);
@@ -512,6 +673,23 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count)
 	dma_addr_t addr;
 	int ret;
 
+	ret = media_pipeline_start(&ctx->vdev.entity, &ctx->phy->pipe);
+	if (ret < 0) {
+		ctx_err(ctx, "Failed to start media pipeline: %d\n", ret);
+		return ret;
+	}
+
+	/*
+	 * Verify that the currently configured format matches the output of
+	 * the connected CAMERARX.
+	 */
+	ret = cal_video_check_format(ctx);
+	if (ret < 0) {
+		ctx_dbg(3, ctx,
+			"Format mismatch between CAMERARX and video node\n");
+		goto error_pipeline;
+	}
+
 	spin_lock_irq(&ctx->dma.lock);
 	buf = list_first_entry(&ctx->dma.queue, struct cal_buffer, list);
 	ctx->dma.pending = buf;
@@ -527,18 +705,21 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count)
 
 	ret = v4l2_subdev_call(&ctx->phy->subdev, video, s_stream, 1);
 	if (ret)
-		goto err;
+		goto error_stop;
 
 	if (cal_debug >= 4)
 		cal_quickdump_regs(ctx->cal);
 
 	return 0;
 
-err:
+error_stop:
 	cal_ctx_stop(ctx);
 	pm_runtime_put_sync(ctx->cal->dev);
 
+error_pipeline:
+	media_pipeline_stop(&ctx->vdev.entity);
 	cal_release_buffers(ctx, VB2_BUF_STATE_QUEUED);
+
 	return ret;
 }
 
@@ -553,6 +734,8 @@ static void cal_stop_streaming(struct vb2_queue *vq)
 	pm_runtime_put_sync(ctx->cal->dev);
 
 	cal_release_buffers(ctx, VB2_BUF_STATE_ERROR);
+
+	media_pipeline_stop(&ctx->vdev.entity);
 }
 
 static const struct vb2_ops cal_video_qops = {
@@ -570,13 +753,14 @@ static const struct vb2_ops cal_video_qops = {
  * ------------------------------------------------------------------
  */
 
-static const struct video_device cal_videodev = {
-	.name		= CAL_MODULE_NAME,
-	.fops		= &cal_fops,
-	.ioctl_ops	= &cal_ioctl_ops,
-	.minor		= -1,
-	.release	= video_device_release_empty,
-	.device_caps	= V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING,
+static const struct v4l2_file_operations cal_fops = {
+	.owner		= THIS_MODULE,
+	.open           = v4l2_fh_open,
+	.release        = vb2_fop_release,
+	.read           = vb2_fop_read,
+	.poll		= vb2_fop_poll,
+	.unlocked_ioctl = video_ioctl2, /* V4L2 ioctl handler */
+	.mmap           = vb2_fop_mmap,
 };
 
 static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx)
@@ -650,19 +834,22 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx)
 
 int cal_ctx_v4l2_register(struct cal_ctx *ctx)
 {
-	struct v4l2_ctrl_handler *hdl = &ctx->ctrl_handler;
 	struct video_device *vfd = &ctx->vdev;
 	int ret;
 
-	ret = cal_ctx_v4l2_init_formats(ctx);
-	if (ret)
-		return ret;
+	if (!cal_mc_api) {
+		struct v4l2_ctrl_handler *hdl = &ctx->ctrl_handler;
 
-	ret = v4l2_ctrl_add_handler(hdl, ctx->phy->sensor->ctrl_handler, NULL,
-				    true);
-	if (ret < 0) {
-		ctx_err(ctx, "Failed to add sensor ctrl handler\n");
-		return ret;
+		ret = cal_ctx_v4l2_init_formats(ctx);
+		if (ret)
+			return ret;
+
+		ret = v4l2_ctrl_add_handler(hdl, ctx->phy->sensor->ctrl_handler,
+					    NULL, true);
+		if (ret < 0) {
+			ctx_err(ctx, "Failed to add sensor ctrl handler\n");
+			return ret;
+		}
 	}
 
 	ret = video_register_device(vfd, VFL_TYPE_VIDEO, cal_video_nr);
@@ -699,7 +886,6 @@ void cal_ctx_v4l2_unregister(struct cal_ctx *ctx)
 
 int cal_ctx_v4l2_init(struct cal_ctx *ctx)
 {
-	struct v4l2_ctrl_handler *hdl = &ctx->ctrl_handler;
 	struct video_device *vfd = &ctx->vdev;
 	struct vb2_queue *q = &ctx->vb_vidq;
 	int ret;
@@ -726,10 +912,14 @@ int cal_ctx_v4l2_init(struct cal_ctx *ctx)
 		return ret;
 
 	/* Initialize the video device and media entity. */
-	*vfd = cal_videodev;
+	vfd->fops = &cal_fops;
+	vfd->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING
+			 | (cal_mc_api ? V4L2_CAP_IO_MC : 0);
 	vfd->v4l2_dev = &ctx->cal->v4l2_dev;
 	vfd->queue = q;
 	snprintf(vfd->name, sizeof(vfd->name), "CAL output %u", ctx->index);
+	vfd->release = video_device_release_empty;
+	vfd->ioctl_ops = cal_mc_api ? &cal_ioctl_mc_ops : &cal_ioctl_video_ops;
 	vfd->lock = &ctx->mutex;
 	video_set_drvdata(vfd, ctx);
 
@@ -738,15 +928,19 @@ int cal_ctx_v4l2_init(struct cal_ctx *ctx)
 	if (ret < 0)
 		return ret;
 
-	/* Initialize the control handler. */
-	ret = v4l2_ctrl_handler_init(hdl, 11);
-	if (ret < 0) {
-		ctx_err(ctx, "Failed to init ctrl handler\n");
-		goto error;
+	if (!cal_mc_api) {
+		/* Initialize the control handler. */
+		struct v4l2_ctrl_handler *hdl = &ctx->ctrl_handler;
+
+		ret = v4l2_ctrl_handler_init(hdl, 11);
+		if (ret < 0) {
+			ctx_err(ctx, "Failed to init ctrl handler\n");
+			goto error;
+		}
+
+		vfd->ctrl_handler = hdl;
 	}
 
-	vfd->ctrl_handler = hdl;
-
 	return 0;
 
 error:
@@ -756,6 +950,8 @@ int cal_ctx_v4l2_init(struct cal_ctx *ctx)
 
 void cal_ctx_v4l2_cleanup(struct cal_ctx *ctx)
 {
-	v4l2_ctrl_handler_free(&ctx->ctrl_handler);
+	if (!cal_mc_api)
+		v4l2_ctrl_handler_free(&ctx->ctrl_handler);
+
 	media_entity_cleanup(&ctx->vdev.entity);
 }
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
index 293cbac905b3..2ce2b6404c92 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -43,6 +43,10 @@ unsigned int cal_debug;
 module_param_named(debug, cal_debug, uint, 0644);
 MODULE_PARM_DESC(debug, "activates debug info");
 
+bool cal_mc_api;
+module_param_named(mc_api, cal_mc_api, bool, 0444);
+MODULE_PARM_DESC(mc_api, "activates the MC API");
+
 /* ------------------------------------------------------------------
  *	Format Handling
  * ------------------------------------------------------------------
@@ -660,13 +664,17 @@ static int cal_async_notifier_complete(struct v4l2_async_notifier *notifier)
 {
 	struct cal_dev *cal = container_of(notifier, struct cal_dev, notifier);
 	unsigned int i;
+	int ret = 0;
 
 	for (i = 0; i < ARRAY_SIZE(cal->ctx); ++i) {
 		if (cal->ctx[i])
 			cal_ctx_v4l2_register(cal->ctx[i]);
 	}
 
-	return 0;
+	if (cal_mc_api)
+		ret = v4l2_device_register_subdev_nodes(&cal->v4l2_dev);
+
+	return ret;
 }
 
 static const struct v4l2_async_notifier_operations cal_async_notifier_ops = {
diff --git a/drivers/media/platform/ti-vpe/cal.h b/drivers/media/platform/ti-vpe/cal.h
index 2d935691bf75..f5609216b7c6 100644
--- a/drivers/media/platform/ti-vpe/cal.h
+++ b/drivers/media/platform/ti-vpe/cal.h
@@ -160,6 +160,7 @@ struct cal_camerarx {
 	struct device_node	*sensor_ep_node;
 	struct device_node	*sensor_node;
 	struct v4l2_subdev	*sensor;
+	struct media_pipeline	pipe;
 
 	struct v4l2_subdev	subdev;
 	struct media_pad	pads[2];
@@ -224,6 +225,7 @@ struct cal_ctx {
 
 extern unsigned int cal_debug;
 extern int cal_video_nr;
+extern bool cal_mc_api;
 
 #define cal_dbg(level, cal, fmt, arg...)				\
 	do {								\
-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2020-07-06 18:39 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 18:35 [PATCH v2 000/108] media: ti-vpe: cal: Add media controller support Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 001/108] media: ti-vpe: cal: Sort headers alphabetically Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 002/108] media: ti-vpe: cal: Avoid function forward declaration Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 003/108] media: ti-vpe: cal: Decouple CSI2 port and CPORT Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 004/108] media: ti-vpe: cal: Index CSI-2 port starting at 0 Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 005/108] media: ti-vpe: cal: Index IRQ registersstarting " Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 006/108] media: ti-vpe: cal: Merge all status variables in IRQ handler Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 007/108] media: ti-vpe: cal: Inline CAL_VERSION macro in its only user Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 008/108] media: ti-vpe: cal: Turn reg_(read|write)_field() into inline functions Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 009/108] media: ti-vpe: cal: Make cal_formats array const Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 010/108] media: ti-vpe: cal: Remove needless variable initialization Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 011/108] media: ti-vpe: cal: Remove needless casts Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 012/108] media: ti-vpe: cal: Turn boolean variable into bool Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 013/108] media: ti-vpe: cal: Make loop indices unsigned where applicable Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 014/108] media: ti-vpe: cal: Embed base_fields array in struct cal_csi2_phy Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 015/108] media: ti-vpe: cal: Don't modify cal_csi2_phy base_fields Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 016/108] media: ti-vpe: cal: Store PHY regmap fields in struct cc_data Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 017/108] media: ti-vpe: cal: Rename cal_csi2_phy base_fields to fields Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 018/108] media: ti-vpe: cal: Make structure fields unsigned where applicable Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 019/108] media: ti-vpe: cal: Constify platform data Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 020/108] media: ti-vpe: cal: Remove static const cal_regmap_config template Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 021/108] media: ti-vpe: cal: Remove unused structure fields Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 022/108] media: ti-vpe: cal: Remove flags field from struct cal_dev Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 023/108] media: ti-vpe: cal: Move function to avoid forward declaration Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 024/108] media: ti-vpe: cal: Rename cc_data to cal_camerarx Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 025/108] media: ti-vpe: cal: Rename cal_csi2_phy to cal_camerarx_data Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 026/108] media: ti-vpe: cal: Name all cal_dev pointers consistently Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 027/108] media: ti-vpe: cal: Name all cal_camerarx " Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 028/108] media: ti-vpe: cal: Remove internal phy structure from cal_camerarx Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 029/108] media: ti-vpe: cal: Store instance ID and cal pointer in cal_camerarx Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 030/108] media: ti-vpe: cal: Use dev_* print macros Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 031/108] media: ti-vpe: cal: Add print macros for the cal_camerarx instances Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 032/108] media: ti-vpe: cal: Store sensor-related data in cal_camerarx Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 033/108] media: ti-vpe: cal: Create consistent naming for CAMERARX functions Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 034/108] media: ti-vpe: cal: Group CAMERARX-related functions together Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 035/108] media: ti-vpe: cal: Inline cal_data_get_num_csi2_phy() in its caller Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 036/108] media: ti-vpe: cal: Create consistent naming for context functions Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 037/108] media: ti-vpe: cal: Reorganize remaining code in sections Laurent Pinchart
2020-07-06 18:35 ` [PATCH v2 038/108] media: ti-vpe: cal: Rename cal_ctx.csi2_port to cal_ctx.index Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 039/108] media: ti-vpe: cal: Use correct device name for bus_info Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 040/108] media: ti-vpe: cal: Get struct device without going through v4l2_device Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 041/108] media: ti-vpe: cal: Use ctx_info() instead of v4l2_info() Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 042/108] media: ti-vpe: cal: Use a loop to create CAMERARX and context instances Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 043/108] media: ti-vpe: cal: Drop struct cal_dev v4l2_dev field Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 044/108] media: ti-vpe: cal: Split CAMERARX syscon regmap retrieval to a function Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 045/108] media: ti-vpe: cal: Use syscon_regmap_lookup_by_phandle_args() Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 046/108] media: ti-vpe: cal: Inline cal_get_camerarx_regmap() in caller Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 047/108] media: ti-vpe: cal: Add comments to cal_probe() to delimitate sections Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 048/108] media: ti-vpe: cal: Rename cal_create_instance() to cal_ctx_create() Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 049/108] media: ti-vpe: cal: Hardcode virtual channel to 0 Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 050/108] media: ti-vpe: cal: Use of_graph_get_endpoint_by_regs() to parse OF Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 051/108] media: ti-vpe: cal: Fix usage of v4l2_fwnode_endpoint_parse() Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 052/108] media: ti-vpe: cal: Decouple control handler from v4l2_device Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 053/108] media: ti-vpe: cal: Move v4l2_device from cal_ctx to cal_dev Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 054/108] media: ti-vpe: cal: Split video device initialization and registration Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 055/108] media: ti-vpe: cal: Add context V4L2 cleanup and unregister functions Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 056/108] media: ti-vpe: cal: Unregister video device before cleanup Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 057/108] media: ti-vpe: cal: Add cal_camerarx_destroy() to cleanup CAMERARX Laurent Pinchart
2020-07-10 11:24   ` Hans Verkuil
2020-07-10 11:51     ` Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 058/108] media: ti-vpe: cal: Move DT parsing to CAMERARX Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 059/108] media: ti-vpe: cal: Use ARRAY_SIZE to replace numerical value Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 060/108] media: ti-vpe: cal: Move all sensor-related init to .bound() notifier Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 061/108] media: ti-vpe: cal: Allow multiple contexts per subdev notifier Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 062/108] media: ti-vpe: cal: Move async notifiers from contexts to cal_dev Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 063/108] media: ti-vpe: cal: Replace context with phy in async notifier entries Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 064/108] media: ti-vpe: cal: Operate on phy instances in cal_quickdump_regs() Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 065/108] media: ti-vpe: cal: Decouple context and phy cleanup at remove time Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 066/108] media: ti-vpe: cal: Move CAL_NUM_CSI2_PORTS from cal_regs.h to cal.c Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 067/108] media: ti-vpe: cal: Remove isvcirqset() and isportirqset() macros Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 068/108] media: ti-vpe: cal: Replace number of ports numerical value by macro Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 069/108] media: ti-vpe: cal: Split media initialization and cleanup to functions Laurent Pinchart
2020-07-10 11:26   ` Hans Verkuil
2020-07-10 11:53     ` Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 070/108] media: ti-vpe: cal: Read hardware revision earlier during probe Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 071/108] media: ti-vpe: cal: Print revision and hwinfo in a more readable format Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 072/108] media: ti-vpe: cal: Store struct device in cal_dev Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 073/108] media: ti-vpe: cal: Register a media device Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 074/108] media: ti-vpe: cal: Init formats in cal_ctx_v4l2_register() Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 075/108] media: ti-vpe: cal: Allocate cal_ctx active_fmt array dynamically Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 076/108] media: ti-vpe: cal: Inline cal_camerarx_max_lanes() in its only caller Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 077/108] media: ti-vpe: cal: Reorder camerarx functions to prepare refactoring Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 078/108] media: ti-vpe: cal: Refactor camerarx start and stop Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 079/108] media: ti-vpe: cal: Don't store external rate in cal_camerarx Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 080/108] media: ti-vpe: cal: Remove unneeded phy->sensor NULL check Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 081/108] media: ti-vpe: cal: Use 'unsigned int' type instead of 'unsigned' Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 082/108] media: ti-vpe: cal: Split video node handling to cal-video.c Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 083/108] media: ti-vpe: cal: Move CAL I/O accessors to cal.h Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 084/108] media: ti-vpe: cal: Split CAMERARX handling to cal-camerarx.c Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 085/108] media: ti-vpe: cal: Create subdev for CAMERARX Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 086/108] media: ti-vpe: cal: Drop cal_ctx m_fmt field Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 087/108] media: ti-vpe: cal: Move format handling to cal.c and expose helpers Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 088/108] media: ti-vpe: cal: Rename MAX_(WIDTH|HEIGHT)_* macros with CAL_ prefix Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 089/108] media: ti-vpe: cal: Replace hardcoded BIT() value with macro Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 090/108] media: ti-vpe: cal: Iterate over correct number of CAMERARX instances Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 091/108] media: ti-vpe: cal: Implement subdev ops for CAMERARX Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 092/108] media: ti-vpe: cal: Use CAMERARX subdev s_stream op in video device code Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 093/108] media: ti-vpe: cal: Don't pass format to cal_ctx_wr_dma_config() Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 094/108] media: ti-vpe: cal: Rename struct cal_fmt to cal_format_info Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 095/108] media: ti-vpe: cal: Refactor interrupt enable/disable Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 096/108] media: ti-vpe: cal: Fold PPI enable in CAMERARX .s_stream() Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 097/108] media: ti-vpe: cal: Stop write DMA without disabling PPI Laurent Pinchart
2020-07-06 18:36 ` [PATCH v2 098/108] media: ti-vpe: cal: Use spin_lock_irq() when starting or stopping stream Laurent Pinchart
2020-07-06 18:37 ` [PATCH v2 099/108] media: ti-vpe: cal: Share buffer release code between start and stop Laurent Pinchart
2020-07-06 18:37 ` [PATCH v2 100/108] media: ti-vpe: cal: Drop V4L2_CAP_READWRITE Laurent Pinchart
2020-07-10 11:29   ` Hans Verkuil
2020-07-06 18:37 ` [PATCH v2 101/108] media: ti-vpe: cal: Drop unneeded check in cal_calc_format_size() Laurent Pinchart
2020-07-06 18:37 ` [PATCH v2 102/108] media: ti-vpe: cal: Remove DMA queue empty check at start streaming time Laurent Pinchart
2020-07-06 18:37 ` [PATCH v2 103/108] media: ti-vpe: cal: Use list_first_entry() Laurent Pinchart
2020-07-06 18:37 ` [PATCH v2 104/108] media: ti-vpe: cal: Group all DMA queue fields in struct cal_dmaqueue Laurent Pinchart
2020-07-06 18:37 ` [PATCH v2 105/108] media: ti-vpe: cal: Set cal_dmaqueue.pending to NULL when no pending buffer Laurent Pinchart
2020-07-06 18:37 ` [PATCH v2 106/108] media: ti-vpe: cal: Store buffer DMA address in dma_addr_t Laurent Pinchart
2020-07-06 18:37 ` [PATCH v2 107/108] media: ti-vpe: cal: Simplify the context API Laurent Pinchart
2020-07-06 18:37 ` Laurent Pinchart [this message]
2020-11-03 11:02   ` [PATCH v2 108/108] media: ti-vpe: cal: Implement media controller centric API Hans Verkuil
2020-12-06 23:24     ` Laurent Pinchart
2020-12-07  9:27       ` Hans Verkuil
2020-12-07 23:55         ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200706183709.12238-109-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=bparrot@ti.com \
    --cc=linux-media@vger.kernel.org \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.