Skip to content

Commit ab724be

Browse files
Ben Skeggsairlied
authored andcommitted
drm/nouveau/pmu/tu102-: prepare for GSP-RM
- disable PMU completely when GSP-RM detected Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230918202149.4343-19-skeggsb@gmail.com
1 parent f5a533a commit ab724be

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • drivers/gpu/drm/nouveau/nvkm/subdev/pmu

drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp102.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
#include "priv.h"
2525

26+
#include <subdev/gsp.h>
27+
2628
static const struct nvkm_falcon_func
2729
gp102_pmu_flcn = {
2830
.disable = gm200_flcn_disable,
@@ -54,5 +56,8 @@ int
5456
gp102_pmu_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
5557
struct nvkm_pmu **ppmu)
5658
{
59+
if (nvkm_gsp_rm(device->gsp))
60+
return -ENODEV;
61+
5762
return nvkm_pmu_new_(gp102_pmu_fwif, device, type, inst, ppmu);
5863
}

0 commit comments

Comments
 (0)