public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Intel-gfx@lists.freedesktop.org,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Zhipeng Gong <zhipeng.gong@intel.com>
Subject: Re: [PATCH] drm/i915: Fix VCS ring selection after uapi decoupling
Date: Wed, 27 Jan 2016 13:42:16 +0000	[thread overview]
Message-ID: <56A8C938.4090800@linux.intel.com> (raw)
In-Reply-To: <20160127130050.GX8281@nuc-i3427.alporthouse.com>


On 27/01/16 13:00, Chris Wilson wrote:
> On Wed, Jan 27, 2016 at 12:38:43PM +0000, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> This got broken in:
>>
>>     commit de1add360522c876c25ef2bbbbab1c94bdb509ab
>>     Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>     Date:   Fri Jan 15 15:12:50 2016 +0000
>>
>>         drm/i915: Decouple execbuf uAPI from internal implementation
>>
>> BSD ring flags need to be shifted before they can be considered
>> indices into the ring array.
>>
>> Reported by Zhipeng Gong.
>>
>
> This should be hit by gem_busy on appropriate hardware. I need to add
> the extra ring to gem_exec_nop and make those all basic test.

Right hardware is the key.

>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Zhipeng Gong <zhipeng.gong@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_gem_execbuffer.c | 11 +++++++----
>>   include/uapi/drm/i915_drm.h                | 10 ++++++----
>>   2 files changed, 13 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
>> index 2dc08ce1079a..6fc620af14fa 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
>> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
>> @@ -1395,12 +1395,15 @@ eb_select_ring(struct drm_i915_private *dev_priv,
>>   	}
>>
>>   	if (user_ring_id == I915_EXEC_BSD && HAS_BSD2(dev_priv)) {
>> -		unsigned int bsd_idx = args->flags & I915_EXEC_BSD_MASK;
>> +		unsigned int bsd_idx = (args->flags & I915_EXEC_BSD_MASK) >>
>> +					I915_EXEC_BSD_SHIFT;
>>
>> -		if (bsd_idx == I915_EXEC_BSD_DEFAULT) {
>> +		if (bsd_idx == (I915_EXEC_BSD_DEFAULT >> I915_EXEC_BSD_SHIFT)) {
>>   			bsd_idx = gen8_dispatch_bsd_ring(dev_priv, file);
>> -		} else if (bsd_idx >= I915_EXEC_BSD_RING1 &&
>> -			   bsd_idx <= I915_EXEC_BSD_RING2) {
>> +		} else if (bsd_idx >=
>> +			  (I915_EXEC_BSD_RING1 >> I915_EXEC_BSD_SHIFT) &&
>> +			  bsd_idx <=
>> +			  (I915_EXEC_BSD_RING2 >> I915_EXEC_BSD_SHIFT)) {
>
> Wouldn't inserting bsd_idx >>= I915_EXEC_BSD_SHIFT; here be simpler ?

Indeed it would, v2 is on the way.

Regards,

Tvrtko


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-01-27 13:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 12:38 [PATCH] drm/i915: Fix VCS ring selection after uapi decoupling Tvrtko Ursulin
2016-01-27 13:00 ` Chris Wilson
2016-01-27 13:41   ` [PATCH v2] " Tvrtko Ursulin
2016-01-27 14:58     ` Chris Wilson
2016-01-27 13:42   ` Tvrtko Ursulin [this message]
2016-01-28  8:58 ` ✓ Fi.CI.BAT: success for drm/i915: Fix VCS ring selection after uapi decoupling (rev2) 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=56A8C938.4090800@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=tvrtko.ursulin@intel.com \
    --cc=zhipeng.gong@intel.com \
    /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