linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ayaka <ayaka@soulik.info>
To: linux-media@vger.kernel.org
Cc: randy.li@synaptics.com, Brian.Starkey@arm.com,
	boris.brezillon@collabora.com, frkoenig@chromium.org,
	hans.verkuil@cisco.com, hiroh@chromium.org, hverkuil@xs4all.nl,
	kernel@collabora.com, laurent.pinchart@ideasonboard.com,
	linux-kernel@vger.kernel.org, mchehab@kernel.org,
	narmstrong@baylibre.com, nicolas@ndufresne.ca,
	sakari.ailus@iki.fi, stanimir.varbanov@linaro.org,
	tfiga@chromium.org, Helen Koike <helen.koike@collabora.com>
Subject: [PATCH v7 7/9] media: vimc: use vb2_ioctls_ext_{d}qbuf hooks
Date: Mon,  6 Feb 2023 12:33:06 +0800	[thread overview]
Message-ID: <20230206043308.28365-8-ayaka@soulik.info> (raw)
In-Reply-To: <20230206043308.28365-1-ayaka@soulik.info>

From: Helen Koike <helen.koike@collabora.com>

Add vb2 ext hooks and call vb2_set_pixelformat().
This allows more flexibility with buffer handling.

Signed-off-by: Helen Koike <helen.koike@collabora.com>

---
Changes in v7:
- Refresh and rebase

Changes in v6:
- New patch to exemplify how drivers would easily support features from Ext Buf
---
 drivers/media/test-drivers/vimc/vimc-capture.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/test-drivers/vimc/vimc-capture.c b/drivers/media/test-drivers/vimc/vimc-capture.c
index aa944270e716..246d90d1f5ae 100644
--- a/drivers/media/test-drivers/vimc/vimc-capture.c
+++ b/drivers/media/test-drivers/vimc/vimc-capture.c
@@ -218,6 +218,8 @@ static const struct v4l2_ioctl_ops vimc_capture_ioctl_ops = {
 	.vidioc_querybuf = vb2_ioctl_querybuf,
 	.vidioc_qbuf = vb2_ioctl_qbuf,
 	.vidioc_dqbuf = vb2_ioctl_dqbuf,
+	.vidioc_ext_qbuf = vb2_ioctl_ext_qbuf,
+	.vidioc_ext_dqbuf = vb2_ioctl_ext_dqbuf,
 	.vidioc_expbuf = vb2_ioctl_expbuf,
 	.vidioc_streamon = vb2_ioctl_streamon,
 	.vidioc_streamoff = vb2_ioctl_streamoff,
@@ -389,6 +391,8 @@ static void *vimc_capture_process_frame(struct vimc_ent_device *ved,
 	/* Set it as ready */
 	vb2_set_plane_payload(&vimc_buf->vb2.vb2_buf, 0,
 			      vcapture->format.sizeimage);
+	vb2_set_pixelformat(&vimc_buf->vb2.vb2_buf,
+			    vcapture->format.pixelformat);
 	vb2_buffer_done(&vimc_buf->vb2.vb2_buf, VB2_BUF_STATE_DONE);
 	return NULL;
 }
-- 
2.17.1


  parent reply	other threads:[~2023-02-06  4:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06  4:32 [RFC PATCH v7 0/9] media: v4l2: Add extended fmt and buffer ayaka
2023-02-06  4:33 ` [PATCH v7 1/9] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more) ayaka
     [not found]   ` <1e3a583f-f9ef-d2d3-6571-ac3b79d800ce@synaptics.com>
2023-06-28 16:27     ` Nicolas Dufresne
2023-06-29  3:43       ` Hsia-Jun Li
2023-07-13 10:26   ` Tomasz Figa
2023-07-21  6:03     ` Hsia-Jun Li
2023-02-06  4:33 ` [PATCH v7 2/9] media: vivid: Convert to v4l2_ext_pix_format ayaka
2023-07-13 10:39   ` Tomasz Figa
2023-07-17 16:00     ` Randy Li
2023-07-20 20:09       ` Nicolas Dufresne
2023-07-28  7:22         ` Tomasz Figa
2023-07-28 18:40           ` Randy Li
2023-08-04 20:19           ` Nicolas Dufresne
2023-07-28  7:18       ` Tomasz Figa
2023-02-06  4:33 ` [PATCH v7 3/9] media: v4l2: Add extended buffer (de)queue operations for video types ayaka
2023-02-06  4:33 ` [PATCH v7 4/9] media: videobuf2-v4l2: reorganize flags handling ayaka
2023-02-06  4:33 ` [PATCH v7 5/9] media: videobuf2: Expose helpers for Ext qbuf/dqbuf ayaka
2023-02-06  4:33 ` [PATCH v7 6/9] media: vivid: use vb2_ioctls_ext_{d}qbuf hooks ayaka
2023-02-06  4:33 ` ayaka [this message]
2023-02-06  4:33 ` [PATCH v7 8/9] media: mediabus: Add helpers to convert a ext_pix format to/from a mbus_fmt ayaka
2023-02-06  4:33 ` [PATCH v7 9/9] media: vimc: Convert to v4l2_ext_pix_format ayaka

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=20230206043308.28365-8-ayaka@soulik.info \
    --to=ayaka@soulik.info \
    --cc=Brian.Starkey@arm.com \
    --cc=boris.brezillon@collabora.com \
    --cc=frkoenig@chromium.org \
    --cc=hans.verkuil@cisco.com \
    --cc=helen.koike@collabora.com \
    --cc=hiroh@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=nicolas@ndufresne.ca \
    --cc=randy.li@synaptics.com \
    --cc=sakari.ailus@iki.fi \
    --cc=stanimir.varbanov@linaro.org \
    --cc=tfiga@chromium.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).