Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Karolina Stolarek <karolina.stolarek@intel.com>
To: <janga.rahul.kumar@intel.com>
Cc: igt-dev@lists.freedesktop.org, lucas.demarchi@intel.com,
	ramadevi.gandi@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t] tests/intel/xe_vm: Correct stride to avoid address range collision
Date: Tue, 7 Nov 2023 11:30:42 +0100	[thread overview]
Message-ID: <4ab2f4da-7c0c-4e08-b44e-f25845052e37@intel.com> (raw)
In-Reply-To: <20231107083023.751059-1-janga.rahul.kumar@intel.com>

On 7.11.2023 09:30, janga.rahul.kumar@intel.com wrote:
> From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
> 
> For XE2, the minimum page size for both VRAM and system memory is only 4K.
> 
> Minimum page size was used as the address stride, which is 4K.
> When attempting to bind a 4K range, consecutive VM BIND IOCTL calls
> resulted in a range collision. Update stride based on bo size.
> 
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
> ---
>   tests/intel/xe_vm.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
> index dd3302337..2aead9427 100644
> --- a/tests/intel/xe_vm.c
> +++ b/tests/intel/xe_vm.c
> @@ -377,6 +377,10 @@ shared_pte_page(int fd, struct drm_xe_engine_class_instance *eci, int n_bo,
>   	bo_size = ALIGN(bo_size + xe_cs_prefetch_size(fd),
>   			xe_get_default_alignment(fd));
>   
> +	if (addr_stride <= bo_size) {
> +		addr_stride = addr_stride + bo_size;
> +	}
> +

It's just one line here, you can drop the braces (it will also make 
checkpatch happy). Do we need to align the address stride, or is already 
aligned?

All the best,
Karolina

>   	for (i = 0; i < n_bo; ++i) {
>   		bo[i] = xe_bo_create_flags(fd, vm, bo_size,
>   					   visible_vram_if_possible(fd, eci->gt_id));

  parent reply	other threads:[~2023-11-07 10:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07  8:30 [igt-dev] [PATCH i-g-t] tests/intel/xe_vm: Correct stride to avoid address range collision janga.rahul.kumar
2023-11-07  9:44 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-11-07  9:45 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-07 10:30 ` Karolina Stolarek [this message]
2023-11-09  8:15   ` [igt-dev] [PATCH i-g-t] " Kumar, Janga Rahul
2023-11-07 19:49 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-11-09  8:16 [igt-dev] [PATCH i-g-t] " janga.rahul.kumar
2023-11-09  8:58 ` Karolina Stolarek

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=4ab2f4da-7c0c-4e08-b44e-f25845052e37@intel.com \
    --to=karolina.stolarek@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=janga.rahul.kumar@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=ramadevi.gandi@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