Loading drivers/gpu/msm/kgsl.c +12 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <linux/compat.h> #include <linux/ctype.h> #include <linux/mm.h> #include <linux/ion.h> #include <asm/cacheflush.h> #include <uapi/linux/sched/types.h> Loading Loading @@ -2352,6 +2353,7 @@ static long _gpuobj_map_dma_buf(struct kgsl_device *device, { struct kgsl_gpuobj_import_dma_buf buf; struct dma_buf *dmabuf; unsigned long flags = 0; int ret; /* Loading Loading @@ -2382,6 +2384,16 @@ static long _gpuobj_map_dma_buf(struct kgsl_device *device, if (IS_ERR_OR_NULL(dmabuf)) return (dmabuf == NULL) ? -EINVAL : PTR_ERR(dmabuf); /* * ION cache ops are routed through kgsl, so record if the dmabuf is * cached or not in the memdesc. Assume uncached if dma_buf_get_flags * fails. */ dma_buf_get_flags(dmabuf, &flags); if (flags & ION_FLAG_CACHED) entry->memdesc.flags |= KGSL_CACHEMODE_WRITEBACK << KGSL_CACHEMODE_SHIFT; ret = kgsl_setup_dma_buf(device, pagetable, entry, dmabuf); if (ret) dma_buf_put(dmabuf); Loading Loading
drivers/gpu/msm/kgsl.c +12 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <linux/compat.h> #include <linux/ctype.h> #include <linux/mm.h> #include <linux/ion.h> #include <asm/cacheflush.h> #include <uapi/linux/sched/types.h> Loading Loading @@ -2352,6 +2353,7 @@ static long _gpuobj_map_dma_buf(struct kgsl_device *device, { struct kgsl_gpuobj_import_dma_buf buf; struct dma_buf *dmabuf; unsigned long flags = 0; int ret; /* Loading Loading @@ -2382,6 +2384,16 @@ static long _gpuobj_map_dma_buf(struct kgsl_device *device, if (IS_ERR_OR_NULL(dmabuf)) return (dmabuf == NULL) ? -EINVAL : PTR_ERR(dmabuf); /* * ION cache ops are routed through kgsl, so record if the dmabuf is * cached or not in the memdesc. Assume uncached if dma_buf_get_flags * fails. */ dma_buf_get_flags(dmabuf, &flags); if (flags & ION_FLAG_CACHED) entry->memdesc.flags |= KGSL_CACHEMODE_WRITEBACK << KGSL_CACHEMODE_SHIFT; ret = kgsl_setup_dma_buf(device, pagetable, entry, dmabuf); if (ret) dma_buf_put(dmabuf); Loading