summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 2f52fdcf..2d87911d 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -2722,7 +2722,6 @@ static void gr_gk20a_free_global_ctx_buffers(struct gk20a *g)
2722 2722
2723static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g) 2723static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g)
2724{ 2724{
2725 struct gk20a_platform *platform = dev_get_drvdata(g->dev);
2726 struct gr_gk20a *gr = &g->gr; 2725 struct gr_gk20a *gr = &g->gr;
2727 int attr_buffer_size, err; 2726 int attr_buffer_size, err;
2728 struct device *dev = g->dev; 2727 struct device *dev = g->dev;
@@ -2744,8 +2743,8 @@ static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g)
2744 if (err) 2743 if (err)
2745 goto clean_up; 2744 goto clean_up;
2746 2745
2747 if (platform->secure_alloc) 2746 if (g->ops.mm.secure_alloc)
2748 platform->secure_alloc(dev, 2747 g->ops.mm.secure_alloc(dev,
2749 &gr->global_ctx_buffer[CIRCULAR_VPR], 2748 &gr->global_ctx_buffer[CIRCULAR_VPR],
2750 cb_buffer_size); 2749 cb_buffer_size);
2751 2750
@@ -2756,8 +2755,8 @@ static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g)
2756 if (err) 2755 if (err)
2757 goto clean_up; 2756 goto clean_up;
2758 2757
2759 if (platform->secure_alloc) 2758 if (g->ops.mm.secure_alloc)
2760 platform->secure_alloc(dev, 2759 g->ops.mm.secure_alloc(dev,
2761 &gr->global_ctx_buffer[PAGEPOOL_VPR], 2760 &gr->global_ctx_buffer[PAGEPOOL_VPR],
2762 pagepool_buffer_size); 2761 pagepool_buffer_size);
2763 2762
@@ -2768,14 +2767,11 @@ static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g)
2768 if (err) 2767 if (err)
2769 goto clean_up; 2768 goto clean_up;
2770 2769
2771 if (platform->secure_alloc) 2770 if (g->ops.mm.secure_alloc)
2772 platform->secure_alloc(dev, 2771 g->ops.mm.secure_alloc(dev,
2773 &gr->global_ctx_buffer[ATTRIBUTE_VPR], 2772 &gr->global_ctx_buffer[ATTRIBUTE_VPR],
2774 attr_buffer_size); 2773 attr_buffer_size);
2775 2774
2776 if (platform->secure_buffer.destroy)
2777 platform->secure_buffer.destroy(dev, &platform->secure_buffer);
2778
2779 gk20a_dbg_info("golden_image_size : %d", 2775 gk20a_dbg_info("golden_image_size : %d",
2780 gr->ctx_vars.golden_image_size); 2776 gr->ctx_vars.golden_image_size);
2781 2777