Commit 63705da3 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: remove #ifdef HAS_NO_HMEM

This is not defined anywhere, so, solve the ifdefs, getting
rid of them.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 35009261
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
* more details. * more details.
*/ */
#if !defined(HAS_NO_HMEM)
#include "ia_css_types.h" #include "ia_css_types.h"
#include "sh_css_internal.h" #include "sh_css_internal.h"
...@@ -63,4 +62,3 @@ ia_css_bh_encode( ...@@ -63,4 +62,3 @@ ia_css_bh_encode(
uDIGIT_FITTING(from->ae_y_coef_b, 16, SH_CSS_AE_YCOEF_SHIFT); uDIGIT_FITTING(from->ae_y_coef_b, 16, SH_CSS_AE_YCOEF_SHIFT);
} }
#endif
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
* more details. * more details.
*/ */
#if !defined(HAS_NO_HMEM)
#include "ia_css_types.h" #include "ia_css_types.h"
#include "sh_css_internal.h" #include "sh_css_internal.h"
...@@ -32,4 +31,3 @@ ia_css_raa_encode( ...@@ -32,4 +31,3 @@ ia_css_raa_encode(
(void)from; (void)from;
} }
#endif
...@@ -227,10 +227,6 @@ ia_css_s3a_hmem_decode( ...@@ -227,10 +227,6 @@ ia_css_s3a_hmem_decode(
struct ia_css_3a_statistics *host_stats, struct ia_css_3a_statistics *host_stats,
const struct ia_css_bh_table *hmem_buf) const struct ia_css_bh_table *hmem_buf)
{ {
#if defined(HAS_NO_HMEM)
(void)host_stats;
(void)hmem_buf;
#else
struct ia_css_3a_rgby_output *out_ptr; struct ia_css_3a_rgby_output *out_ptr;
int i; int i;
...@@ -291,7 +287,6 @@ ia_css_s3a_hmem_decode( ...@@ -291,7 +287,6 @@ ia_css_s3a_hmem_decode(
out_ptr[0].g -= diff; out_ptr[0].g -= diff;
out_ptr[0].b -= diff; out_ptr[0].b -= diff;
out_ptr[0].y -= diff; out_ptr[0].y -= diff;
#endif
} }
void void
......
...@@ -805,11 +805,7 @@ ia_css_binary_3a_grid_info(const struct ia_css_binary *binary, ...@@ -805,11 +805,7 @@ ia_css_binary_3a_grid_info(const struct ia_css_binary *binary,
s3a_info->deci_factor_log2 = binary->deci_factor_log2; s3a_info->deci_factor_log2 = binary->deci_factor_log2;
s3a_info->elem_bit_depth = SH_CSS_BAYER_BITS; s3a_info->elem_bit_depth = SH_CSS_BAYER_BITS;
s3a_info->use_dmem = binary->info->sp.s3a.s3atbl_use_dmem; s3a_info->use_dmem = binary->info->sp.s3a.s3atbl_use_dmem;
#if defined(HAS_NO_HMEM)
s3a_info->has_histogram = 1;
#else
s3a_info->has_histogram = 0; s3a_info->has_histogram = 0;
#endif
IA_CSS_LEAVE_ERR_PRIVATE(err); IA_CSS_LEAVE_ERR_PRIVATE(err);
return err; return err;
} }
......
...@@ -16,12 +16,10 @@ ...@@ -16,12 +16,10 @@
#include "gdc_device.h" /* gdc_lut_store(), ... */ #include "gdc_device.h" /* gdc_lut_store(), ... */
#include "isp.h" /* ISP_VEC_ELEMBITS */ #include "isp.h" /* ISP_VEC_ELEMBITS */
#include "vamem.h" #include "vamem.h"
#if !defined(HAS_NO_HMEM)
#ifndef __INLINE_HMEM__ #ifndef __INLINE_HMEM__
#define __INLINE_HMEM__ #define __INLINE_HMEM__
#endif #endif
#include "hmem.h" #include "hmem.h"
#endif /* !defined(HAS_NO_HMEM) */
#define IA_CSS_INCLUDE_PARAMETERS #define IA_CSS_INCLUDE_PARAMETERS
#define IA_CSS_INCLUDE_ACC_PARAMETERS #define IA_CSS_INCLUDE_ACC_PARAMETERS
...@@ -1489,10 +1487,8 @@ ia_css_translate_3a_statistics( ...@@ -1489,10 +1487,8 @@ ia_css_translate_3a_statistics(
ia_css_s3a_vmem_decode(host_stats, isp_stats->vmem_stats_hi, ia_css_s3a_vmem_decode(host_stats, isp_stats->vmem_stats_hi,
isp_stats->vmem_stats_lo); isp_stats->vmem_stats_lo);
} }
#if !defined(HAS_NO_HMEM)
IA_CSS_LOG("3A: HMEM"); IA_CSS_LOG("3A: HMEM");
ia_css_s3a_hmem_decode(host_stats, isp_stats->hmem_stats); ia_css_s3a_hmem_decode(host_stats, isp_stats->hmem_stats);
#endif
IA_CSS_LEAVE("void"); IA_CSS_LEAVE("void");
} }
...@@ -2157,9 +2153,7 @@ ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid) ...@@ -2157,9 +2153,7 @@ ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
me->vmem_size = ISP_S3ATBL_HI_LO_STRIDE_BYTES * me->vmem_size = ISP_S3ATBL_HI_LO_STRIDE_BYTES *
grid->aligned_height; grid->aligned_height;
} }
#if !defined(HAS_NO_HMEM)
me->hmem_size = sizeof_hmem(HMEM0_ID); me->hmem_size = sizeof_hmem(HMEM0_ID);
#endif
/* All subsections need to be aligned to the system bus width */ /* All subsections need to be aligned to the system bus width */
me->dmem_size = CEIL_MUL(me->dmem_size, HIVE_ISP_DDR_WORD_BYTES); me->dmem_size = CEIL_MUL(me->dmem_size, HIVE_ISP_DDR_WORD_BYTES);
...@@ -4148,12 +4142,8 @@ ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid) ...@@ -4148,12 +4142,8 @@ ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
me->data = kvmalloc(grid_size * sizeof(*me->data), GFP_KERNEL); me->data = kvmalloc(grid_size * sizeof(*me->data), GFP_KERNEL);
if (!me->data) if (!me->data)
goto err; goto err;
#if !defined(HAS_NO_HMEM)
/* No weighted histogram, no structure, treat the histogram data as a byte dump in a byte array */ /* No weighted histogram, no structure, treat the histogram data as a byte dump in a byte array */
me->rgby_data = kvmalloc(sizeof_hmem(HMEM0_ID), GFP_KERNEL); me->rgby_data = kvmalloc(sizeof_hmem(HMEM0_ID), GFP_KERNEL);
#else
me->rgby_data = NULL;
#endif
IA_CSS_LEAVE("return=%p", me); IA_CSS_LEAVE("return=%p", me);
return me; return me;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment