summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
diff options
context:
space:
mode:
authorAingara Paramakuru <aparamakuru@nvidia.com>2015-04-15 16:10:30 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2015-06-22 11:56:36 -0400
commit788776c9aa2028a0672c07271e9c06ed684f74a8 (patch)
tree7afe8a93d8076ffc3cf77279f4954f096c795492 /drivers/gpu/nvgpu/vgpu/gr_vgpu.c
parentf877d0649c40c183f02953b192b0a352e5153851 (diff)
gpu: nvgpu: vgpu: support additional notifications
Client notification support is now added for the following: - stalling and non-stalling GR sema release - non-stalling FIFO channel intr - non-stalling CE2 nonblockpipe intr Bug 200097077 Change-Id: Icd3c076d7880e1c9ef1fcc0fc58eed9f23f39277 Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com> Reviewed-on: http://git-master/r/736064 (cherry picked from commit 0585d1f14d5a5ae1ccde8ccb7b7daa5593b3d1bc) Reviewed-on: http://git-master/r/759824 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gr_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gr_vgpu.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
index f6f12c7b..99754cae 100644
--- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
@@ -803,7 +803,8 @@ int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info)
803 struct channel_gk20a *ch = &f->channel[info->chid]; 803 struct channel_gk20a *ch = &f->channel[info->chid];
804 804
805 gk20a_dbg_fn(""); 805 gk20a_dbg_fn("");
806 if (info->type != TEGRA_VGPU_GR_INTR_NOTIFY) 806 if (info->type != TEGRA_VGPU_GR_INTR_NOTIFY &&
807 info->type != TEGRA_VGPU_GR_INTR_SEMAPHORE)
807 gk20a_err(dev_from_gk20a(g), "gr intr (%d) on ch %u", 808 gk20a_err(dev_from_gk20a(g), "gr intr (%d) on ch %u",
808 info->type, info->chid); 809 info->type, info->chid);
809 810
@@ -811,6 +812,10 @@ int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info)
811 case TEGRA_VGPU_GR_INTR_NOTIFY: 812 case TEGRA_VGPU_GR_INTR_NOTIFY:
812 wake_up(&ch->notifier_wq); 813 wake_up(&ch->notifier_wq);
813 break; 814 break;
815 case TEGRA_VGPU_GR_INTR_SEMAPHORE:
816 gk20a_channel_event(ch);
817 wake_up(&ch->semaphore_wq);
818 break;
814 case TEGRA_VGPU_GR_INTR_SEMAPHORE_TIMEOUT: 819 case TEGRA_VGPU_GR_INTR_SEMAPHORE_TIMEOUT:
815 gk20a_set_error_notifier(ch, 820 gk20a_set_error_notifier(ch,
816 NVGPU_CHANNEL_GR_SEMAPHORE_TIMEOUT); 821 NVGPU_CHANNEL_GR_SEMAPHORE_TIMEOUT);
@@ -846,6 +851,23 @@ int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info)
846 return 0; 851 return 0;
847} 852}
848 853
854int vgpu_gr_nonstall_isr(struct gk20a *g,
855 struct tegra_vgpu_gr_nonstall_intr_info *info)
856{
857 gk20a_dbg_fn("");
858
859 switch (info->type) {
860 case TEGRA_VGPU_GR_NONSTALL_INTR_SEMAPHORE:
861 gk20a_channel_semaphore_wakeup(g);
862 break;
863 default:
864 WARN_ON(1);
865 break;
866 }
867
868 return 0;
869}
870
849void vgpu_init_gr_ops(struct gpu_ops *gops) 871void vgpu_init_gr_ops(struct gpu_ops *gops)
850{ 872{
851 gops->gr.free_channel_ctx = vgpu_gr_free_channel_ctx; 873 gops->gr.free_channel_ctx = vgpu_gr_free_channel_ctx;