From patchwork Mon Oct 14 15:06:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 835315 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 A7EC81BDC3 for ; Mon, 14 Oct 2024 15:06:59 +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=1728918419; cv=none; b=a2I3vs3+/FylUVTnqL+yuE+tBgS+X0G6bC6mQu4qeevrQGEwBQ74UjEpIkkSC1fevOVfmn8lVsItAUjPReJZlwbCw51jPWqVqaOI7zL4Bfs4GqH0J07rvf0fi2tuQnkkcq72JnrqAh+6IierNHitYGejiBBkfMDS01cozWtYcL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918419; c=relaxed/simple; bh=287D1h3A4y5wl5ryi33huXOhd31/ZFejhPocIxSiy7I=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=Ohsoi7CglElhEQRLknL8O/FlLSX1mIn5qFB4Ez/ugvb5TsAeDH5xPA/Trco9U2Xd1AMJy8CM11N3RDAryBkKAbSIIu9dS+MJV6kb3q5iFf7/Say0LMju6ha3tGlxS/lAEer5I2oOB5FRnrvBtcDYO8fYKKJwI5oF3UwZaG3Zo9g= 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 BDBA9C4CEC3; Mon, 14 Oct 2024 15:06:41 +0000 (UTC) From: Hans Verkuil Subject: [PATCH 00/10] media: start work to remove wait_prepare/finish callbacks Date: Mon, 14 Oct 2024 17:06:27 +0200 Message-Id: <20241014-vb2-wait-v1-0-8c3ee25c618c@xs4all.nl> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAHMzDWcC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxNDA0MT3bIkI93yxMwSXRMT00ST1MQUg2STNCWg8oKi1LTMCrBR0bG1tQD pE/QlWgAAAA== X-Change-ID: 20241014-vb2-wait-445a4ead0c4f 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 This patch series makes one change to videobuf2-core.c in vb2_thread() where wait_prepare/finish was also called. That was missed in the previous commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish are NULL"), but that is needed before we can start removing the vb2_ops_wait_prepare/finish callbacks from drivers. The next 9 patches drop the vb2_ops_wait_prepare/finish callbacks from the various drivers in the media subsystem. After this there are some V4L2 drivers in other subsystems (gadget, input, staging) that need this change as well, but I'll start on that when this series is merged. There are also a few drivers that set the wait_prepare/finish callbacks to their own implementation. Those need work as well. Since this series touches on almost all V4L2 drivers, it is sent to a lot of people. Regards, Hans Signed-off-by: Hans Verkuil Reviewed-by: Neil Armstrong # for meson-ge2d Tested-by: Luca Ceresoli # drivers/staging/media/tegra-video/vi.c Reviewed-by: Mauro Carvalho Chehab Reviewed-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus Acked-by: Sakari Ailus Acked-by: Andrzej Pietrasiewicz --- Hans Verkuil (10): media: videobuf2-core: update vb2_thread if wait_finish/prepare are NULL media: test-drivers: drop vb2_ops_wait_prepare/finish media: pci: drop vb2_ops_wait_prepare/finish media: usb: drop vb2_ops_wait_prepare/finish media: video-i2c: drop vb2_ops_wait_prepare/finish media: rtl2832_sdr: drop vb2_ops_wait_prepare/finish media: platform: drop vb2_ops_wait_prepare/finish media: common: saa7146: drop vb2_ops_wait_prepare/finish staging: media: drop vb2_ops_wait_prepare/finish media: samples: v4l2-pci-skeleton.c: drop vb2_ops_wait_prepare/finish drivers/media/common/saa7146/saa7146_vbi.c | 2 -- drivers/media/common/saa7146/saa7146_video.c | 2 -- drivers/media/common/videobuf2/videobuf2-core.c | 12 ++++++++---- drivers/media/dvb-frontends/rtl2832_sdr.c | 2 -- drivers/media/i2c/video-i2c.c | 2 -- 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 -- 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 -- .../mediatek/vcodec/decoder/mtk_vcodec_dec_stateful.c | 2 -- .../mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c | 2 -- .../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 -- .../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 -- 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 -- 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 ---- 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 -- samples/v4l/v4l2-pci-skeleton.c | 6 +----- 153 files changed, 9 insertions(+), 327 deletions(-) --- base-commit: bcd4f091cf1ea7184d813afc115af82ac9326b25 change-id: 20241014-vb2-wait-445a4ead0c4f Best regards,