summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/common/linux/module.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h2
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c7
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a.h2
-rw-r--r--drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c7
5 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c
index b1638b9e..ec18df15 100644
--- a/drivers/gpu/nvgpu/common/linux/module.c
+++ b/drivers/gpu/nvgpu/common/linux/module.c
@@ -984,7 +984,7 @@ static int __exit gk20a_remove(struct platform_device *pdev)
984 gk20a_remove_sysfs(dev); 984 gk20a_remove_sysfs(dev);
985 985
986 if (platform->secure_buffer.destroy) 986 if (platform->secure_buffer.destroy)
987 platform->secure_buffer.destroy(dev, 987 platform->secure_buffer.destroy(g,
988 &platform->secure_buffer); 988 &platform->secure_buffer);
989 989
990 if (pm_runtime_enabled(dev)) 990 if (pm_runtime_enabled(dev))
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index f91e86df..19012bf5 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -695,7 +695,7 @@ struct gpu_ops {
695 * context buffer descriptor (especially fields destroy, sgt, 695 * context buffer descriptor (especially fields destroy, sgt,
696 * size). 696 * size).
697 */ 697 */
698 int (*secure_alloc)(struct device *dev, 698 int (*secure_alloc)(struct gk20a *g,
699 struct gr_ctx_buffer_desc *desc, 699 struct gr_ctx_buffer_desc *desc,
700 size_t size); 700 size_t size);
701 } mm; 701 } mm;
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 7631decf..f101d3ba 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -2728,7 +2728,6 @@ static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g)
2728{ 2728{
2729 struct gr_gk20a *gr = &g->gr; 2729 struct gr_gk20a *gr = &g->gr;
2730 int attr_buffer_size, err; 2730 int attr_buffer_size, err;
2731 struct device *dev = g->dev;
2732 2731
2733 u32 cb_buffer_size = gr->bundle_cb_default_size * 2732 u32 cb_buffer_size = gr->bundle_cb_default_size *
2734 gr_scc_bundle_cb_size_div_256b_byte_granularity_v(); 2733 gr_scc_bundle_cb_size_div_256b_byte_granularity_v();
@@ -2748,7 +2747,7 @@ static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g)
2748 goto clean_up; 2747 goto clean_up;
2749 2748
2750 if (g->ops.mm.secure_alloc) 2749 if (g->ops.mm.secure_alloc)
2751 g->ops.mm.secure_alloc(dev, 2750 g->ops.mm.secure_alloc(g,
2752 &gr->global_ctx_buffer[CIRCULAR_VPR], 2751 &gr->global_ctx_buffer[CIRCULAR_VPR],
2753 cb_buffer_size); 2752 cb_buffer_size);
2754 2753
@@ -2760,7 +2759,7 @@ static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g)
2760 goto clean_up; 2759 goto clean_up;
2761 2760
2762 if (g->ops.mm.secure_alloc) 2761 if (g->ops.mm.secure_alloc)
2763 g->ops.mm.secure_alloc(dev, 2762 g->ops.mm.secure_alloc(g,
2764 &gr->global_ctx_buffer[PAGEPOOL_VPR], 2763 &gr->global_ctx_buffer[PAGEPOOL_VPR],
2765 pagepool_buffer_size); 2764 pagepool_buffer_size);
2766 2765
@@ -2772,7 +2771,7 @@ static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g)
2772 goto clean_up; 2771 goto clean_up;
2773 2772
2774 if (g->ops.mm.secure_alloc) 2773 if (g->ops.mm.secure_alloc)
2775 g->ops.mm.secure_alloc(dev, 2774 g->ops.mm.secure_alloc(g,
2776 &gr->global_ctx_buffer[ATTRIBUTE_VPR], 2775 &gr->global_ctx_buffer[ATTRIBUTE_VPR],
2777 attr_buffer_size); 2776 attr_buffer_size);
2778 2777
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
index 9499f91a..72322e54 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
@@ -31,7 +31,7 @@ struct gr_ctx_buffer_desc;
31struct gk20a_scale_profile; 31struct gk20a_scale_profile;
32 32
33struct secure_page_buffer { 33struct secure_page_buffer {
34 void (*destroy)(struct device *, struct secure_page_buffer *); 34 void (*destroy)(struct gk20a *, struct secure_page_buffer *);
35 size_t size; 35 size_t size;
36 u64 iova; 36 u64 iova;
37}; 37};
diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
index c4216ffc..b0f6ee7d 100644
--- a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
@@ -95,7 +95,7 @@ static inline void __maybe_unused pmc_write(u32 val, unsigned long reg)
95#define MHZ_TO_HZ(x) ((x) * 1000000) 95#define MHZ_TO_HZ(x) ((x) * 1000000)
96#define HZ_TO_MHZ(x) ((x) / 1000000) 96#define HZ_TO_MHZ(x) ((x) / 1000000)
97 97
98static void gk20a_tegra_secure_page_destroy(struct device *dev, 98static void gk20a_tegra_secure_page_destroy(struct gk20a *g,
99 struct secure_page_buffer *secure_buffer) 99 struct secure_page_buffer *secure_buffer)
100{ 100{
101 DEFINE_DMA_ATTRS(attrs); 101 DEFINE_DMA_ATTRS(attrs);
@@ -148,10 +148,11 @@ static void gk20a_tegra_secure_destroy(struct gk20a *g,
148 } 148 }
149} 149}
150 150
151static int gk20a_tegra_secure_alloc(struct device *dev, 151static int gk20a_tegra_secure_alloc(struct gk20a *g,
152 struct gr_ctx_buffer_desc *desc, 152 struct gr_ctx_buffer_desc *desc,
153 size_t size) 153 size_t size)
154{ 154{
155 struct device *dev = dev_from_gk20a(g);
155 struct gk20a_platform *platform = dev_get_drvdata(dev); 156 struct gk20a_platform *platform = dev_get_drvdata(dev);
156 DEFINE_DMA_ATTRS(attrs); 157 DEFINE_DMA_ATTRS(attrs);
157 dma_addr_t iova; 158 dma_addr_t iova;
@@ -187,7 +188,7 @@ static int gk20a_tegra_secure_alloc(struct device *dev,
187 desc->mem.aperture = APERTURE_SYSMEM; 188 desc->mem.aperture = APERTURE_SYSMEM;
188 189
189 if (platform->secure_buffer.destroy) 190 if (platform->secure_buffer.destroy)
190 platform->secure_buffer.destroy(dev, &platform->secure_buffer); 191 platform->secure_buffer.destroy(g, &platform->secure_buffer);
191 192
192 return err; 193 return err;
193 194