summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-08-02 22:50:30 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-08-02 22:58:25 +0100
commit8f9420184a3d62f9ca1ddb2b2f716989c461489b (patch)
tree08d02ff129de9c2aac9253cfce6b4568a17987da /net
parentc5efa1ad09784905ae31cd65b659cc73c09fd290 (diff)
downloadlinux-8f9420184a3d62f9ca1ddb2b2f716989c461489b.tar.bz2
drm/i915: Move the modulus for ring emission to the register write
Space reservation is already safe with respect to the ring->size modulus, but hardware only expects to see values in the range 0...ring->size-1 (inclusive) and so requires the modulus to prevent us writing the value ring->size instead of 0. As this is only required for the register itself, we can defer the modulus to the register update and not perform it after every command packet. We keep the intel_ring_advance() around in the code to provide demarcation for the end-of-packet (which then can be compared against intel_ring_begin() as the number of dwords emitted must match the reserved space). v2: Assert that the ring size is a power-of-two to match assumptions in the code. Simplify the comment before writing the tail value to explain why the modulus is necessary. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Dave Gordon <david.s.gordon@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-13-git-send-email-chris@chris-wilson.co.uk
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions