diff options
author | Aingara Paramakuru <aparamakuru@nvidia.com> | 2014-05-05 21:14:22 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:01 -0400 |
commit | 1fd722f592c2e0523c5e399a2406a4e387057188 (patch) | |
tree | 3425fb1a08ec2ccc6397e39c73a5579117e00a05 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | 69e0cd3dfd8f39bc8d3529325001dcacd774f669 (diff) |
gpu: nvgpu: support gk20a virtualization
The nvgpu driver now supports using the Tegra graphics virtualization
interfaces to support gk20a in a virtualized environment.
Bug 1509608
Change-Id: I6ede15ee7bf0b0ad8a13e8eb5f557c3516ead676
Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-on: http://git-master/r/440122
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 4363129d..e6b3fd5f 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -1173,7 +1173,7 @@ void gk20a_fifo_recover_ch(struct gk20a *g, u32 hw_chid, bool verbose) | |||
1173 | 1173 | ||
1174 | gk20a_channel_abort(ch); | 1174 | gk20a_channel_abort(ch); |
1175 | for (i = 0; i < g->fifo.max_runlists; i++) | 1175 | for (i = 0; i < g->fifo.max_runlists; i++) |
1176 | gk20a_fifo_update_runlist(g, i, | 1176 | g->ops.fifo.update_runlist(g, i, |
1177 | hw_chid, false, false); | 1177 | hw_chid, false, false); |
1178 | 1178 | ||
1179 | if (gk20a_fifo_set_ctx_mmu_error(g, ch)) | 1179 | if (gk20a_fifo_set_ctx_mmu_error(g, ch)) |
@@ -1620,7 +1620,7 @@ int gk20a_fifo_disable_engine_activity(struct gk20a *g, | |||
1620 | pbdma_chid = fifo_pbdma_status_next_id_v(pbdma_stat); | 1620 | pbdma_chid = fifo_pbdma_status_next_id_v(pbdma_stat); |
1621 | 1621 | ||
1622 | if (pbdma_chid != ~0) { | 1622 | if (pbdma_chid != ~0) { |
1623 | err = gk20a_fifo_preempt_channel(g, pbdma_chid); | 1623 | err = g->ops.fifo.preempt_channel(g, pbdma_chid); |
1624 | if (err) | 1624 | if (err) |
1625 | goto clean_up; | 1625 | goto clean_up; |
1626 | } | 1626 | } |
@@ -1636,7 +1636,7 @@ int gk20a_fifo_disable_engine_activity(struct gk20a *g, | |||
1636 | engine_chid = fifo_engine_status_next_id_v(eng_stat); | 1636 | engine_chid = fifo_engine_status_next_id_v(eng_stat); |
1637 | 1637 | ||
1638 | if (engine_chid != ~0 && engine_chid != pbdma_chid) { | 1638 | if (engine_chid != ~0 && engine_chid != pbdma_chid) { |
1639 | err = gk20a_fifo_preempt_channel(g, engine_chid); | 1639 | err = g->ops.fifo.preempt_channel(g, engine_chid); |
1640 | if (err) | 1640 | if (err) |
1641 | goto clean_up; | 1641 | goto clean_up; |
1642 | } | 1642 | } |
@@ -1960,6 +1960,9 @@ static void gk20a_fifo_apply_pb_timeout(struct gk20a *g) | |||
1960 | void gk20a_init_fifo(struct gpu_ops *gops) | 1960 | void gk20a_init_fifo(struct gpu_ops *gops) |
1961 | { | 1961 | { |
1962 | gk20a_init_channel(gops); | 1962 | gk20a_init_channel(gops); |
1963 | gops->fifo.preempt_channel = gk20a_fifo_preempt_channel; | ||
1964 | gops->fifo.update_runlist = gk20a_fifo_update_runlist; | ||
1963 | gops->fifo.trigger_mmu_fault = gk20a_fifo_trigger_mmu_fault; | 1965 | gops->fifo.trigger_mmu_fault = gk20a_fifo_trigger_mmu_fault; |
1964 | gops->fifo.apply_pb_timeout = gk20a_fifo_apply_pb_timeout; | 1966 | gops->fifo.apply_pb_timeout = gk20a_fifo_apply_pb_timeout; |
1967 | gops->fifo.wait_engine_idle = gk20a_fifo_wait_engine_idle; | ||
1965 | } | 1968 | } |