diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c index cdf3ef1c..3d5afcf9 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c | |||
@@ -53,8 +53,7 @@ static inline int vgpu_comm_init(struct platform_device *pdev) | |||
53 | { | 53 | { |
54 | size_t queue_sizes[] = { TEGRA_VGPU_QUEUE_SIZES }; | 54 | size_t queue_sizes[] = { TEGRA_VGPU_QUEUE_SIZES }; |
55 | 55 | ||
56 | return tegra_gr_comm_init(pdev, TEGRA_GR_COMM_CTX_CLIENT, 3, | 56 | return tegra_gr_comm_init(pdev, 3, queue_sizes, TEGRA_VGPU_QUEUE_CMD, |
57 | queue_sizes, TEGRA_VGPU_QUEUE_CMD, | ||
58 | ARRAY_SIZE(queue_sizes)); | 57 | ARRAY_SIZE(queue_sizes)); |
59 | } | 58 | } |
60 | 59 | ||
@@ -62,8 +61,7 @@ static inline void vgpu_comm_deinit(void) | |||
62 | { | 61 | { |
63 | size_t queue_sizes[] = { TEGRA_VGPU_QUEUE_SIZES }; | 62 | size_t queue_sizes[] = { TEGRA_VGPU_QUEUE_SIZES }; |
64 | 63 | ||
65 | tegra_gr_comm_deinit(TEGRA_GR_COMM_CTX_CLIENT, TEGRA_VGPU_QUEUE_CMD, | 64 | tegra_gr_comm_deinit(TEGRA_VGPU_QUEUE_CMD, ARRAY_SIZE(queue_sizes)); |
66 | ARRAY_SIZE(queue_sizes)); | ||
67 | } | 65 | } |
68 | 66 | ||
69 | int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, | 67 | int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, |
@@ -74,8 +72,7 @@ int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, | |||
74 | void *data = msg; | 72 | void *data = msg; |
75 | int err; | 73 | int err; |
76 | 74 | ||
77 | err = tegra_gr_comm_sendrecv(TEGRA_GR_COMM_CTX_CLIENT, | 75 | err = tegra_gr_comm_sendrecv(tegra_gr_comm_get_server_vmid(), |
78 | tegra_gr_comm_get_server_vmid(), | ||
79 | TEGRA_VGPU_QUEUE_CMD, &handle, &data, &size); | 76 | TEGRA_VGPU_QUEUE_CMD, &handle, &data, &size); |
80 | if (!err) { | 77 | if (!err) { |
81 | WARN_ON(size < size_out); | 78 | WARN_ON(size < size_out); |
@@ -152,8 +149,7 @@ static int vgpu_intr_thread(void *dev_id) | |||
152 | size_t size; | 149 | size_t size; |
153 | int err; | 150 | int err; |
154 | 151 | ||
155 | err = tegra_gr_comm_recv(TEGRA_GR_COMM_CTX_CLIENT, | 152 | err = tegra_gr_comm_recv(TEGRA_VGPU_QUEUE_INTR, &handle, |
156 | TEGRA_VGPU_QUEUE_INTR, &handle, | ||
157 | (void **)&msg, &size, &sender); | 153 | (void **)&msg, &size, &sender); |
158 | if (err == -ETIME) | 154 | if (err == -ETIME) |
159 | continue; | 155 | continue; |
@@ -229,8 +225,7 @@ static void vgpu_remove_support(struct gk20a *g) | |||
229 | g->mm.remove_support(&g->mm); | 225 | g->mm.remove_support(&g->mm); |
230 | 226 | ||
231 | msg.event = TEGRA_VGPU_EVENT_ABORT; | 227 | msg.event = TEGRA_VGPU_EVENT_ABORT; |
232 | err = tegra_gr_comm_send(TEGRA_GR_COMM_CTX_CLIENT, | 228 | err = tegra_gr_comm_send(TEGRA_GR_COMM_ID_SELF, TEGRA_VGPU_QUEUE_INTR, |
233 | TEGRA_GR_COMM_ID_SELF, TEGRA_VGPU_QUEUE_INTR, | ||
234 | &msg, sizeof(msg)); | 229 | &msg, sizeof(msg)); |
235 | WARN_ON(err); | 230 | WARN_ON(err); |
236 | nvgpu_thread_stop(&priv->intr_handler); | 231 | nvgpu_thread_stop(&priv->intr_handler); |