From 7963a40661e7aff42f08cb7caae87365534cd209 Mon Sep 17 00:00:00 2001 From: Preetham Chandru R Date: Mon, 12 Aug 2019 12:33:43 +0530 Subject: [PATCH] gpu: nvgpu: init: skip failing probe if therm DT entry is absent For dGPU with PCIE interface do not have a thermal alert pin. Only platforms where dGPU is used with SXM interface have the thermal alert pin. This change makes sure that if nvgpu-therm-gpio DT entry is is missing we don't fail probe but continue with GPU initialization without enabling thermal alert feature. Bug 200542024 Change-Id: Iaf3aec9b66695a45daf86ecfdeec398b66f96bfd Signed-off-by: Preetham Chandru R Reviewed-on: https://git-master.nvidia.com/r/2173495 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/module.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c index 94c79a2ff..b08a8791c 100644 --- a/drivers/gpu/nvgpu/os/linux/module.c +++ b/drivers/gpu/nvgpu/os/linux/module.c @@ -441,11 +441,15 @@ int gk20a_pm_finalize_poweron(struct device *dev) if (nvgpu_is_enabled(g, NVGPU_SUPPORT_DGPU_THERMAL_ALERT) && nvgpu_platform_is_silicon(g)) { err = nvgpu_request_therm_irq(l); - if (err) { + if (err && (err != -ENOENT)) { nvgpu_err(g, "thermal interrupt request failed %d", err); goto done; } + if (err == -ENOENT) { + nvgpu_info(g, "nvgpu-therm-gpio DT entry is missing. " + "Thermal Alert feature will not be enabled"); + } } err = nvgpu_finalize_poweron(g);