diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-03-19 17:45:14 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-29 21:54:20 -0400 |
commit | d436ad67b60eef68c7d5551b539490f8efb24387 (patch) | |
tree | 21283a39c70ca65f96cc2ecaf600e8880cba5083 /drivers/gpu/nvgpu/gk20a | |
parent | bcab5c148607867eea29e2a2ac82c6b967995525 (diff) |
gpu: nvgpu: add gops.fifo.channel_suspend/channel_resume
RM Server acts differently for channel suspend/resume.
Jira VQRM-3058
Change-Id: If41e3099164654db448d1157fd7f51dd00c5e201
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1679707
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 0206c915..64ae4401 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -91,9 +91,11 @@ int gk20a_prepare_poweroff(struct gk20a *g) | |||
91 | 91 | ||
92 | gk20a_dbg_fn(""); | 92 | gk20a_dbg_fn(""); |
93 | 93 | ||
94 | ret = gk20a_channel_suspend(g); | 94 | if (g->ops.fifo.channel_suspend) { |
95 | if (ret) | 95 | ret = g->ops.fifo.channel_suspend(g); |
96 | return ret; | 96 | if (ret) |
97 | return ret; | ||
98 | } | ||
97 | 99 | ||
98 | /* disable elpg before gr or fifo suspend */ | 100 | /* disable elpg before gr or fifo suspend */ |
99 | if (g->ops.pmu.is_pmu_supported(g)) | 101 | if (g->ops.pmu.is_pmu_supported(g)) |
@@ -330,7 +332,8 @@ int gk20a_finalize_poweron(struct gk20a *g) | |||
330 | } | 332 | } |
331 | #endif | 333 | #endif |
332 | 334 | ||
333 | gk20a_channel_resume(g); | 335 | if (g->ops.fifo.channel_resume) |
336 | g->ops.fifo.channel_resume(g); | ||
334 | 337 | ||
335 | nvgpu_init_mm_ce_context(g); | 338 | nvgpu_init_mm_ce_context(g); |
336 | 339 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 76413600..c7653133 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -633,6 +633,8 @@ struct gpu_ops { | |||
633 | bool *verbose, u32 *ms); | 633 | bool *verbose, u32 *ms); |
634 | bool (*check_ch_ctxsw_timeout)(struct channel_gk20a *ch, | 634 | bool (*check_ch_ctxsw_timeout)(struct channel_gk20a *ch, |
635 | bool *verbose, u32 *ms); | 635 | bool *verbose, u32 *ms); |
636 | int (*channel_suspend)(struct gk20a *g); | ||
637 | int (*channel_resume)(struct gk20a *g); | ||
636 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 638 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
637 | int (*alloc_syncpt_buf)(struct channel_gk20a *c, | 639 | int (*alloc_syncpt_buf)(struct channel_gk20a *c, |
638 | u32 syncpt_id, struct nvgpu_mem *syncpt_buf); | 640 | u32 syncpt_id, struct nvgpu_mem *syncpt_buf); |