Skip to content

Commit 1dc750d

Browse files
Ben Skeggsairlied
authored andcommitted
drm/nouveau/ltc/tu102-: prepare for GSP-RM
- disable LTC 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-16-skeggsb@gmail.com
1 parent 624c6f7 commit 1dc750d

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/gpu/drm/nouveau/nvkm/subdev/ltc/ga102.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 void
2527
ga102_ltc_zbc_clear_color(struct nvkm_ltc *ltc, int i, const u32 color[4])
2628
{
@@ -53,5 +55,8 @@ int
5355
ga102_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
5456
struct nvkm_ltc **pltc)
5557
{
58+
if (nvkm_gsp_rm(device->gsp))
59+
return -ENODEV;
60+
5661
return nvkm_ltc_new_(&ga102_ltc, device, type, inst, pltc);
5762
}

drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp102.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
void
2527
gp102_ltc_zbc_clear_stencil(struct nvkm_ltc *ltc, int i, const u32 stencil)
2628
{
@@ -49,5 +51,8 @@ int
4951
gp102_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
5052
struct nvkm_ltc **pltc)
5153
{
54+
if (nvkm_gsp_rm(device->gsp))
55+
return -ENODEV;
56+
5257
return nvkm_ltc_new_(&gp102_ltc, device, type, inst, pltc);
5358
}

0 commit comments

Comments
 (0)