drm/i915: Share the computation of ring size for RING_CTL register
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 4 Oct 2016 20:11:25 +0000 (21:11 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 5 Oct 2016 07:40:05 +0000 (08:40 +0100)
commit62ae14b1edca0aaf27b84b3fa069177dd794e37f
treeff6da3d92e9af2e88749b273d850add34e290b27
parent615e5000830dd24b8dc6876a6a1babbeda998fdf
drm/i915: Share the computation of ring size for RING_CTL register

Since both legacy and execlists want to populate the RING_CTL register,
share the computation of the right bits for the ring->size. We can then
stop masking errors and explicitly forbid them during creation!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161004201132.21801-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c