mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Disabling Global context buffers commit for Compute engine
Global context buffers are to be mapped and committed only for engine supporting gfx. With MIG, all engines support compute only hence skip that. Bug 4016530 Change-Id: I9f9a01070776f5fa1b18287e62a3080a42c21c60 Signed-off-by: Dinesh T <dt@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2900314 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
9487599da1
commit
8bae56a075
@@ -368,11 +368,13 @@ static void nvgpu_gr_obj_ctx_commit_veid0_preemption_buffers(struct gk20a *g,
|
||||
bool nvgpu_gr_obj_ctx_is_gfx_engine(struct gk20a *g, struct nvgpu_tsg_subctx *subctx)
|
||||
{
|
||||
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS)) {
|
||||
if (!nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG) &&
|
||||
if ((subctx != NULL) && (!nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG)) &&
|
||||
nvgpu_tsg_subctx_get_id(subctx) == CHANNEL_INFO_VEID0) {
|
||||
return true;
|
||||
}
|
||||
} else if (!nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG)) {
|
||||
}
|
||||
|
||||
if (!nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1085,7 +1087,8 @@ static int nvgpu_gr_golden_ctx_prepare_gr_ctx(
|
||||
}
|
||||
}
|
||||
err = nvgpu_gr_ctx_mappings_map_global_ctx_buffers(g,
|
||||
gr->global_ctx_buffer, true, mappings, false);
|
||||
gr->global_ctx_buffer,
|
||||
nvgpu_gr_obj_ctx_is_gfx_engine(g, NULL), mappings, false);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "map global ctx buffers failed err=%d", err);
|
||||
goto unmap_ctx_buffer;
|
||||
@@ -1184,14 +1187,14 @@ int nvgpu_gr_obj_ctx_init_golden_context_image(struct gk20a *g)
|
||||
}
|
||||
|
||||
nvgpu_gr_obj_ctx_commit_global_ctx_buffers(g, gr->global_ctx_buffer,
|
||||
gr->config, &gr_ctx, true,
|
||||
gr->config, &gr_ctx, nvgpu_gr_obj_ctx_is_gfx_engine(g, NULL),
|
||||
&mappings, true);
|
||||
|
||||
/* commit gr ctx buffer */
|
||||
nvgpu_gr_obj_ctx_commit_inst(g, &inst_block, &gr_ctx, subctx, &mappings);
|
||||
err = nvgpu_gr_obj_ctx_alloc_golden_ctx_image(g, golden_image,
|
||||
gr->global_ctx_buffer, gr->config, &gr_ctx,
|
||||
true,
|
||||
nvgpu_gr_obj_ctx_is_gfx_engine(g, NULL),
|
||||
&mappings, &inst_block);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "create golden image failed err=%d", err);
|
||||
|
||||
@@ -673,7 +673,7 @@ test_gr_setup_free_obj_ctx.gr_setup_free_obj_ctx=0
|
||||
test_gr_setup_preemption_mode_errors.gr_setup_preemption_mode_errors=2
|
||||
test_gr_setup_set_preemption_mode.gr_setup_set_preemption_mode=0
|
||||
test_gr_validate_subctx_gr_ctx_buffers.gr_setup_subctx_gr_ctx_buffers=0
|
||||
test_gr_validate_multi_as_subctx_gr_ctx_buffers.gr_setup_subctx_multi_as_gr_ctx_buffers=0
|
||||
test_gr_validate_multi_as_subctx_gr_ctx_buffers.gr_setup_subctx_multi_as_gr_ctx_buffers=2
|
||||
test_gr_validate_subctx_inst_blocks.gr_setup_subctx_inst_blocks=0
|
||||
test_gr_validate_ch_class_veid_pbdma.gr_setup_class_veid_pbdma=0
|
||||
|
||||
|
||||
@@ -1848,7 +1848,7 @@ struct unit_module_test nvgpu_gr_setup_tests[] = {
|
||||
UNIT_TEST(gr_setup_subctx_gr_ctx_buffers,
|
||||
test_gr_validate_subctx_gr_ctx_buffers, NULL, 0),
|
||||
UNIT_TEST(gr_setup_subctx_multi_as_gr_ctx_buffers,
|
||||
test_gr_validate_multi_as_subctx_gr_ctx_buffers, NULL, 0),
|
||||
test_gr_validate_multi_as_subctx_gr_ctx_buffers, NULL, 2),
|
||||
UNIT_TEST(gr_setup_subctx_inst_blocks,
|
||||
test_gr_validate_subctx_inst_blocks, NULL, 0),
|
||||
UNIT_TEST(gr_setup_class_veid_pbdma,
|
||||
|
||||
Reference in New Issue
Block a user