[Intel-gfx] [PATCH 06/13] drm/i915/bdw: implement semaphore signal
Ville Syrjälä
ville.syrjala at linux.intel.com
Wed Mar 5 13:24:42 CET 2014
On Mon, Feb 24, 2014 at 03:10:26PM +0200, Ville Syrjälä wrote:
> 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.
And I noticed there's even a hweight8() if we want to micro optimize,
but I don't really care that much, so even leaving these as hweight_long()
is fine by me.
--
Ville Syrjälä
Intel OTC
More information about the Intel-gfx
mailing list