[Intel-gfx] [PATCH 06/13] drm/i915/bdw: implement semaphore signal

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Feb 24 14:10:26 CET 2014


On Wed, Feb 19, 2014 at 10:19:19PM -0800, Ben Widawsky wrote:
<snip>
> @@ -634,6 +641,85 @@ static void render_ring_cleanup(struct intel_ring_buffer *ring)
>  	ring->scratch.obj = NULL;
>  }
>  
> +static int gen8_rcs_signal(struct intel_ring_buffer *signaller,
> +			   unsigned int num_dwords)
> +{
> +#define MBOX_UPDATE_DWORDS 8
> +	struct drm_device *dev = signaller->dev;
> +	struct drm_i915_private *dev_priv = dev->dev_private;
> +	struct intel_ring_buffer *waiter;
> +	int i, ret, num_rings;
> +
> +	num_rings = hweight_long(INTEL_INFO(dev)->ring_mask);

Again hweight32() would be enough.

<snip>

-- 
Ville Syrjälä
Intel OTC



More information about the Intel-gfx mailing list