aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-01-15 06:34:22 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-01-15 10:50:29 +1000
commitebe52a58acca308142ba2811e50a1b3bf047240d (patch)
treef575a84e131a42d37eb9bb7617a0cf04d9131423 /drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
parentdrm/nouveau/core/memory: add macros to read/write blocks from objects (diff)
downloadlinux-ebe52a58acca308142ba2811e50a1b3bf047240d.tar.gz
linux-ebe52a58acca308142ba2811e50a1b3bf047240d.zip
drm/nouveau/fb/gp102-: unlock VPR as part of FB init
We perform memory allocations long before we hit the code in SECBOOT that would unlock the VPR, which could potentially result in memory allocation within the locked region. Run the scrubber binary right after VRAM init to ensure we don't. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
index c4e9f55af283..5be9c563350d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
@@ -17,6 +17,11 @@ struct nvkm_fb_func {
void (*intr)(struct nvkm_fb *);
struct {
+ bool (*scrub_required)(struct nvkm_fb *);
+ int (*scrub)(struct nvkm_fb *);
+ } vpr;
+
+ struct {
int regions;
void (*init)(struct nvkm_fb *, int i, u32 addr, u32 size,
u32 pitch, u32 flags, struct nvkm_fb_tile *);
@@ -72,4 +77,9 @@ int gm200_fb_init_page(struct nvkm_fb *);
void gp100_fb_init_remapper(struct nvkm_fb *);
void gp100_fb_init_unkn(struct nvkm_fb *);
+
+int gp102_fb_new_(const struct nvkm_fb_func *, struct nvkm_device *, int,
+ struct nvkm_fb **);
+bool gp102_fb_vpr_scrub_required(struct nvkm_fb *);
+int gp102_fb_vpr_scrub(struct nvkm_fb *);
#endif