From beeec12e1735d0756f01b4d7371ffca983b6f5d6 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Wed, 17 Mar 2021 18:32:34 -0700 Subject: [PATCH] gpu: nvgpu: vgpu: add compression and fault recovery flags It added missing flags nvgpu core introduced recently: NVGPU_SUPPORT_COMPRESSION NVGPU_SUPPORT_FAULT_RECOVERY Jira GVSCI-4622 Signed-off-by: Richard Zhao Change-Id: I7eb19b9fdcb834dd479707d8e8a7d21a9640dcfa Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2500558 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Alex Waterman Reviewed-by: Aparna Das Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gp10b.c | 10 +++++++++- drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gp10b.c index 0bc25ec85..99ab529b2 100644 --- a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gp10b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-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"), @@ -963,6 +963,14 @@ int vgpu_gp10b_init_hal(struct gk20a *g) g->max_sm_diversity_config_count = priv->constants.max_sm_diversity_config_count; +#ifdef CONFIG_NVGPU_COMPRESSION + nvgpu_set_enabled(g, NVGPU_SUPPORT_COMPRESSION, true); +#endif + +#ifdef CONFIG_NVGPU_RECOVERY + nvgpu_set_enabled(g, NVGPU_SUPPORT_FAULT_RECOVERY, true); +#endif + g->name = "gp10b"; return 0; 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 6d9202610..2c465fa8b 100644 --- a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c @@ -1109,6 +1109,14 @@ int vgpu_gv11b_init_hal(struct gk20a *g) g->max_sm_diversity_config_count = priv->constants.max_sm_diversity_config_count; +#ifdef CONFIG_NVGPU_COMPRESSION + nvgpu_set_enabled(g, NVGPU_SUPPORT_COMPRESSION, true); +#endif + +#ifdef CONFIG_NVGPU_RECOVERY + nvgpu_set_enabled(g, NVGPU_SUPPORT_FAULT_RECOVERY, true); +#endif + g->name = "gv11b"; return 0;