From db9c1b1f97d09bf08ceecca9bbe91d87c644cb31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konsta=20H=C3=B6ltt=C3=A4?= Date: Thu, 26 Mar 2020 09:40:18 +0200 Subject: [PATCH] gpu: nvgpu: don't build sw semas for dgpu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make tu104's sema cmd HAL ops depend on CONFIG_NVGPU_SW_SEMAPHORE in addition to the kernel mode submit flag. Drop CONFIG_NVGPU_SW_SEMAPHORE from NVGPU_FORCE_DGPU_SAFETY_PROFILE. Semaphore-based synchronization is not actually needed for dgpu. Jira NVGPU-4548 Change-Id: I3fe066dbeb68295dfc4bbe09256ff6a20c892c2f Signed-off-by: Konsta Hölttä Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318737 Reviewed-by: automaticguardword Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/Makefile.shared.configs | 4 ---- drivers/gpu/nvgpu/hal/init/hal_tu104.c | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index e50895a33..f555b2efb 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -105,10 +105,6 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_KERNEL_MODE_SUBMIT CONFIG_NVGPU_FALCON_NON_FUSA := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FALCON_NON_FUSA -# nvgpu_semaphore_get_value -CONFIG_NVGPU_SW_SEMAPHORE :=1 -NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_SW_SEMAPHORE - CONFIG_NVGPU_GR_FALCON_NON_SECURE_BOOT := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_GR_FALCON_NON_SECURE_BOOT diff --git a/drivers/gpu/nvgpu/hal/init/hal_tu104.c b/drivers/gpu/nvgpu/hal/init/hal_tu104.c index 4f56036c5..ced16384c 100644 --- a/drivers/gpu/nvgpu/hal/init/hal_tu104.c +++ b/drivers/gpu/nvgpu/hal/init/hal_tu104.c @@ -1060,7 +1060,8 @@ static const struct gpu_ops tu104_ops = { .get_sync_ro_map = gv11b_syncpt_get_sync_ro_map, }, #endif /* CONFIG_TEGRA_GK20A_NVHOST */ -#ifdef CONFIG_NVGPU_KERNEL_MODE_SUBMIT +#if defined(CONFIG_NVGPU_KERNEL_MODE_SUBMIT) && \ + defined(CONFIG_NVGPU_SW_SEMAPHORE) .sema = { .get_wait_cmd_size = gv11b_sema_get_wait_cmd_size, .get_incr_cmd_size = gv11b_sema_get_incr_cmd_size,