diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-03-15 19:20:34 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-29 21:54:51 -0400 |
commit | 717d99fcfab99e478499880d5742091d031fc76b (patch) | |
tree | e86e42a658a85d9ebe13d768003071e9c0a86f05 /drivers/gpu/nvgpu | |
parent | 0b2ea2924bd0122e0eaa286b4dbcfc9fe96ebe20 (diff) |
gpu: nvgpu: vgpu: add event TEGRA_VGPU_EVENT_SEMAPHORE_WAKEUP
RM Server will implement callback for semaphore wakeup and broadcast
event TEGRA_VGPU_EVENT_SEMAPHORE_WAKEUP. The patch adds handling of the
event in vgpu code.
Jira VQRM-3058
Change-Id: Ife38eff8252f5b4036e6df71f1c64c99cb58c1b5
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1676240
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/vgpu.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h index c269dc24..3bcabadf 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h | |||
@@ -706,6 +706,10 @@ struct tegra_vgpu_sm_esr_info { | |||
706 | u32 hww_warp_esr_report_mask; | 706 | u32 hww_warp_esr_report_mask; |
707 | }; | 707 | }; |
708 | 708 | ||
709 | struct tegra_vgpu_semaphore_wakeup { | ||
710 | u32 post_events; | ||
711 | }; | ||
712 | |||
709 | enum { | 713 | enum { |
710 | 714 | ||
711 | TEGRA_VGPU_INTR_GR = 0, | 715 | TEGRA_VGPU_INTR_GR = 0, |
@@ -722,6 +726,7 @@ enum { | |||
722 | TEGRA_VGPU_EVENT_FECS_TRACE = 2, | 726 | TEGRA_VGPU_EVENT_FECS_TRACE = 2, |
723 | TEGRA_VGPU_EVENT_CHANNEL = 3, | 727 | TEGRA_VGPU_EVENT_CHANNEL = 3, |
724 | TEGRA_VGPU_EVENT_SM_ESR = 4, | 728 | TEGRA_VGPU_EVENT_SM_ESR = 4, |
729 | TEGRA_VGPU_EVENT_SEMAPHORE_WAKEUP = 5, | ||
725 | }; | 730 | }; |
726 | 731 | ||
727 | struct tegra_vgpu_intr_msg { | 732 | struct tegra_vgpu_intr_msg { |
@@ -736,6 +741,7 @@ struct tegra_vgpu_intr_msg { | |||
736 | struct tegra_vgpu_fecs_trace_event_info fecs_trace; | 741 | struct tegra_vgpu_fecs_trace_event_info fecs_trace; |
737 | struct tegra_vgpu_channel_event_info channel_event; | 742 | struct tegra_vgpu_channel_event_info channel_event; |
738 | struct tegra_vgpu_sm_esr_info sm_esr; | 743 | struct tegra_vgpu_sm_esr_info sm_esr; |
744 | struct tegra_vgpu_semaphore_wakeup sem_wakeup; | ||
739 | char padding[32]; | 745 | char padding[32]; |
740 | } info; | 746 | } info; |
741 | }; | 747 | }; |
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index eb56d4f9..3b53474d 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c | |||
@@ -165,6 +165,10 @@ int vgpu_intr_thread(void *dev_id) | |||
165 | case TEGRA_VGPU_EVENT_SM_ESR: | 165 | case TEGRA_VGPU_EVENT_SM_ESR: |
166 | vgpu_gr_handle_sm_esr_event(g, &msg->info.sm_esr); | 166 | vgpu_gr_handle_sm_esr_event(g, &msg->info.sm_esr); |
167 | break; | 167 | break; |
168 | case TEGRA_VGPU_EVENT_SEMAPHORE_WAKEUP: | ||
169 | g->ops.semaphore_wakeup(g, | ||
170 | !!msg->info.sem_wakeup.post_events); | ||
171 | break; | ||
168 | default: | 172 | default: |
169 | nvgpu_err(g, "unknown event %u", msg->event); | 173 | nvgpu_err(g, "unknown event %u", msg->event); |
170 | break; | 174 | break; |