From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> To: unlisted-recipients:; (no To-header on input) Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org Subject: [PATCH v2 06/41] media: atomisp: get rid of unused memory_realloc code Date: Sat, 30 May 2020 08:55:23 +0200 Message-ID: <f9e6c4e27373d71ba95023f3bef8e9a91a820bff.1590821410.git.mchehab+huawei@kernel.org> (raw) In-Reply-To: <cover.1590821410.git.mchehab+huawei@kernel.org> The code for it is commented out, probably because it is broken or uneeded for the driver to work. So, let's get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> --- drivers/staging/media/atomisp/Makefile | 1 - .../pci/hive_isp_css_include/memory_realloc.h | 38 --------- .../media/atomisp/pci/memory_realloc.c | 80 ------------------- .../staging/media/atomisp/pci/sh_css_params.c | 4 +- 4 files changed, 1 insertion(+), 122 deletions(-) delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_include/memory_realloc.h delete mode 100644 drivers/staging/media/atomisp/pci/memory_realloc.c diff --git a/drivers/staging/media/atomisp/Makefile b/drivers/staging/media/atomisp/Makefile index 889227dcebfe..4a77d6d6910d 100644 --- a/drivers/staging/media/atomisp/Makefile +++ b/drivers/staging/media/atomisp/Makefile @@ -115,7 +115,6 @@ atomisp-objs += \ pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.o \ pci/isp/kernels/ynr/ynr_1.0/ia_css_ynr.host.o \ pci/isp/kernels/ynr/ynr_2/ia_css_ynr2.host.o \ - pci/memory_realloc.o \ pci/mmu/isp_mmu.o \ pci/mmu/sh_mmu_mrfld.o \ pci/runtime/binary/src/binary.o \ diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/memory_realloc.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/memory_realloc.h deleted file mode 100644 index 546b93ca1186..000000000000 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/memory_realloc.h +++ /dev/null @@ -1,38 +0,0 @@ -/** -Support for Intel Camera Imaging ISP subsystem. -Copyright (c) 2010 - 2015, Intel Corporation. - -This program is free software; you can redistribute it and/or modify it -under the terms and conditions of the GNU General Public License, -version 2, as published by the Free Software Foundation. - -This program is distributed in the hope it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -more details. -*/ -#ifndef __MEMORY_REALLOC_H_INCLUDED__ -#define __MEMORY_REALLOC_H_INCLUDED__ - -/*! - * \brief - * Define the internal reallocation of private css memory - * - */ - -#include <type_support.h> -/* - * User provided file that defines the (sub)system address types: - * - hrt_vaddress a type that can hold the (sub)system virtual address range - */ -#include "system_types.h" -#include "ia_css_err.h" - -bool reallocate_buffer( - hrt_vaddress *curr_buf, - size_t *curr_size, - size_t needed_size, - bool force, - enum ia_css_err *err); - -#endif /*__MEMORY_REALLOC_H_INCLUDED__*/ diff --git a/drivers/staging/media/atomisp/pci/memory_realloc.c b/drivers/staging/media/atomisp/pci/memory_realloc.c deleted file mode 100644 index ec0a078e65f9..000000000000 --- a/drivers/staging/media/atomisp/pci/memory_realloc.c +++ /dev/null @@ -1,80 +0,0 @@ -/* -Support for Intel Camera Imaging ISP subsystem. -Copyright (c) 2010 - 2015, Intel Corporation. - -This program is free software; you can redistribute it and/or modify it -under the terms and conditions of the GNU General Public License, -version 2, as published by the Free Software Foundation. - -This program is distributed in the hope it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -more details. -*/ -#include "memory_realloc.h" -#include "ia_css_debug.h" -#include "ia_css_refcount.h" -#include "memory_access.h" - -static bool realloc_isp_css_mm_buf( - hrt_vaddress *curr_buf, - size_t *curr_size, - size_t needed_size, - bool force, - enum ia_css_err *err, - uint16_t mmgr_attribute); - -bool reallocate_buffer( - hrt_vaddress *curr_buf, - size_t *curr_size, - size_t needed_size, - bool force, - enum ia_css_err *err) -{ - bool ret; - - IA_CSS_ENTER_PRIVATE("void"); - - ret = realloc_isp_css_mm_buf(curr_buf, - curr_size, needed_size, force, err, 0); - - IA_CSS_LEAVE_PRIVATE("ret=%d", ret); - return ret; -} - -static bool realloc_isp_css_mm_buf( - hrt_vaddress *curr_buf, - size_t *curr_size, - size_t needed_size, - bool force, - enum ia_css_err *err, - uint16_t mmgr_attribute) -{ - s32 id; - - *err = IA_CSS_SUCCESS; - /* Possible optimization: add a function sh_css_isp_css_mm_realloc() - * and implement on top of hmm. */ - - IA_CSS_ENTER_PRIVATE("void"); - - if (ia_css_refcount_is_single(*curr_buf) && !force && - *curr_size >= needed_size) { - IA_CSS_LEAVE_PRIVATE("false"); - return false; - } - - id = IA_CSS_REFCOUNT_PARAM_BUFFER; - ia_css_refcount_decrement(id, *curr_buf); - *curr_buf = ia_css_refcount_increment(id, mmgr_alloc_attr(needed_size, - mmgr_attribute)); - - if (!*curr_buf) { - *err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; - *curr_size = 0; - } else { - *curr_size = needed_size; - } - IA_CSS_LEAVE_PRIVATE("true"); - return true; -} diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c index 890f8e74a85d..70a8e7ae765e 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_params.c +++ b/drivers/staging/media/atomisp/pci/sh_css_params.c @@ -46,9 +46,7 @@ #include "ia_css_pipeline.h" #include "ia_css_debug.h" #include "memory_access.h" -#if 0 /* FIXME */ -#include "memory_realloc.h" -#endif + #include "ia_css_isp_param.h" #include "ia_css_isp_params.h" #include "ia_css_mipi.h" -- 2.26.2
next prev parent reply other threads:[~2020-05-30 6:59 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-30 6:55 [PATCH v2 00/41] More atomisp fixes and cleanups Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 01/41] media: atomisp: simplify hive_isp_css_mm_hrt wrapper Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 02/41] media: atomisp: get rid of the hrt/hive_isp_css_mm_hrt abstraction layer Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 03/41] media: atomisp: reduce abstraction at ia_css_memory_access Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 04/41] media: atomisp: go one step further to drop ia_css_memory_access.c Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 05/41] media: atomisp: get rid of mmgr_load and mmgr_store Mauro Carvalho Chehab 2020-05-30 6:55 ` Mauro Carvalho Chehab [this message] 2020-05-30 6:55 ` [PATCH v2 07/41] media: atomisp: change the type returned by mmgr alloc Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 08/41] media: atomisp: get rid of memory_access.c Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 09/41] media: atomisp: hmm_bo: untag user pointers Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 10/41] media: atomisp: add debug message to help debugging hmm code Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 11/41] media: atomisp: use Yocto Aero default hmm pool sizes Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 12/41] media: atomisp: get rid of a warning message Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 13/41] media: atomisp: fix driver caps Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 14/41] media: atomisp: use pin_user_pages() for memory allocation Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 15/41] media: atomisp: add debug for hmm alloc Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 16/41] media: atomisp: improve warning for IRQ enable function Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 17/41] media: atomisp: add debug functions for received events Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 18/41] media: atomisp: add more comments about frame allocation Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 19/41] media: atomisp: remove kvmalloc/kvcalloc abstractions Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 20/41] media: atomisp: avoid OOPS due to non-existing ref_frames Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 21/41] media: atomisp: Clean up if block in sh_css_sp_init_stage Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 22/41] media: atomisp: Remove second increment of count in atomisp_subdev_probe Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 23/41] media: atomisp: Remove unnecessary NULL checks in ia_css_pipe_load_extension Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 24/41] media: atomisp: Remove unnecessary NULL check in atomisp_param Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 25/41] media: atomisp: Avoid overflow in compute_blending Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 26/41] media: atomisp: Remove binary_supports_input_format Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 27/41] media: atomisp: avoid an extra memset() when alloc memory Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 28/41] media: atomisp: remove some trivial wrappers from compat css20 Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 29/41] media: atomisp: do another round of coding style cleanup Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 31/41] media: atomisp: get rid of an error abstraction layer Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 32/41] media: atomisp: don't cause a warn if probe failed Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 33/41] media: atomisp: get rid of a bunch of other wrappers Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 34/41] media: atomisp: get rid of system_types.h Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 35/41] media: atomisp: provide more details about the firmware binaries Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 36/41] media: atomisp: print firmware data during load Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 37/41] media: atomisp: allow passing firmware name at modprobe time Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 38/41] media: atomisp: add a debug message at hmm free Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 39/41] media: atomisp: add some debug messages when binaries are used Mauro Carvalho Chehab 2020-05-30 6:55 ` [PATCH v2 40/41] media: atomisp: get rid of set_fs() dirty hacks Mauro Carvalho Chehab
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=f9e6c4e27373d71ba95023f3bef8e9a91a820bff.1590821410.git.mchehab+huawei@kernel.org \ --to=mchehab+huawei@kernel.org \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=sakari.ailus@linux.intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Unnamed repository; edit this file 'description' to name the repository. This inbox may be cloned and mirrored by anyone: git clone --mirror http://archive.lwn.net:8080/linux-media/0 linux-media/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-media linux-media/ http://archive.lwn.net:8080/linux-media \ linux-media@vger.kernel.org lwn-linux-media@archive.lwn.net public-inbox-index linux-media Example config snippet for mirrors. Newsgroup available over NNTP: nntp://archive.lwn.net/lwn.kernel.linux-media AGPL code for this site: git clone https://public-inbox.org/public-inbox.git