]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/nouveau/fbcon/nv11-: correctly account for ring space usage
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 29 Jun 2015 08:07:20 +0000 (04:07 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 27 Jul 2015 08:56:10 +0000 (18:56 +1000)
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 <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv04_fbcon.c

index 4ef602c5469d2563ee89d4153f0315abdc485a20..495c57644ced91e4a45c7b8b6205fff7d32ff8ae 100644 (file)
@@ -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;
        }