]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: Make semaphore updates more precise
authorBen Widawsky <ben@bwidawsk.net>
Mon, 30 Jun 2014 16:53:35 +0000 (09:53 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 7 Jul 2014 20:10:10 +0000 (22:10 +0200)
commita1444b79fec2e95b705c5505c1f609306538dc49
treed482d8ef2b59f5f2d1afa0cd2ee948cad0320515
parent707d9cf9935cfba2d62dd80dc01dc5dc4530d4ca
drm/i915: Make semaphore updates more precise

With the ring mask we now have an easy way to know the number of rings
in the system, and therefore can accurately predict the number of dwords
to emit for semaphore signalling. This was not possible (easily)
previously.

There should be no functional impact, simply fewer instructions emitted.

While we're here, simply do the round up to 2 instead of the fancier
rounding we did before, which rounding up per mbox, ie 4. This also
allows us to drop the unnecessary MI_NOOP, so not really 4, 3.

v2: Use 3 dwords instead of 4 (Ville)
Do the proper calculation to get the number of dwords to emit (Ville)
Conditionally set .sync_to when semaphores are enabled (Ville)

v3: Rebased on VCS2
Replace hweight_long with hweight32 (Ville)

v4: Pull out the accidentally squashed hunk from the next patch after
rebase (Daniel).

v5: Fix conflict after rebase (Rodrigo)

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ringbuffer.c