Skip to content

Commit d4c9cd3

Browse files
Ben Skeggsairlied
authored andcommitted
drm/nouveau/top/tu102-: prepare for GSP-RM
- disable TOP completely when GSP-RM detected Signed-off-by: Ben Skeggs <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f2b76a1 commit d4c9cd3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/gpu/drm/nouveau/nvkm/subdev/top/ga100.c

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

24+
#include <subdev/gsp.h>
25+
2426
static int
2527
ga100_top_parse(struct nvkm_top *top)
2628
{
@@ -104,5 +106,8 @@ int
104106
ga100_top_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
105107
struct nvkm_top **ptop)
106108
{
109+
if (nvkm_gsp_rm(device->gsp))
110+
return -ENODEV;
111+
107112
return nvkm_top_new_(&ga100_top, device, type, inst, ptop);
108113
}

drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.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 int
2729
gk104_top_parse(struct nvkm_top *top)
2830
{
@@ -115,5 +117,8 @@ int
115117
gk104_top_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
116118
struct nvkm_top **ptop)
117119
{
120+
if (nvkm_gsp_rm(device->gsp))
121+
return -ENODEV;
122+
118123
return nvkm_top_new_(&gk104_top, device, type, inst, ptop);
119124
}

0 commit comments

Comments
 (0)