diff options
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/vgpu.c | 13 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/vgpu.h | 4 |
2 files changed, 10 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index eb221d01..7e012fb0 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * more details. | 13 | * more details. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kthread.h> | ||
17 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
18 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
19 | #include <linux/pm_runtime.h> | 18 | #include <linux/pm_runtime.h> |
@@ -134,6 +133,7 @@ static void vgpu_handle_channel_event(struct gk20a *g, | |||
134 | static int vgpu_intr_thread(void *dev_id) | 133 | static int vgpu_intr_thread(void *dev_id) |
135 | { | 134 | { |
136 | struct gk20a *g = dev_id; | 135 | struct gk20a *g = dev_id; |
136 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); | ||
137 | 137 | ||
138 | while (true) { | 138 | while (true) { |
139 | struct tegra_vgpu_intr_msg *msg; | 139 | struct tegra_vgpu_intr_msg *msg; |
@@ -188,7 +188,7 @@ static int vgpu_intr_thread(void *dev_id) | |||
188 | tegra_gr_comm_release(handle); | 188 | tegra_gr_comm_release(handle); |
189 | } | 189 | } |
190 | 190 | ||
191 | while (!kthread_should_stop()) | 191 | while (!nvgpu_thread_should_stop(&priv->intr_handler)) |
192 | msleep(10); | 192 | msleep(10); |
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
@@ -219,7 +219,7 @@ static void vgpu_remove_support(struct gk20a *g) | |||
219 | TEGRA_GR_COMM_ID_SELF, TEGRA_VGPU_QUEUE_INTR, | 219 | TEGRA_GR_COMM_ID_SELF, TEGRA_VGPU_QUEUE_INTR, |
220 | &msg, sizeof(msg)); | 220 | &msg, sizeof(msg)); |
221 | WARN_ON(err); | 221 | WARN_ON(err); |
222 | kthread_stop(priv->intr_handler); | 222 | nvgpu_thread_stop(&priv->intr_handler); |
223 | 223 | ||
224 | /* free mappings to registers, etc*/ | 224 | /* free mappings to registers, etc*/ |
225 | 225 | ||
@@ -650,9 +650,10 @@ int vgpu_probe(struct platform_device *pdev) | |||
650 | return err; | 650 | return err; |
651 | } | 651 | } |
652 | 652 | ||
653 | priv->intr_handler = kthread_run(vgpu_intr_thread, gk20a, "gk20a"); | 653 | err = nvgpu_thread_create(&priv->intr_handler, gk20a, |
654 | if (IS_ERR(priv->intr_handler)) | 654 | vgpu_intr_thread, "gk20a"); |
655 | return -ENOMEM; | 655 | if (err) |
656 | return err; | ||
656 | 657 | ||
657 | gk20a_debug_init(dev, "gpu.0"); | 658 | gk20a_debug_init(dev, "gpu.0"); |
658 | 659 | ||
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.h b/drivers/gpu/nvgpu/vgpu/vgpu.h index 7883abc1..ac261979 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.h +++ b/drivers/gpu/nvgpu/vgpu/vgpu.h | |||
@@ -20,11 +20,13 @@ | |||
20 | #include <linux/tegra_vgpu.h> | 20 | #include <linux/tegra_vgpu.h> |
21 | #include "gk20a/gk20a.h" | 21 | #include "gk20a/gk20a.h" |
22 | 22 | ||
23 | #include <nvgpu/thread.h> | ||
24 | |||
23 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | 25 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION |
24 | 26 | ||
25 | struct vgpu_priv_data { | 27 | struct vgpu_priv_data { |
26 | u64 virt_handle; | 28 | u64 virt_handle; |
27 | struct task_struct *intr_handler; | 29 | struct nvgpu_thread intr_handler; |
28 | struct tegra_vgpu_constants_params constants; | 30 | struct tegra_vgpu_constants_params constants; |
29 | }; | 31 | }; |
30 | 32 | ||