mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
MALI: bifrost: rk: not to use sg_dma_len in bifrost DDK r8p0-01rel0
When CONFIG_NEED_SG_DMA_LENGTH is enabled, sg_dma_len is defined as follow : "#define sg_dma_len(sg) ((sg)->dma_length)" But, dma_length is not used by the framework indeed. Change-Id: I93b4ceed28882236dc252fcabb7c7710153804a0 Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
This commit is contained in:
@@ -2491,6 +2491,9 @@ static void kbase_jd_user_buf_unmap(struct kbase_context *kctx,
|
||||
alloc->nents = 0;
|
||||
}
|
||||
|
||||
/* to replace sg_dma_len. */
|
||||
#define MALI_SG_DMA_LEN(sg) ((sg)->length)
|
||||
|
||||
#ifdef CONFIG_DMA_SHARED_BUFFER
|
||||
static int kbase_jd_umm_map(struct kbase_context *kctx,
|
||||
struct kbase_va_region *reg)
|
||||
@@ -2520,11 +2523,12 @@ static int kbase_jd_umm_map(struct kbase_context *kctx,
|
||||
KBASE_DEBUG_ASSERT(pa);
|
||||
|
||||
for_each_sg(sgt->sgl, s, sgt->nents, i) {
|
||||
size_t j, pages = PFN_UP(sg_dma_len(s));
|
||||
int j;
|
||||
size_t pages = PFN_UP(MALI_SG_DMA_LEN(s));
|
||||
|
||||
WARN_ONCE(sg_dma_len(s) & (PAGE_SIZE-1),
|
||||
"sg_dma_len(s)=%u is not a multiple of PAGE_SIZE\n",
|
||||
sg_dma_len(s));
|
||||
WARN_ONCE(MALI_SG_DMA_LEN(s) & (PAGE_SIZE-1),
|
||||
"MALI_SG_DMA_LEN(s)=%u is not a multiple of PAGE_SIZE\n",
|
||||
MALI_SG_DMA_LEN(s));
|
||||
|
||||
WARN_ONCE(sg_dma_address(s) & (PAGE_SIZE-1),
|
||||
"sg_dma_address(s)=%llx is not aligned to PAGE_SIZE\n",
|
||||
|
||||
Reference in New Issue
Block a user