mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: move force preemption flags to gr_ctx_desc
Debug boolean flags force_preemption_gfxp and force_preemption_cilp are right now stored in gr_gk20a.ctx_vars struct These flags logically are property of gr.ctx units since they indicate whether each context should be forced to gfxp/cilp preemption mode by default Move these flags to struct nvgpu_gr_ctx_desc and remove them from gr_gk20a.ctx_vars Expose below APIs from gr.ctx unit to check if flags are set nvgpu_gr_ctx_desc_force_preemption_gfxp() nvgpu_gr_ctx_desc_force_preemption_cilp() 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 these variables from platform specific probe functions Jira NVGPU-3112 Change-Id: I8b2de27f0c71dd2ea5abcf94221c2e15c80073ea Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2099398 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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>
This commit is contained in:
committed by
mobile promotions
parent
556e139077
commit
ee5b3823ff
@@ -114,12 +114,12 @@ int nvgpu_gr_obj_ctx_set_ctxsw_preemption_mode(struct gk20a *g,
|
||||
}
|
||||
|
||||
if (g->ops.class.is_valid_gfx(class) &&
|
||||
g->gr->ctx_vars.force_preemption_gfxp) {
|
||||
nvgpu_gr_ctx_desc_force_preemption_gfxp(gr_ctx_desc)) {
|
||||
graphics_preempt_mode = NVGPU_PREEMPTION_MODE_GRAPHICS_GFXP;
|
||||
}
|
||||
|
||||
if (g->ops.class.is_valid_compute(class) &&
|
||||
g->gr->ctx_vars.force_preemption_cilp) {
|
||||
nvgpu_gr_ctx_desc_force_preemption_cilp(gr_ctx_desc)) {
|
||||
compute_preempt_mode = NVGPU_PREEMPTION_MODE_COMPUTE_CILP;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user