From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7768CCD199 for ; Mon, 20 Oct 2025 11:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PBcpzWj5GQ2X6lFcxiV6LdHv+VKFAlAZsEZ3GXlNMFM=; b=YGQ9Zd9PCA0X7W sNf/na5o0x1+PCFsqVLG6x9PDddTqQsribmO7W/8l5j+avt/lhnlbMeeQW2f3+nd8IU9jc+IjrQjS JcSzG7oJtpUn6aEAttonVIS6EggaFzS6AszsSNXsYXc+8Eg7hzhxsUaqoBXc6ipigSt6+gJeGp+/X isErbmr78KKRRbkrbhopUqEFt4IqhAHC+JnnUuq6q33PoLbl8WJKm4NcVo8oY7fofDM8HNmG2on1z gtfAwzfUnjhUOE/sMKCgmIOFiMsOtFS+kA+YAADhigghM/2drrANKInehJrqNFs9trhpqioNt71Bn QU9nOIux4HT81MWgZq7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vAoXC-0000000DBDs-3uPe; Mon, 20 Oct 2025 11:58:43 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ui8bb-00000007Rik-3W5O; Sat, 02 Aug 2025 09:32:45 +0000 Received: from [192.168.0.172] (mob-5-90-138-121.net.vodafone.it [5.90.138.121]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C5A563FAA; Sat, 2 Aug 2025 11:31:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1754127117; bh=0Wm4/RCQ2ghH3Q7cxBC1m0z/ZhL6jcKl5NKq/nEvhYI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LPbIFhtb7RUjGqKbpUtFGva4zIdr6qXUvUvDFh/PFG+cYiSj+FgviD2jOqNT74Pz5 +EpAhg551TGs5l1tFvNkXNdZXegg1X7xQE+psD2h5F2thd2vcKqYdCg481ysT9zIWB BA5sOSjJJ7OZAwyrUS5Xp7/3wwfNh0NkvQpY8PnE= From: Jacopo Mondi Date: Sat, 02 Aug 2025 11:23:15 +0200 Subject: [PATCH 53/65] media: stm32: dma2d: Access v4l2_fh from file MIME-Version: 1.0 Message-Id: <20250802-media-private-data-v1-53-eb140ddd6a9d@ideasonboard.com> References: <20250802-media-private-data-v1-0-eb140ddd6a9d@ideasonboard.com> In-Reply-To: <20250802-media-private-data-v1-0-eb140ddd6a9d@ideasonboard.com> To: Mauro Carvalho Chehab , Devarsh Thakkar , Benoit Parrot , Hans Verkuil , Mike Isely , Laurent Pinchart , Hans de Goede , Parthiban Veerasooran , Christian Gromm , Greg Kroah-Hartman , Alex Shi , Yanteng Si , Dongliang Mu , Jonathan Corbet , Tomasz Figa , Marek Szyprowski , Andy Walls , Michael Tretter , Pengutronix Kernel Team , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Kieran Bingham , Michal Simek , Ming Qian , Zhou Peng , Xavier Roumegue , Philipp Zabel , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Sylwester Nawrocki , Jernej Skrabec , Chen-Yu Tsai , Samuel Holland , Daniel Almeida , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Nas Chung , Jackson Lee , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Geert Uytterhoeven , Magnus Damm , Mikhail Ulyanov , Jacob Chen , Ezequiel Garcia , Heiko Stuebner , Detlev Casanova , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?utf-8?q?=C5=81ukasz_Stelmach?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Nicolas Dufresne , Benjamin Gaignard , Steve Longerbeam , Maxime Ripard , Paul Kocialkowski , =?utf-8?q?Niklas_S=C3=B6derlund?= , Robert Foss , Todor Tomov , Vladimir Zapolskiy , Corentin Labbe , Sakari Ailus , Bingbu Cao , Tianshu Qiu , Stanislaw Gruszka Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, imx@lists.linux.dev, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-usb@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, mjpeg-users@lists.sourceforge.net, Jacopo Mondi X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1764; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=0Wm4/RCQ2ghH3Q7cxBC1m0z/ZhL6jcKl5NKq/nEvhYI=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBojdj+iTlXHGapdCZ3Rdg3aaSFzezt7QmFvOAXT 3xC8gkCbA6JAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaI3Y/gAKCRByNAaPFqFW PKWrD/9Z2LlP8zp6jDlvAZhHO91/5WhfrQjAV4XA1pd7+h7Yt+lXpe+UXlwVv4eI9ip1UQbDJt5 KAhujyIApfJIsY7phLC1CYJ0wW6deOdDiZkKNLrPF4k8Oapv/g1zuMEZ1AUnk00IBEq2PvKu28u j3SSvyUfNmrS32OE4pFBpFkybWnElDESOcP0kI7c6ANVdXCeSSXxIU4jtkLGdKB33hu1IHtvBw4 lwvcUPkn/LMHTG2E8l4EdRTbrhYSpvmc0xoCg/oWaig36e7FP+u8cRfnFTXxvH0qgINZljl074p 3iplZeoKfdca8vbTg5MQ2EZvROg46v1T66Mf1Q6sJV14mLZ8hhI45bNg1xO9Z54ctxRvkIcPNKz 2FxEHGI8LsbEEun4RkALrJOGxqWPRQjH+ds9huudfym5ODBGUhLV2Y097pOcGTBM/Ys9+KJ3VFK H4sb+sd3Tn/jZdb25RXLxU3aJkiilRlE2fnMmW99QNbfPYUBYeFbdjZJ2Y0pofrUb5fYxxx7mQL HgaFOBdCSMtDlRFU15h4P6W8mJxSaRJ4YlEwxqrOedi1y5jMhjcEoWGsdrDivID8czR0jJ/JrDS d3idISE1xsuy9Bbwt53l266mU0QsZoo2f92kbFj1xZTXj4RnmyUnNFU28rEs0c/0tzjjBjHRftc YT3FGRxMpHovWtg== X-Developer-Key: i=jacopo.mondi@ideasonboard.com; a=openpgp; fpr=72392EDC88144A65C701EA9BA5826A2587AD026B X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250802_023244_022247_F9E4B64A X-CRM114-Status: GOOD ( 11.99 ) X-Mailman-Approved-At: Mon, 20 Oct 2025 04:56:57 -0700 X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The v4l2_fh associated with an open file handle is now guaranteed to be available in file->private_data, initialised by v4l2_fh_add(). Access the v4l2_fh, and from there the driver-specific structure, from the file * in all ioctl handlers. Signed-off-by: Jacopo Mondi --- drivers/media/platform/st/stm32/dma2d/dma2d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/st/stm32/dma2d/dma2d.c b/drivers/media/platform/st/stm32/dma2d/dma2d.c index bc0f81e78018b20c38677eaea44358ddad7a9a52..a22f587a5f83fe114e5b1f0a7a0299638701fa71 100644 --- a/drivers/media/platform/st/stm32/dma2d/dma2d.c +++ b/drivers/media/platform/st/stm32/dma2d/dma2d.c @@ -354,7 +354,7 @@ static int vidioc_enum_fmt(struct file *file, void *prv, struct v4l2_fmtdesc *f) static int vidioc_g_fmt(struct file *file, void *prv, struct v4l2_format *f) { - struct dma2d_ctx *ctx = prv; + struct dma2d_ctx *ctx = file2ctx(file); struct vb2_queue *vq; struct dma2d_frame *frm; @@ -379,7 +379,7 @@ static int vidioc_g_fmt(struct file *file, void *prv, struct v4l2_format *f) static int vidioc_try_fmt(struct file *file, void *prv, struct v4l2_format *f) { - struct dma2d_ctx *ctx = prv; + struct dma2d_ctx *ctx = file2ctx(file); struct dma2d_fmt *fmt; enum v4l2_field *field; u32 fourcc = f->fmt.pix.pixelformat; @@ -422,7 +422,7 @@ static int vidioc_try_fmt(struct file *file, void *prv, struct v4l2_format *f) static int vidioc_s_fmt(struct file *file, void *prv, struct v4l2_format *f) { - struct dma2d_ctx *ctx = prv; + struct dma2d_ctx *ctx = file2ctx(file); struct vb2_queue *vq; struct dma2d_frame *frm; struct dma2d_fmt *fmt; -- 2.49.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip