Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Karolina Stolarek <karolina.stolarek@intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v3 6/8] tests/i915/gem_blits: Add XY_FAST_COPY_BLT support for gem_blits
Date: Wed, 15 Mar 2023 16:11:17 +0100	[thread overview]
Message-ID: <40812c0b-09f4-3020-4546-605086a5f309@intel.com> (raw)
In-Reply-To: <20230315104918.gcyjwmovyzct7rxx@zkempczy-mobl2>

On 15.03.2023 11:49, Zbigniew Kempczyński wrote:
> On Tue, Mar 14, 2023 at 03:44:38PM +0100, Karolina Stolarek wrote:
>> From: Arjun Melkaveri <arjun.melkaveri@intel.com>
>>
>> Test case uses legacy command XY_SRC_COPY_BLT_CMD which is not supported
>> on newer generations. Modify test to use XY_FAST_COPY_BLT.
> 
> Description doesn't match the patch.

Huh, you're right, that's an oversight on my part. Will correct it in 
the next version.

> 
>>
>> Signed-off-by: Arjun Melkaveri <arjun.melkaveri@intel.com>
>> Signed-off-by: Vikas Srivastava <vikas.srivastava@intel.com>
>> Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
>> Cc: Nirmoy Das <nirmoy.das@intel.com>
>> Cc: Andi Shyti <andi.shyti@linux.intel.com>
>> ---
>>   tests/i915/gem_blits.c | 21 +++++++++++++++++----
>>   1 file changed, 17 insertions(+), 4 deletions(-)
>>
>> diff --git a/tests/i915/gem_blits.c b/tests/i915/gem_blits.c
>> index e5ef3662..b38d6c7e 100644
>> --- a/tests/i915/gem_blits.c
>> +++ b/tests/i915/gem_blits.c
>> @@ -216,7 +216,12 @@ static void buffer_set_tiling(const struct device *device,
>>   
>>   	if (!blt_has_xy_src_copy(device->fd)) {
>>   		batch[i++] = fast_copy_dword0(buffer->tiling, tiling);
>> -		dword1 = fast_copy_dword1(buffer->tiling, tiling, 32);
>> +		/* Post ATS-M platforms require tile4 bit to be set for YMAJOR mode */
>> +		dword1 = fast_copy_dword1(buffer->tiling ?
>> +					  I915_TILING_Yf : I915_TILING_NONE,
>> +					  tiling ?
>> +					  I915_TILING_Yf : I915_TILING_NONE,
>> +					  32);
>>   		batch[i++] = dword1 | pitch;
>>   	} else {
>>   		batch[i] = (XY_SRC_COPY_BLT_CMD |
>> @@ -361,8 +366,11 @@ static bool blit_to_linear(const struct device *device,
>>   	}
>>   
>>   	if (!blt_has_xy_src_copy(device->fd)) {
>> -		batch[i++] = fast_copy_dword0(buffer->tiling, I915_TILING_NONE);
>> -		dword1 = fast_copy_dword1(buffer->tiling, I915_TILING_NONE, 32);
>> +		batch[i++] = fast_copy_dword0(buffer->tiling, 0);
>> +		/* Post ATS-M platforms require tile4 bit to be set for YMAJOR mode */
>> +		dword1 = fast_copy_dword1(buffer->tiling ?
>> +					  I915_TILING_Yf : I915_TILING_NONE,
>> +					  0, 32);
> 
> Is that comment adequate to fast_copy_dword1()? Where's tile4 bit set in this patch?

In dw1, we set bits 31 and 30 to specify if we're using new TileY format 
(i.e. Tile4). MTL doesn't support the legacy format, so we have to 
override it here. Come to think of it, we could write something like:

dword1 = fast_copy_dword1(src->tiling == T_YMAJOR,
			  dst->tiling == T_YMAJOR, 32);

to set the required bits.

Thoughts?


All the best,
Karolina
> 
> --
> Zbigniew
> 
> 
>>   		batch[i++] = dword1 | buffer->stride;
>>   	} else {
>>   		batch[i] = (XY_SRC_COPY_BLT_CMD |
>> @@ -705,7 +713,12 @@ blit(const struct device *device,
>>   
>>   	if (!blt_has_xy_src_copy(device->fd)) {
>>   		batch[i++] = fast_copy_dword0(src->tiling, dst->tiling);
>> -		dword1 = fast_copy_dword1(src->tiling, dst->tiling, 32);
>> +		/* Post ATS-M platforms require tile4 bit to be set for YMAJOR mode */
>> +		dword1 = fast_copy_dword1(src->tiling ?
>> +					  I915_TILING_Yf : I915_TILING_NONE,
>> +					  dst->tiling ?
>> +					  I915_TILING_Yf : I915_TILING_NONE,
>> +					  32);
>>   		batch[i++] = dword1 | pitch;
>>   	} else {
>>   		batch[i] = (XY_SRC_COPY_BLT_CMD |
>> -- 
>> 2.25.1
>>

  reply	other threads:[~2023-03-15 15:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 14:44 [igt-dev] [PATCH i-g-t v3 0/8] Update gem_blits for newer generations Karolina Stolarek
2023-03-14 14:44 ` [igt-dev] [PATCH i-g-t v3 1/8] lib/i915_blt: Add helpers to check XY_SRC_COPY support Karolina Stolarek
2023-03-15  8:32   ` Zbigniew Kempczyński
2023-03-14 14:44 ` [igt-dev] [PATCH i-g-t v3 2/8] lib/intel_cmds_info: Correct tiling formats for XY_SRC_COPY Karolina Stolarek
2023-03-15 10:11   ` Zbigniew Kempczyński
2023-03-14 14:44 ` [igt-dev] [PATCH i-g-t v3 3/8] lib/intel_device_info: Add tiling information for early gens Karolina Stolarek
2023-03-15 10:36   ` Zbigniew Kempczyński
2023-03-14 14:44 ` [igt-dev] [PATCH i-g-t v3 4/8] tests/i915/gem_blits: Use new copy instruction Karolina Stolarek
2023-03-15 10:42   ` Zbigniew Kempczyński
2023-03-14 14:44 ` [igt-dev] [PATCH i-g-t v3 5/8] lib/intel_batchbuffer: Add wrapper API to use XY_FAST_COPY_BLT/XY_SRC_BLT Karolina Stolarek
2023-03-15 10:45   ` Zbigniew Kempczyński
2023-03-14 14:44 ` [igt-dev] [PATCH i-g-t v3 6/8] tests/i915/gem_blits: Add XY_FAST_COPY_BLT support for gem_blits Karolina Stolarek
2023-03-15 10:49   ` Zbigniew Kempczyński
2023-03-15 15:11     ` Karolina Stolarek [this message]
2023-03-14 14:44 ` [igt-dev] [PATCH i-g-t v3 7/8] lib/intel_cmds_info: Reorder blt_tiling_type enum Karolina Stolarek
2023-03-15 10:49   ` Zbigniew Kempczyński
2023-03-14 14:44 ` [igt-dev] [PATCH i-g-t v3 8/8] tests/gem_blits: Use intel_cmds_info library Karolina Stolarek
2023-03-15 10:54   ` Zbigniew Kempczyński
2023-03-14 16:13 ` [igt-dev] ✓ Fi.CI.BAT: success for Update gem_blits for newer generations (rev3) Patchwork
2023-03-15 20:05 ` [igt-dev] ✓ Fi.CI.IGT: " 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=40812c0b-09f4-3020-4546-605086a5f309@intel.com \
    --to=karolina.stolarek@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=zbigniew.kempczynski@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