lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230206043308.28365-8-ayaka@soulik.info>
Date:   Mon,  6 Feb 2023 12:33:06 +0800
From:   ayaka <ayaka@...lik.info>
To:     linux-media@...r.kernel.org
Cc:     randy.li@...aptics.com, Brian.Starkey@....com,
        boris.brezillon@...labora.com, frkoenig@...omium.org,
        hans.verkuil@...co.com, hiroh@...omium.org, hverkuil@...all.nl,
        kernel@...labora.com, laurent.pinchart@...asonboard.com,
        linux-kernel@...r.kernel.org, mchehab@...nel.org,
        narmstrong@...libre.com, nicolas@...fresne.ca, sakari.ailus@....fi,
        stanimir.varbanov@...aro.org, tfiga@...omium.org,
        Helen Koike <helen.koike@...labora.com>
Subject: [PATCH v7 7/9] media: vimc: use vb2_ioctls_ext_{d}qbuf hooks

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

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

Signed-off-by: Helen Koike <helen.koike@...labora.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ