drm/nouveau/disp/tu102-: prepare for GSP-RM
- (temporarily) disable if GSP-RM detected, will be added later - pass "suspend" flag down to chipset-specific DISP code 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-25-skeggsb@gmail.com
This commit is contained in:
parent
0e55453fc8
commit
8c186c83f9
@ -105,7 +105,7 @@ nvkm_disp_fini(struct nvkm_engine *engine, bool suspend)
|
||||
struct nvkm_outp *outp;
|
||||
|
||||
if (disp->func->fini)
|
||||
disp->func->fini(disp);
|
||||
disp->func->fini(disp, suspend);
|
||||
|
||||
list_for_each_entry(outp, &disp->outps, head) {
|
||||
if (outp->func->fini)
|
||||
@ -208,6 +208,9 @@ nvkm_disp_dtor(struct nvkm_engine *engine)
|
||||
nvkm_head_del(&head);
|
||||
}
|
||||
|
||||
if (disp->func->dtor)
|
||||
disp->func->dtor(disp);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "head.h"
|
||||
#include "ior.h"
|
||||
|
||||
#include <subdev/gsp.h>
|
||||
#include <subdev/timer.h>
|
||||
|
||||
#include <nvif/class.h>
|
||||
@ -147,5 +148,8 @@ int
|
||||
ga102_disp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
|
||||
struct nvkm_disp **pdisp)
|
||||
{
|
||||
if (nvkm_gsp_rm(device->gsp))
|
||||
return -ENODEV;
|
||||
|
||||
return nvkm_disp_new_(&ga102_disp, device, type, inst, pdisp);
|
||||
}
|
||||
|
@ -1154,7 +1154,7 @@ gf119_disp_intr(struct nvkm_disp *disp)
|
||||
}
|
||||
|
||||
void
|
||||
gf119_disp_fini(struct nvkm_disp *disp)
|
||||
gf119_disp_fini(struct nvkm_disp *disp, bool suspend)
|
||||
{
|
||||
struct nvkm_device *device = disp->engine.subdev.device;
|
||||
/* disable all interrupts */
|
||||
|
@ -1115,7 +1115,7 @@ gv100_disp_intr(struct nvkm_disp *disp)
|
||||
}
|
||||
|
||||
void
|
||||
gv100_disp_fini(struct nvkm_disp *disp)
|
||||
gv100_disp_fini(struct nvkm_disp *disp, bool suspend)
|
||||
{
|
||||
struct nvkm_device *device = disp->engine.subdev.device;
|
||||
nvkm_wr32(device, 0x611db0, 0x00000000);
|
||||
|
@ -1504,7 +1504,7 @@ nv50_disp_intr(struct nvkm_disp *disp)
|
||||
}
|
||||
|
||||
void
|
||||
nv50_disp_fini(struct nvkm_disp *disp)
|
||||
nv50_disp_fini(struct nvkm_disp *disp, bool suspend)
|
||||
{
|
||||
struct nvkm_device *device = disp->engine.subdev.device;
|
||||
/* disable all interrupts */
|
||||
|
@ -15,9 +15,10 @@ int nvkm_disp_new_(const struct nvkm_disp_func *, struct nvkm_device *, enum nvk
|
||||
void nvkm_disp_vblank(struct nvkm_disp *, int head);
|
||||
|
||||
struct nvkm_disp_func {
|
||||
void (*dtor)(struct nvkm_disp *);
|
||||
int (*oneinit)(struct nvkm_disp *);
|
||||
int (*init)(struct nvkm_disp *);
|
||||
void (*fini)(struct nvkm_disp *);
|
||||
void (*fini)(struct nvkm_disp *, bool suspend);
|
||||
void (*intr)(struct nvkm_disp *);
|
||||
void (*intr_error)(struct nvkm_disp *, int chid);
|
||||
|
||||
@ -32,7 +33,7 @@ struct nvkm_disp_func {
|
||||
|
||||
u16 ramht_size;
|
||||
|
||||
const struct nvkm_sclass root;
|
||||
struct nvkm_sclass root;
|
||||
|
||||
struct nvkm_disp_user {
|
||||
struct nvkm_sclass base;
|
||||
@ -44,7 +45,7 @@ struct nvkm_disp_func {
|
||||
|
||||
int nv50_disp_oneinit(struct nvkm_disp *);
|
||||
int nv50_disp_init(struct nvkm_disp *);
|
||||
void nv50_disp_fini(struct nvkm_disp *);
|
||||
void nv50_disp_fini(struct nvkm_disp *, bool suspend);
|
||||
void nv50_disp_intr(struct nvkm_disp *);
|
||||
extern const struct nvkm_enum nv50_disp_intr_error_type[];
|
||||
void nv50_disp_super(struct work_struct *);
|
||||
@ -56,12 +57,12 @@ void nv50_disp_super_2_2(struct nvkm_disp *, struct nvkm_head *);
|
||||
void nv50_disp_super_3_0(struct nvkm_disp *, struct nvkm_head *);
|
||||
|
||||
int gf119_disp_init(struct nvkm_disp *);
|
||||
void gf119_disp_fini(struct nvkm_disp *);
|
||||
void gf119_disp_fini(struct nvkm_disp *, bool suspend);
|
||||
void gf119_disp_intr(struct nvkm_disp *);
|
||||
void gf119_disp_super(struct work_struct *);
|
||||
void gf119_disp_intr_error(struct nvkm_disp *, int);
|
||||
|
||||
void gv100_disp_fini(struct nvkm_disp *);
|
||||
void gv100_disp_fini(struct nvkm_disp *, bool suspend);
|
||||
void gv100_disp_intr(struct nvkm_disp *);
|
||||
void gv100_disp_super(struct work_struct *);
|
||||
int gv100_disp_wndw_cnt(struct nvkm_disp *, unsigned long *);
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "ior.h"
|
||||
|
||||
#include <core/gpuobj.h>
|
||||
#include <subdev/gsp.h>
|
||||
#include <subdev/timer.h>
|
||||
|
||||
#include <nvif/class.h>
|
||||
@ -233,5 +234,8 @@ int
|
||||
tu102_disp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
|
||||
struct nvkm_disp **pdisp)
|
||||
{
|
||||
if (nvkm_gsp_rm(device->gsp))
|
||||
return -ENODEV;
|
||||
|
||||
return nvkm_disp_new_(&tu102_disp, device, type, inst, pdisp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user