From patchwork Sat Jul 13 15:35:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13732429 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 D700BC3DA42 for ; Sat, 13 Jul 2024 15:36:11 +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: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:In-Reply-To:References:List-Owner; bh=R8x8SOnjSlig4/B74pItuN9fRZ0Xwlht5fPrjiL7tgM=; b=ozAT/PCG4+78ofk6P3It/MCGw7 FbLdWtS7dQ+6b6DZAQ/OCprOjLsDXvILPrV9uLSFfQL1+P7S4JD9PcNbgbwESIAQvbaCRUanoagF2 fsLvNRuJ7faeqX9QgYwz3bsx2HhNn17gqwnNQaUCf2nyi3Tui2Q4m0fZwZiLlIMbosRpjIpp1JfeY TeMrJIod/V9HZ4+W/7CQh5KDXOpOhbSJKZ9uZ44wZ1BZ7gn5XgNRFzAuIYyWcaaNywCL1zvZTMvHQ Jh82Pnkxz4SUULBQ+ImapTR1hQq3kWn8PBXPS5d5wR0vLiFyz8v9x1LxYE4sSFBieUJM4fDXK3d0V uZJhO9GA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSemy-00000002nJi-32gZ; Sat, 13 Jul 2024 15:35:56 +0000 Received: from phobos.denx.de ([85.214.62.61]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSemf-00000002nGy-2xdk for linux-arm-kernel@lists.infradead.org; Sat, 13 Jul 2024 15:35:39 +0000 Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 0747F874AC; Sat, 13 Jul 2024 17:35:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1720884934; bh=R8x8SOnjSlig4/B74pItuN9fRZ0Xwlht5fPrjiL7tgM=; h=From:To:Cc:Subject:Date:From; b=skrZZD4L3XEQqgU+V4vyIzS7I+JCBpVZ5fxx5Cx4x/B9EK9E9hWjyruFvZHAhsCri 7LcSPKnIZIvvvJZ/6XPdf2dRpXDSXvgOIMitIfFu7en6Z1gNTgGLmpbv6NGl+IKMl7 x9i/uQicqbnNa5hdzW8w9fq6rOXUdOUj6vQNVaK3Nu8/istUP0khmd1mF3zMDQZDlB QA4w4mM0D3lZ3azOXK6m/jm54/kJT4otgiXRVj/oEHQdA/x4sjEjlYDNfSe3B7LY6N i+LOC5BXX0QoBVlXfz4kuxj/y7NL/YTi0g65Oa4bxsNZnFbKIPZ8HbZBRBxyopvlus uQCevR8gGXLbg== From: Marek Vasut To: linux-media@vger.kernel.org Cc: Marek Vasut , Daniel Vetter , David Airlie , Fabio Estevam , Greg Kroah-Hartman , Helge Deller , Mauro Carvalho Chehab , Pengutronix Kernel Team , Philipp Zabel , Sascha Hauer , Shawn Guo , Steve Longerbeam , dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH] gpu: ipu-v3: image-convert: Drop unused single conversion request code Date: Sat, 13 Jul 2024 17:35:00 +0200 Message-ID: <20240713153524.107019-1-marex@denx.de> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240713_083538_079788_CB3679AB X-CRM114-Status: GOOD ( 14.02 ) 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 Neither ipu_image_convert_sync() nor ipu_image_convert() is used or call from anywhere. Remove this unused code. Signed-off-by: Marek Vasut Reviewed-by: Philipp Zabel --- Cc: Daniel Vetter Cc: David Airlie Cc: Fabio Estevam Cc: Greg Kroah-Hartman Cc: Helge Deller Cc: Mauro Carvalho Chehab Cc: Pengutronix Kernel Team Cc: Philipp Zabel Cc: Sascha Hauer Cc: Shawn Guo Cc: Steve Longerbeam Cc: dri-devel@lists.freedesktop.org Cc: imx@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org Cc: linux-fbdev@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: linux-staging@lists.linux.dev --- drivers/gpu/ipu-v3/ipu-image-convert.c | 76 -------------------------- include/video/imx-ipu-image-convert.h | 46 ---------------- 2 files changed, 122 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c index 841316582ea9d..c87866253eee9 100644 --- a/drivers/gpu/ipu-v3/ipu-image-convert.c +++ b/drivers/gpu/ipu-v3/ipu-image-convert.c @@ -2395,82 +2395,6 @@ void ipu_image_convert_unprepare(struct ipu_image_convert_ctx *ctx) } EXPORT_SYMBOL_GPL(ipu_image_convert_unprepare); -/* - * "Canned" asynchronous single image conversion. Allocates and returns - * a new conversion run. On successful return the caller must free the - * run and call ipu_image_convert_unprepare() after conversion completes. - */ -struct ipu_image_convert_run * -ipu_image_convert(struct ipu_soc *ipu, enum ipu_ic_task ic_task, - struct ipu_image *in, struct ipu_image *out, - enum ipu_rotate_mode rot_mode, - ipu_image_convert_cb_t complete, - void *complete_context) -{ - struct ipu_image_convert_ctx *ctx; - struct ipu_image_convert_run *run; - int ret; - - ctx = ipu_image_convert_prepare(ipu, ic_task, in, out, rot_mode, - complete, complete_context); - if (IS_ERR(ctx)) - return ERR_CAST(ctx); - - run = kzalloc(sizeof(*run), GFP_KERNEL); - if (!run) { - ipu_image_convert_unprepare(ctx); - return ERR_PTR(-ENOMEM); - } - - run->ctx = ctx; - run->in_phys = in->phys0; - run->out_phys = out->phys0; - - ret = ipu_image_convert_queue(run); - if (ret) { - ipu_image_convert_unprepare(ctx); - kfree(run); - return ERR_PTR(ret); - } - - return run; -} -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 3c71b8b94b33a..39906b0cbf2d8 100644 --- a/include/video/imx-ipu-image-convert.h +++ b/include/video/imx-ipu-image-convert.h @@ -149,50 +149,4 @@ int ipu_image_convert_queue(struct ipu_image_convert_run *run); */ void ipu_image_convert_abort(struct ipu_image_convert_ctx *ctx); -/** - * ipu_image_convert() - asynchronous 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 - * @complete: run completion callback - * @complete_context: a context pointer for the completion callback - * - * Request a single image conversion. Returns the run that has been queued. - * A conversion context is automatically created and is available in run->ctx. - * As with ipu_image_convert_prepare(), the input/output formats and rotation - * mode must already meet IPU retrictions. - * - * On successful return the caller can queue more run requests if needed, using - * the prepared context in run->ctx. The caller is responsible for unpreparing - * the context when no more conversion requests are needed. - */ -struct ipu_image_convert_run * -ipu_image_convert(struct ipu_soc *ipu, enum ipu_ic_task ic_task, - struct ipu_image *in, struct ipu_image *out, - enum ipu_rotate_mode rot_mode, - 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__ */