summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-10-11 14:51:47 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-23 22:36:10 -0400
commit748331cbab1c7af26ab1fbae5ead2cdaff22806a (patch)
tree5aebf76223f051b75f7d09918721ba96ef8a78f7 /drivers/gpu/nvgpu/gk20a/gr_gk20a.h
parent12e23c6aad0bbb54911f0573a2ae4d3a078b862a (diff)
gpu: nvgpu: Move preempt query functions
Move functions to query preemption type names to the user of the function: ioctl_channel.c. This removes a dependency to <uapi/linux/nvgpu.h> from gr_gk20a.h. JIRA NVGPU-259 Change-Id: I6cafda986eb4659fcfc1b19eac77e43aaaeaec76 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1577248
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index 52b39c4f..6b422138 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -748,26 +748,4 @@ void gk20a_gr_get_ovr_perf_regs(struct gk20a *g, u32 *num_ovr_perf_regs,
748void gk20a_gr_init_ctxsw_hdr_data(struct gk20a *g, 748void gk20a_gr_init_ctxsw_hdr_data(struct gk20a *g,
749 struct nvgpu_mem *mem); 749 struct nvgpu_mem *mem);
750 750
751static inline const char *gr_gk20a_graphics_preempt_mode_name(u32 graphics_preempt_mode)
752{
753 switch (graphics_preempt_mode) {
754 case NVGPU_GRAPHICS_PREEMPTION_MODE_WFI:
755 return "WFI";
756 default:
757 return "?";
758 }
759}
760
761static inline const char *gr_gk20a_compute_preempt_mode_name(u32 compute_preempt_mode)
762{
763 switch (compute_preempt_mode) {
764 case NVGPU_COMPUTE_PREEMPTION_MODE_WFI:
765 return "WFI";
766 case NVGPU_COMPUTE_PREEMPTION_MODE_CTA:
767 return "CTA";
768 default:
769 return "?";
770 }
771}
772
773#endif /*__GR_GK20A_H__*/ 751#endif /*__GR_GK20A_H__*/