summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 08e2e9cc..ec020d5f 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -665,7 +665,8 @@ int gk20a_init_mm_setup_sw(struct gk20a *g)
665 * this requires fixed allocations in vidmem which must be 665 * this requires fixed allocations in vidmem which must be
666 * allocated before all other buffers 666 * allocated before all other buffers
667 */ 667 */
668 if (g->ops.pmu.alloc_blob_space && g->mm.vidmem_is_vidmem) { 668 if (g->ops.pmu.alloc_blob_space
669 && !nvgpu_is_enabled(g, NVGPU_MM_UNIFIED_MEMORY)) {
669 err = g->ops.pmu.alloc_blob_space(g, 0, &g->acr.ucode_blob); 670 err = g->ops.pmu.alloc_blob_space(g, 0, &g->acr.ucode_blob);
670 if (err) 671 if (err)
671 return err; 672 return err;
@@ -1234,10 +1235,12 @@ enum nvgpu_aperture gk20a_dmabuf_aperture(struct gk20a *g,
1234 struct dma_buf *dmabuf) 1235 struct dma_buf *dmabuf)
1235{ 1236{
1236 struct gk20a *buf_owner = gk20a_vidmem_buf_owner(dmabuf); 1237 struct gk20a *buf_owner = gk20a_vidmem_buf_owner(dmabuf);
1238 bool unified_memory = nvgpu_is_enabled(g, NVGPU_MM_UNIFIED_MEMORY);
1239
1237 if (buf_owner == NULL) { 1240 if (buf_owner == NULL) {
1238 /* Not nvgpu-allocated, assume system memory */ 1241 /* Not nvgpu-allocated, assume system memory */
1239 return APERTURE_SYSMEM; 1242 return APERTURE_SYSMEM;
1240 } else if (WARN_ON(buf_owner == g && !g->mm.vidmem_is_vidmem)) { 1243 } else if (WARN_ON(buf_owner == g && unified_memory)) {
1241 /* Looks like our video memory, but this gpu doesn't support 1244 /* Looks like our video memory, but this gpu doesn't support
1242 * it. Warn about a bug and bail out */ 1245 * it. Warn about a bug and bail out */
1243 nvgpu_warn(g, 1246 nvgpu_warn(g,