From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Initialize legacy semaphores from engine hw id indexed array
Date: Thu, 11 Aug 2016 15:45:36 +0100 [thread overview]
Message-ID: <57AC8F90.8020709@linux.intel.com> (raw)
In-Reply-To: <20160811112048.GJ12148@nuc-i3427.alporthouse.com>
On 11/08/16 12:20, Chris Wilson wrote:
> On Thu, Aug 11, 2016 at 12:05:58PM +0100, Tvrtko Ursulin wrote:
>> @@ -1394,9 +1393,13 @@ static int gen6_signal(struct drm_i915_gem_request *req)
>> if (ret)
>> return ret;
>>
>> - for_each_engine_id(useless, dev_priv, id) {
>> - i915_reg_t mbox_reg = req->engine->semaphore.mbox.signal[id];
>> + for_each_engine(engine, dev_priv) {
>> + i915_reg_t mbox_reg;
>> +
>> + if (engine->hw_id > GEN6_SEMAPHORE_LAST)
>> + continue;
>
> Yeah, this makes more sense to me...
>
>> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
>> index ac568808aeb1..c2d8677b5b9f 100644
>> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
>> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
>> @@ -277,11 +277,12 @@ struct intel_engine_cs {
>> u32 sync_seqno[I915_NUM_ENGINES-1];
>>
>> union {
>> +#define GEN6_SEMAPHORE_LAST VECS_HW
>> struct {
>> /* our mbox written by others */
>> - u32 wait[I915_NUM_ENGINES];
>> + u32 wait[GEN6_SEMAPHORE_LAST + 1];
>
> but I agree with your hesistation here.
>
> #define GEN6_SEMAPHORE_LAST VECS_HW
> #define GEN6_NUM_SEMAPHORES (GEN6_SEMAPHORE_LAST_HW + 1)
> #define GEN6_MASK_SEMAPHORES GENMASK(GEN6_SEMAPHORE_LAST, 0)
>
> if (!(BIT(engine->hw_id) & GEN6_SEMAPHORES_MASK))
> continue;
>
> (can't decide on NUM/MASK_SEM or SEM_COUNT/MASK)
>
> would that look better?
Yeah it is better, will do that with NUM/MASK.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-08-11 14:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 10:43 [PATCH 0/2] Shrink and lock the size static gen6 semaphore init array Tvrtko Ursulin
2016-08-11 10:43 ` [PATCH 1/2] drm/i915: Add enum for hardware engine identifiers Tvrtko Ursulin
2016-08-11 10:43 ` [PATCH 2/2] drm/i915: Initialize legacy semaphores from engine hw id indexed array Tvrtko Ursulin
2016-08-11 10:53 ` Chris Wilson
2016-08-11 11:05 ` [PATCH v2] " Tvrtko Ursulin
2016-08-11 11:20 ` Chris Wilson
2016-08-11 14:45 ` Tvrtko Ursulin [this message]
2016-08-11 14:50 ` [PATCH v3] " Tvrtko Ursulin
2016-08-11 15:46 ` Chris Wilson
2016-08-11 11:06 ` [PATCH 2/2] " Tvrtko Ursulin
2016-08-11 11:58 ` ✗ Ro.CI.BAT: failure for Shrink and lock the size static gen6 semaphore init array (rev2) Patchwork
2016-08-11 15:31 ` ✗ Ro.CI.BAT: failure for Shrink and lock the size static gen6 semaphore init array (rev3) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57AC8F90.8020709@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox