From patchwork Thu Dec 26 02:27:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13920940 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 9F43BE7718B for ; Thu, 26 Dec 2024 02:36:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8oqYD/B3UMlO69nH16a4qOpq5t9+uPPTLogH0zzGwks=; b=J3R2V/b2AUwX2ojwsbV5PqIiI1 78rsqJef8lqbsW17ayEeOncMco88ML5odbQ0O0TFbW9YuvoAZ9rlelqmr9Kdj6rTlGpHFeAAHiISj YhpHoqeKyNphx+gPcjHmJ92S7VzapBObN6VSt0TrN0a1MzutkBLmyzt2QLbwXwVnYW6ck6TBWTQGT 3LBA4w6NcRoewkfcJpeDEmpAvsD+g4DTVtf+d+z/1XIbWubaZiVVGjxICWk/THKLohIwXtacn2Xua +n2Q/dp6AQtTq7Yt/g4aCYPgAvKW9N2P5jkAJ9Rib/GW8zqMGFgwtgSx2bMZSt+Nx91eK4vHIdYSn PWN1q69Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tQdju-0000000Ez6Y-04ag; Thu, 26 Dec 2024 02:36:42 +0000 Received: from mx.treblig.org ([2a00:1098:5b::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tQdbn-0000000ExzH-39BT for linux-arm-kernel@lists.infradead.org; Thu, 26 Dec 2024 02:28:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=8oqYD/B3UMlO69nH16a4qOpq5t9+uPPTLogH0zzGwks=; b=Eevo40RWUifZuus8 s48V+jvzoplAN44z3+2xITvRxcWrZODQotuSNCN8wjQZybqro18vPFkZgTbEAYY235W6LwC57qM0D dpOdCBNN7PDJKRu9/yia/r984fVZljCpIJLXNEbIa71EQfRv66ll2UPeFeYN6r0XcLzuJBuEFjcAA Orxi5NXo7PFbANyaAqxZDDIkL70ou2H+gmTU/LBgBb6NSDiUE61Mf4r4ZqSijCM3VZLWZAHJngA5B 8p/Lx6Sm+y23DjoDBG5Lqwcc08wY5/4H6y/CDracxO4tbiTPnV4PXOIv2htKKk8EMyo0q2EH1hoj3 XQQRX5RXR+LOz2Lmog==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tQdbO-007F0L-17; Thu, 26 Dec 2024 02:27:54 +0000 From: linux@treblig.org To: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, deller@gmx.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 1/7] gpu: ipu-v3: ipu-ic: Remove unused ipu_ic_task_graphics_init Date: Thu, 26 Dec 2024 02:27:46 +0000 Message-ID: <20241226022752.219399-2-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241226022752.219399-1-linux@treblig.org> References: <20241226022752.219399-1-linux@treblig.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241225_182819_832131_A4B332B8 X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Dr. David Alan Gilbert" ipu_ic_task_graphics_init() was added in 2014 by commit 1aa8ea0d2bd5 ("gpu: ipu-v3: Add Image Converter unit") but has been unused. Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/ipu-v3/ipu-ic.c | 73 ------------------------------------- include/video/imx-ipu-v3.h | 4 -- 2 files changed, 77 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-ic.c b/drivers/gpu/ipu-v3/ipu-ic.c index 846461bac70d..acd76ecc5221 100644 --- a/drivers/gpu/ipu-v3/ipu-ic.c +++ b/drivers/gpu/ipu-v3/ipu-ic.c @@ -321,79 +321,6 @@ void ipu_ic_task_disable(struct ipu_ic *ic) } EXPORT_SYMBOL_GPL(ipu_ic_task_disable); -int ipu_ic_task_graphics_init(struct ipu_ic *ic, - const struct ipu_ic_colorspace *g_in_cs, - bool galpha_en, u32 galpha, - bool colorkey_en, u32 colorkey) -{ - struct ipu_ic_priv *priv = ic->priv; - struct ipu_ic_csc csc2; - unsigned long flags; - u32 reg, ic_conf; - int ret = 0; - - if (ic->task == IC_TASK_ENCODER) - return -EINVAL; - - spin_lock_irqsave(&priv->lock, flags); - - ic_conf = ipu_ic_read(ic, IC_CONF); - - if (!(ic_conf & ic->bit->ic_conf_csc1_en)) { - struct ipu_ic_csc csc1; - - ret = ipu_ic_calc_csc(&csc1, - V4L2_YCBCR_ENC_601, - V4L2_QUANTIZATION_FULL_RANGE, - IPUV3_COLORSPACE_RGB, - V4L2_YCBCR_ENC_601, - V4L2_QUANTIZATION_FULL_RANGE, - IPUV3_COLORSPACE_RGB); - if (ret) - goto unlock; - - /* need transparent CSC1 conversion */ - ret = init_csc(ic, &csc1, 0); - if (ret) - goto unlock; - } - - ic->g_in_cs = *g_in_cs; - csc2.in_cs = ic->g_in_cs; - csc2.out_cs = ic->out_cs; - - ret = __ipu_ic_calc_csc(&csc2); - if (ret) - goto unlock; - - ret = init_csc(ic, &csc2, 1); - if (ret) - goto unlock; - - if (galpha_en) { - ic_conf |= IC_CONF_IC_GLB_LOC_A; - reg = ipu_ic_read(ic, IC_CMBP_1); - reg &= ~(0xff << ic->bit->ic_cmb_galpha_bit); - reg |= (galpha << ic->bit->ic_cmb_galpha_bit); - ipu_ic_write(ic, reg, IC_CMBP_1); - } else - ic_conf &= ~IC_CONF_IC_GLB_LOC_A; - - if (colorkey_en) { - ic_conf |= IC_CONF_KEY_COLOR_EN; - ipu_ic_write(ic, colorkey, IC_CMBP_2); - } else - ic_conf &= ~IC_CONF_KEY_COLOR_EN; - - ipu_ic_write(ic, ic_conf, IC_CONF); - - ic->graphics = true; -unlock: - spin_unlock_irqrestore(&priv->lock, flags); - return ret; -} -EXPORT_SYMBOL_GPL(ipu_ic_task_graphics_init); - int ipu_ic_task_init_rsc(struct ipu_ic *ic, const struct ipu_ic_csc *csc, int in_width, int in_height, diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index c422a403c099..0bb1d714cbf5 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -445,10 +445,6 @@ int ipu_ic_task_init_rsc(struct ipu_ic *ic, int in_width, int in_height, int out_width, int out_height, u32 rsc); -int ipu_ic_task_graphics_init(struct ipu_ic *ic, - const struct ipu_ic_colorspace *g_in_cs, - bool galpha_en, u32 galpha, - bool colorkey_en, u32 colorkey); void ipu_ic_task_enable(struct ipu_ic *ic); void ipu_ic_task_disable(struct ipu_ic *ic); int ipu_ic_task_idma_init(struct ipu_ic *ic, struct ipuv3_channel *channel, From patchwork Thu Dec 26 02:27:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13920933 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 3E44FE7718B for ; Thu, 26 Dec 2024 02:29:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=m4Osx6Hdy9KSW372q7wGp80UoBpNogxBOIxeaPz8X+M=; b=1Id0HaNMgCYQRyHCBLQlLN8Oa7 utG4caG7RCewaCTBW1VsQ2VaoXrp+e5qWoCZrK7u3zgniu7qbslXsG/N35lt28/+jlkDFq9dpbuZb BfJGB/eLZAJEBwzWCZvYc0+de2duzidJ/whwuiR8AWJS/KERsg5UIMSDpLKe/awb7i4Xk3xNT6Jxm Gx1paxblvjhx9Jk9bAqxZ565Y3p4WOKr1j8gHTUoZZuO+AttVkGEi2HuDnPFGVCDgHvbzLn1trcf3 T1d1MCbnelU2suyDSWaWYcFpyGc1/2lPiaoPPQFPS0Q9eU92e7EDpH+IfSvrWZ6joJ2xjAp3tWTxw zlBMikYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tQdcx-0000000EyAc-1s1i; Thu, 26 Dec 2024 02:29:31 +0000 Received: from mx.treblig.org ([2a00:1098:5b::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tQdbl-0000000Exxz-23Di for linux-arm-kernel@lists.infradead.org; Thu, 26 Dec 2024 02:28:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=m4Osx6Hdy9KSW372q7wGp80UoBpNogxBOIxeaPz8X+M=; b=WYfQSZgV7n/+3+Pd KmWCyewhwvPkrUihSLAvKQe6lvM5B+2jwmuShNU77PeeE0hgZSF3OeHuJ54E0apajjhoLnm7eiYHa FkY9DIDWmnbx4OlniJqZzQl5xFAxI4G4cNiSq5duToEDjjuSJxlyKiBc2KDIpZkxb+SofwKJR29hl E0l6PLzOvuyHHvCnEJZFphJ3LKWgA250kg//KiIvnZkRu/uTdNUazkWjDR8vJZM4p8AkWgLZtxo/o Ue5eJeslQo3MHPwoXsQ6lSqq0QOIsJUBBangZzu+Yk/Q4EOgjg/9Q1lDLkuPhN2vFe9K1DsKb3Xzk ISzCMPjbVwpE/PO5BQ==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tQdbP-007F0L-0G; Thu, 26 Dec 2024 02:27:55 +0000 From: linux@treblig.org To: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, deller@gmx.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 2/7] gpu: ipu-v3: Remove unused ipu_rot_mode_to_degrees Date: Thu, 26 Dec 2024 02:27:47 +0000 Message-ID: <20241226022752.219399-3-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241226022752.219399-1-linux@treblig.org> References: <20241226022752.219399-1-linux@treblig.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241225_182817_617236_F58129B5 X-CRM114-Status: UNSURE ( 6.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Dr. David Alan Gilbert" ipu_rot_mode_to_degrees() was added in 2014 by commit f835f386a119 ("gpu: ipu-v3: Add rotation mode conversion utilities") but has remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/ipu-v3/ipu-common.c | 32 -------------------------------- include/video/imx-ipu-v3.h | 2 -- 2 files changed, 34 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index 947323f4a234..a8570e1bdf28 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -165,38 +165,6 @@ int ipu_degrees_to_rot_mode(enum ipu_rotate_mode *mode, int degrees, } EXPORT_SYMBOL_GPL(ipu_degrees_to_rot_mode); -int ipu_rot_mode_to_degrees(int *degrees, enum ipu_rotate_mode mode, - bool hflip, bool vflip) -{ - u32 r90, vf, hf; - - r90 = ((u32)mode >> 2) & 0x1; - hf = ((u32)mode >> 1) & 0x1; - vf = ((u32)mode >> 0) & 0x1; - hf ^= (u32)hflip; - vf ^= (u32)vflip; - - switch ((enum ipu_rotate_mode)((r90 << 2) | (hf << 1) | vf)) { - case IPU_ROTATE_NONE: - *degrees = 0; - break; - case IPU_ROTATE_90_RIGHT: - *degrees = 90; - break; - case IPU_ROTATE_180: - *degrees = 180; - break; - case IPU_ROTATE_90_LEFT: - *degrees = 270; - break; - default: - return -EINVAL; - } - - return 0; -} -EXPORT_SYMBOL_GPL(ipu_rot_mode_to_degrees); - struct ipuv3_channel *ipu_idmac_get(struct ipu_soc *ipu, unsigned num) { struct ipuv3_channel *channel; diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 0bb1d714cbf5..8870f65c9a8b 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -484,8 +484,6 @@ enum ipu_color_space ipu_drm_fourcc_to_colorspace(u32 drm_fourcc); enum ipu_color_space ipu_pixelformat_to_colorspace(u32 pixelformat); int ipu_degrees_to_rot_mode(enum ipu_rotate_mode *mode, int degrees, bool hflip, bool vflip); -int ipu_rot_mode_to_degrees(int *degrees, enum ipu_rotate_mode mode, - bool hflip, bool vflip); struct ipu_client_platformdata { int csi; From patchwork Thu Dec 26 02:27:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13920941 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 1C524E7718B for ; Thu, 26 Dec 2024 02:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yXPgWv/039w1DyrPkw5OOxKhH6440KjCye1nUeVurvk=; b=k6LYEbQ2tcKO2XEbyw4TU+faiC B2XT03RH/68LaPwtXlHIixL7zYucUz8DmklGF4oEwECTPG7Yh22FHleZ2jBh6phkM9fBGteceMo6T za+3ZlNAUSiN+FPba1NtwumaEAPsCh1V07y14iOGV5RPVApenjbx934KCpo6ilNPrxlE6Lqc0R3xn p6/q7llGx/kDs1BtFtzyAdLTzNB3rEuBJG7O4/rtJj1NTOQgmKv7Gm0Hcsu+MJtE8vAhEcdIxrdVy kKA0YH2gbPKIuc0+4BWqmcMVUguKEKIrvJ1bXJSiayuF3YowTPALM0BC7gIrJ3Z3VGTU5wA55fgNU hv6al6Qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tQdl3-0000000EzDc-2te1; Thu, 26 Dec 2024 02:37:53 +0000 Received: from mx.treblig.org ([2a00:1098:5b::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tQdbu-0000000Ey0h-3ldZ for linux-arm-kernel@lists.infradead.org; Thu, 26 Dec 2024 02:28:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=yXPgWv/039w1DyrPkw5OOxKhH6440KjCye1nUeVurvk=; b=OWjTPVYFBHSCtQMs 8L78DLn9tCBaDou3Ky31EIG4UabrDzOUFYegaOp0IXEQSpBiUYDy/H/uSuWiU1NleRQg2jzFqyMbt AssPaAXJy47TFNuFXaAyiA6aLn4Yw9GbFQN1KdVc7rQuS/5TcukA/Ih5LGmrJGsHs0f1BEssx5JfD p5v3xFFui/5Bc/BivfJ90lClLt3vskDfhQZPmex16Ny0katC6ZqdOADSj7O3Zk2KqF6r+WwDqPa3R FEU76F6ahoRcPC+1LqfMrlSNdu72IwTsjEma31ba+yIp4//bDnzFmdZ2TxRJavmKNgNJfA+xWKtJd RiUDMxUtLrXmi9UkHg==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tQdbP-007F0L-2Z; Thu, 26 Dec 2024 02:27:55 +0000 From: linux@treblig.org To: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, deller@gmx.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 3/7] gpu: ipu-v3: Remove unused ipu_idmac_channel_busy Date: Thu, 26 Dec 2024 02:27:48 +0000 Message-ID: <20241226022752.219399-4-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241226022752.219399-1-linux@treblig.org> References: <20241226022752.219399-1-linux@treblig.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241225_182826_937172_EB9794F3 X-CRM114-Status: UNSURE ( 7.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Dr. David Alan Gilbert" The last use of ipu_idmac_channel_busy() was removed in 2017 by commit eb8c88808c83 ("drm/imx: add deferred plane disabling") Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/ipu-v3/ipu-common.c | 6 ------ drivers/gpu/ipu-v3/ipu-prv.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index a8570e1bdf28..fa77e4e64f12 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -484,12 +484,6 @@ int ipu_idmac_enable_channel(struct ipuv3_channel *channel) } EXPORT_SYMBOL_GPL(ipu_idmac_enable_channel); -bool ipu_idmac_channel_busy(struct ipu_soc *ipu, unsigned int chno) -{ - return (ipu_idmac_read(ipu, IDMAC_CHA_BUSY(chno)) & idma_mask(chno)); -} -EXPORT_SYMBOL_GPL(ipu_idmac_channel_busy); - int ipu_idmac_wait_busy(struct ipuv3_channel *channel, int ms) { struct ipu_soc *ipu = channel->ipu; diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h index 3884acb7995a..16322b2137f8 100644 --- a/drivers/gpu/ipu-v3/ipu-prv.h +++ b/drivers/gpu/ipu-v3/ipu-prv.h @@ -216,8 +216,6 @@ void ipu_srm_dp_update(struct ipu_soc *ipu, bool sync); int ipu_module_enable(struct ipu_soc *ipu, u32 mask); int ipu_module_disable(struct ipu_soc *ipu, u32 mask); -bool ipu_idmac_channel_busy(struct ipu_soc *ipu, unsigned int chno); - int ipu_csi_init(struct ipu_soc *ipu, struct device *dev, int id, unsigned long base, u32 module, struct clk *clk_ipu); void ipu_csi_exit(struct ipu_soc *ipu, int id); From patchwork Thu Dec 26 02:27:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13920935 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 8D979E7718B for ; Thu, 26 Dec 2024 02:32:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0Ys/6PWadFMMf0CT+9doN3qX4Fu8/PHNQBlHP0QonJA=; b=jqO0+9HidBUj1JZfpEm2Pv++bU 1Qf+xZKCTysq1eP57GT1MD5el1VD3BcSFBC7rDwhNwPf4qdO/vTPUY6ee52mB7ogO0Wi/1lyryv+a o6QCc1jgQ1lWBrk8ZHm3mCaeJO2JUCVHEPw7V5SIfYJP9QEMJ4E3crpQjgS9+Dg8qhp772vdCwj3r QJ4rbaIkGReq6bnW4rrnRWScGGCy1o/rQ9K0gszYvHv0bHQ2cGyS5PB5ZEfVjOryfipPN/ppzaqpd QRpEatmTfpa8aOrDCg6ohDVFhPAa7/io3QRtjA0unSgdv2ZPK11yFDL2jeno3iYXF3qdH5Q98Oq9a c+/84qwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tQdfH-0000000Eyde-3RNJ; Thu, 26 Dec 2024 02:31:55 +0000 Received: from mx.treblig.org ([2a00:1098:5b::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tQdbl-0000000Exy8-447t for linux-arm-kernel@lists.infradead.org; Thu, 26 Dec 2024 02:28:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=0Ys/6PWadFMMf0CT+9doN3qX4Fu8/PHNQBlHP0QonJA=; b=Hbo+h+Qc0gFhN1uU cZP9vtV4n77mGEgq0ULpbgkp2GX2pwmOezeKICNdTVBJuZY4YP8I5kvcnrfYVWW8FVaQ4A8QM2b8f Ia1ktdvHqRvY4289h4MVl2fgToBWNrbk1obRuO4/7wFgKylJjid04Mdjq9ugjLjhHH6dPDoNGPhsy FqYPOgdRPir/ydaTQi6p6i1nAs2xBg/JLqo7Csa19G6x3H49KkzVCCSsZoU/UueKECoKFsBzTYBWR f8oNAHV+2lQFWaqLaoBNyn5C2K0n3LI/ULy/BY9KO0dyO6PqRaG8rxFdUeHTLsmT0YSyPWbf95vNG 5BahjFGcmuqsFUPl9w==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tQdbQ-007F0L-1Z; Thu, 26 Dec 2024 02:27:56 +0000 From: linux@treblig.org To: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, deller@gmx.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 4/7] gpu: ipu-v3: Remove unused ipu_image_convert_* functions Date: Thu, 26 Dec 2024 02:27:49 +0000 Message-ID: <20241226022752.219399-5-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241226022752.219399-1-linux@treblig.org> References: <20241226022752.219399-1-linux@treblig.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241225_182818_012873_F9BB87B3 X-CRM114-Status: GOOD ( 12.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Dr. David Alan Gilbert" ipu_image_convert_enum_format() and ipu_image_convert_sync() were both added in 2016 by commit cd98e85a6b78 ("gpu: ipu-v3: Add queued image conversion support") but have remained unused. Remove them. ipu_image_convert_sync() was the last user of image_convert_sync_complete(). Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/ipu-v3/ipu-image-convert.c | 48 -------------------------- include/video/imx-ipu-image-convert.h | 32 ----------------- 2 files changed, 80 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c index 841316582ea9..3c33b4defab5 100644 --- a/drivers/gpu/ipu-v3/ipu-image-convert.c +++ b/drivers/gpu/ipu-v3/ipu-image-convert.c @@ -355,20 +355,6 @@ static void dump_format(struct ipu_image_convert_ctx *ctx, (ic_image->fmt->fourcc >> 24) & 0xff); } -int ipu_image_convert_enum_format(int index, u32 *fourcc) -{ - const struct ipu_image_pixfmt *fmt; - - if (index >= (int)ARRAY_SIZE(image_convert_formats)) - return -EINVAL; - - /* Format found */ - fmt = &image_convert_formats[index]; - *fourcc = fmt->fourcc; - return 0; -} -EXPORT_SYMBOL_GPL(ipu_image_convert_enum_format); - static void free_dma_buf(struct ipu_image_convert_priv *priv, struct ipu_image_convert_dma_buf *buf) { @@ -2437,40 +2423,6 @@ ipu_image_convert(struct ipu_soc *ipu, enum ipu_ic_task ic_task, } EXPORT_SYMBOL_GPL(ipu_image_convert); -/* "Canned" synchronous single image conversion */ -static void image_convert_sync_complete(struct ipu_image_convert_run *run, - void *data) -{ - struct completion *comp = data; - - complete(comp); -} - -int ipu_image_convert_sync(struct ipu_soc *ipu, enum ipu_ic_task ic_task, - struct ipu_image *in, struct ipu_image *out, - enum ipu_rotate_mode rot_mode) -{ - struct ipu_image_convert_run *run; - struct completion comp; - int ret; - - init_completion(&comp); - - run = ipu_image_convert(ipu, ic_task, in, out, rot_mode, - image_convert_sync_complete, &comp); - if (IS_ERR(run)) - return PTR_ERR(run); - - ret = wait_for_completion_timeout(&comp, msecs_to_jiffies(10000)); - ret = (ret == 0) ? -ETIMEDOUT : 0; - - ipu_image_convert_unprepare(run->ctx); - kfree(run); - - return ret; -} -EXPORT_SYMBOL_GPL(ipu_image_convert_sync); - int ipu_image_convert_init(struct ipu_soc *ipu, struct device *dev) { struct ipu_image_convert_priv *priv; diff --git a/include/video/imx-ipu-image-convert.h b/include/video/imx-ipu-image-convert.h index 3c71b8b94b33..003b3927ede5 100644 --- a/include/video/imx-ipu-image-convert.h +++ b/include/video/imx-ipu-image-convert.h @@ -40,19 +40,6 @@ struct ipu_image_convert_run { typedef void (*ipu_image_convert_cb_t)(struct ipu_image_convert_run *run, void *ctx); -/** - * ipu_image_convert_enum_format() - enumerate the image converter's - * supported input and output pixel formats. - * - * @index: pixel format index - * @fourcc: v4l2 fourcc for this index - * - * Returns 0 with a valid index and fills in v4l2 fourcc, -EINVAL otherwise. - * - * In V4L2, drivers can call ipu_image_enum_format() in .enum_fmt. - */ -int ipu_image_convert_enum_format(int index, u32 *fourcc); - /** * ipu_image_convert_adjust() - adjust input/output images to IPU restrictions. * @@ -176,23 +163,4 @@ ipu_image_convert(struct ipu_soc *ipu, enum ipu_ic_task ic_task, ipu_image_convert_cb_t complete, void *complete_context); -/** - * ipu_image_convert_sync() - synchronous single image conversion request - * - * @ipu: the IPU handle to use for the conversion - * @ic_task: the IC task to use for the conversion - * @in: input image format - * @out: output image format - * @rot_mode: rotation mode - * - * Carry out a single image conversion. Returns when the conversion - * completes. The input/output formats and rotation mode must already - * meet IPU retrictions. The created context is automatically unprepared - * and the run freed on return. - */ -int ipu_image_convert_sync(struct ipu_soc *ipu, enum ipu_ic_task ic_task, - struct ipu_image *in, struct ipu_image *out, - enum ipu_rotate_mode rot_mode); - - #endif /* __IMX_IPU_IMAGE_CONVERT_H__ */ From patchwork Thu Dec 26 02:27:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13920934 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 20926E7718B for ; Thu, 26 Dec 2024 02:30:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pHpYoWcC3a1yibTmmSQIGYWTas0Sv+4pH8WU+FAozOM=; b=QgM1Lvq5SzBT4zzfJJJvU7QXlX EssFy5+zOyzHwjI0ByqKQv8gqf+lhgdOXQ00s9QDweZ6iV99gyIncyer9h/NFU6K4TG6GrEUeXb2y kEf5NvJAaJxwq0rQHIPjEio+w83GW4jx8qIu+cqSgwYUrEEkq134O+WJsFA4+r6p8Q6tsrXe4MQoM F+vHwUjWJcDPWVy7Nw3I1n9XiXH6rahquCXNDep7iz+YVVlKXk1kbC/rfsBKTkIYxc6eyOwjJ3ToJ HtxDYLftIYJ3Fzblfl+rp9lJIMErdqqdJME+2eJgLbpty1UK0AH0kr0VsXuur7v/QKoSjDa9lszPN rsKwZDeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tQde7-0000000EySY-0XND; Thu, 26 Dec 2024 02:30:43 +0000 Received: from mx.treblig.org ([2a00:1098:5b::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tQdbl-0000000Exy2-2371 for linux-arm-kernel@lists.infradead.org; Thu, 26 Dec 2024 02:28:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=pHpYoWcC3a1yibTmmSQIGYWTas0Sv+4pH8WU+FAozOM=; b=B6Llc0TQLzww4Rky /dbg4HPyp+UBtHIXR5WjD4HGbvJDFE+hF5DvZoCmGG6meYjfz1OwGYukGVk1XBBh3PSLPVdieLhEk j4iUZDaO19Pl9D7Yp5AmRZ6JzB2AyMmU7z0QyMCmjPn2LU9xRX5Rl3tmcF8ZEZu/ymOa0r+6GznYn SFdJ6TKExnFsQnLzF4weKJ3t0ROAzdisHOBvoXMHo/LPSNFuyLvGzd/2bO14RfO6q9k7PgYbO4DrM OSB9Lm2hhNbuZth/24DIaECh74tb2F8qFsUzX3J145VVJA2oX/GDE6kK3XjneaFC0p0uJWgVx0TwS cVut6VQakL5qkxo+Yw==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tQdbR-007F0L-0b; Thu, 26 Dec 2024 02:27:57 +0000 From: linux@treblig.org To: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, deller@gmx.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 5/7] gpu: ipu-v3: Remove unused ipu_vdi_unsetup Date: Thu, 26 Dec 2024 02:27:50 +0000 Message-ID: <20241226022752.219399-6-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241226022752.219399-1-linux@treblig.org> References: <20241226022752.219399-1-linux@treblig.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241225_182817_617110_4EFA37D7 X-CRM114-Status: UNSURE ( 7.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Dr. David Alan Gilbert" ipu_vdi_unsetup() was added in 2016 by commit 2d2ead453077 ("gpu: ipu-v3: Add Video Deinterlacer unit") but has remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/ipu-v3/ipu-vdi.c | 11 ----------- include/video/imx-ipu-v3.h | 1 - 2 files changed, 12 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-vdi.c b/drivers/gpu/ipu-v3/ipu-vdi.c index a593b232b6d3..af9631fd4256 100644 --- a/drivers/gpu/ipu-v3/ipu-vdi.c +++ b/drivers/gpu/ipu-v3/ipu-vdi.c @@ -150,17 +150,6 @@ void ipu_vdi_setup(struct ipu_vdi *vdi, u32 code, int xres, int yres) } EXPORT_SYMBOL_GPL(ipu_vdi_setup); -void ipu_vdi_unsetup(struct ipu_vdi *vdi) -{ - unsigned long flags; - - spin_lock_irqsave(&vdi->lock, flags); - ipu_vdi_write(vdi, 0, VDI_FSIZE); - ipu_vdi_write(vdi, 0, VDI_C); - spin_unlock_irqrestore(&vdi->lock, flags); -} -EXPORT_SYMBOL_GPL(ipu_vdi_unsetup); - int ipu_vdi_enable(struct ipu_vdi *vdi) { unsigned long flags; diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 8870f65c9a8b..c9ed4b6a408b 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -463,7 +463,6 @@ struct ipu_vdi; void ipu_vdi_set_field_order(struct ipu_vdi *vdi, v4l2_std_id std, u32 field); void ipu_vdi_set_motion(struct ipu_vdi *vdi, enum ipu_motion_sel motion_sel); void ipu_vdi_setup(struct ipu_vdi *vdi, u32 code, int xres, int yres); -void ipu_vdi_unsetup(struct ipu_vdi *vdi); int ipu_vdi_enable(struct ipu_vdi *vdi); int ipu_vdi_disable(struct ipu_vdi *vdi); struct ipu_vdi *ipu_vdi_get(struct ipu_soc *ipu); From patchwork Thu Dec 26 02:27:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13920936 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 370B2E7718D for ; Thu, 26 Dec 2024 02:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CzQEqU7rwgr2tl1CtQgZLGQjEt1ez91boRU3k7xCN7k=; b=DUTlJgJiSvptrFs/mO3ZMeylc6 dmgRvFfs1YOPzhSqJBBj3cuXb0OUwR2YNP1Of4J7SE8XVuob6DS4u2I/ssgxvaYkw/MGUQFKc3jjb VsJlSQKNb03OTgTgkh1Q9M9bThBKKGyEoJ5gVP0+t0FAoInEUxRIuOIDBbhT9KTIP/bvToh/GPXA8 VSGqvEBq9F6Rbm1gIClAfCgQn/Fg/lNaJmBhFb0CpHhhiQcYmpgYzUG9BlPQVIqE8rYJ0fBTjUuxu WoarjAyuQRR5jogg2Izd8AAWw3z25GqjVGmLtKU2mi0Q4i33lqUQdLaMC+UiuYGbSDiR+Y3MFtRcd vepfshrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tQdgR-0000000Eylc-2EId; Thu, 26 Dec 2024 02:33:07 +0000 Received: from mx.treblig.org ([2a00:1098:5b::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tQdbm-0000000Exy9-0Lh0 for linux-arm-kernel@lists.infradead.org; Thu, 26 Dec 2024 02:28:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=CzQEqU7rwgr2tl1CtQgZLGQjEt1ez91boRU3k7xCN7k=; b=LiDIn/NxWLtO7Q1N AP05iZOzRbOvvHj0+PU0/joMAXcz6XV2kGJhzN5cuZnI7yd/Vo08qRsCVlX48aQ+xLKRruUvHoUkY XioEYVojBRoaq5B5BOQZkC4oswDi05cYLBQpaGzowwkYYlWwA2wUHZC61UO+7pf3aFVd8+VD9qZRO AoCJZcg7lN5DJT16Lr50F91aA0uEqOko5yYCZG72UPW+JKLtiSNVTJrhpOwnLpTkXcId83uqMb6Wx G57hg3Ag22hhQFJgXjirAw2CpL/am7pvlCI6cQK2KviH9j58xAPy1iRci3e6C4nEVDK8EIWJL3Fwi yeDqO78mh6OypQQImQ==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tQdbR-007F0L-2p; Thu, 26 Dec 2024 02:27:57 +0000 From: linux@treblig.org To: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, deller@gmx.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 6/7] gpu: ipu-v3: ipu-csi: Remove unused functions Date: Thu, 26 Dec 2024 02:27:51 +0000 Message-ID: <20241226022752.219399-7-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241226022752.219399-1-linux@treblig.org> References: <20241226022752.219399-1-linux@treblig.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241225_182818_125537_B6882188 X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Dr. David Alan Gilbert" ipu_csi_get_window(), ipu_csi_is_interlaced() and ipu_csi_set_test_generator() were added in 2014 by commit 2ffd48f2e7ae ("gpu: ipu-v3: Add Camera Sensor Interface unit") but have remained unused. Remove them. ipu_csi_set_testgen_mclk() is now unused. Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/ipu-v3/ipu-csi.c | 108 ----------------------------------- include/video/imx-ipu-v3.h | 5 -- 2 files changed, 113 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c index 778bc26d3ba5..d576b7d28437 100644 --- a/drivers/gpu/ipu-v3/ipu-csi.c +++ b/drivers/gpu/ipu-v3/ipu-csi.c @@ -185,32 +185,6 @@ static inline void ipu_csi_write(struct ipu_csi *csi, u32 value, writel(value, csi->base + offset); } -/* - * Set mclk division ratio for generating test mode mclk. Only used - * for test generator. - */ -static int ipu_csi_set_testgen_mclk(struct ipu_csi *csi, u32 pixel_clk, - u32 ipu_clk) -{ - u32 temp; - int div_ratio; - - div_ratio = (ipu_clk / pixel_clk) - 1; - - if (div_ratio > 0xFF || div_ratio < 0) { - dev_err(csi->ipu->dev, - "value of pixel_clk extends normal range\n"); - return -EINVAL; - } - - temp = ipu_csi_read(csi, CSI_SENS_CONF); - temp &= ~CSI_SENS_CONF_DIVRATIO_MASK; - ipu_csi_write(csi, temp | (div_ratio << CSI_SENS_CONF_DIVRATIO_SHIFT), - CSI_SENS_CONF); - - return 0; -} - /* * Find the CSI data format and data width for the given V4L2 media * bus pixel format code. @@ -538,56 +512,6 @@ int ipu_csi_init_interface(struct ipu_csi *csi, } EXPORT_SYMBOL_GPL(ipu_csi_init_interface); -bool ipu_csi_is_interlaced(struct ipu_csi *csi) -{ - unsigned long flags; - u32 sensor_protocol; - - spin_lock_irqsave(&csi->lock, flags); - sensor_protocol = - (ipu_csi_read(csi, CSI_SENS_CONF) & - CSI_SENS_CONF_SENS_PRTCL_MASK) >> - CSI_SENS_CONF_SENS_PRTCL_SHIFT; - spin_unlock_irqrestore(&csi->lock, flags); - - switch (sensor_protocol) { - case IPU_CSI_CLK_MODE_GATED_CLK: - case IPU_CSI_CLK_MODE_NONGATED_CLK: - case IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE: - case IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_DDR: - case IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_SDR: - return false; - case IPU_CSI_CLK_MODE_CCIR656_INTERLACED: - case IPU_CSI_CLK_MODE_CCIR1120_INTERLACED_DDR: - case IPU_CSI_CLK_MODE_CCIR1120_INTERLACED_SDR: - return true; - default: - dev_err(csi->ipu->dev, - "CSI %d sensor protocol unsupported\n", csi->id); - return false; - } -} -EXPORT_SYMBOL_GPL(ipu_csi_is_interlaced); - -void ipu_csi_get_window(struct ipu_csi *csi, struct v4l2_rect *w) -{ - unsigned long flags; - u32 reg; - - spin_lock_irqsave(&csi->lock, flags); - - reg = ipu_csi_read(csi, CSI_ACT_FRM_SIZE); - w->width = (reg & 0xFFFF) + 1; - w->height = (reg >> 16 & 0xFFFF) + 1; - - reg = ipu_csi_read(csi, CSI_OUT_FRM_CTRL); - w->left = (reg & CSI_HSC_MASK) >> CSI_HSC_SHIFT; - w->top = (reg & CSI_VSC_MASK) >> CSI_VSC_SHIFT; - - spin_unlock_irqrestore(&csi->lock, flags); -} -EXPORT_SYMBOL_GPL(ipu_csi_get_window); - void ipu_csi_set_window(struct ipu_csi *csi, struct v4l2_rect *w) { unsigned long flags; @@ -624,38 +548,6 @@ void ipu_csi_set_downsize(struct ipu_csi *csi, bool horiz, bool vert) } EXPORT_SYMBOL_GPL(ipu_csi_set_downsize); -void ipu_csi_set_test_generator(struct ipu_csi *csi, bool active, - u32 r_value, u32 g_value, u32 b_value, - u32 pix_clk) -{ - unsigned long flags; - u32 ipu_clk = clk_get_rate(csi->clk_ipu); - u32 temp; - - spin_lock_irqsave(&csi->lock, flags); - - temp = ipu_csi_read(csi, CSI_TST_CTRL); - - if (!active) { - temp &= ~CSI_TEST_GEN_MODE_EN; - ipu_csi_write(csi, temp, CSI_TST_CTRL); - } else { - /* Set sensb_mclk div_ratio */ - ipu_csi_set_testgen_mclk(csi, pix_clk, ipu_clk); - - temp &= ~(CSI_TEST_GEN_R_MASK | CSI_TEST_GEN_G_MASK | - CSI_TEST_GEN_B_MASK); - temp |= CSI_TEST_GEN_MODE_EN; - temp |= (r_value << CSI_TEST_GEN_R_SHIFT) | - (g_value << CSI_TEST_GEN_G_SHIFT) | - (b_value << CSI_TEST_GEN_B_SHIFT); - ipu_csi_write(csi, temp, CSI_TST_CTRL); - } - - spin_unlock_irqrestore(&csi->lock, flags); -} -EXPORT_SYMBOL_GPL(ipu_csi_set_test_generator); - int ipu_csi_set_mipi_datatype(struct ipu_csi *csi, u32 vc, struct v4l2_mbus_framefmt *mbus_fmt) { diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index c9ed4b6a408b..29e142e95ba3 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -361,13 +361,8 @@ int ipu_csi_init_interface(struct ipu_csi *csi, const struct v4l2_mbus_config *mbus_cfg, const struct v4l2_mbus_framefmt *infmt, const struct v4l2_mbus_framefmt *outfmt); -bool ipu_csi_is_interlaced(struct ipu_csi *csi); -void ipu_csi_get_window(struct ipu_csi *csi, struct v4l2_rect *w); void ipu_csi_set_window(struct ipu_csi *csi, struct v4l2_rect *w); void ipu_csi_set_downsize(struct ipu_csi *csi, bool horiz, bool vert); -void ipu_csi_set_test_generator(struct ipu_csi *csi, bool active, - u32 r_value, u32 g_value, u32 b_value, - u32 pix_clk); int ipu_csi_set_mipi_datatype(struct ipu_csi *csi, u32 vc, struct v4l2_mbus_framefmt *mbus_fmt); int ipu_csi_set_skip_smfc(struct ipu_csi *csi, u32 skip, From patchwork Thu Dec 26 02:27:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13920939 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 AF020E7718B for ; Thu, 26 Dec 2024 02:35:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ekg/UKB4/lYLmQ4zoU6HE87Q7T/RgQ0dvlW6KUtiFAI=; b=n04bd+v5h5UjuKDk6DVKT4WecA DBKI/QKeWA/F0TIfvAi69HWV+mnl0qHp0wxp4MOKAol2TGoxTSkynhLgXjROnpYxtNIAySvExDPAO Nt13ZiP8pjCtWMpNe4qoQQg3nUQqoOb2EaLNE3R4a0J7tGrdvTcfBZQnEY//SjWfJWrWGNPkJPOfJ pDAcGF8DsK48jGztDJz5hPGzmshDcq/oVtP7LVf3DZ7B89L11LEGslU/YS2j5uDvz2I4mlgVnMDlz fO+VcgsVkacYWkqe1iLOgT2aZl50u3rglIXDzkHasIujkltz3ojtAF3pvG7JKEEmGQrkAKCl7Vw+F NxE9b0wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tQdil-0000000Eyzt-02AT; Thu, 26 Dec 2024 02:35:31 +0000 Received: from mx.treblig.org ([2a00:1098:5b::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tQdbn-0000000ExzD-2J9v for linux-arm-kernel@lists.infradead.org; Thu, 26 Dec 2024 02:28:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=ekg/UKB4/lYLmQ4zoU6HE87Q7T/RgQ0dvlW6KUtiFAI=; b=flqOZRkBUSff6t+9 UdbssLKyddIkHRcpOP97NpnFf0RkaSChotpTWNoMLX+xfhYxdPIwf9f8/YTTiJdfu/5ZK6cL2G20T ZJVB2WyBtTg0oE33aFkbdIIMio6KoDaE5flbb/xpuwOPRIeHh49GuumSIZ6kc1cZoQtchWkoyZyVg MJBnFVZupalsVOruJa1GbrSiXeTCzO6tW5xfelnRrJ7AColuv7MgECsgooz3XTgXU5DtckG5jm1MR vcF8bIaTDScAhKzmuA6DNDqMkoVUc6sw0Ab/bq/sR2/IX5tIwC9pQiheey2P3YavkWdQn6WClP8kO 0SFl9m1wsXZQE1Kvhw==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tQdbS-007F0L-2E; Thu, 26 Dec 2024 02:27:58 +0000 From: linux@treblig.org To: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, deller@gmx.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 7/7] gpu: ipu-v3 ipu-cpmem: Remove unused functions Date: Thu, 26 Dec 2024 02:27:52 +0000 Message-ID: <20241226022752.219399-8-linux@treblig.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241226022752.219399-1-linux@treblig.org> References: <20241226022752.219399-1-linux@treblig.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241225_182819_602218_792DF45C X-CRM114-Status: UNSURE ( 7.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Dr. David Alan Gilbert" ipu_cpmem_set_yuv_interleaved() was added in 2012 by commit 0125f21b2baf ("staging: drm/imx: Add ipu_cpmem_set_yuv_interleaved()") but has remained unused. ipu_cpmem_get_burstsize() was added in 2016 by commit 03085911d7bb ("gpu: ipu-cpmem: Add ipu_cpmem_get_burstsize()") but has remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/ipu-v3/ipu-cpmem.c | 23 ----------------------- include/video/imx-ipu-v3.h | 2 -- 2 files changed, 25 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index 82b244cb313e..07866b1369c6 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c @@ -337,12 +337,6 @@ void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id) } EXPORT_SYMBOL_GPL(ipu_cpmem_set_axi_id); -int ipu_cpmem_get_burstsize(struct ipuv3_channel *ch) -{ - return ipu_ch_param_read_field(ch, IPU_FIELD_NPB) + 1; -} -EXPORT_SYMBOL_GPL(ipu_cpmem_get_burstsize); - void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize) { ipu_ch_param_write_field(ch, IPU_FIELD_NPB, burstsize - 1); @@ -452,23 +446,6 @@ int ipu_cpmem_set_format_passthrough(struct ipuv3_channel *ch, int width) } EXPORT_SYMBOL_GPL(ipu_cpmem_set_format_passthrough); -void ipu_cpmem_set_yuv_interleaved(struct ipuv3_channel *ch, u32 pixel_format) -{ - switch (pixel_format) { - case V4L2_PIX_FMT_UYVY: - ipu_ch_param_write_field(ch, IPU_FIELD_BPP, 3); /* bits/pixel */ - ipu_ch_param_write_field(ch, IPU_FIELD_PFS, 0xA);/* pix fmt */ - ipu_ch_param_write_field(ch, IPU_FIELD_NPB, 31);/* burst size */ - break; - case V4L2_PIX_FMT_YUYV: - ipu_ch_param_write_field(ch, IPU_FIELD_BPP, 3); /* bits/pixel */ - ipu_ch_param_write_field(ch, IPU_FIELD_PFS, 0x8);/* pix fmt */ - ipu_ch_param_write_field(ch, IPU_FIELD_NPB, 31);/* burst size */ - break; - } -} -EXPORT_SYMBOL_GPL(ipu_cpmem_set_yuv_interleaved); - void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch, unsigned int uv_stride, unsigned int u_offset, unsigned int v_offset) diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 29e142e95ba3..c89574b6f527 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -262,7 +262,6 @@ void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off); void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride, u32 pixelformat); void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id); -int ipu_cpmem_get_burstsize(struct ipuv3_channel *ch); void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize); void ipu_cpmem_set_block_mode(struct ipuv3_channel *ch); void ipu_cpmem_set_rotation(struct ipuv3_channel *ch, @@ -270,7 +269,6 @@ void ipu_cpmem_set_rotation(struct ipuv3_channel *ch, int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch, const struct ipu_rgb *rgb); int ipu_cpmem_set_format_passthrough(struct ipuv3_channel *ch, int width); -void ipu_cpmem_set_yuv_interleaved(struct ipuv3_channel *ch, u32 pixel_format); void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch, unsigned int uv_stride, unsigned int u_offset,