@@ -827,7 +827,6 @@ struct atomisp_s_runmode {
#define ATOMISP_MAP_FLAG_NOFLUSH 0x0001 /* Do not flush cache */
#define ATOMISP_MAP_FLAG_CACHED 0x0002 /* Enable cache */
-#define ATOMISP_MAP_FLAG_CLEARED 0x0004
struct atomisp_update_exposure {
unsigned int gain;
@@ -208,9 +208,6 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type,
goto bind_err;
}
- if (attrs & ATOMISP_MAP_FLAG_CLEARED)
- hmm_set(bo->start, 0, bytes);
-
dev_dbg(atomisp_dev,
"%s: pages: 0x%08x (%zu bytes), type: %d from highmem %d, user ptr %p, cached %d\n",
__func__, bo->start, bytes, type, from_highmem, userptr, cached);
@@ -2587,13 +2587,11 @@ sh_css_params_init(void)
xmem_sp_stage_ptrs[p][i] =
ia_css_refcount_increment(-1,
hmm_alloc(sizeof(struct sh_css_sp_stage),
- HMM_BO_PRIVATE, 0, NULL,
- ATOMISP_MAP_FLAG_CLEARED));
+ HMM_BO_PRIVATE, 0, NULL, 0));
xmem_isp_stage_ptrs[p][i] =
ia_css_refcount_increment(-1,
hmm_alloc(sizeof(struct sh_css_sp_stage),
- HMM_BO_PRIVATE, 0, NULL,
- ATOMISP_MAP_FLAG_CLEARED));
+ HMM_BO_PRIVATE, 0, NULL, 0));
if ((xmem_sp_stage_ptrs[p][i] == mmgr_NULL) ||
(xmem_isp_stage_ptrs[p][i] == mmgr_NULL)) {
@@ -2601,6 +2599,9 @@ sh_css_params_init(void)
IA_CSS_LEAVE_ERR_PRIVATE(-ENOMEM);
return -ENOMEM;
}
+
+ hmm_set(xmem_sp_stage_ptrs[p][i], 0, sizeof(struct sh_css_sp_stage));
+ hmm_set(xmem_isp_stage_ptrs[p][i], 0, sizeof(struct sh_css_sp_stage));
}
}
@@ -2612,12 +2613,10 @@ sh_css_params_init(void)
sp_ddr_ptrs = ia_css_refcount_increment(-1,
hmm_alloc(CEIL_MUL(sizeof(struct sh_css_ddr_address_map),
HIVE_ISP_DDR_WORD_BYTES),
- HMM_BO_PRIVATE, 0, NULL,
- ATOMISP_MAP_FLAG_CLEARED));
+ HMM_BO_PRIVATE, 0, NULL, 0));
xmem_sp_group_ptrs = ia_css_refcount_increment(-1,
hmm_alloc(sizeof(struct sh_css_sp_group),
- HMM_BO_PRIVATE, 0, NULL,
- ATOMISP_MAP_FLAG_CLEARED));
+ HMM_BO_PRIVATE, 0, NULL, 0));
if ((sp_ddr_ptrs == mmgr_NULL) ||
(xmem_sp_group_ptrs == mmgr_NULL)) {
@@ -2625,6 +2624,9 @@ sh_css_params_init(void)
IA_CSS_LEAVE_ERR_PRIVATE(-ENOMEM);
return -ENOMEM;
}
+ hmm_set(sp_ddr_ptrs, 0, CEIL_MUL(sizeof(struct sh_css_ddr_address_map),
+ HIVE_ISP_DDR_WORD_BYTES));
+ hmm_set(xmem_sp_group_ptrs, 0, sizeof(struct sh_css_sp_group));
IA_CSS_LEAVE_ERR_PRIVATE(0);
return 0;
}