mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
Debug boolean flag dump_ctxsw_stats_on_channel_close is right now stored in gr_gk20a.ctx_vars struct This flag logically is property of gr.ctx units since it indicates whether each context should dump ctxsw stats on channel/context close Move this flag to struct nvgpu_gr_ctx_desc and remove it from gr_gk20a.ctx_vars Expose below API from gr.ctx unit to check if flag is set nvgpu_gr_ctx_desc_dump_ctxsw_stats_on_channel_close() Move debugfs creation code to create corresponding debugfs to gr_gk20a_debugfs_init() and change debugfs type from "u32" to "file" Struct gr.gr_ctx_desc is created only during first poweron. Return error if this struct is not available. Remove unnecessary initialization of this variable from platform specific probe functions Jira NVGPU-3112 Change-Id: Id675e047237f82e9b8198a42082e99c95824578f Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2099399 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
88 lines
2.3 KiB
C
88 lines
2.3 KiB
C
/*
|
|
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
* to deal in the Software without restriction, including without limitation
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
#ifndef NVGPU_GR_CTX_PRIV_H
|
|
#define NVGPU_GR_CTX_PRIV_H
|
|
|
|
struct nvgpu_mem;
|
|
enum nvgpu_gr_global_ctx_index;
|
|
|
|
struct patch_desc {
|
|
struct nvgpu_mem mem;
|
|
u32 data_count;
|
|
};
|
|
|
|
struct zcull_ctx_desc {
|
|
u64 gpu_va;
|
|
u32 ctx_sw_mode;
|
|
};
|
|
|
|
struct pm_ctx_desc {
|
|
struct nvgpu_mem mem;
|
|
u64 gpu_va;
|
|
u32 pm_mode;
|
|
};
|
|
|
|
struct nvgpu_gr_ctx_desc {
|
|
u32 size[NVGPU_GR_CTX_COUNT];
|
|
|
|
bool force_preemption_gfxp;
|
|
bool force_preemption_cilp;
|
|
|
|
bool dump_ctxsw_stats_on_channel_close;
|
|
};
|
|
|
|
struct nvgpu_gr_ctx {
|
|
u32 ctx_id;
|
|
bool ctx_id_valid;
|
|
struct nvgpu_mem mem;
|
|
|
|
struct nvgpu_mem preempt_ctxsw_buffer;
|
|
struct nvgpu_mem spill_ctxsw_buffer;
|
|
struct nvgpu_mem betacb_ctxsw_buffer;
|
|
struct nvgpu_mem pagepool_ctxsw_buffer;
|
|
struct nvgpu_mem gfxp_rtvcb_ctxsw_buffer;
|
|
|
|
struct patch_desc patch_ctx;
|
|
struct zcull_ctx_desc zcull_ctx;
|
|
struct pm_ctx_desc pm_ctx;
|
|
|
|
u32 graphics_preempt_mode;
|
|
u32 compute_preempt_mode;
|
|
|
|
bool golden_img_loaded;
|
|
bool cilp_preempt_pending;
|
|
bool boosted_ctx;
|
|
|
|
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
|
u64 virt_ctx;
|
|
#endif
|
|
|
|
u64 global_ctx_buffer_va[NVGPU_GR_CTX_VA_COUNT];
|
|
enum nvgpu_gr_global_ctx_index global_ctx_buffer_index[NVGPU_GR_CTX_VA_COUNT];
|
|
bool global_ctx_buffer_mapped;
|
|
|
|
u32 tsgid;
|
|
};
|
|
|
|
#endif /* NVGPU_GR_CTX_PRIV_H */
|