From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1DBC410E114 for ; Mon, 9 Oct 2023 13:41:49 +0000 (UTC) Message-ID: <0654cc94-47cd-8494-7c03-6c997bda4ae6@intel.com> Date: Mon, 9 Oct 2023 15:41:36 +0200 Content-Language: en-US To: "Sharma, Swati2" , , Juha-Pekka Heikkila References: <20231002121428.3827-1-nirmoy.das@intel.com> <690de57f-d5f3-45a6-a97e-cffaf3d512d2@intel.com> From: Nirmoy Das In-Reply-To: <690de57f-d5f3-45a6-a97e-cffaf3d512d2@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH i-g-t] tests/prime_vgem: Use correct blitter List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: +  Zbigniew, Karolina Adding blitter experts On 10/9/2023 7:22 AM, Sharma, Swati2 wrote: > Hi Nirmoy, > > On 02-Oct-23 5:44 PM, Nirmoy Das wrote: >> Use igt_blitter_copy() which picks a correct blitter >> command depending on platform. > > Should this change be made in other places as well where we are using > igt_blitter_src_copy() like igt_fb.c, etc. I think so. Regards, Nirmoy > > ++JP > >> >> Cc: Kamil Konieczny >> Signed-off-by: Nirmoy Das >> --- >>   tests/prime_vgem.c | 52 +++++++++++++++++++++++----------------------- >>   1 file changed, 26 insertions(+), 26 deletions(-) >> >> diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c >> index 876e04ed0..551a731f5 100644 >> --- a/tests/prime_vgem.c >> +++ b/tests/prime_vgem.c >> @@ -29,7 +29,7 @@ >>   #include "i915/gem_create.h" >>   #include "igt.h" >>   #include "igt_vgem.h" >> -#include "intel_batchbuffer.h"    /* igt_blitter_src_copy() */ >> +#include "intel_batchbuffer.h"    /* igt_blitter_copy() */ >>   /** >>    * TEST: prime vgem >>    * Description: Basic check of polling for prime/vgem fences. >> @@ -351,11 +351,11 @@ static void test_fence_blt(int i915, int vgem) >>           write(master[1], &child, sizeof(child)); >>           read(slave[0], &child, sizeof(child)); >>   -        igt_blitter_src_copy(i915, ahnd, 0, NULL, prime, 0, >> scratch.pitch, >> -                     I915_TILING_NONE, 0, 0, scratch.size, >> -                     scratch.width, scratch.height, scratch.bpp, >> -                     native, 0, scratch.pitch, >> -                     I915_TILING_NONE, 0, 0, scratch.size); >> +        igt_blitter_copy(i915, ahnd, 0, NULL, prime, 0, scratch.pitch, >> +                 I915_TILING_NONE, 0, 0, scratch.size, >> +                 scratch.width, scratch.height, scratch.bpp, >> +                 native, 0, scratch.pitch, >> +                 I915_TILING_NONE, 0, 0, scratch.size); >>           gem_sync(i915, native); >>             for (i = 0; i < scratch.height; i++) >> @@ -480,11 +480,11 @@ static void test_blt(int vgem, int i915) >>           ptr[scratch.pitch * i / sizeof(*ptr)] = i; >>       munmap(ptr, scratch.size); >>   -    igt_blitter_src_copy(i915, ahnd, 0, NULL, native, 0, >> scratch.pitch, >> -                 I915_TILING_NONE, 0, 0, scratch.size, >> -                 scratch.width, scratch.height, scratch.bpp, >> -                 prime, 0, scratch.pitch, I915_TILING_NONE, 0, 0, >> -                 scratch.size); >> +    igt_blitter_copy(i915, ahnd, 0, NULL, native, 0, scratch.pitch, >> +             I915_TILING_NONE, 0, 0, scratch.size, >> +             scratch.width, scratch.height, scratch.bpp, >> +             prime, 0, scratch.pitch, I915_TILING_NONE, 0, 0, >> +             scratch.size); >>       prime_sync_start(dmabuf, true); >>       prime_sync_end(dmabuf, true); >>       close(dmabuf); >> @@ -496,11 +496,11 @@ static void test_blt(int vgem, int i915) >>       } >>       munmap(ptr, scratch.size); >>   -    igt_blitter_src_copy(i915, ahnd, 0, NULL, prime, 0, >> scratch.pitch, >> -                 I915_TILING_NONE, 0, 0, scratch.size, >> -                 scratch.width, scratch.height, scratch.bpp, >> -                 native, 0, scratch.pitch, I915_TILING_NONE, 0, 0, >> -                 scratch.size); >> +    igt_blitter_copy(i915, ahnd, 0, NULL, prime, 0, scratch.pitch, >> +             I915_TILING_NONE, 0, 0, scratch.size, >> +             scratch.width, scratch.height, scratch.bpp, >> +             native, 0, scratch.pitch, I915_TILING_NONE, 0, 0, >> +             scratch.size); >>       gem_sync(i915, native); >>         ptr = gem_mmap__device_coherent(i915, native, 0, >> scratch.size, PROT_READ); >> @@ -620,22 +620,22 @@ static void test_blt_interleaved(int vgem, int >> i915) >>         for (i = 0; i < SLOW_QUICK(scratch.height, 64); i++) { >>           local[scratch.pitch * i / sizeof(*local)] = i; >> -        igt_blitter_src_copy(i915, ahnd, 0, NULL, native, 0, >> -                     scratch.pitch, I915_TILING_NONE, 0, i, >> -                     scratch.size, scratch.width, 1, >> -                     scratch.bpp, prime, 0, scratch.pitch, >> -                     I915_TILING_NONE, 0, i, scratch.size); >> +        igt_blitter_copy(i915, ahnd, 0, NULL, native, 0, >> +                 scratch.pitch, I915_TILING_NONE, 0, i, >> +                 scratch.size, scratch.width, 1, >> +                 scratch.bpp, prime, 0, scratch.pitch, >> +                 I915_TILING_NONE, 0, i, scratch.size); >>           prime_sync_start(dmabuf, true); >>           igt_assert_eq_u32(foreign[scratch.pitch * i / >> sizeof(*foreign)], >>                     i); >>           prime_sync_end(dmabuf, true); >>             foreign[scratch.pitch * i / sizeof(*foreign)] = ~i; >> -        igt_blitter_src_copy(i915, ahnd, 0, NULL, prime, 0, >> scratch.pitch, >> -                     I915_TILING_NONE, 0, i, scratch.size, >> -                     scratch.width, 1, >> -                     scratch.bpp, native, 0, scratch.pitch, >> -                     I915_TILING_NONE, 0, i, scratch.size); >> +        igt_blitter_copy(i915, ahnd, 0, NULL, prime, 0, scratch.pitch, >> +                 I915_TILING_NONE, 0, i, scratch.size, >> +                 scratch.width, 1, >> +                 scratch.bpp, native, 0, scratch.pitch, >> +                 I915_TILING_NONE, 0, i, scratch.size); >>           gem_sync(i915, native); >>           igt_assert_eq_u32(local[scratch.pitch * i / sizeof(*local)], >>                     ~i);