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>
This commit is contained in:
Richard Zhao
2018-03-15 16:20:34 -07:00
committed by mobile promotions
parent 0b2ea2924b
commit 717d99fcfa
2 changed files with 10 additions and 0 deletions

View File

@@ -706,6 +706,10 @@ struct tegra_vgpu_sm_esr_info {
u32 hww_warp_esr_report_mask;
};
struct tegra_vgpu_semaphore_wakeup {
u32 post_events;
};
enum {
TEGRA_VGPU_INTR_GR = 0,
@@ -722,6 +726,7 @@ enum {
TEGRA_VGPU_EVENT_FECS_TRACE = 2,
TEGRA_VGPU_EVENT_CHANNEL = 3,
TEGRA_VGPU_EVENT_SM_ESR = 4,
TEGRA_VGPU_EVENT_SEMAPHORE_WAKEUP = 5,
};
struct tegra_vgpu_intr_msg {
@@ -736,6 +741,7 @@ struct tegra_vgpu_intr_msg {
struct tegra_vgpu_fecs_trace_event_info fecs_trace;
struct tegra_vgpu_channel_event_info channel_event;
struct tegra_vgpu_sm_esr_info sm_esr;
struct tegra_vgpu_semaphore_wakeup sem_wakeup;
char padding[32];
} info;
};

View File

@@ -165,6 +165,10 @@ int vgpu_intr_thread(void *dev_id)
case TEGRA_VGPU_EVENT_SM_ESR:
vgpu_gr_handle_sm_esr_event(g, &msg->info.sm_esr);
break;
case TEGRA_VGPU_EVENT_SEMAPHORE_WAKEUP:
g->ops.semaphore_wakeup(g,
!!msg->info.sem_wakeup.post_events);
break;
default:
nvgpu_err(g, "unknown event %u", msg->event);
break;