diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index 77890da8..84edacbb 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "gr_gk20a.h" | 32 | #include "gr_gk20a.h" |
33 | #include "dbg_gpu_gk20a.h" | 33 | #include "dbg_gpu_gk20a.h" |
34 | #include "regops_gk20a.h" | 34 | #include "regops_gk20a.h" |
35 | #include "common/linux/os_linux.h" | ||
35 | 36 | ||
36 | #include <nvgpu/hw/gk20a/hw_therm_gk20a.h> | 37 | #include <nvgpu/hw/gk20a/hw_therm_gk20a.h> |
37 | #include <nvgpu/hw/gk20a/hw_gr_gk20a.h> | 38 | #include <nvgpu/hw/gk20a/hw_gr_gk20a.h> |
@@ -115,6 +116,7 @@ static int alloc_profiler(struct gk20a *g, | |||
115 | static int gk20a_dbg_gpu_do_dev_open(struct inode *inode, | 116 | static int gk20a_dbg_gpu_do_dev_open(struct inode *inode, |
116 | struct file *filp, bool is_profiler) | 117 | struct file *filp, bool is_profiler) |
117 | { | 118 | { |
119 | struct nvgpu_os_linux *l; | ||
118 | struct dbg_session_gk20a *dbg_session; | 120 | struct dbg_session_gk20a *dbg_session; |
119 | struct gk20a *g; | 121 | struct gk20a *g; |
120 | 122 | ||
@@ -123,12 +125,12 @@ static int gk20a_dbg_gpu_do_dev_open(struct inode *inode, | |||
123 | int err; | 125 | int err; |
124 | 126 | ||
125 | if (!is_profiler) | 127 | if (!is_profiler) |
126 | g = container_of(inode->i_cdev, | 128 | l = container_of(inode->i_cdev, |
127 | struct gk20a, dbg.cdev); | 129 | struct nvgpu_os_linux, dbg.cdev); |
128 | else | 130 | else |
129 | g = container_of(inode->i_cdev, | 131 | l = container_of(inode->i_cdev, |
130 | struct gk20a, prof.cdev); | 132 | struct nvgpu_os_linux, prof.cdev); |
131 | g = gk20a_get(g); | 133 | g = gk20a_get(&l->g); |
132 | if (!g) | 134 | if (!g) |
133 | return -ENODEV; | 135 | return -ENODEV; |
134 | 136 | ||