From edf03baedd70042300c83a0c7501934c39a5523c Mon Sep 17 00:00:00 2001 From: Lakshmanan M Date: Wed, 17 Feb 2021 12:53:34 +0530 Subject: [PATCH] gpu: nvgpu: Enable SCG flag * Enabled NVGPU_SUPPORT_SCG for tu104. * Enabled NVGPU_SUPPORT_SCG if graphics support is enabled. JIRA NVGPU-6532 Change-Id: I22175de6906a496127fef464f70a6521b2ad2ad2 Signed-off-by: Lakshmanan M Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485632 Tested-by: mobile promotions Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Sagar Kamble Reviewed-by: Rajesh Devaraj Reviewed-by: Dinesh T Reviewed-by: Ankur Kishore Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/hal/init/hal_gv11b.c | 2 ++ drivers/gpu/nvgpu/hal/init/hal_tu104.c | 3 +++ drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/hal/init/hal_gv11b.c b/drivers/gpu/nvgpu/hal/init/hal_gv11b.c index b512dc8cd..c2e47e86e 100644 --- a/drivers/gpu/nvgpu/hal/init/hal_gv11b.c +++ b/drivers/gpu/nvgpu/hal/init/hal_gv11b.c @@ -222,7 +222,9 @@ static int gv11b_init_gpu_characteristics(struct gk20a *g) } nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); +#ifdef CONFIG_NVGPU_GRAPHICS nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); +#endif #ifdef CONFIG_NVGPU_CHANNEL_TSG_SCHEDULING nvgpu_set_enabled(g, NVGPU_SUPPORT_RESCHEDULE_RUNLIST, true); #endif diff --git a/drivers/gpu/nvgpu/hal/init/hal_tu104.c b/drivers/gpu/nvgpu/hal/init/hal_tu104.c index 2e6710b83..80917dfd4 100644 --- a/drivers/gpu/nvgpu/hal/init/hal_tu104.c +++ b/drivers/gpu/nvgpu/hal/init/hal_tu104.c @@ -262,6 +262,9 @@ static int tu104_init_gpu_characteristics(struct gk20a *g) } nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); +#ifdef CONFIG_NVGPU_GRAPHICS + nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); +#endif nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_TEMPERATURE, true); if (nvgpu_has_syncpoints(g)) { nvgpu_set_enabled(g, NVGPU_SUPPORT_SYNCPOINT_ADDRESS, true); diff --git a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c index 984807eba..6d9202610 100644 --- a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2021, 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"), @@ -161,13 +161,13 @@ static int vgpu_gv11b_init_gpu_characteristics(struct gk20a *g) nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); nvgpu_set_enabled(g, NVGPU_USE_COHERENT_SYSMEM, true); nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); - nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); if (nvgpu_has_syncpoints(g)) { nvgpu_set_enabled(g, NVGPU_SUPPORT_SYNCPOINT_ADDRESS, true); nvgpu_set_enabled(g, NVGPU_SUPPORT_USER_SYNCPOINT, true); } nvgpu_set_enabled(g, NVGPU_SUPPORT_USERMODE_SUBMIT, true); #ifdef CONFIG_NVGPU_GRAPHICS + nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); nvgpu_set_enabled(g, NVGPU_SUPPORT_ZBC_STENCIL, true); #endif nvgpu_set_enabled(g, NVGPU_SUPPORT_PREEMPTION_GFXP, true);