mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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
This commit is contained in:
committed by
mobile promotions
parent
12e23c6aad
commit
748331cbab
@@ -37,6 +37,28 @@
|
||||
#include "ioctl_channel.h"
|
||||
#include "os_linux.h"
|
||||
|
||||
static const char *gr_gk20a_graphics_preempt_mode_name(u32 graphics_preempt_mode)
|
||||
{
|
||||
switch (graphics_preempt_mode) {
|
||||
case NVGPU_GRAPHICS_PREEMPTION_MODE_WFI:
|
||||
return "WFI";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
static const char *gr_gk20a_compute_preempt_mode_name(u32 compute_preempt_mode)
|
||||
{
|
||||
switch (compute_preempt_mode) {
|
||||
case NVGPU_COMPUTE_PREEMPTION_MODE_WFI:
|
||||
return "WFI";
|
||||
case NVGPU_COMPUTE_PREEMPTION_MODE_CTA:
|
||||
return "CTA";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
static void gk20a_channel_trace_sched_param(
|
||||
void (*trace)(int chid, int tsgid, pid_t pid, u32 timeslice,
|
||||
u32 timeout, const char *interleave,
|
||||
|
||||
@@ -748,26 +748,4 @@ void gk20a_gr_get_ovr_perf_regs(struct gk20a *g, u32 *num_ovr_perf_regs,
|
||||
void gk20a_gr_init_ctxsw_hdr_data(struct gk20a *g,
|
||||
struct nvgpu_mem *mem);
|
||||
|
||||
static inline const char *gr_gk20a_graphics_preempt_mode_name(u32 graphics_preempt_mode)
|
||||
{
|
||||
switch (graphics_preempt_mode) {
|
||||
case NVGPU_GRAPHICS_PREEMPTION_MODE_WFI:
|
||||
return "WFI";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
static inline const char *gr_gk20a_compute_preempt_mode_name(u32 compute_preempt_mode)
|
||||
{
|
||||
switch (compute_preempt_mode) {
|
||||
case NVGPU_COMPUTE_PREEMPTION_MODE_WFI:
|
||||
return "WFI";
|
||||
case NVGPU_COMPUTE_PREEMPTION_MODE_CTA:
|
||||
return "CTA";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
#endif /*__GR_GK20A_H__*/
|
||||
|
||||
Reference in New Issue
Block a user