diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gm206/acr_gm206.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm206/acr_gm206.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/gpu/nvgpu/gm206/acr_gm206.c b/drivers/gpu/nvgpu/gm206/acr_gm206.c index 8db03105..aeccbd28 100644 --- a/drivers/gpu/nvgpu/gm206/acr_gm206.c +++ b/drivers/gpu/nvgpu/gm206/acr_gm206.c | |||
@@ -56,31 +56,12 @@ static void flcn64_set_dma(struct falc_u64 *dma_addr, u64 value) | |||
56 | int gm206_alloc_blob_space(struct gk20a *g, | 56 | int gm206_alloc_blob_space(struct gk20a *g, |
57 | size_t size, struct mem_desc *mem) | 57 | size_t size, struct mem_desc *mem) |
58 | { | 58 | { |
59 | int err = 0; | ||
60 | struct wpr_carveout_info wpr_inf; | 59 | struct wpr_carveout_info wpr_inf; |
61 | 60 | ||
62 | g->ops.pmu.get_wpr(g, &wpr_inf); | 61 | g->ops.pmu.get_wpr(g, &wpr_inf); |
63 | 62 | ||
64 | mem->aperture = APERTURE_VIDMEM; | 63 | return gk20a_gmmu_alloc_attr_vid_at(g, 0, wpr_inf.size, mem, |
65 | mem->sgt = kzalloc(sizeof(*mem->sgt), GFP_KERNEL); | 64 | wpr_inf.wpr_base); |
66 | if (!mem->sgt) { | ||
67 | gk20a_err(dev_from_gk20a(g), "failed to allocate memory\n"); | ||
68 | return -ENOMEM; | ||
69 | } | ||
70 | |||
71 | err = sg_alloc_table(mem->sgt, 1, GFP_KERNEL); | ||
72 | if (err) { | ||
73 | gk20a_err(dev_from_gk20a(g), "failed to allocate sg_table\n"); | ||
74 | goto free_sgt; | ||
75 | } | ||
76 | |||
77 | sg_dma_address(mem->sgt->sgl) = wpr_inf.wpr_base; | ||
78 | |||
79 | return err; | ||
80 | |||
81 | free_sgt: | ||
82 | gk20a_free_sgtable(&mem->sgt); | ||
83 | return err; | ||
84 | } | 65 | } |
85 | 66 | ||
86 | void gm206_init_secure_pmu(struct gpu_ops *gops) | 67 | void gm206_init_secure_pmu(struct gpu_ops *gops) |