disp: msm: fix coherent device check
Coherency check is done for all kernel revisions during begin_cpu_access, but the check is limited to older kernel revisions during end_cpu_access. Fix it to have the coherency check for all begin & end cpu access. Change-Id: I03ada0d7dea6875f0be7b4f807738480bcfb3c70 Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
This commit is contained in:
@@ -813,12 +813,11 @@ static void msm_gem_vunmap_locked(struct drm_gem_object *obj)
|
||||
if (obj->import_attach) {
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
||||
dma_buf_vunmap(obj->import_attach->dmabuf, &map);
|
||||
dma_buf_end_cpu_access(obj->import_attach->dmabuf, DMA_BIDIRECTIONAL);
|
||||
#else
|
||||
dma_buf_vunmap(obj->import_attach->dmabuf, msm_obj->vaddr);
|
||||
#endif
|
||||
if (obj->dev && obj->dev->dev && !dev_is_dma_coherent(obj->dev->dev))
|
||||
dma_buf_end_cpu_access(obj->import_attach->dmabuf, DMA_BIDIRECTIONAL);
|
||||
#endif
|
||||
} else {
|
||||
vunmap(msm_obj->vaddr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user