drm: etnaviv: extract command ring reservation
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 21 Jan 2016 15:20:04 +0000 (15:20 +0000)
committerLucas Stach <l.stach@pengutronix.de>
Mon, 7 Mar 2016 14:36:52 +0000 (15:36 +0100)
commit584a13c6e65d9f986424594e41c6a7114d37391b
treee181ee91819d8b38d152e7909ad09810be2c861e
parent471070abd2f53e579ebeb362e78ce62d04287f49
drm: etnaviv: extract command ring reservation

Provide a helper etnaviv_buffer_reserve() to ensure that we can fit a
set of commands into the ring buffer without wrapping by moving code
out of etnaviv_buffer_queue().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_buffer.c