From: Ilia Mirkin Date: Mon, 29 Jun 2015 08:07:20 +0000 (-0400) Subject: drm/nouveau/fbcon/nv11-: correctly account for ring space usage X-Git-Tag: v4.1.5~7 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=49aed64d0a9e9bce6e848440ed8bcce2d8fab558;p=users%2Fjedix%2Flinux-maple.git drm/nouveau/fbcon/nv11-: correctly account for ring space usage commit d108142c0840ce389cd9898aa76943b3fb430b83 upstream. The RING_SPACE macro accounts how much space is used up so it's important to ask it for the right amount. Incorrect accounting of this can cause page faults down the line as writes are attempted outside of the ring. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/nouveau/nv04_fbcon.c b/drivers/gpu/drm/nouveau/nv04_fbcon.c index 4ef602c5469d2..495c57644ced9 100644 --- a/drivers/gpu/drm/nouveau/nv04_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv04_fbcon.c @@ -203,7 +203,7 @@ nv04_fbcon_accel_init(struct fb_info *info) if (ret) return ret; - if (RING_SPACE(chan, 49)) { + if (RING_SPACE(chan, 49 + (device->info.chipset >= 0x11 ? 4 : 0))) { nouveau_fbcon_gpu_lockup(info); return 0; }