diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2017-07-03 20:06:26 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-08-22 11:04:22 +0300 |
commit | eba5e56db65b7a44d57a98f5f382b2a2b9991321 (patch) | |
tree | 85e3b36620dfcb15c42c034abf639694a628f062 /drivers/gpu/drm/nouveau/nvkm/engine/disp | |
parent | 9d60b9c9d0b6bacee794db9cd18671296b7db072 (diff) | |
download | linux-eba5e56db65b7a44d57a98f5f382b2a2b9991321.tar.xz |
drm/nouveau/disp/gf119-: avoid creating non-existent heads
We assume that each board has 4 heads for GF119+. However this is not
necessarily true - in the case of a GP108 board, the register indicated
that there were only 2.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101601
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/headgf119.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/headgf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/headgf119.c index b33552757647..9fd7ae331308 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/headgf119.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/headgf119.c @@ -92,5 +92,8 @@ gf119_head = { int gf119_head_new(struct nvkm_disp *disp, int id) { + struct nvkm_device *device = disp->engine.subdev.device; + if (!(nvkm_rd32(device, 0x612004) & (0x00000001 << id))) + return 0; return nvkm_head_new_(&gf119_head, disp, id); } |