From patchwork Mon Oct 14 15:06:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835183 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05A983A1B6 for ; Mon, 14 Oct 2024 15:07:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918437; cv=none; b=E0wymqwFrUAzdhuJx0jvHdKzvmKDB9bsvghiQg2d+jV1dM+oieP2sNhZXzz1wKCBi9nIQhCnCBg4fLfVwcTK4zXrZn90gmSCFN7wg/0JrumZ6+/9Vo/f17yPfxwHMzw0RtVENpFf5lU5sIERyEogaPjs437BoMFs8GmJmUNJnF8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918437; c=relaxed/simple; bh=vC8JWUB+3F49BudkbmUNr+1BbGlkTjbaRH3/yy0o2bE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dpGZa2WVltVX9VLlkF0RwaEr8iQ44DtLRFMiIeS7DWRSmrJdt8rE8mAA9KkzZtCeTPCdPXDZeonMjezjxeDaNvRmV3ak9mMR11gzh8FPycyxsPC/+Jdn7Uj5HljEY1UaVWOz7LGVFuCKJeEkSi29QdHxSY2YJgNp1UUy6BZCya0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91531C4CED3; Mon, 14 Oct 2024 15:06:59 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:28 +0200 Subject: [PATCH 01/10] media: videobuf2-core: update vb2_thread if wait_finish/prepare are NULL Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-1-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 For read/write support the vb2_thread is used. This will queue and dequeue buffers automatically to provide the read() or write() feature. It calls wait_finish/prepare around vb2_core_dqbuf() and vb2_core_qbuf(), but that assumes all drivers have these ops set. But that will change due to commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL"). So instead check if the callback is available, and if not, use q->lock, just as __vb2_wait_for_done_vb() does. It was also used around vb2_core_qbuf(), but VIDIOC_QBUF doesn't need this since it doesn't do a blocking wait, so just drop the wait_finish/prepare callbacks around vb2_core_qbuf(). Signed-off-by: Hans Verkuil Reviewed-by: Mauro Carvalho Chehab --- drivers/media/common/videobuf2/videobuf2-core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index d064e0664851b26b2da71e0a374c49a2d2c5e217..e9c1d9e3222323be50b3039eb463384a3d558239 100644 --- a/drivers/media/common/videobuf2/videobuf2-core.c +++ b/drivers/media/common/videobuf2/videobuf2-core.c @@ -3218,10 +3218,16 @@ static int vb2_thread(void *data) continue; prequeue--; } else { - call_void_qop(q, wait_finish, q); + if (q->ops->wait_finish) + call_void_qop(q, wait_finish, q); + else if (q->lock) + mutex_lock(q->lock); if (!threadio->stop) ret = vb2_core_dqbuf(q, &index, NULL, 0); - call_void_qop(q, wait_prepare, q); + if (q->ops->wait_prepare) + call_void_qop(q, wait_prepare, q); + else if (q->lock) + mutex_unlock(q->lock); dprintk(q, 5, "file io: vb2_dqbuf result: %d\n", ret); if (!ret) vb = vb2_get_buffer(q, index); @@ -3233,12 +3239,10 @@ static int vb2_thread(void *data) if (vb->state != VB2_BUF_STATE_ERROR) if (threadio->fnc(vb, threadio->priv)) break; - call_void_qop(q, wait_finish, q); if (copy_timestamp) vb->timestamp = ktime_get_ns(); if (!threadio->stop) ret = vb2_core_qbuf(q, vb, NULL, NULL); - call_void_qop(q, wait_prepare, q); if (ret || threadio->stop) break; } From patchwork Mon Oct 14 15:06:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835184 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 954F91BDC3 for ; Mon, 14 Oct 2024 15:07:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918454; cv=none; b=ovUd+hzDzY/SZWoaumHoRy4hQXdfHyUyAJfWIBdZm0v0eascpM5hIuJQufZ6y6RdTrazGj0yRohPGVwkA2ssAmo79QdoomxoGTm8y5z8IoU9iWd3ls2htvnoydo8leqghm5t+8LjymqG8QWYo7lFQxJE/rzHmdgIYSFkq9++MMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918454; c=relaxed/simple; bh=C7VVp5DYu1O564w3anXHODJMz6LlrNNbJ5SAsmxKk0U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=scO2pBwlqzQ1GVFjUwTK76GOY6SE/j8xq/rYbeYgPnoEPdpFGx3GZwTdPjPOv4RZWmdgjiJA2GCcn5tO9N3WQbRxqx/Pm6/xTvDvCTpSxDQhKVnEHe5iVBLwy5PSjX8irvBEf7SSp5aV702FfvLnh6WxTSN6bSmsT53wtfkyNDY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 332CBC4CEC3; Mon, 14 Oct 2024 15:07:17 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:29 +0200 Subject: [PATCH 02/10] media: test-drivers: drop vb2_ops_wait_prepare/finish Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-2-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Since the vb2_ops_wait_prepare/finish callbacks already rely on that field, we can safely drop these callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Signed-off-by: Hans Verkuil Reviewed-by: Shuah Khan --- drivers/media/test-drivers/vicodec/vicodec-core.c | 2 -- drivers/media/test-drivers/vim2m.c | 2 -- drivers/media/test-drivers/vimc/vimc-capture.c | 6 ------ drivers/media/test-drivers/visl/visl-video.c | 2 -- drivers/media/test-drivers/vivid/vivid-meta-cap.c | 2 -- drivers/media/test-drivers/vivid/vivid-meta-out.c | 2 -- drivers/media/test-drivers/vivid/vivid-sdr-cap.c | 2 -- drivers/media/test-drivers/vivid/vivid-touch-cap.c | 2 -- drivers/media/test-drivers/vivid/vivid-vbi-cap.c | 2 -- drivers/media/test-drivers/vivid/vivid-vbi-out.c | 2 -- drivers/media/test-drivers/vivid/vivid-vid-cap.c | 2 -- drivers/media/test-drivers/vivid/vivid-vid-out.c | 2 -- 12 files changed, 28 deletions(-) diff --git a/drivers/media/test-drivers/vicodec/vicodec-core.c b/drivers/media/test-drivers/vicodec/vicodec-core.c index 1e6e3b7140a9403f3e3de1f67bd210998fac5236..00c84a06f343cf361dd453a4780827defb17f4a9 100644 --- a/drivers/media/test-drivers/vicodec/vicodec-core.c +++ b/drivers/media/test-drivers/vicodec/vicodec-core.c @@ -1688,8 +1688,6 @@ static const struct vb2_ops vicodec_qops = { .buf_request_complete = vicodec_buf_request_complete, .start_streaming = vicodec_start_streaming, .stop_streaming = vicodec_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/test-drivers/vim2m.c b/drivers/media/test-drivers/vim2m.c index d4e27279dd0c94b2be152f5ca4902dcc013faeac..6c24dcf27eb078ae2e121b81bc32ef46b34fb415 100644 --- a/drivers/media/test-drivers/vim2m.c +++ b/drivers/media/test-drivers/vim2m.c @@ -1100,8 +1100,6 @@ static const struct vb2_ops vim2m_qops = { .buf_queue = vim2m_buf_queue, .start_streaming = vim2m_start_streaming, .stop_streaming = vim2m_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_request_complete = vim2m_buf_request_complete, }; diff --git a/drivers/media/test-drivers/vimc/vimc-capture.c b/drivers/media/test-drivers/vimc/vimc-capture.c index 89506ae009016779807768159e78711dc53fd721..10df039278e701ca4fa36774a8bc4d09893ac80d 100644 --- a/drivers/media/test-drivers/vimc/vimc-capture.c +++ b/drivers/media/test-drivers/vimc/vimc-capture.c @@ -326,12 +326,6 @@ static const struct vb2_ops vimc_capture_qops = { .buf_queue = vimc_capture_buf_queue, .queue_setup = vimc_capture_queue_setup, .buf_prepare = vimc_capture_buffer_prepare, - /* - * Since q->lock is set we can use the standard - * vb2_ops_wait_prepare/finish helper functions. - */ - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static const struct media_entity_operations vimc_capture_mops = { diff --git a/drivers/media/test-drivers/visl/visl-video.c b/drivers/media/test-drivers/visl/visl-video.c index 677a8564de03c5db5999c2e71dd4d847ce0c0631..8be505d8908c98bb50118dfa2f491d5ac68772ec 100644 --- a/drivers/media/test-drivers/visl/visl-video.c +++ b/drivers/media/test-drivers/visl/visl-video.c @@ -732,8 +732,6 @@ static const struct vb2_ops visl_qops = { .buf_queue = visl_buf_queue, .start_streaming = visl_start_streaming, .stop_streaming = visl_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_request_complete = visl_buf_request_complete, }; diff --git a/drivers/media/test-drivers/vivid/vivid-meta-cap.c b/drivers/media/test-drivers/vivid/vivid-meta-cap.c index 0a718d037e5944439f3c882d8a2661ec500318d7..c7aaecc0b5a24726639a253accfc50383a84e846 100644 --- a/drivers/media/test-drivers/vivid/vivid-meta-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-meta-cap.c @@ -122,8 +122,6 @@ const struct vb2_ops vivid_meta_cap_qops = { .start_streaming = meta_cap_start_streaming, .stop_streaming = meta_cap_stop_streaming, .buf_request_complete = meta_cap_buf_request_complete, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; int vidioc_enum_fmt_meta_cap(struct file *file, void *priv, diff --git a/drivers/media/test-drivers/vivid/vivid-meta-out.c b/drivers/media/test-drivers/vivid/vivid-meta-out.c index 82ab3b26914e6d47533dc9b109383e95d3ccdd04..55e5e5dec2f2ab1bdc01a2d1d479a6f1eb758299 100644 --- a/drivers/media/test-drivers/vivid/vivid-meta-out.c +++ b/drivers/media/test-drivers/vivid/vivid-meta-out.c @@ -122,8 +122,6 @@ const struct vb2_ops vivid_meta_out_qops = { .start_streaming = meta_out_start_streaming, .stop_streaming = meta_out_stop_streaming, .buf_request_complete = meta_out_buf_request_complete, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; int vidioc_enum_fmt_meta_out(struct file *file, void *priv, diff --git a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c index 38cda33dffb2aba68b2ce1187448a291d57a64ee..74a91d28c8be936b2c4cb0cc297625d91d7a27a7 100644 --- a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c @@ -337,8 +337,6 @@ const struct vb2_ops vivid_sdr_cap_qops = { .start_streaming = sdr_cap_start_streaming, .stop_streaming = sdr_cap_stop_streaming, .buf_request_complete = sdr_cap_buf_request_complete, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; int vivid_sdr_enum_freq_bands(struct file *file, void *fh, diff --git a/drivers/media/test-drivers/vivid/vivid-touch-cap.c b/drivers/media/test-drivers/vivid/vivid-touch-cap.c index 3600b084bca53eb22a10a7d17152c5d0c39705c5..36a781fa17bc3daaf1d949a7f1c94ebb9aecb7c0 100644 --- a/drivers/media/test-drivers/vivid/vivid-touch-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-touch-cap.c @@ -110,8 +110,6 @@ const struct vb2_ops vivid_touch_cap_qops = { .start_streaming = touch_cap_start_streaming, .stop_streaming = touch_cap_stop_streaming, .buf_request_complete = touch_cap_buf_request_complete, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; int vivid_enum_fmt_tch(struct file *file, void *priv, struct v4l2_fmtdesc *f) diff --git a/drivers/media/test-drivers/vivid/vivid-vbi-cap.c b/drivers/media/test-drivers/vivid/vivid-vbi-cap.c index 99138f63585c7146cb3289c4e9ac8180ed66966d..a09f62c66c33d143d56c58fa90fc25e687118662 100644 --- a/drivers/media/test-drivers/vivid/vivid-vbi-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-vbi-cap.c @@ -230,8 +230,6 @@ const struct vb2_ops vivid_vbi_cap_qops = { .start_streaming = vbi_cap_start_streaming, .stop_streaming = vbi_cap_stop_streaming, .buf_request_complete = vbi_cap_buf_request_complete, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; int vidioc_g_fmt_vbi_cap(struct file *file, void *priv, diff --git a/drivers/media/test-drivers/vivid/vivid-vbi-out.c b/drivers/media/test-drivers/vivid/vivid-vbi-out.c index 871a56d934254a198648835c38a65a33d3c8c85d..b7a09d2f394e43e4e78256d4a34d1db9898acea7 100644 --- a/drivers/media/test-drivers/vivid/vivid-vbi-out.c +++ b/drivers/media/test-drivers/vivid/vivid-vbi-out.c @@ -128,8 +128,6 @@ const struct vb2_ops vivid_vbi_out_qops = { .start_streaming = vbi_out_start_streaming, .stop_streaming = vbi_out_stop_streaming, .buf_request_complete = vbi_out_buf_request_complete, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; int vidioc_g_fmt_vbi_out(struct file *file, void *priv, diff --git a/drivers/media/test-drivers/vivid/vivid-vid-cap.c b/drivers/media/test-drivers/vivid/vivid-vid-cap.c index 69620e0a35a02fb210529a1d652abf915b4445af..e74d73d370e0a8f092401e280de4a55135ae10df 100644 --- a/drivers/media/test-drivers/vivid/vivid-vid-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-vid-cap.c @@ -257,8 +257,6 @@ const struct vb2_ops vivid_vid_cap_qops = { .start_streaming = vid_cap_start_streaming, .stop_streaming = vid_cap_stop_streaming, .buf_request_complete = vid_cap_buf_request_complete, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* diff --git a/drivers/media/test-drivers/vivid/vivid-vid-out.c b/drivers/media/test-drivers/vivid/vivid-vid-out.c index 60327f3612af40f7ebd6dedf8e23a113d8d6ac43..5ec84db934d6b0fd9f659298f80cd59a25983a2c 100644 --- a/drivers/media/test-drivers/vivid/vivid-vid-out.c +++ b/drivers/media/test-drivers/vivid/vivid-vid-out.c @@ -201,8 +201,6 @@ const struct vb2_ops vivid_vid_out_qops = { .start_streaming = vid_out_start_streaming, .stop_streaming = vid_out_stop_streaming, .buf_request_complete = vid_out_buf_request_complete, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* From patchwork Mon Oct 14 15:06:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835185 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2655249659 for ; Mon, 14 Oct 2024 15:07:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918472; cv=none; b=ALYQxr4RSZu3Jw7pgiyrySL1yzI54w4lMxUAFSkh8x8cTu+uYvsKeinZjpXewcg9arDZGDujN3CRambS7OdEJxZm0Cm6pkjq8m7HtZ04ZXnsCSo5/8i49juC/mCmcIwg7k0HIyBsEuj1Kmr4Et4UP6aLtOHTpaohXeYWpKCFVa8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918472; c=relaxed/simple; bh=AaNhr1MYchMG1KocrUsuE6X7Qr86Usot8pXAs+mSYSI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pBRJ54yh30DhVjTKomFIUogM4oq1PLOrpMtxSo/Eji7k/aiIuVEjaxhlMiVbg6bQyTxxNVAJATcAdW1H+vBUgCSGPBtQ0tzEfT2nNrtEPkIh2BP2/c2QOWItdDsiZKCzXokU7ZZysur4r7n/6fNuMyY9R9XN7g+2U1v9b03+CzI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6853C4CED0; Mon, 14 Oct 2024 15:07:34 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:30 +0200 Subject: [PATCH 03/10] media: pci: drop vb2_ops_wait_prepare/finish Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-3-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Since the vb2_ops_wait_prepare/finish callbacks already rely on that field, we can safely drop these callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- drivers/media/pci/bt8xx/bttv-driver.c | 2 -- drivers/media/pci/bt8xx/bttv-vbi.c | 2 -- drivers/media/pci/cobalt/cobalt-v4l2.c | 2 -- drivers/media/pci/cx18/cx18-streams.c | 2 -- drivers/media/pci/cx23885/cx23885-417.c | 2 -- drivers/media/pci/cx23885/cx23885-dvb.c | 2 -- drivers/media/pci/cx23885/cx23885-vbi.c | 2 -- drivers/media/pci/cx23885/cx23885-video.c | 2 -- drivers/media/pci/cx25821/cx25821-video.c | 2 -- drivers/media/pci/cx88/cx88-blackbird.c | 2 -- drivers/media/pci/cx88/cx88-dvb.c | 2 -- drivers/media/pci/cx88/cx88-vbi.c | 2 -- drivers/media/pci/cx88/cx88-video.c | 2 -- drivers/media/pci/dt3155/dt3155.c | 2 -- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 -- drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 2 -- drivers/media/pci/mgb4/mgb4_vin.c | 2 -- drivers/media/pci/mgb4/mgb4_vout.c | 2 -- drivers/media/pci/saa7134/saa7134-empress.c | 2 -- drivers/media/pci/saa7134/saa7134-ts.c | 2 -- drivers/media/pci/saa7134/saa7134-vbi.c | 2 -- drivers/media/pci/saa7134/saa7134-video.c | 2 -- drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 2 -- drivers/media/pci/solo6x10/solo6x10-v4l2.c | 2 -- drivers/media/pci/sta2x11/sta2x11_vip.c | 2 -- drivers/media/pci/tw5864/tw5864-video.c | 2 -- drivers/media/pci/tw68/tw68-video.c | 2 -- drivers/media/pci/tw686x/tw686x-video.c | 2 -- drivers/media/pci/zoran/zoran_driver.c | 2 -- 29 files changed, 58 deletions(-) diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 511f013cc33873ecc0a5ee4adfa4eb0727f38022..2782832f5eb8f272cf9acf29d7b4c31620c99227 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c @@ -1584,8 +1584,6 @@ static const struct vb2_ops bttv_video_qops = { .buf_cleanup = buf_cleanup, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static void radio_enable(struct bttv *btv) diff --git a/drivers/media/pci/bt8xx/bttv-vbi.c b/drivers/media/pci/bt8xx/bttv-vbi.c index e489a3acb4b98afa17036c3a85514c40031f40e5..a71440611e46eccfc442a7f9100f803d9d875201 100644 --- a/drivers/media/pci/bt8xx/bttv-vbi.c +++ b/drivers/media/pci/bt8xx/bttv-vbi.c @@ -170,8 +170,6 @@ const struct vb2_ops bttv_vbi_qops = { .buf_cleanup = buf_cleanup_vbi, .start_streaming = start_streaming_vbi, .stop_streaming = stop_streaming_vbi, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* ----------------------------------------------------------------------- */ diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c index d4d7b264c965a3a6a7c76e23567b0c18deb742d3..ae82427e3479bb316dc310bb11837aad05ffaf9c 100644 --- a/drivers/media/pci/cobalt/cobalt-v4l2.c +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c @@ -424,8 +424,6 @@ static const struct vb2_ops cobalt_qops = { .buf_queue = cobalt_buf_queue, .start_streaming = cobalt_start_streaming, .stop_streaming = cobalt_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* V4L2 ioctls */ diff --git a/drivers/media/pci/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c index acc6418db4254ab00eb1b70ebdce30799e85e503..42d6f7b90ede3045b9c5612a35ce8dbee2551282 100644 --- a/drivers/media/pci/cx18/cx18-streams.c +++ b/drivers/media/pci/cx18/cx18-streams.c @@ -229,8 +229,6 @@ static const struct vb2_ops cx18_vb2_qops = { .buf_prepare = cx18_buf_prepare, .start_streaming = cx18_start_streaming, .stop_streaming = cx18_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int cx18_stream_init(struct cx18 *cx, int type) diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c index fdb96f80c03649f9ce1f5acac8f4b9b3e54b9df1..219937a153b3aed206091579fffbd07840ca0c3a 100644 --- a/drivers/media/pci/cx23885/cx23885-417.c +++ b/drivers/media/pci/cx23885/cx23885-417.c @@ -1210,8 +1210,6 @@ static const struct vb2_ops cx23885_qops = { .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = cx23885_start_streaming, .stop_streaming = cx23885_stop_streaming, }; diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c index 3d01cdc4c7f3d7d379a63d9fde4d2ded73d41972..05a7859cbe5795bdb7d54510fe617f48ab486986 100644 --- a/drivers/media/pci/cx23885/cx23885-dvb.c +++ b/drivers/media/pci/cx23885/cx23885-dvb.c @@ -170,8 +170,6 @@ static const struct vb2_ops dvb_qops = { .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = cx23885_start_streaming, .stop_streaming = cx23885_stop_streaming, }; diff --git a/drivers/media/pci/cx23885/cx23885-vbi.c b/drivers/media/pci/cx23885/cx23885-vbi.c index 4bdd2bea3713e1dc0fd630dedf345d87c9a8632f..40817cc52fc1ee256be86319638d0d26116e51c0 100644 --- a/drivers/media/pci/cx23885/cx23885-vbi.c +++ b/drivers/media/pci/cx23885/cx23885-vbi.c @@ -249,8 +249,6 @@ const struct vb2_ops cx23885_vbi_qops = { .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = cx23885_start_streaming, .stop_streaming = cx23885_stop_streaming, }; diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 7d4a409c433e2a8c909323542e6f917bd27cfb64..35d58328db563992fa1332e3e96427749eaf7ed8 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -519,8 +519,6 @@ static const struct vb2_ops cx23885_video_qops = { .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = cx23885_start_streaming, .stop_streaming = cx23885_stop_streaming, }; diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c index 0bee4b728a6014817d74fe243dbf9ef3c2da1524..84aa1209e7171ecc541a764fea064e031ce2bb6e 100644 --- a/drivers/media/pci/cx25821/cx25821-video.c +++ b/drivers/media/pci/cx25821/cx25821-video.c @@ -295,8 +295,6 @@ static const struct vb2_ops cx25821_video_qops = { .buf_prepare = cx25821_buffer_prepare, .buf_finish = cx25821_buffer_finish, .buf_queue = cx25821_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = cx25821_start_streaming, .stop_streaming = cx25821_stop_streaming, }; diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index d55df8fdb3b604400495021033b3e57406f982e1..13b8cc46835b2cb5a84405cdb7fa21d35675f552 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c @@ -781,8 +781,6 @@ static const struct vb2_ops blackbird_qops = { .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = start_streaming, .stop_streaming = stop_streaming, }; diff --git a/drivers/media/pci/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c index b33b3a5e32ec6479d96af4558d200be6122572f9..c9cfceed2f1b42fc5a9c2c97900b7e1d638226c8 100644 --- a/drivers/media/pci/cx88/cx88-dvb.c +++ b/drivers/media/pci/cx88/cx88-dvb.c @@ -152,8 +152,6 @@ static const struct vb2_ops dvb_qops = { .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = start_streaming, .stop_streaming = stop_streaming, }; diff --git a/drivers/media/pci/cx88/cx88-vbi.c b/drivers/media/pci/cx88/cx88-vbi.c index 469aeaa725ad9259122f407edf71006f5e324b4d..e3e379e6f6207b6ebf08327263d7087f5122d236 100644 --- a/drivers/media/pci/cx88/cx88-vbi.c +++ b/drivers/media/pci/cx88/cx88-vbi.c @@ -228,8 +228,6 @@ const struct vb2_ops cx8800_vbi_qops = { .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = start_streaming, .stop_streaming = stop_streaming, }; diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index cefb6b25e92172b188b9f4f699492eaa31cf2b0b..0c87327689d3f669241bfc11ca07f7210f603a36 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c @@ -562,8 +562,6 @@ static const struct vb2_ops cx8800_video_qops = { .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = start_streaming, .stop_streaming = stop_streaming, }; diff --git a/drivers/media/pci/dt3155/dt3155.c b/drivers/media/pci/dt3155/dt3155.c index dff853e73fdc8ef66f18cd7f27e017346850c6d8..7bddcbba4cf1ba2998afbfe1e961ad89a303f1c2 100644 --- a/drivers/media/pci/dt3155/dt3155.c +++ b/drivers/media/pci/dt3155/dt3155.c @@ -222,8 +222,6 @@ static void dt3155_buf_queue(struct vb2_buffer *vb) static const struct vb2_ops q_ops = { .queue_setup = dt3155_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_prepare = dt3155_buf_prepare, .start_streaming = dt3155_start_streaming, .stop_streaming = dt3155_stop_streaming, diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c index 81ec8630453b7a1240528f1d36182d0928aded09..4e98f432ed557393c83dbbe404b6d5e6d87fd106 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c @@ -1045,8 +1045,6 @@ static const struct vb2_ops cio2_vb2_ops = { .queue_setup = cio2_vb2_queue_setup, .start_streaming = cio2_vb2_start_streaming, .stop_streaming = cio2_vb2_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /**************** V4L2 interface ****************/ diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c index 03dbb0e0ea7957970667cef31f668a807b30455a..4e15dd75cf865559893eea55360e8224f78fbc7c 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c @@ -767,8 +767,6 @@ void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, static const struct vb2_ops ipu6_isys_queue_ops = { .queue_setup = queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_prepare = ipu6_isys_buf_prepare, .start_streaming = start_streaming, .stop_streaming = stop_streaming, diff --git a/drivers/media/pci/mgb4/mgb4_vin.c b/drivers/media/pci/mgb4/mgb4_vin.c index 185fb28226b60c3253f64d78e945172c6321ac33..e34d02d1e943db98578765562e99d79776fe52a0 100644 --- a/drivers/media/pci/mgb4/mgb4_vin.c +++ b/drivers/media/pci/mgb4/mgb4_vin.c @@ -304,8 +304,6 @@ static const struct vb2_ops queue_ops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish }; static int fh_open(struct file *file) diff --git a/drivers/media/pci/mgb4/mgb4_vout.c b/drivers/media/pci/mgb4/mgb4_vout.c index 133110aac68808fa956ae7da8cb2e6bd27cf7447..6b2791e29de15e5124c5a05ed5bf1a9e2668f6d5 100644 --- a/drivers/media/pci/mgb4/mgb4_vout.c +++ b/drivers/media/pci/mgb4/mgb4_vout.c @@ -230,8 +230,6 @@ static const struct vb2_ops queue_ops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish }; static int vidioc_querycap(struct file *file, void *priv, diff --git a/drivers/media/pci/saa7134/saa7134-empress.c b/drivers/media/pci/saa7134/saa7134-empress.c index bbf480ab31ca7728934821faf33b734d894b9a8c..8c4f70e4177d1836ad685be851df63b234674c40 100644 --- a/drivers/media/pci/saa7134/saa7134-empress.c +++ b/drivers/media/pci/saa7134/saa7134-empress.c @@ -78,8 +78,6 @@ static const struct vb2_ops saa7134_empress_qops = { .buf_init = saa7134_ts_buffer_init, .buf_prepare = saa7134_ts_buffer_prepare, .buf_queue = saa7134_vb2_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = start_streaming, .stop_streaming = stop_streaming, }; diff --git a/drivers/media/pci/saa7134/saa7134-ts.c b/drivers/media/pci/saa7134/saa7134-ts.c index 437dbe5e75e2975a370a99f14f9aeb9fb5658b96..ec699ea14799427a8c0d0b6318fa30d94dc061ea 100644 --- a/drivers/media/pci/saa7134/saa7134-ts.c +++ b/drivers/media/pci/saa7134/saa7134-ts.c @@ -166,8 +166,6 @@ struct vb2_ops saa7134_ts_qops = { .buf_init = saa7134_ts_buffer_init, .buf_prepare = saa7134_ts_buffer_prepare, .buf_queue = saa7134_vb2_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = saa7134_ts_stop_streaming, }; EXPORT_SYMBOL_GPL(saa7134_ts_qops); diff --git a/drivers/media/pci/saa7134/saa7134-vbi.c b/drivers/media/pci/saa7134/saa7134-vbi.c index 3e773690468bdb935d0a2ada46ef9a7f9da23e8d..efa6e4fa423aa9cfed5556bb7f19832fa18811e2 100644 --- a/drivers/media/pci/saa7134/saa7134-vbi.c +++ b/drivers/media/pci/saa7134/saa7134-vbi.c @@ -161,8 +161,6 @@ const struct vb2_ops saa7134_vbi_qops = { .buf_init = buffer_init, .buf_prepare = buffer_prepare, .buf_queue = saa7134_vb2_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = saa7134_vb2_start_streaming, .stop_streaming = saa7134_vb2_stop_streaming, }; diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index 56b4481a40e6125fa8534a85e56031186a190e8e..43e7b006eb596740771cf893d8fda39df0e4aff4 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -844,8 +844,6 @@ static const struct vb2_ops vb2_qops = { .buf_init = buffer_init, .buf_prepare = buffer_prepare, .buf_queue = saa7134_vb2_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = saa7134_vb2_start_streaming, .stop_streaming = saa7134_vb2_stop_streaming, }; diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c index 0adf3d80f248ed3511509e5a571f1226cac62866..5ee59b3844cc3dc4ae42c255a0ea3e624c605a1d 100644 --- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c @@ -756,8 +756,6 @@ static const struct vb2_ops solo_enc_video_qops = { .buf_finish = solo_enc_buf_finish, .start_streaming = solo_enc_start_streaming, .stop_streaming = solo_enc_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int solo_enc_querycap(struct file *file, void *priv, diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2.c b/drivers/media/pci/solo6x10/solo6x10-v4l2.c index e18cc41fca83b2b5293dc4d654c96a5ee86a6993..35715b21dbdffc80de68990b88836700816e7cb6 100644 --- a/drivers/media/pci/solo6x10/solo6x10-v4l2.c +++ b/drivers/media/pci/solo6x10/solo6x10-v4l2.c @@ -365,8 +365,6 @@ static const struct vb2_ops solo_video_qops = { .buf_queue = solo_buf_queue, .start_streaming = solo_start_streaming, .stop_streaming = solo_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int solo_querycap(struct file *file, void *priv, diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index 364ce9e5701827de4d7b92cac104fa9d0fcb8869..3049bad20f142dbfdf6bbd47699c50f75cb10f72 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c @@ -372,8 +372,6 @@ static const struct vb2_ops vip_video_qops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; diff --git a/drivers/media/pci/tw5864/tw5864-video.c b/drivers/media/pci/tw5864/tw5864-video.c index 4f35c159efe5a39be8c674a8d21b4e58437849f9..0a08708e52b08283074db66611969312762182a8 100644 --- a/drivers/media/pci/tw5864/tw5864-video.c +++ b/drivers/media/pci/tw5864/tw5864-video.c @@ -471,8 +471,6 @@ static const struct vb2_ops tw5864_video_qops = { .buf_queue = tw5864_buf_queue, .start_streaming = tw5864_start_streaming, .stop_streaming = tw5864_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int tw5864_s_ctrl(struct v4l2_ctrl *ctrl) diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index cdf5d733b863e46186e3a02f9f3e489ba1b62c5f..77773dec48b83ac997fcbbb4dc83e55861a899eb 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -524,8 +524,6 @@ static const struct vb2_ops tw68_video_qops = { .buf_finish = tw68_buf_finish, .start_streaming = tw68_start_streaming, .stop_streaming = tw68_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* ------------------------------------------------------------------ */ diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c index 63be95fce83d132718ed94a20865fc337b701cc7..785dd797d921b515ead7b500edd01a4ac0618e6d 100644 --- a/drivers/media/pci/tw686x/tw686x-video.c +++ b/drivers/media/pci/tw686x/tw686x-video.c @@ -579,8 +579,6 @@ static const struct vb2_ops tw686x_video_qops = { .buf_prepare = tw686x_buf_prepare, .start_streaming = tw686x_start_streaming, .stop_streaming = tw686x_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int tw686x_s_ctrl(struct v4l2_ctrl *ctrl) diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index 5c05e64c71a905a2900b3e7feeea50672394881a..f42f596d3e6295e31e3b33cd83c5f7243911bd30 100644 --- a/drivers/media/pci/zoran/zoran_driver.c +++ b/drivers/media/pci/zoran/zoran_driver.c @@ -950,8 +950,6 @@ static const struct vb2_ops zr_video_qops = { .buf_prepare = zr_vb2_prepare, .start_streaming = zr_vb2_start_streaming, .stop_streaming = zr_vb2_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; int zoran_queue_init(struct zoran *zr, struct vb2_queue *vq, int dir) From patchwork Mon Oct 14 15:06:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835186 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB76A1AB6DC for ; Mon, 14 Oct 2024 15:08:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918489; cv=none; b=kYcFpHDqiIMrafntPysYNZM456kVA4DFDpZfJJJKuvwG+w2Y0o65UBCR7ygTyRVU7FwzRUK6s8YPr5JCxiqRYO/9UBlXMhzQYNvQ4nNy4xI+ZpMwhlNG3XKqiKiwTpYG0nDtMH7MR38m1tYioE97Pkitj/+vNRc3oxDy+vCfduY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918489; c=relaxed/simple; bh=/S0AhbSyTbN9mCpyj1fiokh1Ak8ZFAg62ihmgRE8MwA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WcNemsfqiTa5hinUrl4R8cbgduc2Q1hUeVIl11r0V2WKtOqUH7qtqrAyyXgwHUXUxXb26Tcge/4oWAvpwmLjAVfq8wUe29SWsWsdhJLzzts/u6KbtZ55f9czCezbbAWQPlerP5Bz3HEhH9qCCHkiyY77G7SaOBCr6c+PxThO2EY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67BD9C4CED4; Mon, 14 Oct 2024 15:07:52 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:31 +0200 Subject: [PATCH 04/10] media: usb: drop vb2_ops_wait_prepare/finish Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-4-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Since the vb2_ops_wait_prepare/finish callbacks already rely on that field, we can safely drop these callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Signed-off-by: Hans Verkuil --- drivers/media/usb/airspy/airspy.c | 2 -- drivers/media/usb/au0828/au0828-vbi.c | 2 -- drivers/media/usb/au0828/au0828-video.c | 2 -- drivers/media/usb/cx231xx/cx231xx-417.c | 2 -- drivers/media/usb/cx231xx/cx231xx-vbi.c | 2 -- drivers/media/usb/cx231xx/cx231xx-video.c | 2 -- drivers/media/usb/dvb-usb/cxusb-analog.c | 2 -- drivers/media/usb/em28xx/em28xx-vbi.c | 2 -- drivers/media/usb/em28xx/em28xx-video.c | 2 -- drivers/media/usb/go7007/go7007-v4l2.c | 2 -- drivers/media/usb/gspca/gspca.c | 2 -- drivers/media/usb/hackrf/hackrf.c | 2 -- drivers/media/usb/msi2500/msi2500.c | 2 -- drivers/media/usb/pwc/pwc-if.c | 2 -- drivers/media/usb/s2255/s2255drv.c | 2 -- drivers/media/usb/stk1160/stk1160-v4l.c | 2 -- drivers/media/usb/usbtv/usbtv-video.c | 2 -- drivers/media/usb/uvc/uvc_queue.c | 4 ---- 18 files changed, 38 deletions(-) diff --git a/drivers/media/usb/airspy/airspy.c b/drivers/media/usb/airspy/airspy.c index 3e2a3099a8fe379bb9a92e07cdbc770fa6cb3661..08f0920cf6ca2f2f0fcc8e9a7b1632488d9af5f5 100644 --- a/drivers/media/usb/airspy/airspy.c +++ b/drivers/media/usb/airspy/airspy.c @@ -603,8 +603,6 @@ static const struct vb2_ops airspy_vb2_ops = { .buf_queue = airspy_buf_queue, .start_streaming = airspy_start_streaming, .stop_streaming = airspy_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int airspy_querycap(struct file *file, void *fh, diff --git a/drivers/media/usb/au0828/au0828-vbi.c b/drivers/media/usb/au0828/au0828-vbi.c index b0333637b747d7777ed6f87f7d556e80c6cad377..11203adf47ea04e6fdf2704a11448e0d69e225b2 100644 --- a/drivers/media/usb/au0828/au0828-vbi.c +++ b/drivers/media/usb/au0828/au0828-vbi.c @@ -74,6 +74,4 @@ const struct vb2_ops au0828_vbi_qops = { .prepare_streaming = v4l_vb2q_enable_media_source, .start_streaming = au0828_start_analog_streaming, .stop_streaming = au0828_stop_vbi_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index 2ec49ea479d56ec986b52fa4f4979c83c8f46c36..e9cd2a335f7faf27b029a3a79112d48d6a13188c 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c @@ -915,8 +915,6 @@ static const struct vb2_ops au0828_video_qops = { .prepare_streaming = v4l_vb2q_enable_media_source, .start_streaming = au0828_start_analog_streaming, .stop_streaming = au0828_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* ------------------------------------------------------------------ diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c index abb967c8bd352cf2fee9bfd25638262560137ed4..a4a9781328c50a47a3bda1894a4c71ed2cca3dea 100644 --- a/drivers/media/usb/cx231xx/cx231xx-417.c +++ b/drivers/media/usb/cx231xx/cx231xx-417.c @@ -1458,8 +1458,6 @@ static const struct vb2_ops cx231xx_video_qops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* ------------------------------------------------------------------ */ diff --git a/drivers/media/usb/cx231xx/cx231xx-vbi.c b/drivers/media/usb/cx231xx/cx231xx-vbi.c index 33431d9f54c2cf49363d0c528257a69055f08571..338e101484653afce991912a9fdfb02811a977a9 100644 --- a/drivers/media/usb/cx231xx/cx231xx-vbi.c +++ b/drivers/media/usb/cx231xx/cx231xx-vbi.c @@ -243,8 +243,6 @@ struct vb2_ops cx231xx_vbi_qops = { .buf_queue = vbi_buf_queue, .start_streaming = vbi_start_streaming, .stop_streaming = vbi_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* ------------------------------------------------------------------ diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 435eb0b32cb15c5104a5fc4d8ab82bb68ccfeb8c..2cd4e333bc4b012f97df98f8771f2508d81c3b3c 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c @@ -800,8 +800,6 @@ static const struct vb2_ops cx231xx_video_qops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /********************* v4l2 interface **************************************/ diff --git a/drivers/media/usb/dvb-usb/cxusb-analog.c b/drivers/media/usb/dvb-usb/cxusb-analog.c index b5d8c6b75ae133be47b179530d687cfbe0215ef5..8253046cd6e60195264387000789d4739fdffe51 100644 --- a/drivers/media/usb/dvb-usb/cxusb-analog.c +++ b/drivers/media/usb/dvb-usb/cxusb-analog.c @@ -956,8 +956,6 @@ static const struct vb2_ops cxdev_video_qops = { .start_streaming = cxusb_medion_v_start_streaming, .stop_streaming = cxusb_medion_v_stop_streaming, .buf_queue = cxusub_medion_v_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish }; static const __u32 videocaps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER | diff --git a/drivers/media/usb/em28xx/em28xx-vbi.c b/drivers/media/usb/em28xx/em28xx-vbi.c index b253c44c9724ff37c7e4e4926603d25713b9c657..8c5d9518122330b50636defff324ca2412554800 100644 --- a/drivers/media/usb/em28xx/em28xx-vbi.c +++ b/drivers/media/usb/em28xx/em28xx-vbi.c @@ -84,6 +84,4 @@ const struct vb2_ops em28xx_vbi_qops = { .buf_queue = vbi_buffer_queue, .start_streaming = em28xx_start_analog_streaming, .stop_streaming = em28xx_stop_vbi_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 4aef584e21da5d772d2609641157562ce723f777..66c09bc6d59ed29328c081c03e0084877ea8d7d0 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -1229,8 +1229,6 @@ static const struct vb2_ops em28xx_video_qops = { .buf_queue = buffer_queue, .start_streaming = em28xx_start_analog_streaming, .stop_streaming = em28xx_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int em28xx_vb2_setup(struct em28xx *dev) diff --git a/drivers/media/usb/go7007/go7007-v4l2.c b/drivers/media/usb/go7007/go7007-v4l2.c index 13256565b034308bc6366f1824cbb9f2d145c607..2087ffcb85a5a6d1f89b66a81d65f01772758c9f 100644 --- a/drivers/media/usb/go7007/go7007-v4l2.c +++ b/drivers/media/usb/go7007/go7007-v4l2.c @@ -452,8 +452,6 @@ static const struct vb2_ops go7007_video_qops = { .buf_finish = go7007_buf_finish, .start_streaming = go7007_start_streaming, .stop_streaming = go7007_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int vidioc_g_parm(struct file *filp, void *priv, diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index e8c8bdb9c40baaaa59f7e9d98c15c8429aaaad69..25edd21896540291a48a857abb35b2137bdd7604 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c @@ -1380,8 +1380,6 @@ static const struct vb2_ops gspca_qops = { .buf_queue = gspca_buffer_queue, .start_streaming = gspca_start_streaming, .stop_streaming = gspca_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static const struct v4l2_file_operations dev_fops = { diff --git a/drivers/media/usb/hackrf/hackrf.c b/drivers/media/usb/hackrf/hackrf.c index a1a7690a344a5bc8add88f7d0c5cda6cfc52509b..0b50de8775a38deb11c50da799c98b1a1ef14d0a 100644 --- a/drivers/media/usb/hackrf/hackrf.c +++ b/drivers/media/usb/hackrf/hackrf.c @@ -888,8 +888,6 @@ static const struct vb2_ops hackrf_vb2_ops = { .buf_queue = hackrf_buf_queue, .start_streaming = hackrf_start_streaming, .stop_streaming = hackrf_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int hackrf_querycap(struct file *file, void *fh, diff --git a/drivers/media/usb/msi2500/msi2500.c b/drivers/media/usb/msi2500/msi2500.c index c42fad1e3204137d0b97d7e6a77809af14940788..32fb59208ef2811a6548fa1ee76abc6cc579794f 100644 --- a/drivers/media/usb/msi2500/msi2500.c +++ b/drivers/media/usb/msi2500/msi2500.c @@ -883,8 +883,6 @@ static const struct vb2_ops msi2500_vb2_ops = { .buf_queue = msi2500_buf_queue, .start_streaming = msi2500_start_streaming, .stop_streaming = msi2500_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int msi2500_enum_fmt_sdr_cap(struct file *file, void *priv, diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c index 4a8485ea0c81436e8a9f3ad0b083d811b50f5b42..3ec9eb5956edd0d6c7d4b4b62ba5a5cc64a2483d 100644 --- a/drivers/media/usb/pwc/pwc-if.c +++ b/drivers/media/usb/pwc/pwc-if.c @@ -760,8 +760,6 @@ static const struct vb2_ops pwc_vb_queue_ops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /***************************************************************************/ diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index a6e450181fd014616a2f4e6bcb72f2ba8b5087ac..899a7a67e2baf16012719006c7cbbf0504462608 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -704,8 +704,6 @@ static const struct vb2_ops s2255_video_qops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int vidioc_querycap(struct file *file, void *priv, diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c index a1f785a5ffd8923b71fd5ac3093ea8f5a5533e20..5ba3d9c4b3fb033106d47a367d4b36d6b47a93ca 100644 --- a/drivers/media/usb/stk1160/stk1160-v4l.c +++ b/drivers/media/usb/stk1160/stk1160-v4l.c @@ -734,8 +734,6 @@ static const struct vb2_ops stk1160_video_qops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static const struct video_device v4l_template = { diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c index 702f1c8bd2ab3d8cff01bff379dbfc9a11497dc2..be22a9697197c6078981a84b882ec85cd591506c 100644 --- a/drivers/media/usb/usbtv/usbtv-video.c +++ b/drivers/media/usb/usbtv/usbtv-video.c @@ -780,8 +780,6 @@ static const struct vb2_ops usbtv_vb2_ops = { .buf_queue = usbtv_buf_queue, .start_streaming = usbtv_start_streaming, .stop_streaming = usbtv_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int usbtv_s_ctrl(struct v4l2_ctrl *ctrl) diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c index 16fa17bbd15eaaa60bd160fd687a1b282eebec56..26ee85657fc89da97655cc8ff6e63a5bb99384ef 100644 --- a/drivers/media/usb/uvc/uvc_queue.c +++ b/drivers/media/usb/uvc/uvc_queue.c @@ -197,8 +197,6 @@ static const struct vb2_ops uvc_queue_qops = { .buf_prepare = uvc_buffer_prepare, .buf_queue = uvc_buffer_queue, .buf_finish = uvc_buffer_finish, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = uvc_start_streaming, .stop_streaming = uvc_stop_streaming, }; @@ -207,8 +205,6 @@ static const struct vb2_ops uvc_meta_queue_qops = { .queue_setup = uvc_queue_setup, .buf_prepare = uvc_buffer_prepare, .buf_queue = uvc_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = uvc_stop_streaming, }; From patchwork Mon Oct 14 15:06:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835187 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BA961AB517 for ; Mon, 14 Oct 2024 15:08:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918507; cv=none; b=u4N/OOZTPB8U++xU+ViPnS2/hc3ZjTEuXtkstxq5kCAljwjjJ/HzaMPIsvSqNzeo1gBXvO+5/HAxdjfuMXvRHVgsJ8Vw35xzUBIcBKEsfPSIoWdhVDHR0X9I8SAhrjx3lTUMAFW5S25lJCLBshuzC49BIbjhq2Gmnt3c3k/buSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918507; c=relaxed/simple; bh=BFvhEYoIEtA/A5iE0k2gxA74MPt1ghtz4Mmt6VsCLoo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ramp0Fg8jEaXQ80qa5tMz28BawIJuJpwXU3UvDE+v+Nf7wrbFR7jQUGGdHaSWW4qHb+xAXkK9slD8bDCoctBHteyeggE8PTF2KPzZYmWwPPa4yVYcBxCHq0q2RHw5HGJLi4fIn6e4aQU70HfSrpMaAadUNZD14MAOjPSnwLfxPs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A81BC4CED0; Mon, 14 Oct 2024 15:08:09 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:32 +0200 Subject: [PATCH 05/10] media: video-i2c: drop vb2_ops_wait_prepare/finish Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-5-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Since the vb2_ops_wait_prepare/finish callbacks already rely on that field, we can safely drop these callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- drivers/media/i2c/video-i2c.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index ffb3d9d61a749146d0ffc27710689984f3d801ce..036a6375627a95a7ad17a07d883e033324ad471c 100644 --- a/drivers/media/i2c/video-i2c.c +++ b/drivers/media/i2c/video-i2c.c @@ -566,8 +566,6 @@ static const struct vb2_ops video_i2c_video_qops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int video_i2c_querycap(struct file *file, void *priv, From patchwork Mon Oct 14 15:06:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835188 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A9421AB517 for ; Mon, 14 Oct 2024 15:08:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918525; cv=none; b=Xbea762DGCCahw45Qqf9bxScrHnkk3j63z2kOaSDBaVZh/OxZf/wx2lkD06oWvlyLFPBQuidXfRsHRxJPd8UhLMu8TUxYJrwWIZckeQmnOzQ5im4D6ipxpnwC0OUVNd8DeQVV3goPHDir3xNZ2jV5WpE3WRLU3YjrJ1UZgKztCk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918525; c=relaxed/simple; bh=E+8pKaev9/H/KJA5iepiEY7v51VimAnb3hueA3uDgH8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YP8a0co10DqE2GQ6ELp7NNWK8ko53o4gYdOaBZ//T1hMOe6su/391x0S2EWMRsLhKRqoTzN3TmS0z+wfdBSKdBLi7FmBy/POYUJnWYPjEoM9IUoFk2L4ik1+eA+AnBWbP8wVMj4MRWkZJZJgQZxubzxe060b3Y+aNQ8Se1RfNMQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2DDBC4CEC3; Mon, 14 Oct 2024 15:08:27 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:33 +0200 Subject: [PATCH 06/10] media: rtl2832_sdr: drop vb2_ops_wait_prepare/finish Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-6-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Since the vb2_ops_wait_prepare/finish callbacks already rely on that field, we can safely drop these callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Signed-off-by: Hans Verkuil --- drivers/media/dvb-frontends/rtl2832_sdr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb-frontends/rtl2832_sdr.c index 922c1662f1f038bebeb8abb3a7892e30ee1a0140..05254d8717db85a66b098fa66ce7388e9589d3c3 100644 --- a/drivers/media/dvb-frontends/rtl2832_sdr.c +++ b/drivers/media/dvb-frontends/rtl2832_sdr.c @@ -947,8 +947,6 @@ static const struct vb2_ops rtl2832_sdr_vb2_ops = { .buf_queue = rtl2832_sdr_buf_queue, .start_streaming = rtl2832_sdr_start_streaming, .stop_streaming = rtl2832_sdr_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int rtl2832_sdr_g_tuner(struct file *file, void *priv, From patchwork Mon Oct 14 15:06:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835189 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1E0245C1C for ; Mon, 14 Oct 2024 15:09:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918542; cv=none; b=kww8o/IgydZaFMIV2bnOttN+KD7Wvq7cV9ox5WQuljvWKqV+yxEDeDG0FTXEtlMjv1Sxc6jZ2tQ3d0h48OWISysMimSGiUJ1k9bAHJU6sQh+3fRkBfnyWKe91zA3sWwhDAz0HD6+90tRwN4QkRVAo2Qq6AN/VOXlfMA/t8D1gDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918542; c=relaxed/simple; bh=+ZW9C6uqftStxVURqRPK/VOSekDSwzWNM/wK1fZvmg4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qPiUD/y/0nqgYmooZvcyp8uEk+CjIIk3r+DRXWYlnnXYkfdcL+H9UcyQSQRmmHPmHhhUCYP18SN6XmofcqeQX7IXXjPyivjbSsrDHVhmR/+RnxOY6NAG61UtZKtw8H/UFIJPoKFKNBGZAZUi8oTHHVrM9DvU/s1MYR+1XRtjc54= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 449A6C4CED1; Mon, 14 Oct 2024 15:08:45 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:34 +0200 Subject: [PATCH 07/10] media: platform: drop vb2_ops_wait_prepare/finish Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-7-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Since the vb2_ops_wait_prepare/finish callbacks already rely on that field, we can safely drop these callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Signed-off-by: Hans Verkuil Reviewed-by: Neil Armstrong # for meson-ge2d Acked-by: Andrzej Pietrasiewicz --- drivers/media/platform/allegro-dvt/allegro-core.c | 2 -- drivers/media/platform/amlogic/meson-ge2d/ge2d.c | 2 -- drivers/media/platform/amphion/vpu_v4l2.c | 2 -- drivers/media/platform/aspeed/aspeed-video.c | 2 -- drivers/media/platform/atmel/atmel-isi.c | 2 -- drivers/media/platform/broadcom/bcm2835-unicam.c | 2 -- drivers/media/platform/chips-media/coda/coda-common.c | 2 -- drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 2 -- drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 2 -- drivers/media/platform/imagination/e5010-jpeg-enc.c | 2 -- drivers/media/platform/intel/pxa_camera.c | 2 -- drivers/media/platform/m2m-deinterlace.c | 2 -- drivers/media/platform/marvell/mcam-core.c | 4 ---- drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 4 ---- drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c | 2 -- drivers/media/platform/mediatek/mdp3/mtk-mdp3-m2m.c | 2 -- .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateful.c | 2 -- .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c | 2 -- drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c | 2 -- drivers/media/platform/microchip/microchip-isc-base.c | 2 -- drivers/media/platform/nuvoton/npcm-video.c | 2 -- drivers/media/platform/nvidia/tegra-vde/v4l2.c | 2 -- drivers/media/platform/nxp/dw100/dw100.c | 2 -- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 -- drivers/media/platform/nxp/imx-pxp.c | 2 -- drivers/media/platform/nxp/imx7-media-csi.c | 2 -- drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c | 2 -- drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 -- drivers/media/platform/nxp/mx2_emmaprp.c | 2 -- drivers/media/platform/qcom/camss/camss-video.c | 2 -- drivers/media/platform/qcom/venus/vdec.c | 2 -- drivers/media/platform/qcom/venus/venc.c | 2 -- drivers/media/platform/raspberrypi/pisp_be/pisp_be.c | 2 -- drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 2 -- drivers/media/platform/renesas/rcar_drif.c | 2 -- drivers/media/platform/renesas/rcar_fdp1.c | 2 -- drivers/media/platform/renesas/rcar_jpu.c | 2 -- drivers/media/platform/renesas/renesas-ceu.c | 2 -- drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 2 -- drivers/media/platform/renesas/sh_vou.c | 2 -- drivers/media/platform/renesas/vsp1/vsp1_histo.c | 2 -- drivers/media/platform/renesas/vsp1/vsp1_video.c | 2 -- drivers/media/platform/rockchip/rga/rga-buf.c | 2 -- drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 2 -- drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 2 -- drivers/media/platform/rockchip/rkisp1/rkisp1-stats.c | 2 -- drivers/media/platform/samsung/exynos-gsc/gsc-m2m.c | 2 -- drivers/media/platform/samsung/exynos4-is/fimc-capture.c | 2 -- drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c | 2 -- drivers/media/platform/samsung/exynos4-is/fimc-lite.c | 2 -- drivers/media/platform/samsung/exynos4-is/fimc-m2m.c | 2 -- drivers/media/platform/samsung/s3c-camif/camif-capture.c | 2 -- drivers/media/platform/samsung/s5p-g2d/g2d.c | 2 -- drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c | 2 -- drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c | 2 -- drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c | 2 -- drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c | 2 -- drivers/media/platform/st/sti/delta/delta-v4l2.c | 4 ---- drivers/media/platform/st/sti/hva/hva-v4l2.c | 2 -- drivers/media/platform/st/stm32/dma2d/dma2d.c | 2 -- drivers/media/platform/st/stm32/stm32-dcmi.c | 2 -- drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c | 6 ------ drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c | 2 -- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 2 -- drivers/media/platform/sunxi/sun8i-di/sun8i-di.c | 2 -- drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c | 2 -- drivers/media/platform/ti/am437x/am437x-vpfe.c | 2 -- drivers/media/platform/ti/cal/cal-video.c | 2 -- drivers/media/platform/ti/davinci/vpif_capture.c | 2 -- drivers/media/platform/ti/davinci/vpif_display.c | 2 -- drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 2 -- drivers/media/platform/ti/omap/omap_vout.c | 2 -- drivers/media/platform/ti/vpe/vpe.c | 2 -- drivers/media/platform/verisilicon/hantro_v4l2.c | 2 -- drivers/media/platform/via/via-camera.c | 2 -- drivers/media/platform/xilinx/xilinx-dma.c | 2 -- 76 files changed, 162 deletions(-) diff --git a/drivers/media/platform/allegro-dvt/allegro-core.c b/drivers/media/platform/allegro-dvt/allegro-core.c index 44e0d5512f94aee8d31b74c00790548872344f2a..e491399afcc984346eb4159111f35bab5340f2b5 100644 --- a/drivers/media/platform/allegro-dvt/allegro-core.c +++ b/drivers/media/platform/allegro-dvt/allegro-core.c @@ -2897,8 +2897,6 @@ static const struct vb2_ops allegro_queue_ops = { .buf_queue = allegro_buf_queue, .start_streaming = allegro_start_streaming, .stop_streaming = allegro_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int allegro_queue_init(void *priv, diff --git a/drivers/media/platform/amlogic/meson-ge2d/ge2d.c b/drivers/media/platform/amlogic/meson-ge2d/ge2d.c index b05c944d5dc2e50e8646d62a84c2971cce2f7cb5..0c004bb8ba05059245e73a306ed2d20dc18c9197 100644 --- a/drivers/media/platform/amlogic/meson-ge2d/ge2d.c +++ b/drivers/media/platform/amlogic/meson-ge2d/ge2d.c @@ -391,8 +391,6 @@ static const struct vb2_ops ge2d_qops = { .buf_queue = ge2d_buf_queue, .start_streaming = ge2d_start_streaming, .stop_streaming = ge2d_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int diff --git a/drivers/media/platform/amphion/vpu_v4l2.c b/drivers/media/platform/amphion/vpu_v4l2.c index f0b1ec79d2961cf1a5785359923bb57f1eeb21d5..45707931bc4f1fd0bce4852f97721bb7af98f44d 100644 --- a/drivers/media/platform/amphion/vpu_v4l2.c +++ b/drivers/media/platform/amphion/vpu_v4l2.c @@ -646,8 +646,6 @@ static const struct vb2_ops vpu_vb2_ops = { .start_streaming = vpu_vb2_start_streaming, .stop_streaming = vpu_vb2_stop_streaming, .buf_queue = vpu_vb2_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int vpu_m2m_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq) diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c index fd540349811517661671ac3c5a512af2127e0d44..54cae0da9aca3fd74800b51f79136a261aec241a 100644 --- a/drivers/media/platform/aspeed/aspeed-video.c +++ b/drivers/media/platform/aspeed/aspeed-video.c @@ -1891,8 +1891,6 @@ static void aspeed_video_buf_queue(struct vb2_buffer *vb) static const struct vb2_ops aspeed_video_vb2_ops = { .queue_setup = aspeed_video_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_prepare = aspeed_video_buf_prepare, .start_streaming = aspeed_video_start_streaming, .stop_streaming = aspeed_video_stop_streaming, diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c index 049b7faf57900120dbea7ca213c29037e2c39360..0d1c3934752972190d8a1ded9a04b2be2b768c36 100644 --- a/drivers/media/platform/atmel/atmel-isi.c +++ b/drivers/media/platform/atmel/atmel-isi.c @@ -526,8 +526,6 @@ static const struct vb2_ops isi_video_qops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int isi_g_fmt_vid_cap(struct file *file, void *priv, diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index 6dcc6c13a7540edbd30d9244511f784527a78cf0..3aed0e493c81f1aef1ac78bd20e1fd6f69d4bd6c 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -1801,8 +1801,6 @@ static void unicam_buffer_queue(struct vb2_buffer *vb) static const struct vb2_ops unicam_video_qops = { .queue_setup = unicam_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_prepare = unicam_buffer_prepare, .start_streaming = unicam_start_streaming, .stop_streaming = unicam_stop_streaming, diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c index c3afd63edbb2a0781b9cdb5d11937d229914ae91..289a076c3bcc776faf923c24eaa0ebe3e891ee79 100644 --- a/drivers/media/platform/chips-media/coda/coda-common.c +++ b/drivers/media/platform/chips-media/coda/coda-common.c @@ -2171,8 +2171,6 @@ static const struct vb2_ops coda_qops = { .buf_queue = coda_buf_queue, .start_streaming = coda_start_streaming, .stop_streaming = coda_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int coda_s_ctrl(struct v4l2_ctrl *ctrl) diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c index 99e929aab8709f700e34cac625d5d70a382bd6dd..d3ff420c52ce1c30ef2b50993a295c53f72e1183 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c @@ -1475,8 +1475,6 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q) static const struct vb2_ops wave5_vpu_dec_vb2_ops = { .queue_setup = wave5_vpu_dec_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_queue = wave5_vpu_dec_buf_queue, .start_streaming = wave5_vpu_dec_start_streaming, .stop_streaming = wave5_vpu_dec_stop_streaming, diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c index 4e1c8a4e72728b769dcd216c92803a61fd3f4515..1e5fc5f8b856c5329b2c6007649285a28749b6aa 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c @@ -1471,8 +1471,6 @@ static void wave5_vpu_enc_stop_streaming(struct vb2_queue *q) static const struct vb2_ops wave5_vpu_enc_vb2_ops = { .queue_setup = wave5_vpu_enc_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_queue = wave5_vpu_enc_buf_queue, .start_streaming = wave5_vpu_enc_start_streaming, .stop_streaming = wave5_vpu_enc_stop_streaming, diff --git a/drivers/media/platform/imagination/e5010-jpeg-enc.c b/drivers/media/platform/imagination/e5010-jpeg-enc.c index 25044f15672e9b95265c1c04c82f66c6622a7520..c194f830577f9a2ed313e76f536e5d078729a3a3 100644 --- a/drivers/media/platform/imagination/e5010-jpeg-enc.c +++ b/drivers/media/platform/imagination/e5010-jpeg-enc.c @@ -1593,8 +1593,6 @@ static const struct vb2_ops e5010_video_ops = { .buf_finish = e5010_buf_finish, .buf_prepare = e5010_buf_prepare, .buf_out_validate = e5010_buf_out_validate, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = e5010_start_streaming, .stop_streaming = e5010_stop_streaming, }; diff --git a/drivers/media/platform/intel/pxa_camera.c b/drivers/media/platform/intel/pxa_camera.c index b8b1cf0665ab60786585d2dd7d0cb2caa4ba2a84..bef1e7137f23f02ef0005058c59fb712ba467cea 100644 --- a/drivers/media/platform/intel/pxa_camera.c +++ b/drivers/media/platform/intel/pxa_camera.c @@ -1504,8 +1504,6 @@ static const struct vb2_ops pxac_vb2_ops = { .buf_cleanup = pxac_vb2_cleanup, .start_streaming = pxac_vb2_start_streaming, .stop_streaming = pxac_vb2_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int pxa_camera_init_videobuf2(struct pxa_camera_dev *pcdev) diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c index 7d331c37525a4aa98ec02d2d477ef7d622e87664..5188f31890966735c6eba990587627f43ff84378 100644 --- a/drivers/media/platform/m2m-deinterlace.c +++ b/drivers/media/platform/m2m-deinterlace.c @@ -784,8 +784,6 @@ static const struct vb2_ops deinterlace_qops = { .queue_setup = deinterlace_queue_setup, .buf_prepare = deinterlace_buf_prepare, .buf_queue = deinterlace_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/marvell/mcam-core.c b/drivers/media/platform/marvell/mcam-core.c index c81593c969e057f7efb24666f48f6ac9fdf06ed1..9ec01228f907311f1034523f06a2704a3b70b902 100644 --- a/drivers/media/platform/marvell/mcam-core.c +++ b/drivers/media/platform/marvell/mcam-core.c @@ -1203,8 +1203,6 @@ static const struct vb2_ops mcam_vb2_ops = { .buf_queue = mcam_vb_buf_queue, .start_streaming = mcam_vb_start_streaming, .stop_streaming = mcam_vb_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; @@ -1267,8 +1265,6 @@ static const struct vb2_ops mcam_vb2_sg_ops = { .buf_cleanup = mcam_vb_sg_buf_cleanup, .start_streaming = mcam_vb_start_streaming, .stop_streaming = mcam_vb_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; #endif /* MCAM_MODE_DMA_SG */ diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c index a5bf75eb8b221245b53a2fc08d5514b6ba9d25f0..834d2a354692df120b81ee0bef7f816a4529a2f4 100644 --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c @@ -884,8 +884,6 @@ static const struct vb2_ops mtk_jpeg_dec_qops = { .queue_setup = mtk_jpeg_queue_setup, .buf_prepare = mtk_jpeg_buf_prepare, .buf_queue = mtk_jpeg_dec_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = mtk_jpeg_dec_stop_streaming, }; @@ -893,8 +891,6 @@ static const struct vb2_ops mtk_jpeg_enc_qops = { .queue_setup = mtk_jpeg_queue_setup, .buf_prepare = mtk_jpeg_buf_prepare, .buf_queue = mtk_jpeg_enc_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = mtk_jpeg_enc_stop_streaming, }; diff --git a/drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c b/drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c index f14779e7596e51057079472bf57588813ff3c39d..28c998bd3a81c440bc273ba0a09bf31e3460d8e1 100644 --- a/drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c +++ b/drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c @@ -584,8 +584,6 @@ static const struct vb2_ops mtk_mdp_m2m_qops = { .buf_queue = mtk_mdp_m2m_buf_queue, .stop_streaming = mtk_mdp_m2m_stop_streaming, .start_streaming = mtk_mdp_m2m_start_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int mtk_mdp_m2m_querycap(struct file *file, void *fh, diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-m2m.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-m2m.c index 0e69128a3772c38135ab8348063ae1306e7155c9..59ce5cce069836a6902df686f4dd91b13fa729f2 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-m2m.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-m2m.c @@ -266,8 +266,6 @@ static void mdp_m2m_buf_queue(struct vb2_buffer *vb) static const struct vb2_ops mdp_m2m_qops = { .queue_setup = mdp_m2m_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_prepare = mdp_m2m_buf_prepare, .start_streaming = mdp_m2m_start_streaming, .stop_streaming = mdp_m2m_stop_streaming, diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateful.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateful.c index e62c1c18758bb18f518de88633995bcf4955781d..aa9bdee7a96ca97bd92846edd79643b428ff5948 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateful.c +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateful.c @@ -598,8 +598,6 @@ static void mtk_init_vdec_params(struct mtk_vcodec_dec_ctx *ctx) static const struct vb2_ops mtk_vdec_frame_vb2_ops = { .queue_setup = vb2ops_vdec_queue_setup, .buf_prepare = vb2ops_vdec_buf_prepare, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = vb2ops_vdec_start_streaming, .buf_queue = vb2ops_vdec_stateful_buf_queue, diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c index 3307dc15fc1dfee96362239f2096190c57a0be10..afa224da0f4165cf5701d6861f1f787c6317bfe4 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c @@ -856,8 +856,6 @@ static int vb2ops_vdec_out_buf_validate(struct vb2_buffer *vb) static const struct vb2_ops mtk_vdec_request_vb2_ops = { .queue_setup = vb2ops_vdec_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = vb2ops_vdec_start_streaming, .stop_streaming = vb2ops_vdec_stop_streaming, diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c index 7eaf0e24c9fc41bf8f431c885417ff348299c2eb..a01dc25a769911cd85a8d19c58e0c0a12b92ad50 100644 --- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c +++ b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c @@ -1009,8 +1009,6 @@ static const struct vb2_ops mtk_venc_vb2_ops = { .buf_out_validate = vb2ops_venc_buf_out_validate, .buf_prepare = vb2ops_venc_buf_prepare, .buf_queue = vb2ops_venc_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = vb2ops_venc_start_streaming, .stop_streaming = vb2ops_venc_stop_streaming, }; diff --git a/drivers/media/platform/microchip/microchip-isc-base.c b/drivers/media/platform/microchip/microchip-isc-base.c index 28e56f6a695da2a6e4035fbe99b80ff65e95517e..a7cdc743fda71db0ffbf499cb4b9ca18c9e7abf2 100644 --- a/drivers/media/platform/microchip/microchip-isc-base.c +++ b/drivers/media/platform/microchip/microchip-isc-base.c @@ -465,8 +465,6 @@ static void isc_buffer_queue(struct vb2_buffer *vb) static const struct vb2_ops isc_vb2_ops = { .queue_setup = isc_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_prepare = isc_buffer_prepare, .start_streaming = isc_start_streaming, .stop_streaming = isc_stop_streaming, diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/platform/nuvoton/npcm-video.c index 3b527029cbbbb22e77724df8557d4944924c3939..4f5d75645b2bb94669d976f9bfe7a9870f92c481 100644 --- a/drivers/media/platform/nuvoton/npcm-video.c +++ b/drivers/media/platform/nuvoton/npcm-video.c @@ -1558,8 +1558,6 @@ static const struct regmap_config npcm_video_ece_regmap_cfg = { static const struct vb2_ops npcm_video_vb2_ops = { .queue_setup = npcm_video_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_prepare = npcm_video_buf_prepare, .buf_finish = npcm_video_buf_finish, .start_streaming = npcm_video_start_streaming, diff --git a/drivers/media/platform/nvidia/tegra-vde/v4l2.c b/drivers/media/platform/nvidia/tegra-vde/v4l2.c index ebf882198eeeb71e316a2d10985067fb897532e8..e3726cab0c82c92cf0d552b8e8061fd22badfa90 100644 --- a/drivers/media/platform/nvidia/tegra-vde/v4l2.c +++ b/drivers/media/platform/nvidia/tegra-vde/v4l2.c @@ -328,8 +328,6 @@ static const struct vb2_ops tegra_qops = { .buf_request_complete = tegra_buf_request_complete, .start_streaming = tegra_start_streaming, .stop_streaming = tegra_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int tegra_queue_init(void *priv, diff --git a/drivers/media/platform/nxp/dw100/dw100.c b/drivers/media/platform/nxp/dw100/dw100.c index 54ebf59df682e067a5035c5ff399091642c77c97..66582e7f92fc6c0751afcc302dfe94f049a88b87 100644 --- a/drivers/media/platform/nxp/dw100/dw100.c +++ b/drivers/media/platform/nxp/dw100/dw100.c @@ -558,8 +558,6 @@ static const struct vb2_ops dw100_qops = { .buf_queue = dw100_buf_queue, .start_streaming = dw100_start_streaming, .stop_streaming = dw100_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int dw100_m2m_queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c index d8e946aebba276139245de1475b4c54a9fc381ac..7f5fe551179b9eb27a3e6846f57d083dd5323ffc 100644 --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c @@ -1965,8 +1965,6 @@ static int mxc_jpeg_buf_prepare(struct vb2_buffer *vb) static const struct vb2_ops mxc_jpeg_qops = { .queue_setup = mxc_jpeg_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_out_validate = mxc_jpeg_buf_out_validate, .buf_prepare = mxc_jpeg_buf_prepare, .start_streaming = mxc_jpeg_start_streaming, diff --git a/drivers/media/platform/nxp/imx-pxp.c b/drivers/media/platform/nxp/imx-pxp.c index e696d377960f9a2c554db2ad2956e8763fdfbead..7f8ffbac582fcf6a968e5ab000827d7086c18261 100644 --- a/drivers/media/platform/nxp/imx-pxp.c +++ b/drivers/media/platform/nxp/imx-pxp.c @@ -1606,8 +1606,6 @@ static const struct vb2_ops pxp_qops = { .buf_queue = pxp_buf_queue, .start_streaming = pxp_start_streaming, .stop_streaming = pxp_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c index 08e36b7bab59ebd4b2b2ed77158055f86429adf1..34a92642bbfe7b7ce9c85fbaf346c6f595425cc9 100644 --- a/drivers/media/platform/nxp/imx7-media-csi.c +++ b/drivers/media/platform/nxp/imx7-media-csi.c @@ -1507,8 +1507,6 @@ static const struct vb2_ops imx7_csi_video_qops = { .buf_init = imx7_csi_video_buf_init, .buf_prepare = imx7_csi_video_buf_prepare, .buf_queue = imx7_csi_video_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = imx7_csi_video_start_streaming, .stop_streaming = imx7_csi_video_stop_streaming, }; diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c index 9745d6219a1667f28c2b290ded1c7739bee8c2ba..794050a6a919b8d108e4585d6be5ffd519e1311f 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c @@ -269,8 +269,6 @@ static const struct vb2_ops mxc_isi_m2m_vb2_qops = { .buf_init = mxc_isi_m2m_vb2_buffer_init, .buf_prepare = mxc_isi_m2m_vb2_buffer_prepare, .buf_queue = mxc_isi_m2m_vb2_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = mxc_isi_m2m_vb2_start_streaming, .stop_streaming = mxc_isi_m2m_vb2_stop_streaming, }; diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c index 4091f1c0e78bdca91e66d3d63e96da0e3d2ad5af..c0ba34ea82fd799a4efbd723f6cd459ca1572283 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c @@ -987,8 +987,6 @@ static const struct vb2_ops mxc_isi_vb2_qops = { .buf_init = mxc_isi_vb2_buffer_init, .buf_prepare = mxc_isi_vb2_buffer_prepare, .buf_queue = mxc_isi_vb2_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = mxc_isi_vb2_start_streaming, .stop_streaming = mxc_isi_vb2_stop_streaming, }; diff --git a/drivers/media/platform/nxp/mx2_emmaprp.c b/drivers/media/platform/nxp/mx2_emmaprp.c index bcad0aed7206e28651b54caf8d456d748aeb9abc..0c6cc120fd2a443db4dbc583f2cdb1cfd61b6a7e 100644 --- a/drivers/media/platform/nxp/mx2_emmaprp.c +++ b/drivers/media/platform/nxp/mx2_emmaprp.c @@ -677,8 +677,6 @@ static const struct vb2_ops emmaprp_qops = { .queue_setup = emmaprp_queue_setup, .buf_prepare = emmaprp_buf_prepare, .buf_queue = emmaprp_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/qcom/camss/camss-video.c b/drivers/media/platform/qcom/camss/camss-video.c index 3b8fc31d957c77fcfd19790f066b4025b1a7ea51..aa021fd5e1233ba413acc9fdbac6b677619079b4 100644 --- a/drivers/media/platform/qcom/camss/camss-video.c +++ b/drivers/media/platform/qcom/camss/camss-video.c @@ -310,8 +310,6 @@ static void video_stop_streaming(struct vb2_queue *q) static const struct vb2_ops msm_video_vb2_q_ops = { .queue_setup = video_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_init = video_buf_init, .buf_prepare = video_buf_prepare, .buf_queue = video_buf_queue, diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 6252a6b3d4ba6d49b343bb53dfb7b0e683410bb4..fd4c4934c910383539c59948df9fdc39f62a2d1f 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1390,8 +1390,6 @@ static const struct vb2_ops vdec_vb2_ops = { .buf_prepare = venus_helper_vb2_buf_prepare, .start_streaming = vdec_start_streaming, .stop_streaming = vdec_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_queue = vdec_vb2_buf_queue, }; diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 322a7737e2c7befdebcdf147955ba1d5ba8b42e2..b1093683c3063807e597a465fd1f80c2bf0d76f1 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -1319,8 +1319,6 @@ static const struct vb2_ops venc_vb2_ops = { .buf_prepare = venus_helper_vb2_buf_prepare, .start_streaming = venc_start_streaming, .stop_streaming = venus_helper_vb2_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_queue = venc_vb2_buf_queue, }; diff --git a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c index 89e36e8219ed8b7cc4040ae1f33ec21bb12778d6..7596ae1f7de6671484d4d351015b234829f642d4 100644 --- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c +++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c @@ -964,8 +964,6 @@ static const struct vb2_ops pispbe_node_queue_ops = { .buf_queue = pispbe_node_buffer_queue, .start_streaming = pispbe_node_start_streaming, .stop_streaming = pispbe_node_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static const struct v4l2_file_operations pispbe_fops = { diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c index 21d5b2815e86a66a1786901586f18f5474b94ad0..39cf22376fbe0a4c0ea761272d3c8c302a6e51c0 100644 --- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c +++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c @@ -1529,8 +1529,6 @@ static const struct vb2_ops rvin_qops = { .buf_queue = rvin_buffer_queue, .start_streaming = rvin_start_streaming_vq, .stop_streaming = rvin_stop_streaming_vq, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; void rvin_dma_unregister(struct rvin_dev *vin) diff --git a/drivers/media/platform/renesas/rcar_drif.c b/drivers/media/platform/renesas/rcar_drif.c index a7b882975440d0ae0e81fe1b20d1d02affcf97f1..fc8b6bbef793c64e63f8750eadbcf0cbe43f9c41 100644 --- a/drivers/media/platform/renesas/rcar_drif.c +++ b/drivers/media/platform/renesas/rcar_drif.c @@ -861,8 +861,6 @@ static const struct vb2_ops rcar_drif_vb2_ops = { .buf_queue = rcar_drif_buf_queue, .start_streaming = rcar_drif_start_streaming, .stop_streaming = rcar_drif_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int rcar_drif_querycap(struct file *file, void *fh, diff --git a/drivers/media/platform/renesas/rcar_fdp1.c b/drivers/media/platform/renesas/rcar_fdp1.c index 5827cc33ab50fd05f1e7312ca3f6de070d15c76d..5d453a7a89889fa3fd115da5f87b4bb24554a3c6 100644 --- a/drivers/media/platform/renesas/rcar_fdp1.c +++ b/drivers/media/platform/renesas/rcar_fdp1.c @@ -2032,8 +2032,6 @@ static const struct vb2_ops fdp1_qops = { .buf_queue = fdp1_buf_queue, .start_streaming = fdp1_start_streaming, .stop_streaming = fdp1_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/renesas/rcar_jpu.c b/drivers/media/platform/renesas/rcar_jpu.c index 881df8a8a1ac8521d615512320d963debc6a040a..1421364d2d14d2dac3cd5afd63377d9005926044 100644 --- a/drivers/media/platform/renesas/rcar_jpu.c +++ b/drivers/media/platform/renesas/rcar_jpu.c @@ -1171,8 +1171,6 @@ static const struct vb2_ops jpu_qops = { .buf_finish = jpu_buf_finish, .start_streaming = jpu_start_streaming, .stop_streaming = jpu_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int jpu_queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/renesas/renesas-ceu.c b/drivers/media/platform/renesas/renesas-ceu.c index cacfa3951c4d52b34c7eb9d587540d744f519804..8cceafe491b1bec6c10ced8e0336b5575db88297 100644 --- a/drivers/media/platform/renesas/renesas-ceu.c +++ b/drivers/media/platform/renesas/renesas-ceu.c @@ -761,8 +761,6 @@ static const struct vb2_ops ceu_vb2_ops = { .queue_setup = ceu_vb2_setup, .buf_queue = ceu_vb2_queue, .buf_prepare = ceu_vb2_prepare, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = ceu_start_streaming, .stop_streaming = ceu_stop_streaming, }; diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c index b16b8af6e8f8cb067fbdd71cf9b49cb4784eaaea..128694c0b144181cdfb26062cd2d92c831d884d1 100644 --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c @@ -712,8 +712,6 @@ static const struct vb2_ops rzg2l_cru_qops = { .buf_queue = rzg2l_cru_buffer_queue, .start_streaming = rzg2l_cru_start_streaming_vq, .stop_streaming = rzg2l_cru_stop_streaming_vq, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; void rzg2l_cru_dma_unregister(struct rzg2l_cru_dev *cru) diff --git a/drivers/media/platform/renesas/sh_vou.c b/drivers/media/platform/renesas/sh_vou.c index d440e54599195bf72bbeeeff221138a3d3902e05..4ad7ae188d5b25ab383d664898f855a4819c1a85 100644 --- a/drivers/media/platform/renesas/sh_vou.c +++ b/drivers/media/platform/renesas/sh_vou.c @@ -360,8 +360,6 @@ static const struct vb2_ops sh_vou_qops = { .buf_queue = sh_vou_buf_queue, .start_streaming = sh_vou_start_streaming, .stop_streaming = sh_vou_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* Video IOCTLs */ diff --git a/drivers/media/platform/renesas/vsp1/vsp1_histo.c b/drivers/media/platform/renesas/vsp1/vsp1_histo.c index 9c2d4c91bfadb8f19773fca511014c29f326c41d..c762202877babdc651a63997f4340f6a37a301ac 100644 --- a/drivers/media/platform/renesas/vsp1/vsp1_histo.c +++ b/drivers/media/platform/renesas/vsp1/vsp1_histo.c @@ -155,8 +155,6 @@ static const struct vb2_ops histo_video_queue_qops = { .queue_setup = histo_queue_setup, .buf_prepare = histo_buffer_prepare, .buf_queue = histo_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = histo_start_streaming, .stop_streaming = histo_stop_streaming, }; diff --git a/drivers/media/platform/renesas/vsp1/vsp1_video.c b/drivers/media/platform/renesas/vsp1/vsp1_video.c index e728f9f5160e42f2cf8956cd4180c0ce2162073b..03f4efd6b82bd76419ff048f24c82ecce44f321c 100644 --- a/drivers/media/platform/renesas/vsp1/vsp1_video.c +++ b/drivers/media/platform/renesas/vsp1/vsp1_video.c @@ -873,8 +873,6 @@ static const struct vb2_ops vsp1_video_queue_qops = { .queue_setup = vsp1_video_queue_setup, .buf_prepare = vsp1_video_buffer_prepare, .buf_queue = vsp1_video_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = vsp1_video_start_streaming, .stop_streaming = vsp1_video_stop_streaming, }; diff --git a/drivers/media/platform/rockchip/rga/rga-buf.c b/drivers/media/platform/rockchip/rga/rga-buf.c index 70808049d2e810dadc76d2adfa366ec4f4d046a9..8a48e9d91f96f1afbcc5367e6bd00898729a3be2 100644 --- a/drivers/media/platform/rockchip/rga/rga-buf.c +++ b/drivers/media/platform/rockchip/rga/rga-buf.c @@ -218,8 +218,6 @@ const struct vb2_ops rga_qops = { .buf_prepare = rga_buf_prepare, .buf_queue = rga_buf_queue, .buf_cleanup = rga_buf_cleanup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = rga_buf_start_streaming, .stop_streaming = rga_buf_stop_streaming, }; diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c index 2bddb4fa8a5cd163f383a9baa9fc3e2ca1ea87b8..02339cd94486ab2b669c966895c83d7dcc2d2b94 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c @@ -1203,8 +1203,6 @@ static const struct vb2_ops rkisp1_vb2_ops = { .buf_init = rkisp1_vb2_buf_init, .buf_queue = rkisp1_vb2_buf_queue, .buf_prepare = rkisp1_vb2_buf_prepare, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = rkisp1_vb2_stop_streaming, .start_streaming = rkisp1_vb2_start_streaming, }; diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c index 320581a9f866e919c1bf0cf64d34d20ea08c02d3..b28f4140c8a309a3231d44d825c6461e3ecb2a44 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c @@ -2704,8 +2704,6 @@ static const struct vb2_ops rkisp1_params_vb2_ops = { .queue_setup = rkisp1_params_vb2_queue_setup, .buf_init = rkisp1_params_vb2_buf_init, .buf_cleanup = rkisp1_params_vb2_buf_cleanup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_queue = rkisp1_params_vb2_buf_queue, .buf_prepare = rkisp1_params_vb2_buf_prepare, .stop_streaming = rkisp1_params_vb2_stop_streaming, diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-stats.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-stats.c index a502719e916a92bcf4cbc53bc0895e591e23a894..d5fdb8f82dc78b0143f71d76f36817db389921b7 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-stats.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-stats.c @@ -150,8 +150,6 @@ static const struct vb2_ops rkisp1_stats_vb2_ops = { .queue_setup = rkisp1_stats_vb2_queue_setup, .buf_queue = rkisp1_stats_vb2_buf_queue, .buf_prepare = rkisp1_stats_vb2_buf_prepare, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = rkisp1_stats_vb2_stop_streaming, }; diff --git a/drivers/media/platform/samsung/exynos-gsc/gsc-m2m.c b/drivers/media/platform/samsung/exynos-gsc/gsc-m2m.c index b7854ce5fb8e34f51b70f7392caf2ccb1cf0d7ba..4bda1c369c44c41265a42f2bab6f70ec532881bd 100644 --- a/drivers/media/platform/samsung/exynos-gsc/gsc-m2m.c +++ b/drivers/media/platform/samsung/exynos-gsc/gsc-m2m.c @@ -276,8 +276,6 @@ static const struct vb2_ops gsc_m2m_qops = { .queue_setup = gsc_m2m_queue_setup, .buf_prepare = gsc_m2m_buf_prepare, .buf_queue = gsc_m2m_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = gsc_m2m_stop_streaming, .start_streaming = gsc_m2m_start_streaming, }; diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-capture.c b/drivers/media/platform/samsung/exynos4-is/fimc-capture.c index ffa4ea21387da39136d9dcfdb02a6a7cfe6edebc..c3c2e474a18a725fd196ae29d107bc056d4a0932 100644 --- a/drivers/media/platform/samsung/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/samsung/exynos4-is/fimc-capture.c @@ -455,8 +455,6 @@ static const struct vb2_ops fimc_capture_qops = { .queue_setup = queue_setup, .buf_prepare = buffer_prepare, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = start_streaming, .stop_streaming = stop_streaming, }; diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c b/drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c index 06c4352562b38fb7cce395b31698f3798b06bc77..ad219ac1b95137a703ea709d12139cca6b2e2332 100644 --- a/drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c +++ b/drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c @@ -255,8 +255,6 @@ static const struct vb2_ops isp_video_capture_qops = { .queue_setup = isp_video_capture_queue_setup, .buf_prepare = isp_video_capture_buffer_prepare, .buf_queue = isp_video_capture_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = isp_video_capture_start_streaming, .stop_streaming = isp_video_capture_stop_streaming, }; diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-lite.c b/drivers/media/platform/samsung/exynos4-is/fimc-lite.c index e362719612d2f88c32f284ba97d614eed74009ab..f23e51e3da2fe520683a556b2e912e1e3cedff95 100644 --- a/drivers/media/platform/samsung/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/samsung/exynos4-is/fimc-lite.c @@ -441,8 +441,6 @@ static const struct vb2_ops fimc_lite_qops = { .queue_setup = queue_setup, .buf_prepare = buffer_prepare, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = start_streaming, .stop_streaming = stop_streaming, }; diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-m2m.c b/drivers/media/platform/samsung/exynos4-is/fimc-m2m.c index 199997eec1cc25bbc3872c960e323128fac430d2..951433c8e92a5b75bad59f2e0dbf7d56f6726dee 100644 --- a/drivers/media/platform/samsung/exynos4-is/fimc-m2m.c +++ b/drivers/media/platform/samsung/exynos4-is/fimc-m2m.c @@ -216,8 +216,6 @@ static const struct vb2_ops fimc_qops = { .queue_setup = fimc_queue_setup, .buf_prepare = fimc_buf_prepare, .buf_queue = fimc_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = stop_streaming, .start_streaming = start_streaming, }; diff --git a/drivers/media/platform/samsung/s3c-camif/camif-capture.c b/drivers/media/platform/samsung/s3c-camif/camif-capture.c index be58260ea67e797f44326c7d8140aeb66da1d8b9..bd1149e8abc2d2fb923f5a11368c388f6a23dbd6 100644 --- a/drivers/media/platform/samsung/s3c-camif/camif-capture.c +++ b/drivers/media/platform/samsung/s3c-camif/camif-capture.c @@ -525,8 +525,6 @@ static const struct vb2_ops s3c_camif_qops = { .queue_setup = queue_setup, .buf_prepare = buffer_prepare, .buf_queue = buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = start_streaming, .stop_streaming = stop_streaming, }; diff --git a/drivers/media/platform/samsung/s5p-g2d/g2d.c b/drivers/media/platform/samsung/s5p-g2d/g2d.c index e5e55a41bf3e853d82001074ba285224988c4735..ffed16a34493be2edbdaee13619467417487c1e7 100644 --- a/drivers/media/platform/samsung/s5p-g2d/g2d.c +++ b/drivers/media/platform/samsung/s5p-g2d/g2d.c @@ -133,8 +133,6 @@ static const struct vb2_ops g2d_qops = { .queue_setup = g2d_queue_setup, .buf_prepare = g2d_buf_prepare, .buf_queue = g2d_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c index 30a6144f2c770db9197e053871971eed2d1eb331..71d7a1d853a87e2eff27102927a42bdae757619c 100644 --- a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c @@ -2590,8 +2590,6 @@ static const struct vb2_ops s5p_jpeg_qops = { .queue_setup = s5p_jpeg_queue_setup, .buf_prepare = s5p_jpeg_buf_prepare, .buf_queue = s5p_jpeg_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = s5p_jpeg_start_streaming, .stop_streaming = s5p_jpeg_stop_streaming, }; diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c index 91e102d4ec4e2ad9f432c662561e565de6cdc39e..3efbc336790629425c2a71e9feee8f073db55790 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c @@ -1161,8 +1161,6 @@ static void s5p_mfc_buf_queue(struct vb2_buffer *vb) static const struct vb2_ops s5p_mfc_dec_qops = { .queue_setup = s5p_mfc_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_init = s5p_mfc_buf_init, .start_streaming = s5p_mfc_start_streaming, .stop_streaming = s5p_mfc_stop_streaming, diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c index 81cbb36fb382c0a0644730e7eb87b61884a8ed03..6c603dcd56649fcabe161173c64b9ea8bd055b93 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c @@ -2652,8 +2652,6 @@ static void s5p_mfc_buf_queue(struct vb2_buffer *vb) static const struct vb2_ops s5p_mfc_enc_qops = { .queue_setup = s5p_mfc_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_init = s5p_mfc_buf_init, .buf_prepare = s5p_mfc_buf_prepare, .start_streaming = s5p_mfc_start_streaming, diff --git a/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c index 3b0066cf2eb0899e74a227554129839656bac6f1..73ad66ed20f2e3201e8ceb1d2ff9aff1ad873c92 100644 --- a/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c +++ b/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c @@ -531,8 +531,6 @@ static const struct vb2_ops bdisp_qops = { .queue_setup = bdisp_queue_setup, .buf_prepare = bdisp_buf_prepare, .buf_queue = bdisp_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = bdisp_stop_streaming, .start_streaming = bdisp_start_streaming, }; diff --git a/drivers/media/platform/st/sti/delta/delta-v4l2.c b/drivers/media/platform/st/sti/delta/delta-v4l2.c index fdee7fae3a20133b002932c80372ab92c83c7ae5..196e6a40335d14898ff7abbb38d2de2f5bcf6789 100644 --- a/drivers/media/platform/st/sti/delta/delta-v4l2.c +++ b/drivers/media/platform/st/sti/delta/delta-v4l2.c @@ -1559,8 +1559,6 @@ static const struct vb2_ops delta_vb2_au_ops = { .queue_setup = delta_vb2_au_queue_setup, .buf_prepare = delta_vb2_au_prepare, .buf_queue = delta_vb2_au_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = delta_vb2_au_start_streaming, .stop_streaming = delta_vb2_au_stop_streaming, }; @@ -1570,8 +1568,6 @@ static const struct vb2_ops delta_vb2_frame_ops = { .buf_prepare = delta_vb2_frame_prepare, .buf_finish = delta_vb2_frame_finish, .buf_queue = delta_vb2_frame_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .stop_streaming = delta_vb2_frame_stop_streaming, }; diff --git a/drivers/media/platform/st/sti/hva/hva-v4l2.c b/drivers/media/platform/st/sti/hva/hva-v4l2.c index 31a94300d6457b8da689e26004d906c11588d8c0..5366c0f92549bb090967a1337ce55d0b0f1d76ce 100644 --- a/drivers/media/platform/st/sti/hva/hva-v4l2.c +++ b/drivers/media/platform/st/sti/hva/hva-v4l2.c @@ -1114,8 +1114,6 @@ static const struct vb2_ops hva_qops = { .buf_queue = hva_buf_queue, .start_streaming = hva_start_streaming, .stop_streaming = hva_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* diff --git a/drivers/media/platform/st/stm32/dma2d/dma2d.c b/drivers/media/platform/st/stm32/dma2d/dma2d.c index 643bda7f9f7d10a4a6b282babfb1504f85c3af5c..b6c8400fb92da974d95bd74770bd8196b5be0dc0 100644 --- a/drivers/media/platform/st/stm32/dma2d/dma2d.c +++ b/drivers/media/platform/st/stm32/dma2d/dma2d.c @@ -186,8 +186,6 @@ static const struct vb2_ops dma2d_qops = { .buf_queue = dma2d_buf_queue, .start_streaming = dma2d_start_streaming, .stop_streaming = dma2d_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c index a28db89e4b50f739fb5f5f821ac4176bd856b4f5..9b699ee2b1e0614c22f68da2709b54c85e5024bd 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmi.c +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c @@ -898,8 +898,6 @@ static const struct vb2_ops dcmi_video_qops = { .buf_queue = dcmi_buf_queue, .start_streaming = dcmi_start_streaming, .stop_streaming = dcmi_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int dcmi_g_fmt_vid_cap(struct file *file, void *priv, diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c index 9f768f011fa25a0981cd0d1d3f114b02e58223d4..7edd49bfe7e5b8d6962777291f82e21131f1fae2 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c @@ -625,12 +625,6 @@ static const struct vb2_ops dcmipp_bytecap_qops = { .buf_prepare = dcmipp_bytecap_buf_prepare, .buf_queue = dcmipp_bytecap_buf_queue, .queue_setup = dcmipp_bytecap_queue_setup, - /* - * Since q->lock is set we can use the standard - * vb2_ops_wait_prepare/finish helper functions. - */ - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static void dcmipp_bytecap_release(struct video_device *vdev) diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c index d1371e13011374ef78874f723a424ed8bb42ed79..e911c7f7acc5245b92ce20a9c2f8a16516eeb901 100644 --- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c +++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c @@ -371,8 +371,6 @@ static const struct vb2_ops sun4i_csi_qops = { .buf_queue = sun4i_csi_buffer_queue, .start_streaming = sun4i_csi_start_streaming, .stop_streaming = sun4i_csi_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static irqreturn_t sun4i_csi_irq(int irq, void *data) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c index 14c0dc827c5200d854022680e3867a2604e863ad..76356bc7f10e396253b24a3a73d942d6a045942f 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c @@ -657,8 +657,6 @@ static const struct vb2_ops sun6i_csi_capture_queue_ops = { .buf_queue = sun6i_csi_capture_buffer_queue, .start_streaming = sun6i_csi_capture_start_streaming, .stop_streaming = sun6i_csi_capture_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* V4L2 Device */ diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c index c55b1761b089778b3ace385da331fa81585ec3d6..3e7f2df70408b882f6c9d47b66a8e092f6960927 100644 --- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c +++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c @@ -659,8 +659,6 @@ static const struct vb2_ops deinterlace_qops = { .buf_queue = deinterlace_buf_queue, .start_streaming = deinterlace_start_streaming, .stop_streaming = deinterlace_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int deinterlace_queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c index d60d3496e5b4d6821e1dce42d7f79560a8485179..abd10b218aa1dc552004fe7ebcb815b3d6b8a43d 100644 --- a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c +++ b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c @@ -522,8 +522,6 @@ static const struct vb2_ops rotate_qops = { .buf_queue = rotate_buf_queue, .start_streaming = rotate_start_streaming, .stop_streaming = rotate_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int rotate_queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/media/platform/ti/am437x/am437x-vpfe.c b/drivers/media/platform/ti/am437x/am437x-vpfe.c index edbe0620ecaadf0b53852a6ebc5e983a33a171b9..44cdccb8937752964a0787d192d9b7fc0f5efbf9 100644 --- a/drivers/media/platform/ti/am437x/am437x-vpfe.c +++ b/drivers/media/platform/ti/am437x/am437x-vpfe.c @@ -2079,8 +2079,6 @@ static long vpfe_ioctl_default(struct file *file, void *priv, } static const struct vb2_ops vpfe_video_qops = { - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .queue_setup = vpfe_queue_setup, .buf_prepare = vpfe_buffer_prepare, .buf_queue = vpfe_buffer_queue, diff --git a/drivers/media/platform/ti/cal/cal-video.c b/drivers/media/platform/ti/cal/cal-video.c index e1ba5dfc217e3ac9421cb749cce78c87c9e75a6c..e29743ae61e27ea6d11d3555aaf370d747fbbad9 100644 --- a/drivers/media/platform/ti/cal/cal-video.c +++ b/drivers/media/platform/ti/cal/cal-video.c @@ -808,8 +808,6 @@ static const struct vb2_ops cal_video_qops = { .buf_queue = cal_buffer_queue, .start_streaming = cal_start_streaming, .stop_streaming = cal_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* ------------------------------------------------------------------ diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c index 8357450b3f01a7da387b8fcb46fe6de765f56568..d053972888d1b43161e99a04c4ca5e11664bf5b8 100644 --- a/drivers/media/platform/ti/davinci/vpif_capture.c +++ b/drivers/media/platform/ti/davinci/vpif_capture.c @@ -310,8 +310,6 @@ static const struct vb2_ops video_qops = { .start_streaming = vpif_start_streaming, .stop_streaming = vpif_stop_streaming, .buf_queue = vpif_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /** diff --git a/drivers/media/platform/ti/davinci/vpif_display.c b/drivers/media/platform/ti/davinci/vpif_display.c index bea47e5159de06a9ee537524dee97c7d136e564d..70c89549f4b61d79bb72157e722e1984a4fca68e 100644 --- a/drivers/media/platform/ti/davinci/vpif_display.c +++ b/drivers/media/platform/ti/davinci/vpif_display.c @@ -293,8 +293,6 @@ static void vpif_stop_streaming(struct vb2_queue *vq) static const struct vb2_ops video_qops = { .queue_setup = vpif_buffer_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_prepare = vpif_buffer_prepare, .start_streaming = vpif_start_streaming, .stop_streaming = vpif_stop_streaming, diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c index bd9c9e6ac573af2a564ef1c18feedec0544b64ec..9a4a72331b4f2d578d03b74f16f4c6625608510d 100644 --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c @@ -878,8 +878,6 @@ static const struct vb2_ops csi_vb2_qops = { .buf_queue = ti_csi2rx_buffer_queue, .start_streaming = ti_csi2rx_start_streaming, .stop_streaming = ti_csi2rx_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int ti_csi2rx_init_vb2q(struct ti_csi2rx_dev *csi) diff --git a/drivers/media/platform/ti/omap/omap_vout.c b/drivers/media/platform/ti/omap/omap_vout.c index 85dca219042895b686a8c3b9f770f84186dbe478..a87d5030ac35ced841efa1d4e940b26594a8a275 100644 --- a/drivers/media/platform/ti/omap/omap_vout.c +++ b/drivers/media/platform/ti/omap/omap_vout.c @@ -1300,8 +1300,6 @@ static const struct vb2_ops omap_vout_vb2_ops = { .buf_prepare = omap_vout_vb2_prepare, .start_streaming = omap_vout_vb2_start_streaming, .stop_streaming = omap_vout_vb2_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* Init functions used during driver initialization */ diff --git a/drivers/media/platform/ti/vpe/vpe.c b/drivers/media/platform/ti/vpe/vpe.c index bd2e97afd776121e5d0813fc722b136eb902f5ec..636d76ecebcd7e6f4e98d6fe4873bf98b0f0239e 100644 --- a/drivers/media/platform/ti/vpe/vpe.c +++ b/drivers/media/platform/ti/vpe/vpe.c @@ -2210,8 +2210,6 @@ static const struct vb2_ops vpe_qops = { .queue_setup = vpe_queue_setup, .buf_prepare = vpe_buf_prepare, .buf_queue = vpe_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = vpe_start_streaming, .stop_streaming = vpe_stop_streaming, }; diff --git a/drivers/media/platform/verisilicon/hantro_v4l2.c b/drivers/media/platform/verisilicon/hantro_v4l2.c index 32f69c6c703bf4af680c92557f0a5f6d9f4c715f..2513adfbd82595632d5e797a71501153d557c5d1 100644 --- a/drivers/media/platform/verisilicon/hantro_v4l2.c +++ b/drivers/media/platform/verisilicon/hantro_v4l2.c @@ -1004,6 +1004,4 @@ const struct vb2_ops hantro_queue_ops = { .buf_request_complete = hantro_buf_request_complete, .start_streaming = hantro_start_streaming, .stop_streaming = hantro_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; diff --git a/drivers/media/platform/via/via-camera.c b/drivers/media/platform/via/via-camera.c index 195e9bf1eedf69c0d27b3a0471a8354599e07853..5702eff664d4ef652b22aaeaaacbbd0e16a2e137 100644 --- a/drivers/media/platform/via/via-camera.c +++ b/drivers/media/platform/via/via-camera.c @@ -666,8 +666,6 @@ static const struct vb2_ops viacam_vb2_ops = { .buf_prepare = viacam_vb2_prepare, .start_streaming = viacam_vb2_start_streaming, .stop_streaming = viacam_vb2_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* --------------------------------------------------------------------------*/ diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c index a1687b868a445228e33373fa7b268dd44ecebab7..18bfa6001909dfa6efc23b3ca432a39a1b316afc 100644 --- a/drivers/media/platform/xilinx/xilinx-dma.c +++ b/drivers/media/platform/xilinx/xilinx-dma.c @@ -458,8 +458,6 @@ static const struct vb2_ops xvip_dma_queue_qops = { .queue_setup = xvip_dma_queue_setup, .buf_prepare = xvip_dma_buffer_prepare, .buf_queue = xvip_dma_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = xvip_dma_start_streaming, .stop_streaming = xvip_dma_stop_streaming, }; From patchwork Mon Oct 14 15:06:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835190 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 769BA45C1C for ; Mon, 14 Oct 2024 15:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918560; cv=none; b=f/EQlqF1lmKS0jhyrwgJEBSeS4O6xZW+7TJAzdFBHSid7IduylmxC4ygWQtPfSrbUqwEqL+Ta8CDBji8LWFzixmoikCx867Z1Kg5Az06YY4RudFOGJDWI+P0t+MT957M7496PlZ+u9S/lh8PB9r7WPYFmIwGK0q52puJ8oyJW+Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918560; c=relaxed/simple; bh=0Bx+iji4cqg3XpXI87sy4I7u6g5Qnu7YUlzAGkSkOwA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uSYiYa60cqz9qlY9TA3rxiQFYS6wHiP8jR6rS5IbeMPn+iBluVAobUulF0dicalUx/lmigMQ2KS27VqP/IqbKQMUREssQjeGZOvoUdW1MHUGPIDNwgnvl8paNNn4wwgmSSejmeN0SBqHCQHHpT0DlDflnsqYW0dRw1KQ2BpUJVA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BF4FC4CEC7; Mon, 14 Oct 2024 15:09:02 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:35 +0200 Subject: [PATCH 08/10] media: common: saa7146: drop vb2_ops_wait_prepare/finish Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-8-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Since the vb2_ops_wait_prepare/finish callbacks already rely on that field, we can safely drop these callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Signed-off-by: Hans Verkuil --- drivers/media/common/saa7146/saa7146_vbi.c | 2 -- drivers/media/common/saa7146/saa7146_video.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/media/common/saa7146/saa7146_vbi.c b/drivers/media/common/saa7146/saa7146_vbi.c index bb7d81f7eba624d5baf25b218f9171eb6ae7a5ef..a1854b3dd004b90c3f449df085c28b336bc3abbb 100644 --- a/drivers/media/common/saa7146/saa7146_vbi.c +++ b/drivers/media/common/saa7146/saa7146_vbi.c @@ -407,8 +407,6 @@ const struct vb2_ops vbi_qops = { .buf_cleanup = buf_cleanup, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* ------------------------------------------------------------------ */ diff --git a/drivers/media/common/saa7146/saa7146_video.c b/drivers/media/common/saa7146/saa7146_video.c index 040489e15ea0c32c2646f8c77db83e3ebae10ae5..94e1cd4eaedbf1ed84f30975d0f2505117feac47 100644 --- a/drivers/media/common/saa7146/saa7146_video.c +++ b/drivers/media/common/saa7146/saa7146_video.c @@ -681,8 +681,6 @@ const struct vb2_ops video_qops = { .buf_cleanup = buf_cleanup, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /********************************************************************************/ From patchwork Mon Oct 14 15:06:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835191 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 467651AAE27 for ; Mon, 14 Oct 2024 15:09:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918578; cv=none; b=mblNyDfY0ygnRnzevxonYNQHuXWeNutNY4k2hTcdCBcRFBJsrrurqr2Rua404ejKlBs2jChC65hG+C8IbT8n79DN+9XAhsdUIj6nMCNTOXA8K6cLdiZkAFmWyDNUSJmS7beoiBkCKLwyuNq96h6M9kRRucL28nfBWDcAInoR4yM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918578; c=relaxed/simple; bh=zpbwigixApS+GWpV4p2ifg4BigntloHSRwRz67mkRuk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Yr2W12nRDKB7MRwzJYpl+PWRGYJrNYLV/2r3hDV8pLcw1F5oGIIJSI1u83vRqtgR6au6g6V5ezllmk0/c1XpC1O5ILHkteBK3pF5LRVPbMtPbflpkMp+ct0LtUGeglvFLHsq5+/ODWDIQTC+4EtIxQSSG+l3KmxVSn3RKIHMfiY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3772C4CEC3; Mon, 14 Oct 2024 15:09:20 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:36 +0200 Subject: [PATCH 09/10] staging: media: drop vb2_ops_wait_prepare/finish Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-9-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Since the vb2_ops_wait_prepare/finish callbacks already rely on that field, we can safely drop these callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Signed-off-by: Hans Verkuil Reviewed-by: Neil Armstrong # for meson/vdec Tested-by: Luca Ceresoli # drivers/staging/media/tegra-video/vi.c --- drivers/staging/media/atomisp/pci/atomisp_fops.c | 2 -- drivers/staging/media/deprecated/atmel/atmel-isc-base.c | 2 -- drivers/staging/media/imx/imx-media-capture.c | 2 -- drivers/staging/media/imx/imx-media-csc-scaler.c | 2 -- drivers/staging/media/ipu3/ipu3-v4l2.c | 2 -- drivers/staging/media/meson/vdec/vdec.c | 2 -- drivers/staging/media/rkvdec/rkvdec.c | 2 -- drivers/staging/media/starfive/camss/stf-video.c | 2 -- drivers/staging/media/sunxi/cedrus/cedrus_video.c | 2 -- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c | 2 -- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c | 2 -- drivers/staging/media/tegra-video/vi.c | 2 -- 12 files changed, 24 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c index b180fcbea9b1e6909cf3b6c2cf165684c6cf8667..50c4123ba006648db38c1e310bed4697d49615e0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c @@ -441,8 +441,6 @@ const struct vb2_ops atomisp_vb2_ops = { .buf_queue = atomisp_buf_queue, .start_streaming = atomisp_start_streaming, .stop_streaming = atomisp_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static void atomisp_dev_init_struct(struct atomisp_device *isp) diff --git a/drivers/staging/media/deprecated/atmel/atmel-isc-base.c b/drivers/staging/media/deprecated/atmel/atmel-isc-base.c index 305b103153d7edbf0cdae70fcbb0b6c14432a975..fb9ee8547392b4ee768b39ce08f52488323bb6f9 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-isc-base.c +++ b/drivers/staging/media/deprecated/atmel/atmel-isc-base.c @@ -477,8 +477,6 @@ static struct isc_format *find_format_by_fourcc(struct isc_device *isc, static const struct vb2_ops isc_vb2_ops = { .queue_setup = isc_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_prepare = isc_buffer_prepare, .start_streaming = isc_start_streaming, .stop_streaming = isc_stop_streaming, diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c index efa7623b5cee1bbfa77654ad2604758d929a2045..e9cef7af000a91674aa2cfe750a399cae40ff9d6 100644 --- a/drivers/staging/media/imx/imx-media-capture.c +++ b/drivers/staging/media/imx/imx-media-capture.c @@ -768,8 +768,6 @@ static const struct vb2_ops capture_qops = { .buf_init = capture_buf_init, .buf_prepare = capture_buf_prepare, .buf_queue = capture_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = capture_start_streaming, .stop_streaming = capture_stop_streaming, }; diff --git a/drivers/staging/media/imx/imx-media-csc-scaler.c b/drivers/staging/media/imx/imx-media-csc-scaler.c index 95cca281e8a378c6244bd25d5b81c392712361aa..e5e08c6f79f222a86fbe528d84d5e9644fbbb63a 100644 --- a/drivers/staging/media/imx/imx-media-csc-scaler.c +++ b/drivers/staging/media/imx/imx-media-csc-scaler.c @@ -572,8 +572,6 @@ static const struct vb2_ops ipu_csc_scaler_qops = { .queue_setup = ipu_csc_scaler_queue_setup, .buf_prepare = ipu_csc_scaler_buf_prepare, .buf_queue = ipu_csc_scaler_buf_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = ipu_csc_scaler_start_streaming, .stop_streaming = ipu_csc_scaler_stop_streaming, }; diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index e7aee7e3db5bbdb8c0cb555e5d2a5c2e4ae0c161..ad6095bf717db6d3fc1cd19112884248a6b04fce 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -937,8 +937,6 @@ static const struct vb2_ops imgu_vb2_ops = { .queue_setup = imgu_vb2_queue_setup, .start_streaming = imgu_vb2_start_streaming, .stop_streaming = imgu_vb2_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /****************** v4l2_file_operations *****************/ diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c index 5e5b296f93bab4faf01f1e4238057e072e540680..52185090129ba5a5c5f3d7747f7d00268375aa33 100644 --- a/drivers/staging/media/meson/vdec/vdec.c +++ b/drivers/staging/media/meson/vdec/vdec.c @@ -450,8 +450,6 @@ static const struct vb2_ops vdec_vb2_ops = { .stop_streaming = vdec_stop_streaming, .buf_queue = vdec_vb2_buf_queue, .buf_prepare = vdec_vb2_buf_prepare, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index ac398b5a97360446672a8a5c40ea05bcf222f557..f468af64bbef1c7e9019352508f95f5e2d2a083a 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -617,8 +617,6 @@ static const struct vb2_ops rkvdec_queue_ops = { .buf_request_complete = rkvdec_buf_request_complete, .start_streaming = rkvdec_start_streaming, .stop_streaming = rkvdec_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; static int rkvdec_request_validate(struct media_request *req) diff --git a/drivers/staging/media/starfive/camss/stf-video.c b/drivers/staging/media/starfive/camss/stf-video.c index 989b5e82bae98fdbcec7b2b28f4a93bc7a8334f3..a0420eb6a0aa034fb0b1468951d84c8fe7bb1b56 100644 --- a/drivers/staging/media/starfive/camss/stf-video.c +++ b/drivers/staging/media/starfive/camss/stf-video.c @@ -321,8 +321,6 @@ static void video_stop_streaming(struct vb2_queue *q) static const struct vb2_ops stf_video_vb2_q_ops = { .queue_setup = video_queue_setup, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .buf_init = video_buf_init, .buf_prepare = video_buf_prepare, .buf_queue = video_buf_queue, diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_video.c b/drivers/staging/media/sunxi/cedrus/cedrus_video.c index b00feaf4072c995b4e54ffa6c67bffe039be1f49..77f78266f406288cfd5aa666dd5e3409b5a770cf 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c @@ -570,8 +570,6 @@ static const struct vb2_ops cedrus_qops = { .buf_request_complete = cedrus_buf_request_complete, .start_streaming = cedrus_start_streaming, .stop_streaming = cedrus_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; int cedrus_queue_init(void *priv, struct vb2_queue *src_vq, diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c index 0eea4c2c3627188cbe0de74839e37835fdfdbc35..24899f41dc1c12dbbe43b01d176b4ec9ce287f06 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c @@ -368,8 +368,6 @@ static const struct vb2_ops sun6i_isp_capture_queue_ops = { .buf_queue = sun6i_isp_capture_buffer_queue, .start_streaming = sun6i_isp_capture_start_streaming, .stop_streaming = sun6i_isp_capture_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* Video Device */ diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c index 53d05e8a364bb7ed060a957034ef28ef91209fd1..3d95ed0b023e314ae189d20747868b962278b14e 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c @@ -379,8 +379,6 @@ static const struct vb2_ops sun6i_isp_params_queue_ops = { .buf_queue = sun6i_isp_params_buffer_queue, .start_streaming = sun6i_isp_params_start_streaming, .stop_streaming = sun6i_isp_params_stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /* Video Device */ diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c index 57a856a21e9013e5b179e45e42a4512ff466de0a..ad481b35e618a0b0e85af7276d84342440b82e64 100644 --- a/drivers/staging/media/tegra-video/vi.c +++ b/drivers/staging/media/tegra-video/vi.c @@ -287,8 +287,6 @@ static const struct vb2_ops tegra_channel_queue_qops = { .queue_setup = tegra_channel_queue_setup, .buf_prepare = tegra_channel_buffer_prepare, .buf_queue = tegra_channel_buffer_queue, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, .start_streaming = tegra_channel_start_streaming, .stop_streaming = tegra_channel_stop_streaming, }; From patchwork Mon Oct 14 15:06:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13835192 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8FB41AB517 for ; Mon, 14 Oct 2024 15:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918595; cv=none; b=RWT165RvRxPXTZHh6PfhPA8pjP6nm/bGS8CLq6h9h6NbebufyUJYWyZIobN/euonzG9QtZ4DkkpVVCm+4vSNFy6K4jg9gbFPZnJc3bTEmBJWqCEZh+xDtg1cjcOmxMsj+cyrD4q5Y+zUNO18amrPErdmTFsNeIijsAUcJxSW3qg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918595; c=relaxed/simple; bh=Ks6W5ASUPMHdPFUBbRIWImVnsjjsYRs5Wq9vB5UQezI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qGsZlaSNKj9hpL0CAuWRc+leDBGswgVSsofIGr56oGQHvyDQRJ+V+4snc1Eg8HA+P57x7Z2rOh8+bXrppEf+R1TKvBK883urTsk9DWoMsBjv6zAB2vr/fRKK52htF4V+PMJQ1A4ygZZM2+cxebdWPP1vbCeOLQ95RxMq/z2aAeo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45270C4CED0; Mon, 14 Oct 2024 15:09:38 +0000 (UTC) From: Hans Verkuil Date: Mon, 14 Oct 2024 17:06:37 +0200 Subject: [PATCH 10/10] media: samples: v4l2-pci-skeleton.c: drop vb2_ops_wait_prepare/finish Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-vb2-wait-v1-10-8c3ee25c618c@xs4all.nl> References: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> In-Reply-To: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> To: Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Shuah Khan , Kieran Bingham , Daniel Almeida , Andy Walls , Yong Zhi , Sakari Ailus , Bingbu Cao , Dan Scally , Tianshu Qiu , Martin Tuma , Bluecherry Maintainers , Andrey Utkin , Ismael Luceno , Ezequiel Garcia , Corentin Labbe , Michael Krufky , Laurent Pinchart , Matt Ranostay , Michael Tretter , Pengutronix Kernel Team , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ming Qian , Zhou Peng , Eddie James , Joel Stanley , Andrew Jeffery , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Raspberry Pi Kernel Maintenance , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Philipp Zabel , Nas Chung , Jackson Lee , Devarsh Thakkar , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Joseph Liu , Marvin Lin , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Xavier Roumegue , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Robert Foss , Todor Tomov , Bryan O'Donoghue , Stanimir Varbanov , Vikash Garodia , Jacopo Mondi , =?utf-8?q?Niklas_S=C3=B6derl?= =?utf-8?q?und?= , Fabrizio Castro , Kieran Bingham , Mikhail Ulyanov , Jacob Chen , Heiko Stuebner , Dafna Hirschfeld , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmac?= =?utf-8?q?h?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Alain Volmat , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Yong Deng , Paul Kocialkowski , Benoit Parrot , Jai Luthra , Michal Simek , Andy Shevchenko , Hans de Goede , Greg Kroah-Hartman , Steve Longerbeam , Jack Zhu , Changhuang Liang , Sowjanya Komatineni , Luca Ceresoli Cc: linux-media@vger.kernel.org, Hans Verkuil X-Mailer: b4 0.14.2 Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL") it is no longer needed to set the wait_prepare/finish vb2_ops callbacks as long as the lock field in vb2_queue is set. Since the vb2_ops_wait_prepare/finish callbacks already rely on that field, we can safely drop these callbacks. This simplifies the code and this is a step towards the goal of deleting these callbacks. Signed-off-by: Hans Verkuil --- samples/v4l/v4l2-pci-skeleton.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/samples/v4l/v4l2-pci-skeleton.c b/samples/v4l/v4l2-pci-skeleton.c index 4fc2063b9f595ff3b4579bab7692790a53f689c3..d709d82800cdb80ddb9b41d0009c1c93ef0955e3 100644 --- a/samples/v4l/v4l2-pci-skeleton.c +++ b/samples/v4l/v4l2-pci-skeleton.c @@ -269,9 +269,7 @@ static void stop_streaming(struct vb2_queue *vq) } /* - * The vb2 queue ops. Note that since q->lock is set we can use the standard - * vb2_ops_wait_prepare/finish helper functions. If q->lock would be NULL, - * then this driver would have to provide these ops. + * The vb2 queue ops. */ static const struct vb2_ops skel_qops = { .queue_setup = queue_setup, @@ -279,8 +277,6 @@ static const struct vb2_ops skel_qops = { .buf_queue = buffer_queue, .start_streaming = start_streaming, .stop_streaming = stop_streaming, - .wait_prepare = vb2_ops_wait_prepare, - .wait_finish = vb2_ops_wait_finish, }; /*