From: Ben Skeggs Date: Mon, 18 Sep 2023 20:21:25 +0000 (+1000) Subject: drm/nouveau/therm/tu102-: prepare for GSP-RM X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f2b76a18251d08aae035288190c562b28da9bf35;p=linux.git drm/nouveau/therm/tu102-: prepare for GSP-RM - disable THERM completely when GSP-RM detected Signed-off-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20230918202149.4343-21-skeggsb@gmail.com --- diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c index 44f021392b955..5392833d36148 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c @@ -23,6 +23,8 @@ */ #include "priv.h" +#include + static int gp100_temp_get(struct nvkm_therm *therm) { @@ -52,5 +54,8 @@ int gp100_therm_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_therm **ptherm) { + if (nvkm_gsp_rm(device->gsp)) + return -ENODEV; + return nvkm_therm_new_(&gp100_therm, device, type, inst, ptherm); }