intelfb: fix ring space calculation
authorOrczykowski, Juergen <juergen.orczykowski@siemens.com>
Tue, 8 May 2007 07:37:25 +0000 (00:37 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:26 +0000 (11:15 -0700)
commit71c6efd9930bd87249d007120425341d1293303d
tree43cdb8c00526f16ca5e2cbb99012277fbb1fe116
parent33a9f640a2511155517d316e696654b84dd48654
intelfb: fix ring space calculation

If there is less than RING_MIN_FREE available in the ring buffer,
dinfo->ring_space is set to a big value forcing wait_ring to return.

Fix by making ring space = 0 if ring space < RING_MIN_FREE.

Signed-off-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/intelfb/intelfbhw.c