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: 853729 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (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 1DD33171E49; Thu, 26 Dec 2024 02:28:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735180105; cv=none; b=EVSl75OQjS8YT6e/8kcKncZuirMYx2Jir+Yw01czwwJlzDB5WGo2quZUoCyKu8eZNFUiTviM5wbZurQpYVp6zURfN5UXHEkGYsR6YcIz0XsDPrd2Ya9bsLP2lI0+FG2IwwpE0oWMjNTl4jpgGUVQNbJUhv7LO2e4hBBu2acuy7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735180105; c=relaxed/simple; bh=o726KERMhplbrhdQBm3pbtBKYC+6DF/Syh/pkwANo+M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CFk7TQ5FSACuXvb3Af58AhuAUgSGk0n5C8b5wF7hKWPWxLR0jHagx9MdUtMOdVFpVin9ggtdsk9eywXNRq1pEffHcEPfHPvi7EW30ZS614DGG4fM5Nkvfw6ojkKz0X/qmmgQfxJUMuLumimcPfZuxesgvfoRdz34bEQ7k0Ba6ZA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=OWjTPVYF; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="OWjTPVYF" 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> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: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: 853732 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (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 6BF38146D76; Thu, 26 Dec 2024 02:28:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735180096; cv=none; b=OOQ9q9jzpu1ml3fa0sqekUIvqqlI1v5ToDD8WmH27SiEl7n5dljbJz9mVpDLyxILZKTBObijN5h9P+id8iGiYvabxJUywjKYjzzKa8TqU71kTiFcKU8cj6TWCe7LR8l4Kmm6oJKXv4GLq3s0ShS9n2kyNjLzEMBAghUK+ZRcQwE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735180096; c=relaxed/simple; bh=lgi4msL8jzD/sDnb7usEXE5HwG/3xkJ44+z1/D61tF8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=At1NsyKOrb3D5kBQh9mOx3+1DJ7Ty1DC5LXJ+nXUJ5YxZFPA4T1HEYg1rKxgl5AeO5Uez4KArW3NxKuXHBOPHtqiK/Lx+0c/hNZefxJwBr8t/UYW1kzNhlx4XEJRQUDteKEq8RjsVj6LRQO9yYh5sXo0pgKNsLomy9BhgXLLUJo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=B6Llc0TQ; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="B6Llc0TQ" 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> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 853731 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (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 357C014831E; Thu, 26 Dec 2024 02:28:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735180096; cv=none; b=a2XG7mG/KlJI9wV1VFxBM+wViFMxXFVqGcYTHkFLMCjD85lUxJMo/XKVbkBnjKnp6gyw7NJVdRVggITFrvBHpBw5roTyvXg9JLbfu96IOHwkvnPXDXSgDxJToNgQEDGijlc28R+dysZFgYs81FNMsETeTuioo9rCQiGbsCd7kyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735180096; c=relaxed/simple; bh=DA7+p+sqvcV1bfMtqx/OfgF8iCr7PIRu+xxz92YnSnQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OZLBIK7YE71DTU/zlct85KtfYSZB+yJJU2wvDIkzcH4EAbDFJEl9f51KeUWGutoXV6Ty4XcreKLrTmgkAYNiNGjfNXNxrjPQey6o/zijYSfXaZbBUQ1PgPkNqEurnQziHpXpaJMo7fKilJgmhQNZRcPva2rbACftlwrqk8Ozqf8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=LiDIn/Nx; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="LiDIn/Nx" 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> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 853730 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (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 A0EB314A4C7; Thu, 26 Dec 2024 02:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735180098; cv=none; b=FJ+IESA7tUbEOt17xa/0/4G99LE2SMtJJ8cqtrdwUMmxvILEnREng34g4/cmwGRbYQZgRNeiZyXCUvatUvpBKYGz3icuWAlNKlEEdZZDbgufPsdLES8tu/9GS30hs+c+R/G5PBhhBpDHmLi3JlBaeoe0la69GXy0fLq5kA9ZKug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735180098; c=relaxed/simple; bh=1Jbfs9bJyGvvrV6qI/wAd1AAr3XZs3qJWHWPh6rqB+A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tFIw2q9JA5dfUpcB7w/J0Zpm/b+rPrp9VJUCPHYLP/Txz5IMaE4dgQmxRm4WXlBRwraGoV2YTgNPtL6G0mDP1qgiT/VoTZnSbNjUHYy6mh33khL5HSkYqKUCDdoRemY0NsFmNAQJCA5h6jdQgNacymzsH16VOGenL+PpKoUxmC4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=flqOZRkB; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="flqOZRkB" 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> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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,