mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-24 14:45:12 +08:00
media: atomisp: get rid of unused memory_realloc code
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>
This commit is contained in:
parent
5472b4db3f
commit
dc50fa18af
@ -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 \
|
||||
|
@ -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__*/
|
@ -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;
|
||||
}
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user