diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
23 files changed, 66 insertions, 57 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/clk.c b/drivers/gpu/nvgpu/common/linux/clk.c index 775e5661..f24445b3 100644 --- a/drivers/gpu/nvgpu/common/linux/clk.c +++ b/drivers/gpu/nvgpu/common/linux/clk.c | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | static unsigned long nvgpu_linux_clk_get_rate(struct gk20a *g, u32 api_domain) | 28 | static unsigned long nvgpu_linux_clk_get_rate(struct gk20a *g, u32 api_domain) |
29 | { | 29 | { |
30 | struct gk20a_platform *platform = gk20a_get_platform(g->dev); | 30 | struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g)); |
31 | unsigned long ret; | 31 | unsigned long ret; |
32 | 32 | ||
33 | switch (api_domain) { | 33 | switch (api_domain) { |
@@ -52,7 +52,7 @@ static unsigned long nvgpu_linux_clk_get_rate(struct gk20a *g, u32 api_domain) | |||
52 | static int nvgpu_linux_clk_set_rate(struct gk20a *g, | 52 | static int nvgpu_linux_clk_set_rate(struct gk20a *g, |
53 | u32 api_domain, unsigned long rate) | 53 | u32 api_domain, unsigned long rate) |
54 | { | 54 | { |
55 | struct gk20a_platform *platform = gk20a_get_platform(g->dev); | 55 | struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g)); |
56 | int ret; | 56 | int ret; |
57 | 57 | ||
58 | switch (api_domain) { | 58 | switch (api_domain) { |
diff --git a/drivers/gpu/nvgpu/common/linux/debug.c b/drivers/gpu/nvgpu/common/linux/debug.c index 2962a467..9fd09efe 100644 --- a/drivers/gpu/nvgpu/common/linux/debug.c +++ b/drivers/gpu/nvgpu/common/linux/debug.c | |||
@@ -101,13 +101,13 @@ static int gk20a_gr_debug_show(struct seq_file *s, void *unused) | |||
101 | 101 | ||
102 | void gk20a_debug_dump(struct gk20a *g) | 102 | void gk20a_debug_dump(struct gk20a *g) |
103 | { | 103 | { |
104 | struct gk20a_platform *platform = gk20a_get_platform(g->dev); | 104 | struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g)); |
105 | struct gk20a_debug_output o = { | 105 | struct gk20a_debug_output o = { |
106 | .fn = gk20a_debug_write_printk | 106 | .fn = gk20a_debug_write_printk |
107 | }; | 107 | }; |
108 | 108 | ||
109 | if (platform->dump_platform_dependencies) | 109 | if (platform->dump_platform_dependencies) |
110 | platform->dump_platform_dependencies(g->dev); | 110 | platform->dump_platform_dependencies(dev_from_gk20a(g)); |
111 | 111 | ||
112 | /* HAL only initialized after 1st power-on */ | 112 | /* HAL only initialized after 1st power-on */ |
113 | if (g->ops.debug.show_dump) | 113 | if (g->ops.debug.show_dump) |
@@ -180,12 +180,12 @@ void gk20a_init_debug_ops(struct gpu_ops *gops) | |||
180 | static int railgate_residency_show(struct seq_file *s, void *data) | 180 | static int railgate_residency_show(struct seq_file *s, void *data) |
181 | { | 181 | { |
182 | struct gk20a *g = s->private; | 182 | struct gk20a *g = s->private; |
183 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 183 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
184 | unsigned long time_since_last_state_transition_ms; | 184 | unsigned long time_since_last_state_transition_ms; |
185 | unsigned long total_rail_gate_time_ms; | 185 | unsigned long total_rail_gate_time_ms; |
186 | unsigned long total_rail_ungate_time_ms; | 186 | unsigned long total_rail_ungate_time_ms; |
187 | 187 | ||
188 | if (platform->is_railgated(g->dev)) { | 188 | if (platform->is_railgated(dev_from_gk20a(g))) { |
189 | time_since_last_state_transition_ms = | 189 | time_since_last_state_transition_ms = |
190 | jiffies_to_msecs(jiffies - | 190 | jiffies_to_msecs(jiffies - |
191 | g->pstats.last_rail_gate_complete); | 191 | g->pstats.last_rail_gate_complete); |
@@ -227,7 +227,7 @@ static const struct file_operations railgate_residency_fops = { | |||
227 | 227 | ||
228 | static int gk20a_railgating_debugfs_init(struct gk20a *g) | 228 | static int gk20a_railgating_debugfs_init(struct gk20a *g) |
229 | { | 229 | { |
230 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 230 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
231 | struct dentry *d; | 231 | struct dentry *d; |
232 | 232 | ||
233 | if (!g->can_railgate) | 233 | if (!g->can_railgate) |
@@ -244,7 +244,7 @@ static int gk20a_railgating_debugfs_init(struct gk20a *g) | |||
244 | 244 | ||
245 | void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink) | 245 | void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink) |
246 | { | 246 | { |
247 | struct device *dev = g->dev; | 247 | struct device *dev = dev_from_gk20a(g); |
248 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 248 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
249 | 249 | ||
250 | platform->debugfs = debugfs_create_dir(dev_name(dev), NULL); | 250 | platform->debugfs = debugfs_create_dir(dev_name(dev), NULL); |
@@ -364,7 +364,7 @@ void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink) | |||
364 | 364 | ||
365 | void gk20a_debug_deinit(struct gk20a *g) | 365 | void gk20a_debug_deinit(struct gk20a *g) |
366 | { | 366 | { |
367 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 367 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
368 | 368 | ||
369 | if (!platform->debugfs) | 369 | if (!platform->debugfs) |
370 | return; | 370 | return; |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_allocator.c b/drivers/gpu/nvgpu/common/linux/debug_allocator.c index 3d4a2bb2..9102b989 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_allocator.c +++ b/drivers/gpu/nvgpu/common/linux/debug_allocator.c | |||
@@ -67,7 +67,7 @@ void nvgpu_fini_alloc_debug(struct nvgpu_allocator *a) | |||
67 | 67 | ||
68 | void nvgpu_alloc_debugfs_init(struct gk20a *g) | 68 | void nvgpu_alloc_debugfs_init(struct gk20a *g) |
69 | { | 69 | { |
70 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 70 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
71 | 71 | ||
72 | g->debugfs_allocators = debugfs_create_dir("allocators", platform->debugfs); | 72 | g->debugfs_allocators = debugfs_create_dir("allocators", platform->debugfs); |
73 | if (IS_ERR_OR_NULL(g->debugfs_allocators)) { | 73 | if (IS_ERR_OR_NULL(g->debugfs_allocators)) { |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_cde.c b/drivers/gpu/nvgpu/common/linux/debug_cde.c index eb7c33e2..d3aab3cd 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_cde.c +++ b/drivers/gpu/nvgpu/common/linux/debug_cde.c | |||
@@ -33,7 +33,7 @@ static const struct file_operations gk20a_cde_reload_fops = { | |||
33 | 33 | ||
34 | void gk20a_cde_debugfs_init(struct gk20a *g) | 34 | void gk20a_cde_debugfs_init(struct gk20a *g) |
35 | { | 35 | { |
36 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 36 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
37 | 37 | ||
38 | if (!platform->has_cde) | 38 | if (!platform->has_cde) |
39 | return; | 39 | return; |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_ce.c b/drivers/gpu/nvgpu/common/linux/debug_ce.c index 9c50870e..95f0d2ad 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_ce.c +++ b/drivers/gpu/nvgpu/common/linux/debug_ce.c | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | void gk20a_ce_debugfs_init(struct gk20a *g) | 20 | void gk20a_ce_debugfs_init(struct gk20a *g) |
21 | { | 21 | { |
22 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 22 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
23 | 23 | ||
24 | debugfs_create_u32("ce_app_ctx_count", S_IWUSR | S_IRUGO, | 24 | debugfs_create_u32("ce_app_ctx_count", S_IWUSR | S_IRUGO, |
25 | platform->debugfs, &g->ce_app.ctx_count); | 25 | platform->debugfs, &g->ce_app.ctx_count); |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_clk.c b/drivers/gpu/nvgpu/common/linux/debug_clk.c index 9dfa2d77..5bbe4127 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_clk.c +++ b/drivers/gpu/nvgpu/common/linux/debug_clk.c | |||
@@ -217,7 +217,7 @@ static const struct file_operations pll_param_fops = { | |||
217 | int gm20b_clk_init_debugfs(struct gk20a *g) | 217 | int gm20b_clk_init_debugfs(struct gk20a *g) |
218 | { | 218 | { |
219 | struct dentry *d; | 219 | struct dentry *d; |
220 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 220 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
221 | 221 | ||
222 | if (!platform->debugfs) | 222 | if (!platform->debugfs) |
223 | return -EINVAL; | 223 | return -EINVAL; |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_fifo.c b/drivers/gpu/nvgpu/common/linux/debug_fifo.c index 04937dbe..1fba1868 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_fifo.c +++ b/drivers/gpu/nvgpu/common/linux/debug_fifo.c | |||
@@ -291,7 +291,7 @@ static const struct file_operations gk20a_fifo_profile_stats_debugfs_fops = { | |||
291 | 291 | ||
292 | void gk20a_fifo_debugfs_init(struct gk20a *g) | 292 | void gk20a_fifo_debugfs_init(struct gk20a *g) |
293 | { | 293 | { |
294 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 294 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
295 | 295 | ||
296 | struct dentry *gpu_root = platform->debugfs; | 296 | struct dentry *gpu_root = platform->debugfs; |
297 | struct dentry *fifo_root; | 297 | struct dentry *fifo_root; |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_gr.c b/drivers/gpu/nvgpu/common/linux/debug_gr.c index 56b8612e..1045fe0b 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_gr.c +++ b/drivers/gpu/nvgpu/common/linux/debug_gr.c | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | int gr_gk20a_debugfs_init(struct gk20a *g) | 20 | int gr_gk20a_debugfs_init(struct gk20a *g) |
21 | { | 21 | { |
22 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 22 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
23 | 23 | ||
24 | g->debugfs_gr_default_attrib_cb_size = | 24 | g->debugfs_gr_default_attrib_cb_size = |
25 | debugfs_create_u32("gr_default_attrib_cb_size", | 25 | debugfs_create_u32("gr_default_attrib_cb_size", |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_kmem.c b/drivers/gpu/nvgpu/common/linux/debug_kmem.c index 2ee542a8..ff8d49cd 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_kmem.c +++ b/drivers/gpu/nvgpu/common/linux/debug_kmem.c | |||
@@ -295,7 +295,7 @@ static const struct file_operations __kmem_traces_fops = { | |||
295 | 295 | ||
296 | void nvgpu_kmem_debugfs_init(struct gk20a *g) | 296 | void nvgpu_kmem_debugfs_init(struct gk20a *g) |
297 | { | 297 | { |
298 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 298 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
299 | struct dentry *node; | 299 | struct dentry *node; |
300 | 300 | ||
301 | g->debugfs_kmem = debugfs_create_dir("kmem_tracking", platform->debugfs); | 301 | g->debugfs_kmem = debugfs_create_dir("kmem_tracking", platform->debugfs); |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_mm.c b/drivers/gpu/nvgpu/common/linux/debug_mm.c index 1e260f89..dcb83112 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_mm.c +++ b/drivers/gpu/nvgpu/common/linux/debug_mm.c | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | void gk20a_mm_debugfs_init(struct gk20a *g) | 20 | void gk20a_mm_debugfs_init(struct gk20a *g) |
21 | { | 21 | { |
22 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 22 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
23 | 23 | ||
24 | debugfs_create_bool("force_pramin", 0664, platform->debugfs, | 24 | debugfs_create_bool("force_pramin", 0664, platform->debugfs, |
25 | &g->mm.force_pramin); | 25 | &g->mm.force_pramin); |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_pmu.c b/drivers/gpu/nvgpu/common/linux/debug_pmu.c index 7d9f5ac3..0d364fe7 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_pmu.c +++ b/drivers/gpu/nvgpu/common/linux/debug_pmu.c | |||
@@ -416,7 +416,7 @@ static const struct file_operations security_fops = { | |||
416 | int gk20a_pmu_debugfs_init(struct gk20a *g) | 416 | int gk20a_pmu_debugfs_init(struct gk20a *g) |
417 | { | 417 | { |
418 | struct dentry *d; | 418 | struct dentry *d; |
419 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 419 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
420 | 420 | ||
421 | d = debugfs_create_file( | 421 | d = debugfs_create_file( |
422 | "lpwr_debug", S_IRUGO|S_IWUSR, platform->debugfs, g, | 422 | "lpwr_debug", S_IRUGO|S_IWUSR, platform->debugfs, g, |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_sched.c b/drivers/gpu/nvgpu/common/linux/debug_sched.c index 40b93149..73fb890f 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_sched.c +++ b/drivers/gpu/nvgpu/common/linux/debug_sched.c | |||
@@ -72,7 +72,7 @@ static const struct file_operations gk20a_sched_debugfs_fops = { | |||
72 | 72 | ||
73 | void gk20a_sched_debugfs_init(struct gk20a *g) | 73 | void gk20a_sched_debugfs_init(struct gk20a *g) |
74 | { | 74 | { |
75 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 75 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
76 | 76 | ||
77 | debugfs_create_file("sched_ctrl", S_IRUGO, platform->debugfs, | 77 | debugfs_create_file("sched_ctrl", S_IRUGO, platform->debugfs, |
78 | g, &gk20a_sched_debugfs_fops); | 78 | g, &gk20a_sched_debugfs_fops); |
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index eb4f490f..c2bd9d78 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c | |||
@@ -35,7 +35,8 @@ | |||
35 | static void nvgpu_init_vars(struct gk20a *g) | 35 | static void nvgpu_init_vars(struct gk20a *g) |
36 | { | 36 | { |
37 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | 37 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); |
38 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 38 | struct device *dev = dev_from_gk20a(g); |
39 | struct gk20a_platform *platform = dev_get_drvdata(dev); | ||
39 | 40 | ||
40 | init_waitqueue_head(&g->sw_irq_stall_last_handled_wq); | 41 | init_waitqueue_head(&g->sw_irq_stall_last_handled_wq); |
41 | init_waitqueue_head(&g->sw_irq_nonstall_last_handled_wq); | 42 | init_waitqueue_head(&g->sw_irq_nonstall_last_handled_wq); |
@@ -57,8 +58,8 @@ static void nvgpu_init_vars(struct gk20a *g) | |||
57 | g->emc3d_ratio = EMC3D_DEFAULT_RATIO; | 58 | g->emc3d_ratio = EMC3D_DEFAULT_RATIO; |
58 | 59 | ||
59 | /* Set DMA parameters to allow larger sgt lists */ | 60 | /* Set DMA parameters to allow larger sgt lists */ |
60 | g->dev->dma_parms = &l->dma_parms; | 61 | dev->dma_parms = &l->dma_parms; |
61 | dma_set_max_seg_size(g->dev, UINT_MAX); | 62 | dma_set_max_seg_size(dev, UINT_MAX); |
62 | 63 | ||
63 | nvgpu_init_list_node(&g->pending_sema_waits); | 64 | nvgpu_init_list_node(&g->pending_sema_waits); |
64 | nvgpu_raw_spinlock_init(&g->pending_sema_waits_lock); | 65 | nvgpu_raw_spinlock_init(&g->pending_sema_waits_lock); |
@@ -68,7 +69,7 @@ static void nvgpu_init_vars(struct gk20a *g) | |||
68 | 69 | ||
69 | static void nvgpu_init_timeout(struct gk20a *g) | 70 | static void nvgpu_init_timeout(struct gk20a *g) |
70 | { | 71 | { |
71 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 72 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
72 | 73 | ||
73 | g->gr_idle_timeout_default = CONFIG_GK20A_DEFAULT_TIMEOUT; | 74 | g->gr_idle_timeout_default = CONFIG_GK20A_DEFAULT_TIMEOUT; |
74 | if (nvgpu_platform_is_silicon(g)) | 75 | if (nvgpu_platform_is_silicon(g)) |
@@ -94,7 +95,7 @@ static void nvgpu_init_timeslice(struct gk20a *g) | |||
94 | 95 | ||
95 | static void nvgpu_init_pm_vars(struct gk20a *g) | 96 | static void nvgpu_init_pm_vars(struct gk20a *g) |
96 | { | 97 | { |
97 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 98 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
98 | 99 | ||
99 | /* | 100 | /* |
100 | * Set up initial power settings. For non-slicon platforms, disable | 101 | * Set up initial power settings. For non-slicon platforms, disable |
@@ -119,7 +120,7 @@ static void nvgpu_init_pm_vars(struct gk20a *g) | |||
119 | g->aggressive_sync_destroy_thresh = platform->aggressive_sync_destroy_thresh; | 120 | g->aggressive_sync_destroy_thresh = platform->aggressive_sync_destroy_thresh; |
120 | g->has_syncpoints = platform->has_syncpoints; | 121 | g->has_syncpoints = platform->has_syncpoints; |
121 | g->ptimer_src_freq = platform->ptimer_src_freq; | 122 | g->ptimer_src_freq = platform->ptimer_src_freq; |
122 | g->support_pmu = support_gk20a_pmu(g->dev); | 123 | g->support_pmu = support_gk20a_pmu(dev_from_gk20a(g)); |
123 | g->can_railgate = platform->can_railgate_init; | 124 | g->can_railgate = platform->can_railgate_init; |
124 | g->railgate_delay = platform->railgate_delay_init; | 125 | g->railgate_delay = platform->railgate_delay_init; |
125 | 126 | ||
@@ -133,7 +134,7 @@ static void nvgpu_init_pm_vars(struct gk20a *g) | |||
133 | 134 | ||
134 | static void nvgpu_init_mm_vars(struct gk20a *g) | 135 | static void nvgpu_init_mm_vars(struct gk20a *g) |
135 | { | 136 | { |
136 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 137 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); |
137 | 138 | ||
138 | g->mm.bypass_smmu = platform->bypass_smmu; | 139 | g->mm.bypass_smmu = platform->bypass_smmu; |
139 | g->mm.disable_bigpage = platform->disable_bigpage; | 140 | g->mm.disable_bigpage = platform->disable_bigpage; |
@@ -153,7 +154,8 @@ int nvgpu_probe(struct gk20a *g, | |||
153 | const char *interface_name, | 154 | const char *interface_name, |
154 | struct class *class) | 155 | struct class *class) |
155 | { | 156 | { |
156 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | 157 | struct device *dev = dev_from_gk20a(g); |
158 | struct gk20a_platform *platform = dev_get_drvdata(dev); | ||
157 | int err = 0; | 159 | int err = 0; |
158 | 160 | ||
159 | nvgpu_init_vars(g); | 161 | nvgpu_init_vars(g); |
@@ -162,7 +164,7 @@ int nvgpu_probe(struct gk20a *g, | |||
162 | nvgpu_init_pm_vars(g); | 164 | nvgpu_init_pm_vars(g); |
163 | 165 | ||
164 | /* Initialize the platform interface. */ | 166 | /* Initialize the platform interface. */ |
165 | err = platform->probe(g->dev); | 167 | err = platform->probe(dev); |
166 | if (err) { | 168 | if (err) { |
167 | if (err == -EPROBE_DEFER) | 169 | if (err == -EPROBE_DEFER) |
168 | nvgpu_info(g, "platform probe failed"); | 170 | nvgpu_info(g, "platform probe failed"); |
@@ -172,17 +174,17 @@ int nvgpu_probe(struct gk20a *g, | |||
172 | } | 174 | } |
173 | 175 | ||
174 | /* platform probe can defer do user init only if probe succeeds */ | 176 | /* platform probe can defer do user init only if probe succeeds */ |
175 | err = gk20a_user_init(g->dev, interface_name, class); | 177 | err = gk20a_user_init(dev, interface_name, class); |
176 | if (err) | 178 | if (err) |
177 | return err; | 179 | return err; |
178 | 180 | ||
179 | 181 | ||
180 | /* Initialise scaling */ | 182 | /* Initialise scaling */ |
181 | if (IS_ENABLED(CONFIG_GK20A_DEVFREQ)) | 183 | if (IS_ENABLED(CONFIG_GK20A_DEVFREQ)) |
182 | gk20a_scale_init(g->dev); | 184 | gk20a_scale_init(dev); |
183 | 185 | ||
184 | if (platform->late_probe) { | 186 | if (platform->late_probe) { |
185 | err = platform->late_probe(g->dev); | 187 | err = platform->late_probe(dev); |
186 | if (err) { | 188 | if (err) { |
187 | nvgpu_err(g, "late probe failed"); | 189 | nvgpu_err(g, "late probe failed"); |
188 | return err; | 190 | return err; |
@@ -191,7 +193,7 @@ int nvgpu_probe(struct gk20a *g, | |||
191 | 193 | ||
192 | nvgpu_init_mm_vars(g); | 194 | nvgpu_init_mm_vars(g); |
193 | 195 | ||
194 | nvgpu_create_sysfs(g->dev); | 196 | nvgpu_create_sysfs(dev); |
195 | gk20a_debug_init(g, debugfs_symlink); | 197 | gk20a_debug_init(g, debugfs_symlink); |
196 | 198 | ||
197 | g->dbg_regops_tmp_buf = nvgpu_kzalloc(g, SZ_4K); | 199 | g->dbg_regops_tmp_buf = nvgpu_kzalloc(g, SZ_4K); |
diff --git a/drivers/gpu/nvgpu/common/linux/firmware.c b/drivers/gpu/nvgpu/common/linux/firmware.c index bc4e876a..549e83ae 100644 --- a/drivers/gpu/nvgpu/common/linux/firmware.c +++ b/drivers/gpu/nvgpu/common/linux/firmware.c | |||
@@ -65,7 +65,7 @@ struct nvgpu_firmware *nvgpu_request_firmware(struct gk20a *g, | |||
65 | const char *fw_name, | 65 | const char *fw_name, |
66 | int flags) | 66 | int flags) |
67 | { | 67 | { |
68 | struct device *dev = g->dev; | 68 | struct device *dev = dev_from_gk20a(g); |
69 | struct nvgpu_firmware *fw; | 69 | struct nvgpu_firmware *fw; |
70 | const struct firmware *linux_fw; | 70 | const struct firmware *linux_fw; |
71 | 71 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c index 5905e5a6..2242e19e 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "gk20a/ctxsw_trace_gk20a.h" | 32 | #include "gk20a/ctxsw_trace_gk20a.h" |
33 | #include "gk20a/dbg_gpu_gk20a.h" | 33 | #include "gk20a/dbg_gpu_gk20a.h" |
34 | #include "gk20a/fence_gk20a.h" | 34 | #include "gk20a/fence_gk20a.h" |
35 | #include "gk20a/platform_gk20a.h" | ||
35 | #include "ioctl_channel.h" | 36 | #include "ioctl_channel.h" |
36 | #include "os_linux.h" | 37 | #include "os_linux.h" |
37 | 38 | ||
@@ -291,7 +292,7 @@ int gk20a_channel_release(struct inode *inode, struct file *filp) | |||
291 | goto channel_release; | 292 | goto channel_release; |
292 | } | 293 | } |
293 | 294 | ||
294 | trace_gk20a_channel_release(dev_name(g->dev)); | 295 | trace_gk20a_channel_release(dev_name(dev_from_gk20a(g))); |
295 | 296 | ||
296 | gk20a_channel_close(ch); | 297 | gk20a_channel_close(ch); |
297 | gk20a_channel_free_error_notifiers(ch); | 298 | gk20a_channel_free_error_notifiers(ch); |
@@ -319,7 +320,7 @@ static int __gk20a_channel_open(struct gk20a *g, | |||
319 | if (!g) | 320 | if (!g) |
320 | return -ENODEV; | 321 | return -ENODEV; |
321 | 322 | ||
322 | trace_gk20a_channel_open(dev_name(g->dev)); | 323 | trace_gk20a_channel_open(dev_name(dev_from_gk20a(g))); |
323 | 324 | ||
324 | priv = nvgpu_kzalloc(g, sizeof(*priv)); | 325 | priv = nvgpu_kzalloc(g, sizeof(*priv)); |
325 | if (!priv) { | 326 | if (!priv) { |
@@ -388,7 +389,7 @@ int gk20a_channel_open_ioctl(struct gk20a *g, | |||
388 | fd = err; | 389 | fd = err; |
389 | 390 | ||
390 | snprintf(name, sizeof(name), "nvhost-%s-fd%d", | 391 | snprintf(name, sizeof(name), "nvhost-%s-fd%d", |
391 | dev_name(g->dev), fd); | 392 | dev_name(dev_from_gk20a(g)), fd); |
392 | 393 | ||
393 | file = anon_inode_getfile(name, l->channel.cdev.ops, NULL, O_RDWR); | 394 | file = anon_inode_getfile(name, l->channel.cdev.ops, NULL, O_RDWR); |
394 | if (IS_ERR(file)) { | 395 | if (IS_ERR(file)) { |
@@ -841,7 +842,7 @@ long gk20a_channel_ioctl(struct file *filp, | |||
841 | { | 842 | { |
842 | struct channel_priv *priv = filp->private_data; | 843 | struct channel_priv *priv = filp->private_data; |
843 | struct channel_gk20a *ch = priv->c; | 844 | struct channel_gk20a *ch = priv->c; |
844 | struct device *dev = ch->g->dev; | 845 | struct device *dev = dev_from_gk20a(ch->g); |
845 | u8 buf[NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE] = {0}; | 846 | u8 buf[NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE] = {0}; |
846 | int err = 0; | 847 | int err = 0; |
847 | 848 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index 5c5ac645..2c274f23 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |||
@@ -68,7 +68,7 @@ int gk20a_ctrl_dev_open(struct inode *inode, struct file *filp) | |||
68 | goto free_ref; | 68 | goto free_ref; |
69 | } | 69 | } |
70 | filp->private_data = priv; | 70 | filp->private_data = priv; |
71 | priv->dev = g->dev; | 71 | priv->dev = dev_from_gk20a(g); |
72 | /* | 72 | /* |
73 | * We dont close the arbiter fd's after driver teardown to support | 73 | * We dont close the arbiter fd's after driver teardown to support |
74 | * GPU_LOST events, so we store g here, instead of dereferencing the | 74 | * GPU_LOST events, so we store g here, instead of dereferencing the |
diff --git a/drivers/gpu/nvgpu/common/linux/log.c b/drivers/gpu/nvgpu/common/linux/log.c index bb1e5f63..9883acfc 100644 --- a/drivers/gpu/nvgpu/common/linux/log.c +++ b/drivers/gpu/nvgpu/common/linux/log.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <nvgpu/log.h> | 20 | #include <nvgpu/log.h> |
21 | 21 | ||
22 | #include "gk20a/gk20a.h" | 22 | #include "gk20a/gk20a.h" |
23 | #include "gk20a/platform_gk20a.h" | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * Define a length for log buffers. This is the buffer that the 'fmt, ...' part | 26 | * Define a length for log buffers. This is the buffer that the 'fmt, ...' part |
@@ -52,7 +53,7 @@ int nvgpu_log_mask_enabled(struct gk20a *g, u32 log_mask) | |||
52 | 53 | ||
53 | static inline const char *nvgpu_log_name(struct gk20a *g) | 54 | static inline const char *nvgpu_log_name(struct gk20a *g) |
54 | { | 55 | { |
55 | return dev_name(g->dev); | 56 | return dev_name(dev_from_gk20a(g)); |
56 | } | 57 | } |
57 | 58 | ||
58 | #ifdef CONFIG_GK20A_TRACE_PRINTK | 59 | #ifdef CONFIG_GK20A_TRACE_PRINTK |
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index bb7e260d..b107a721 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -78,7 +78,7 @@ int gk20a_busy(struct gk20a *g) | |||
78 | goto fail; | 78 | goto fail; |
79 | } | 79 | } |
80 | 80 | ||
81 | dev = g->dev; | 81 | dev = dev_from_gk20a(g); |
82 | 82 | ||
83 | if (pm_runtime_enabled(dev)) { | 83 | if (pm_runtime_enabled(dev)) { |
84 | ret = pm_runtime_get_sync(dev); | 84 | ret = pm_runtime_get_sync(dev); |
@@ -116,7 +116,7 @@ void gk20a_idle(struct gk20a *g) | |||
116 | 116 | ||
117 | atomic_dec(&g->usage_count); | 117 | atomic_dec(&g->usage_count); |
118 | 118 | ||
119 | dev = g->dev; | 119 | dev = dev_from_gk20a(g); |
120 | 120 | ||
121 | if (!(dev && gk20a_can_busy(g))) | 121 | if (!(dev && gk20a_can_busy(g))) |
122 | return; | 122 | return; |
@@ -175,7 +175,7 @@ int gk20a_pm_finalize_poweron(struct device *dev) | |||
175 | enable_irq(g->irq_nonstall); | 175 | enable_irq(g->irq_nonstall); |
176 | g->irqs_enabled = 1; | 176 | g->irqs_enabled = 1; |
177 | 177 | ||
178 | gk20a_scale_resume(g->dev); | 178 | gk20a_scale_resume(dev_from_gk20a(g)); |
179 | 179 | ||
180 | if (platform->has_cde) | 180 | if (platform->has_cde) |
181 | gk20a_init_cde_support(g); | 181 | gk20a_init_cde_support(g); |
@@ -269,7 +269,7 @@ static struct of_device_id tegra_gk20a_of_match[] = { | |||
269 | */ | 269 | */ |
270 | int __gk20a_do_idle(struct gk20a *g, bool force_reset) | 270 | int __gk20a_do_idle(struct gk20a *g, bool force_reset) |
271 | { | 271 | { |
272 | struct device *dev = g->dev; | 272 | struct device *dev = dev_from_gk20a(g); |
273 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 273 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
274 | struct nvgpu_timeout timeout; | 274 | struct nvgpu_timeout timeout; |
275 | int ref_cnt; | 275 | int ref_cnt; |
@@ -410,7 +410,7 @@ static int gk20a_do_idle(void *_g) | |||
410 | */ | 410 | */ |
411 | int __gk20a_do_unidle(struct gk20a *g) | 411 | int __gk20a_do_unidle(struct gk20a *g) |
412 | { | 412 | { |
413 | struct device *dev = g->dev; | 413 | struct device *dev = dev_from_gk20a(g); |
414 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 414 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
415 | int err; | 415 | int err; |
416 | 416 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/nvhost.c b/drivers/gpu/nvgpu/common/linux/nvhost.c index 96865f7d..8e337529 100644 --- a/drivers/gpu/nvgpu/common/linux/nvhost.c +++ b/drivers/gpu/nvgpu/common/linux/nvhost.c | |||
@@ -23,10 +23,11 @@ | |||
23 | #include "nvhost_priv.h" | 23 | #include "nvhost_priv.h" |
24 | 24 | ||
25 | #include "gk20a/gk20a.h" | 25 | #include "gk20a/gk20a.h" |
26 | #include "gk20a/platform_gk20a.h" | ||
26 | 27 | ||
27 | int nvgpu_get_nvhost_dev(struct gk20a *g) | 28 | int nvgpu_get_nvhost_dev(struct gk20a *g) |
28 | { | 29 | { |
29 | struct device_node *np = g->dev->of_node; | 30 | struct device_node *np = dev_from_gk20a(g)->of_node; |
30 | struct platform_device *host1x_pdev = NULL; | 31 | struct platform_device *host1x_pdev = NULL; |
31 | const __be32 *host1x_ptr; | 32 | const __be32 *host1x_ptr; |
32 | 33 | ||
@@ -151,7 +152,7 @@ int nvgpu_nvhost_syncpt_read_ext_check( | |||
151 | 152 | ||
152 | int nvgpu_nvhost_create_symlink(struct gk20a *g) | 153 | int nvgpu_nvhost_create_symlink(struct gk20a *g) |
153 | { | 154 | { |
154 | struct device *dev = g->dev; | 155 | struct device *dev = dev_from_gk20a(g); |
155 | int err = 0; | 156 | int err = 0; |
156 | 157 | ||
157 | if (g->nvhost_dev && | 158 | if (g->nvhost_dev && |
@@ -166,7 +167,7 @@ int nvgpu_nvhost_create_symlink(struct gk20a *g) | |||
166 | 167 | ||
167 | void nvgpu_nvhost_remove_symlink(struct gk20a *g) | 168 | void nvgpu_nvhost_remove_symlink(struct gk20a *g) |
168 | { | 169 | { |
169 | struct device *dev = g->dev; | 170 | struct device *dev = dev_from_gk20a(g); |
170 | 171 | ||
171 | if (g->nvhost_dev && | 172 | if (g->nvhost_dev && |
172 | (dev->parent != &g->nvhost_dev->host1x_pdev->dev)) { | 173 | (dev->parent != &g->nvhost_dev->host1x_pdev->dev)) { |
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index 5fcf717c..15435934 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c | |||
@@ -469,7 +469,7 @@ static void nvgpu_pci_remove(struct pci_dev *pdev) | |||
469 | nvgpu_clk_arb_cleanup_arbiter(g); | 469 | nvgpu_clk_arb_cleanup_arbiter(g); |
470 | #endif | 470 | #endif |
471 | 471 | ||
472 | gk20a_user_deinit(g->dev, &nvgpu_pci_class); | 472 | gk20a_user_deinit(dev_from_gk20a(g), &nvgpu_pci_class); |
473 | gk20a_dbg(gpu_dbg_shutdown, "User de-init done.\b"); | 473 | gk20a_dbg(gpu_dbg_shutdown, "User de-init done.\b"); |
474 | 474 | ||
475 | #ifdef CONFIG_DEBUG_FS | 475 | #ifdef CONFIG_DEBUG_FS |
@@ -477,10 +477,10 @@ static void nvgpu_pci_remove(struct pci_dev *pdev) | |||
477 | debugfs_remove_recursive(platform->debugfs_alias); | 477 | debugfs_remove_recursive(platform->debugfs_alias); |
478 | #endif | 478 | #endif |
479 | 479 | ||
480 | nvgpu_remove_sysfs(g->dev); | 480 | nvgpu_remove_sysfs(dev_from_gk20a(g)); |
481 | 481 | ||
482 | if (platform->remove) | 482 | if (platform->remove) |
483 | platform->remove(g->dev); | 483 | platform->remove(dev_from_gk20a(g)); |
484 | gk20a_dbg(gpu_dbg_shutdown, "Platform remove done.\b"); | 484 | gk20a_dbg(gpu_dbg_shutdown, "Platform remove done.\b"); |
485 | 485 | ||
486 | enable_irq(g->irq_stall); | 486 | enable_irq(g->irq_stall); |
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c index 9652c1da..19a05c90 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | |||
@@ -760,7 +760,7 @@ static int gm20b_register_gpcclk(struct gk20a *g) | |||
760 | 760 | ||
761 | /* Data in .init is copied by clk_register(), so stack variable OK */ | 761 | /* Data in .init is copied by clk_register(), so stack variable OK */ |
762 | clk->hw.init = &init; | 762 | clk->hw.init = &init; |
763 | c = clk_register(g->dev, &clk->hw); | 763 | c = clk_register(dev_from_gk20a(g), &clk->hw); |
764 | if (IS_ERR(c)) { | 764 | if (IS_ERR(c)) { |
765 | nvgpu_err(g, "Failed to register GPCPLL clock"); | 765 | nvgpu_err(g, "Failed to register GPCPLL clock"); |
766 | return -EINVAL; | 766 | return -EINVAL; |
diff --git a/drivers/gpu/nvgpu/common/linux/sysfs.c b/drivers/gpu/nvgpu/common/linux/sysfs.c index e0da4661..28ebb21d 100644 --- a/drivers/gpu/nvgpu/common/linux/sysfs.c +++ b/drivers/gpu/nvgpu/common/linux/sysfs.c | |||
@@ -388,7 +388,7 @@ static ssize_t is_railgated_show(struct device *dev, | |||
388 | bool is_railgated = 0; | 388 | bool is_railgated = 0; |
389 | 389 | ||
390 | if (platform->is_railgated) | 390 | if (platform->is_railgated) |
391 | is_railgated = platform->is_railgated(platform->g->dev); | 391 | is_railgated = platform->is_railgated(dev); |
392 | 392 | ||
393 | return snprintf(buf, PAGE_SIZE, "%s\n", is_railgated ? "yes" : "no"); | 393 | return snprintf(buf, PAGE_SIZE, "%s\n", is_railgated ? "yes" : "no"); |
394 | } | 394 | } |
diff --git a/drivers/gpu/nvgpu/common/linux/vm.c b/drivers/gpu/nvgpu/common/linux/vm.c index f356fee2..cbacbdc0 100644 --- a/drivers/gpu/nvgpu/common/linux/vm.c +++ b/drivers/gpu/nvgpu/common/linux/vm.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "gk20a/gk20a.h" | 26 | #include "gk20a/gk20a.h" |
27 | #include "gk20a/mm_gk20a.h" | 27 | #include "gk20a/mm_gk20a.h" |
28 | #include "gk20a/kind_gk20a.h" | 28 | #include "gk20a/kind_gk20a.h" |
29 | #include "gk20a/platform_gk20a.h" | ||
29 | 30 | ||
30 | #include "vm_priv.h" | 31 | #include "vm_priv.h" |
31 | 32 | ||
@@ -187,6 +188,7 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm, | |||
187 | struct vm_gk20a_mapping_batch *batch) | 188 | struct vm_gk20a_mapping_batch *batch) |
188 | { | 189 | { |
189 | struct gk20a *g = gk20a_from_vm(vm); | 190 | struct gk20a *g = gk20a_from_vm(vm); |
191 | struct device *dev = dev_from_gk20a(g); | ||
190 | struct gk20a_comptag_allocator *ctag_allocator = &g->gr.comp_tags; | 192 | struct gk20a_comptag_allocator *ctag_allocator = &g->gr.comp_tags; |
191 | struct nvgpu_mapped_buf *mapped_buffer = NULL; | 193 | struct nvgpu_mapped_buf *mapped_buffer = NULL; |
192 | bool va_allocated = false; | 194 | bool va_allocated = false; |
@@ -224,7 +226,7 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm, | |||
224 | } | 226 | } |
225 | 227 | ||
226 | /* pin buffer to get phys/iovmm addr */ | 228 | /* pin buffer to get phys/iovmm addr */ |
227 | bfr.sgt = gk20a_mm_pin(g->dev, dmabuf); | 229 | bfr.sgt = gk20a_mm_pin(dev, dmabuf); |
228 | if (IS_ERR(bfr.sgt)) { | 230 | if (IS_ERR(bfr.sgt)) { |
229 | /* Falling back to physical is actually possible | 231 | /* Falling back to physical is actually possible |
230 | * here in many cases if we use 4K phys pages in the | 232 | * here in many cases if we use 4K phys pages in the |
@@ -283,7 +285,7 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm, | |||
283 | if (!vm->enable_ctag) | 285 | if (!vm->enable_ctag) |
284 | bfr.ctag_lines = 0; | 286 | bfr.ctag_lines = 0; |
285 | 287 | ||
286 | gk20a_get_comptags(g->dev, dmabuf, &comptags); | 288 | gk20a_get_comptags(dev, dmabuf, &comptags); |
287 | 289 | ||
288 | /* ensure alignment to compression page size if compression enabled */ | 290 | /* ensure alignment to compression page size if compression enabled */ |
289 | if (bfr.ctag_offset) | 291 | if (bfr.ctag_offset) |
@@ -295,7 +297,8 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm, | |||
295 | !!(flags & NVGPU_AS_MAP_BUFFER_FLAGS_MAPPABLE_COMPBITS); | 297 | !!(flags & NVGPU_AS_MAP_BUFFER_FLAGS_MAPPABLE_COMPBITS); |
296 | 298 | ||
297 | /* allocate compression resources if needed */ | 299 | /* allocate compression resources if needed */ |
298 | err = gk20a_alloc_comptags(g, g->dev, dmabuf, ctag_allocator, | 300 | err = gk20a_alloc_comptags(g, dev, dmabuf, |
301 | ctag_allocator, | ||
299 | bfr.ctag_lines, user_mappable, | 302 | bfr.ctag_lines, user_mappable, |
300 | &ctag_map_win_size, | 303 | &ctag_map_win_size, |
301 | &ctag_map_win_ctagline); | 304 | &ctag_map_win_ctagline); |
@@ -304,7 +307,8 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm, | |||
304 | /* TBD: we can partially alloc ctags as well... */ | 307 | /* TBD: we can partially alloc ctags as well... */ |
305 | bfr.kind_v = bfr.uc_kind_v; | 308 | bfr.kind_v = bfr.uc_kind_v; |
306 | } else { | 309 | } else { |
307 | gk20a_get_comptags(g->dev, dmabuf, &comptags); | 310 | gk20a_get_comptags(dev, |
311 | dmabuf, &comptags); | ||
308 | 312 | ||
309 | if (g->ops.ltc.cbc_ctrl) | 313 | if (g->ops.ltc.cbc_ctrl) |
310 | g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear, | 314 | g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear, |
@@ -396,7 +400,7 @@ clean_up: | |||
396 | if (va_allocated) | 400 | if (va_allocated) |
397 | __nvgpu_vm_free_va(vm, map_offset, bfr.pgsz_idx); | 401 | __nvgpu_vm_free_va(vm, map_offset, bfr.pgsz_idx); |
398 | if (!IS_ERR(bfr.sgt)) | 402 | if (!IS_ERR(bfr.sgt)) |
399 | gk20a_mm_unpin(g->dev, dmabuf, bfr.sgt); | 403 | gk20a_mm_unpin(dev, dmabuf, bfr.sgt); |
400 | 404 | ||
401 | nvgpu_mutex_release(&vm->update_gmmu_lock); | 405 | nvgpu_mutex_release(&vm->update_gmmu_lock); |
402 | nvgpu_log_info(g, "err=%d", err); | 406 | nvgpu_log_info(g, "err=%d", err); |