Skip to content

Commit

Permalink
drm/nouveau/fbcon/nv11-: correctly account for ring space usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilia Mirkin authored and Ben Skeggs committed Jul 27, 2015
1 parent d31b11d commit d108142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nv04_fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d108142

Please sign in to comment.