mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
media: atomisp: drop ATOMISP_MAP_FLAG_CLEARED
This flag is only used by one hmm_alloc() caller, drop it and make the caller call hmm_set(ptr, 0, size) itself to do the clearing. Link: https://lore.kernel.org/linux-media/20220615205037.16549-26-hdegoede@redhat.com Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
2c19beb23d
commit
9f40d3a79d
@ -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);
|
||||
|
@ -2585,13 +2585,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)) {
|
||||
@ -2599,6 +2597,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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2610,12 +2611,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)) {
|
||||
@ -2623,6 +2622,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user