diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/ctxsw_trace.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/ctxsw_trace.c b/drivers/gpu/nvgpu/os/linux/ctxsw_trace.c index a8f5f815..4983061b 100644 --- a/drivers/gpu/nvgpu/os/linux/ctxsw_trace.c +++ b/drivers/gpu/nvgpu/os/linux/ctxsw_trace.c | |||
@@ -743,3 +743,41 @@ void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg) | |||
743 | #endif | 743 | #endif |
744 | trace_gk20a_channel_reset(~0, tsg->tsgid); | 744 | trace_gk20a_channel_reset(~0, tsg->tsgid); |
745 | } | 745 | } |
746 | |||
747 | /* | ||
748 | * Convert linux nvgpu ctxsw tags type of the form of NVGPU_CTXSW_TAG_* | ||
749 | * into common nvgpu ctxsw tags type of the form of NVGPU_GPU_CTXSW_TAG_* | ||
750 | */ | ||
751 | |||
752 | u8 nvgpu_gpu_ctxsw_tags_to_common_tags(u8 tags) | ||
753 | { | ||
754 | switch (tags){ | ||
755 | case NVGPU_CTXSW_TAG_SOF: | ||
756 | return NVGPU_GPU_CTXSW_TAG_SOF; | ||
757 | case NVGPU_CTXSW_TAG_CTXSW_REQ_BY_HOST: | ||
758 | return NVGPU_GPU_CTXSW_TAG_CTXSW_REQ_BY_HOST; | ||
759 | case NVGPU_CTXSW_TAG_FE_ACK: | ||
760 | return NVGPU_GPU_CTXSW_TAG_FE_ACK; | ||
761 | case NVGPU_CTXSW_TAG_FE_ACK_WFI: | ||
762 | return NVGPU_GPU_CTXSW_TAG_FE_ACK_WFI; | ||
763 | case NVGPU_CTXSW_TAG_FE_ACK_GFXP: | ||
764 | return NVGPU_GPU_CTXSW_TAG_FE_ACK_GFXP; | ||
765 | case NVGPU_CTXSW_TAG_FE_ACK_CTAP: | ||
766 | return NVGPU_GPU_CTXSW_TAG_FE_ACK_CTAP; | ||
767 | case NVGPU_CTXSW_TAG_FE_ACK_CILP: | ||
768 | return NVGPU_GPU_CTXSW_TAG_FE_ACK_CILP; | ||
769 | case NVGPU_CTXSW_TAG_SAVE_END: | ||
770 | return NVGPU_GPU_CTXSW_TAG_SAVE_END; | ||
771 | case NVGPU_CTXSW_TAG_RESTORE_START: | ||
772 | return NVGPU_GPU_CTXSW_TAG_RESTORE_START; | ||
773 | case NVGPU_CTXSW_TAG_CONTEXT_START: | ||
774 | return NVGPU_GPU_CTXSW_TAG_CONTEXT_START; | ||
775 | case NVGPU_CTXSW_TAG_ENGINE_RESET: | ||
776 | return NVGPU_GPU_CTXSW_TAG_ENGINE_RESET; | ||
777 | case NVGPU_CTXSW_TAG_INVALID_TIMESTAMP: | ||
778 | return NVGPU_GPU_CTXSW_TAG_INVALID_TIMESTAMP; | ||
779 | } | ||
780 | |||
781 | WARN_ON(1); | ||
782 | return tags; | ||
783 | } | ||