From patchwork Tue Sep 8 10:12:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 255882 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C627C433E2 for ; Tue, 8 Sep 2020 10:15:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34D41215A4 for ; Tue, 8 Sep 2020 10:15:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599560137; bh=vW65TbwI8SwZiwFXgxSf5xZsxuSUgeC5F1theLDAloE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QkqerxLBlHNg7m0lFwiO8CESZwijNp6mN7JTeyY7o8QGUMHOIxMQ96pTiQmbxGnys 4a2fDNIb709mF4QVQJpgV4DOCPikGfMBz2hbcS5q6m0bx0sA1+QdOANUz5xHBiJIDr FFA7VSC+n8SS7fx49phaaWt3X57x41G/CxQUZIO4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729259AbgIHKPe (ORCPT ); Tue, 8 Sep 2020 06:15:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:59740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728676AbgIHKMc (ORCPT ); Tue, 8 Sep 2020 06:12:32 -0400 Received: from mail.kernel.org (ip5f5ad5ce.dynamic.kabel-deutschland.de [95.90.213.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AE6052177B; Tue, 8 Sep 2020 10:12:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599559951; bh=vW65TbwI8SwZiwFXgxSf5xZsxuSUgeC5F1theLDAloE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XOTKlvG5RcCQyQUg8lIy9/a/rI0DPNURl0LHFw87QllN/YnsnO1dSvU2sO5+vmnIZ yibeTs10ffagpvTOkXTtm1U9VSw1fqKzjSDLLfq9i8xvyBnfy6OIksjg2FNmjuSAfv wdaHeNeoG8dk0Vo5jCikWEnmkGJywKXPyHnl9mIE= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kFac1-00B3qb-1w; Tue, 08 Sep 2020 12:12:29 +0200 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Sakari Ailus , Andy Shevchenko , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] media: atomisp: get rid of some cleanup leftovers Date: Tue, 8 Sep 2020 12:12:22 +0200 Message-ID: <1e7968e715e23b90ab4994b32301a6cf4faffca8.1599141140.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Message-ID: <20200908101222.HEnAjtLBFmS33hxt-QnEPz6f6VtcpiPZg8G9v4HuUEY@z> The code that used to check for ISP2400/2401 version were using the revision number in order to decide wheather version should be used. With the new version, the code doesn't need to check anymore for ISP version. Fixes: ca133c395f2f ("media: atomisp: improve device detection code") Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index 8c1d5a3b8f45..304857bffc6a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -1429,7 +1429,6 @@ atomisp_load_firmware(struct atomisp_device *isp) */ static bool is_valid_device(struct pci_dev *pdev, const struct pci_device_id *id) { - unsigned int a0_max_id = 0; const char *name; const char *product; @@ -1437,11 +1436,9 @@ static bool is_valid_device(struct pci_dev *pdev, const struct pci_device_id *id switch (id->device & ATOMISP_PCI_DEVICE_SOC_MASK) { case ATOMISP_PCI_DEVICE_SOC_MRFLD: - a0_max_id = ATOMISP_PCI_REV_MRFLD_A0_MAX; name = "Merrifield"; break; case ATOMISP_PCI_DEVICE_SOC_BYT: - a0_max_id = ATOMISP_PCI_REV_BYT_A0_MAX; name = "Baytrail"; break; case ATOMISP_PCI_DEVICE_SOC_ANN: From patchwork Thu Sep 3 13:57:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 255909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C067C433E9 for ; Thu, 3 Sep 2020 15:08:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E5F720722 for ; Thu, 3 Sep 2020 15:08:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599145719; bh=0yVg4VB9wLo7/HcSqfX02PS0qyjpPXXI+/tghmjqUsw=; h=From:Cc:Subject:Date:In-Reply-To:References:To:List-ID:From; b=1PSt4h1iPtGsGiDPXo6RjXF3GBeI8tsdn7OlXk1cI4db9WdcoW+9YgL3UB92FjrcC 9xrBG+Gy+d12+4nmMlMzPNLAQjk91f9Ffyjc4VquA68X4tB8mmUf9sj4F21QH3clVA en8Hg0nAMaW/msga/HixVb9+XQaQi9A8iqyMULJk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729215AbgICPIi (ORCPT ); Thu, 3 Sep 2020 11:08:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:47870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728950AbgICN6P (ORCPT ); Thu, 3 Sep 2020 09:58:15 -0400 Received: from mail.kernel.org (ip5f5ad5c3.dynamic.kabel-deutschland.de [95.90.213.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A8022098B; Thu, 3 Sep 2020 13:57:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599141456; bh=0yVg4VB9wLo7/HcSqfX02PS0qyjpPXXI+/tghmjqUsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eiHTsGhtSrD4YW+TVgEhxy20fyB9O40sXdCq83+iJZ5OqFJFUtSF2LTZVgGCGGcPb AdDPDkTTeF6INrEOOBBvmvuVcoX6bv8qPFj8bB1IQn6IX2QXAFiFnJyOcYdSz4bREr aB17Wr4DPXm/ofqlgjURq4iPLWnZEg5qVO5W3rb8= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kDpk6-004T6n-4b; Thu, 03 Sep 2020 15:57:34 +0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Anant Thazhemadam , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] media: atomisp: print a warning if error while setting downscaler Date: Thu, 3 Sep 2020 15:57:29 +0200 Message-Id: <20d420b6ccec9c8013336437781da0f0c7ffabac.1599141140.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org As warned by gcc: drivers/staging/media/atomisp//pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c:237:31: warning: variable ‘isp_data_ptr’ set but not used [-Wunused-but-set-variable] ia_css_vf_configure() logic has an error var that detects troubles when setting the kernel for downscaling. The driver just ignores it, without producing any warning. Add at least a warning message on such cases. Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c index 3b850bb2d39d..dd3670972936 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c +++ b/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c @@ -13,6 +13,8 @@ * more details. */ +#include "atomisp_internal.h" + #include "ia_css_vf.host.h" #include #include @@ -129,6 +131,9 @@ ia_css_vf_configure( const struct ia_css_binary_info *info = &binary->info->sp; err = configure_kernel(info, out_info, vf_info, downscale_log2, &config); + if (err) + dev_warn(atomisp_dev, "Couldn't setup downscale\n"); + configure_dma(&config, vf_info); if (vf_info) From patchwork Tue Sep 8 10:12:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 255883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8E43C433E2 for ; Tue, 8 Sep 2020 10:14:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A092207DE for ; Tue, 8 Sep 2020 10:14:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599560094; bh=ffupJWwXcthhtAVAOnjxO8uAsxy1+vRiYUe9PMYB2GA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=wEf6K0IZlXJKRP+bKeLtKfm+K5bG4E2MNYJ55mVm1zsjrLe3jx4hG0R3BfXllCqgE J3g0cC71WGpqaYUqIEl5WYH/j9FIaOzc/QBR8wCEvjmameO7J9RvAHxbktACjRFo2/ SJvd5tc8Iq1y8GX65My40N+CHIHjndt/KJZIILIs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729390AbgIHKOw (ORCPT ); Tue, 8 Sep 2020 06:14:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:59754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728904AbgIHKMd (ORCPT ); Tue, 8 Sep 2020 06:12:33 -0400 Received: from mail.kernel.org (ip5f5ad5ce.dynamic.kabel-deutschland.de [95.90.213.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AD7C2207DE; Tue, 8 Sep 2020 10:12:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599559952; bh=ffupJWwXcthhtAVAOnjxO8uAsxy1+vRiYUe9PMYB2GA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ECgzD2NeQfVmveoVmudNYoG2Co9c9lH/Q2XKCM/oQoYRKyXBmtbYygOlvlzUZX5/5 YJGVBW9t1eYq5DNrbiDQ4AO+DYDElQIRPsxjQpM37cnoMoyCowWxEbV6juuEpgDgUt ubwoNi1PR8mXVoWObMb91ypEdCaeCJfxGXGtcDrw= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kFac1-00B3qf-3b; Tue, 08 Sep 2020 12:12:29 +0200 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Sakari Ailus , Andy Shevchenko , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] media: atomisp: get rid of unused vars Date: Tue, 8 Sep 2020 12:12:24 +0200 Message-ID: <7f4a9613771b517a77547a040dbd97a7030848a0.1599141140.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Message-ID: <20200908101224.hjsNClAP_eKGdvO7X5CBeHO7KMextf8nu_p7Dp2R8jg@z> There are several vars declared and set but unused: drivers/staging/media/atomisp//pci/sh_css_param_shading.c:239:4: warning: variable ‘padded_width’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:1366:24: warning: variable ‘stream’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:2702:22: warning: variable ‘capture_pipe’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:2831:7: warning: variable ‘continuous’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3534:15: warning: variable ‘num_output_pins’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3937:55: warning: variable ‘vf_pp_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3937:38: warning: variable ‘preview_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3937:24: warning: variable ‘copy_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3936:26: warning: variable ‘me’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:5749:24: warning: variable ‘copy_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:6013:7: warning: variable ‘continuous’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:6012:7: warning: variable ‘memory’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:7329:24: warning: variable ‘copy_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:7459:26: warning: variable ‘num_vf_pp_stage’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:10420:22: warning: variable ‘pipe_id’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css_params.c:1099:36: warning: variable ‘row_padding’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css_mipi.c:410:27: warning: variable ‘mipi_intermediate_info’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/atomisp_cmd.c:2814:31: warning: variable ‘stream_config’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/atomisp_cmd.c:2893:31: warning: variable ‘stream_config’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c:237:31: warning: variable ‘isp_data_ptr’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c:119:28: warning: variable ‘ver_num_isp’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c:119:15: warning: variable ‘hor_num_isp’ set but not used [-Wunused-but-set-variable] Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/atomisp_cmd.c | 6 --- .../isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c | 3 -- .../kernels/sdis/sdis_2/ia_css_sdis2.host.c | 3 -- .../atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c | 4 +- drivers/staging/media/atomisp/pci/sh_css.c | 47 ++----------------- .../staging/media/atomisp/pci/sh_css_mipi.c | 12 ----- .../media/atomisp/pci/sh_css_param_shading.c | 25 +++------- .../staging/media/atomisp/pci/sh_css_params.c | 3 +- 8 files changed, 14 insertions(+), 89 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 391c4acbd5b2..a1772bbc3042 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -2811,7 +2811,6 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag, struct atomisp_metadata *md) { struct atomisp_device *isp = asd->isp; - struct ia_css_stream_config *stream_config; struct ia_css_stream_info *stream_info; struct camera_mipi_info *mipi_info; struct atomisp_metadata_buf *md_buf; @@ -2821,8 +2820,6 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag, if (flag != 0) return -EINVAL; - stream_config = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]. - stream_config; stream_info = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]. stream_info; @@ -2890,7 +2887,6 @@ int atomisp_get_metadata_by_type(struct atomisp_sub_device *asd, int flag, struct atomisp_metadata_with_type *md) { struct atomisp_device *isp = asd->isp; - struct ia_css_stream_config *stream_config; struct ia_css_stream_info *stream_info; struct camera_mipi_info *mipi_info; struct atomisp_metadata_buf *md_buf; @@ -2900,8 +2896,6 @@ int atomisp_get_metadata_by_type(struct atomisp_sub_device *asd, int flag, if (flag != 0) return -EINVAL; - stream_config = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]. - stream_config; stream_info = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]. stream_info; diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c index b8b71791466f..67f5540b48b5 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c +++ b/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c @@ -234,7 +234,6 @@ convert_allocate_dvs_6axis_config( unsigned int o_width; unsigned int o_height; struct ia_css_host_data *me; - struct gdc_warp_param_mem_s *isp_data_ptr; assert(binary); assert(dvs_6axis_config); @@ -249,8 +248,6 @@ convert_allocate_dvs_6axis_config( assert((dvs_in_frame_info->format == IA_CSS_FRAME_FORMAT_NV12) || (dvs_in_frame_info->format == IA_CSS_FRAME_FORMAT_YUV420)); - isp_data_ptr = (struct gdc_warp_param_mem_s *)me->address; - i_stride = dvs_in_frame_info->padded_width; o_width = binary->out_frame_info[0].res.width; diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c index 7922198f6784..f608740e8340 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c +++ b/drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c @@ -116,7 +116,6 @@ void ia_css_get_isp_dvs2_coefficients( { struct ia_css_isp_parameters *params; unsigned int hor_num_3a, ver_num_3a; - unsigned int hor_num_isp, ver_num_isp; struct ia_css_binary *dvs_binary; IA_CSS_ENTER("void"); @@ -140,8 +139,6 @@ void ia_css_get_isp_dvs2_coefficients( hor_num_3a = dvs_binary->dis.coef.dim.width; ver_num_3a = dvs_binary->dis.coef.dim.height; - hor_num_isp = dvs_binary->dis.coef.pad.width; - ver_num_isp = dvs_binary->dis.coef.pad.height; memcpy(hor_coefs_odd_real, params->dvs2_coefs.hor_coefs.odd_real, hor_num_3a * sizeof(short)); diff --git a/drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c b/drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c index 1ea74296fc8d..b4f53be18e7f 100644 --- a/drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c +++ b/drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c @@ -241,7 +241,6 @@ void rmgr_pop_handle(struct ia_css_rmgr_vbuf_pool *pool, struct ia_css_rmgr_vbuf_handle **handle) { u32 i; - bool succes = false; assert(pool); assert(pool->recycle); @@ -255,8 +254,7 @@ void rmgr_pop_handle(struct ia_css_rmgr_vbuf_pool *pool, pool->handles[i] = NULL; /* dont release, we are returning it... ia_css_rmgr_refcount_release_vbuf(handle); */ - succes = true; - break; + return; } } } diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index 2fb817e3d756..e7a7257b9be2 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -1363,16 +1363,10 @@ static void start_binary(struct ia_css_pipe *pipe, struct ia_css_binary *binary) { - struct ia_css_stream *stream; - assert(pipe); /* Acceleration uses firmware, the binary thus can be NULL */ /* assert(binary != NULL); */ - (void)binary; - - stream = pipe->stream; - if (binary) sh_css_metrics_start_binary(&binary->metrics); @@ -2699,7 +2693,6 @@ alloc_continuous_frames( bool continuous; unsigned int i, idx; unsigned int num_frames; - struct ia_css_pipe *capture_pipe = NULL; IA_CSS_ENTER_PRIVATE("pipe = %p, init_time = %d", pipe, init_time); @@ -2761,17 +2754,12 @@ alloc_continuous_frames( } /* Write format back to binary */ - if (pipe_id == IA_CSS_PIPE_ID_PREVIEW) - { + if (pipe_id == IA_CSS_PIPE_ID_PREVIEW) { pipe->pipe_settings.preview.preview_binary.in_frame_info.format = ref_info.format; - capture_pipe = pipe->pipe_settings.preview.capture_pipe; - } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO) - { + } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO) { pipe->pipe_settings.video.video_binary.in_frame_info.format = ref_info.format; - capture_pipe = pipe->pipe_settings.video.capture_pipe; - } else - { + } else { /* should not happen */ IA_CSS_LEAVE_ERR_PRIVATE(-EINVAL); return -EINVAL; @@ -2828,7 +2816,7 @@ load_preview_binaries(struct ia_css_pipe *pipe) { struct ia_css_binary_descr preview_descr; bool online; int err = 0; - bool continuous, need_vf_pp = false; + bool need_vf_pp = false; bool need_isp_copy_binary = false; #ifdef ISP2401 bool sensor = false; @@ -2843,7 +2831,6 @@ load_preview_binaries(struct ia_css_pipe *pipe) { assert(pipe->mode == IA_CSS_PIPE_ID_PREVIEW); online = pipe->stream->config.online; - continuous = pipe->stream->config.continuous; #ifdef ISP2401 sensor = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR; #endif @@ -3531,7 +3518,6 @@ static int create_host_video_pipeline(struct ia_css_pipe *pipe) bool need_copy = false; bool need_vf_pp = false; bool need_yuv_pp = false; - unsigned int num_output_pins; bool need_in_frameinfo_memory = false; unsigned int i, num_yuv_scaler; @@ -3588,7 +3574,6 @@ static int create_host_video_pipeline(struct ia_css_pipe *pipe) copy_binary = &pipe->pipe_settings.video.copy_binary; video_binary = &pipe->pipe_settings.video.video_binary; vf_pp_binary = &pipe->pipe_settings.video.vf_pp_binary; - num_output_pins = video_binary->info->num_output_pins; yuv_scaler_binary = pipe->pipe_settings.video.yuv_scaler_binary; num_yuv_scaler = pipe->pipe_settings.video.num_yuv_scaler; @@ -3933,8 +3918,6 @@ static void send_raw_frames(struct ia_css_pipe *pipe) static int preview_start(struct ia_css_pipe *pipe) { - struct ia_css_pipeline *me; - struct ia_css_binary *copy_binary, *preview_binary, *vf_pp_binary = NULL; int err = 0; struct ia_css_pipe *copy_pipe, *capture_pipe; struct ia_css_pipe *acc_pipe; @@ -3950,19 +3933,12 @@ preview_start(struct ia_css_pipe *pipe) { return -EINVAL; } - me = &pipe->pipeline; - preview_pipe_input_mode = pipe->stream->config.mode; copy_pipe = pipe->pipe_settings.preview.copy_pipe; capture_pipe = pipe->pipe_settings.preview.capture_pipe; acc_pipe = pipe->pipe_settings.preview.acc_pipe; - copy_binary = &pipe->pipe_settings.preview.copy_binary; - preview_binary = &pipe->pipe_settings.preview.preview_binary; - if (pipe->pipe_settings.preview.vf_pp_binary.info) - vf_pp_binary = &pipe->pipe_settings.preview.vf_pp_binary; - sh_css_metrics_start_frame(); /* multi stream video needs mipi buffers */ @@ -5746,7 +5722,6 @@ unload_video_binaries(struct ia_css_pipe *pipe) { static int video_start(struct ia_css_pipe *pipe) { - struct ia_css_binary *copy_binary; int err = 0; struct ia_css_pipe *copy_pipe, *capture_pipe; enum sh_css_pipe_config_override copy_ovrd; @@ -5766,8 +5741,6 @@ static int video_start(struct ia_css_pipe *pipe) copy_pipe = pipe->pipe_settings.video.copy_pipe; capture_pipe = pipe->pipe_settings.video.capture_pipe; - copy_binary = &pipe->pipe_settings.video.copy_binary; - sh_css_metrics_start_frame(); /* multi stream video needs mipi buffers */ @@ -6009,8 +5982,6 @@ static int load_primary_binaries( struct ia_css_pipe *pipe) { bool online = false; - bool memory = false; - bool continuous = false; bool need_pp = false; bool need_isp_copy_binary = false; bool need_ldc = false; @@ -6036,8 +6007,6 @@ static int load_primary_binaries( pipe->mode == IA_CSS_PIPE_ID_COPY); online = pipe->stream->config.online; - memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY; - continuous = pipe->stream->config.continuous; #ifdef ISP2401 sensor = (pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR); #endif @@ -7326,7 +7295,6 @@ unload_yuvpp_binaries(struct ia_css_pipe *pipe) { static int yuvpp_start(struct ia_css_pipe *pipe) { - struct ia_css_binary *copy_binary; int err = 0; enum sh_css_pipe_config_override copy_ovrd; enum ia_css_input_mode yuvpp_pipe_input_mode; @@ -7339,8 +7307,6 @@ static int yuvpp_start(struct ia_css_pipe *pipe) yuvpp_pipe_input_mode = pipe->stream->config.mode; - copy_binary = &pipe->pipe_settings.yuvpp.copy_binary; - sh_css_metrics_start_frame(); /* multi stream video needs mipi buffers */ @@ -7456,7 +7422,7 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe) { *vf_pp_binary, *yuv_scaler_binary; bool need_scaler = false; - unsigned int num_stage, num_vf_pp_stage, num_output_stage; + unsigned int num_stage, num_output_stage; unsigned int i, j; struct ia_css_frame *in_frame = NULL; @@ -7487,7 +7453,6 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe) { } ia_css_pipe_util_create_output_frames(bin_out_frame); num_stage = pipe->pipe_settings.yuvpp.num_yuv_scaler; - num_vf_pp_stage = pipe->pipe_settings.yuvpp.num_vf_pp; num_output_stage = pipe->pipe_settings.yuvpp.num_output; #ifdef ISP2401 @@ -10417,14 +10382,12 @@ ia_css_update_continuous_frames(struct ia_css_stream *stream) { void ia_css_pipe_map_queue(struct ia_css_pipe *pipe, bool map) { unsigned int thread_id; - enum ia_css_pipe_id pipe_id; unsigned int pipe_num; bool need_input_queue; IA_CSS_ENTER(""); assert(pipe); - pipe_id = pipe->mode; pipe_num = pipe->pipe_num; ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id); diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/sh_css_mipi.c index ba7d406bcc10..d5ae7f0b5864 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c +++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c @@ -407,7 +407,6 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info) { int err = -EINVAL; unsigned int port; - struct ia_css_frame_info mipi_intermediate_info; ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "allocate_mipi_frames(%p) enter:\n", pipe); @@ -486,17 +485,6 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, ref_count_mipi_allocation[port]++; - /* TODO: Cleaning needed. */ - /* This code needs to modified to allocate the MIPI frames in the correct normal way - with an allocate from info, by justin */ - mipi_intermediate_info = pipe->pipe_settings.video.video_binary.internal_frame_info; - mipi_intermediate_info.res.width = 0; - mipi_intermediate_info.res.height = 0; - /* To indicate it is not (yet) valid format. */ - mipi_intermediate_info.format = IA_CSS_FRAME_FORMAT_NUM; - mipi_intermediate_info.padded_width = 0; - mipi_intermediate_info.raw_bit_depth = 0; - /* AM TODO: mipi frames number should come from stream struct. */ my_css.num_mipi_frames[port] = NUM_MIPI_FRAMES_PER_STREAM; diff --git a/drivers/staging/media/atomisp/pci/sh_css_param_shading.c b/drivers/staging/media/atomisp/pci/sh_css_param_shading.c index ed496f6d28f0..69cc4e423d8b 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_param_shading.c +++ b/drivers/staging/media/atomisp/pci/sh_css_param_shading.c @@ -230,15 +230,8 @@ prepare_shading_table(const struct ia_css_shading_table *in_table, const struct ia_css_binary *binary, unsigned int bds_factor) { - unsigned int input_width, - input_height, - table_width, - table_height, - left_padding, - top_padding, - padded_width, - left_cropping, - i; + unsigned int input_width, input_height, table_width, table_height, i; + unsigned int left_padding, top_padding, left_cropping; unsigned int bds_numerator, bds_denominator; int right_padding; @@ -254,15 +247,11 @@ prepare_shading_table(const struct ia_css_shading_table *in_table, return; } - padded_width = binary->in_frame_info.padded_width; - /* We use the ISP input resolution for the shading table because - shading correction is performed in the bayer domain (before bayer - down scaling). */ -#if defined(ISP2401) - padded_width = CEIL_MUL(binary->effective_in_frame_res.width + 2 * - ISP_VEC_NELEMS, - 2 * ISP_VEC_NELEMS); -#endif + /* + * We use the ISP input resolution for the shading table because + * shading correction is performed in the bayer domain (before bayer + * down scaling). + */ input_height = binary->in_frame_info.res.height; input_width = binary->in_frame_info.res.width; left_padding = binary->left_padding; diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c index fa0158c190a7..2c67c23b3700 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_params.c +++ b/drivers/staging/media/atomisp/pci/sh_css_params.c @@ -1096,7 +1096,7 @@ ia_css_params_alloc_convert_sctbl( { const struct ia_css_binary *binary = stage->binary; struct ia_css_host_data *sctbl; - unsigned int i, j, aligned_width, row_padding; + unsigned int i, j, aligned_width; unsigned int sctbl_size; short int *ptr; @@ -1111,7 +1111,6 @@ ia_css_params_alloc_convert_sctbl( } aligned_width = binary->sctbl_aligned_width_per_color; - row_padding = aligned_width - shading_table->width; sctbl_size = shading_table->height * IA_CSS_SC_NUM_COLORS * aligned_width * sizeof(short);