media: atomisp: get rid of unused memory_realloc code
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 26 May 2020 06:10:18 +0000 (08:10 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Jun 2020 16:05:20 +0000 (18:05 +0200)
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
drivers/staging/media/atomisp/pci/hive_isp_css_include/memory_realloc.h [deleted file]
drivers/staging/media/atomisp/pci/memory_realloc.c [deleted file]
drivers/staging/media/atomisp/pci/sh_css_params.c

index 889227d..4a77d6d 100644 (file)
@@ -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 (file)
index 546b93c..0000000
+++ /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 (file)
index ec0a078..0000000
+++ /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;
-}
index 890f8e7..70a8e7a 100644 (file)
@@ -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"