public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: Derek Morton <derek.j.morton@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 2/7] lib/ioctl_wrappers: Separate ring BSD1 from BSD2 checks
Date: Mon, 7 Mar 2016 12:34:05 +0000	[thread overview]
Message-ID: <56DD753D.3080805@intel.com> (raw)
In-Reply-To: <56DD6C75.9090104@intel.com>

On 07/03/16 11:56, Dave Gordon wrote:
> On 02/03/16 18:10, Derek Morton wrote:
>> Some platforms have ring BSD available but no BSD2.
>> Because of the current verification, tests involving ring BSD1
>> will be skipped if no BSD2 is available.
>>
>> Decoupling the checks will allow running the BSD1 specific tests
>> on these platforms.
>>
>> Based on a patch originally submitted by Gabriel Feceoru to
>> patchwork-hook-test branch.
>>
>> Signed-off-by: Derek Morton <derek.j.morton@intel.com>
>> ---
>>   lib/ioctl_wrappers.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
>> index f42e2c9..a4c6aa4 100644
>> --- a/lib/ioctl_wrappers.c
>> +++ b/lib/ioctl_wrappers.c
>> @@ -1432,8 +1432,10 @@ void gem_require_ring(int fd, int ring_id)
>>
>>       /* silly ABI, the kernel thinks everyone who has BSD also has
>> BSD2 */
>>       if ((ring_id & ~(3<<13)) == I915_EXEC_BSD) {
>> -        if (ring_id & (3 << 13))
>> +        if (ring_id & (2 << 13))
>>               igt_require(gem_has_bsd2(fd));
>> +        if (ring_id & (1 << 13))
>> +            igt_require(gem_has_bsd(fd));
>>       }
>>   }
>>
>
> Isn't the first (unchanged) line rather unclear?
> Why not test for (ring_id & I915_EXEC_BSD)?
> And then you only need to additionally test bit 14.
>
>         if (ring_id & I915_EXEC_BSD) {

Oops, no, this should be:

	if ((ring_id & I915_EXEC_RING_MASK) == I915_EXEC_BSD) {

>          /* require at least one BSD ring */
>          igt_require(gem_has_bsd(fd));
>
>          if (ring_id & (2 << 13)) {

Or better (and symbolically):

           if ((ring_id & I915_EXEC_BSD_MASK) == I915_EXEC_BSD_RING2) {

>              /* specifically require BSD2 */
>                 igt_require(gem_has_bsd2(fd));
>          }
>      }
>
> .Dave.

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

  reply	other threads:[~2016-03-07 12:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 18:10 [PATCH i-g-t v2 0/7] Scheduler tests Derek Morton
2016-03-02 18:10 ` [PATCH i-g-t v2 1/7] ioctl_wrappers: make gem_has_ring non static Derek Morton
2016-03-02 18:10 ` [PATCH i-g-t v2 2/7] lib/ioctl_wrappers: Separate ring BSD1 from BSD2 checks Derek Morton
2016-03-02 18:41   ` Chris Wilson
2016-03-04 15:14     ` Morton, Derek J
2016-03-07 11:56   ` Dave Gordon
2016-03-07 12:34     ` Dave Gordon [this message]
2016-03-02 18:10 ` [PATCH i-g-t v2 3/7] lib/intel_batchbuffer: Add functions to be used in the scheduler test Derek Morton
2016-03-02 18:10 ` [PATCH i-g-t v2 4/7] tests/gem_scheduler: Add gem_scheduler test Derek Morton
2016-03-02 20:15   ` Chris Wilson
2016-03-04 15:19     ` Morton, Derek J
2016-03-07 12:40     ` Dave Gordon
2016-03-02 18:10 ` [PATCH i-g-t v2 5/7] igt/gem_ctx_param_basic: Updated to support scheduler priority interface Derek Morton
2016-03-02 18:10 ` [PATCH i-g-t v2 6/7] tests/gem_scheduler: Add subtests to test batch priority behaviour Derek Morton
2016-03-02 18:10 ` [PATCH i-g-t v2 7/7] gem_scheduler: Added subtests to test priority bumping Derek Morton

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=56DD753D.3080805@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=derek.j.morton@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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