All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [CI 4/4] drm/i915/selftests: tweak the misaligned_case
Date: Thu, 21 Apr 2022 14:16:10 +0530	[thread overview]
Message-ID: <20220421084609.GD18679@intel.com> (raw)
In-Reply-To: <20220420181613.70033-4-matthew.auld@intel.com>

On 2022-04-20 at 19:16:13 +0100, Matthew Auld wrote:
> The compact-pt layout restrictions should only apply to the ppGTT. Also
> make this play nice on platforms that only have the 64K GTT restriction,
> and not the compact-pt thing.
> 
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Cc: Nirmoy Das <nirmoy.das@linux.intel.com>
> Cc: Ramalingam C <ramalingam.c@intel.com>
Looks good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>

> ---
>  drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> index bccc49a8ab5e..8633bec18fa7 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> @@ -1112,10 +1112,16 @@ static int misaligned_case(struct i915_address_space *vm, struct intel_memory_re
>  	expected_vma_size = round_up(size, 1 << (ffs(vma->resource->page_sizes_gtt) - 1));
>  	expected_node_size = expected_vma_size;
>  
> -	if (NEEDS_COMPACT_PT(vm->i915) && i915_gem_object_is_lmem(obj)) {
> -		/* compact-pt should expand lmem node to 2MB */
> +	if (HAS_64K_PAGES(vm->i915) && i915_gem_object_is_lmem(obj)) {
> +		/*
> +		 * The compact-pt should expand lmem node to 2MB for the ppGTT,
> +		 * for all other cases we should only expect 64K.
> +		 */
>  		expected_vma_size = round_up(size, I915_GTT_PAGE_SIZE_64K);
> -		expected_node_size = round_up(size, I915_GTT_PAGE_SIZE_2M);
> +		if (NEEDS_COMPACT_PT(vm->i915) && !i915_is_ggtt(vm))
> +			expected_node_size = round_up(size, I915_GTT_PAGE_SIZE_2M);
> +		else
> +			expected_node_size = round_up(size, I915_GTT_PAGE_SIZE_64K);
>  	}
>  
>  	if (vma->size != expected_vma_size || vma->node.size != expected_node_size) {
> -- 
> 2.34.1
> 

WARNING: multiple messages have this Message-ID (diff)
From: Ramalingam C <ramalingam.c@intel.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Nirmoy Das" <nirmoy.das@linux.intel.com>
Subject: Re: [CI 4/4] drm/i915/selftests: tweak the misaligned_case
Date: Thu, 21 Apr 2022 14:16:10 +0530	[thread overview]
Message-ID: <20220421084609.GD18679@intel.com> (raw)
In-Reply-To: <20220420181613.70033-4-matthew.auld@intel.com>

On 2022-04-20 at 19:16:13 +0100, Matthew Auld wrote:
> The compact-pt layout restrictions should only apply to the ppGTT. Also
> make this play nice on platforms that only have the 64K GTT restriction,
> and not the compact-pt thing.
> 
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Cc: Nirmoy Das <nirmoy.das@linux.intel.com>
> Cc: Ramalingam C <ramalingam.c@intel.com>
Looks good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>

> ---
>  drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> index bccc49a8ab5e..8633bec18fa7 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> @@ -1112,10 +1112,16 @@ static int misaligned_case(struct i915_address_space *vm, struct intel_memory_re
>  	expected_vma_size = round_up(size, 1 << (ffs(vma->resource->page_sizes_gtt) - 1));
>  	expected_node_size = expected_vma_size;
>  
> -	if (NEEDS_COMPACT_PT(vm->i915) && i915_gem_object_is_lmem(obj)) {
> -		/* compact-pt should expand lmem node to 2MB */
> +	if (HAS_64K_PAGES(vm->i915) && i915_gem_object_is_lmem(obj)) {
> +		/*
> +		 * The compact-pt should expand lmem node to 2MB for the ppGTT,
> +		 * for all other cases we should only expect 64K.
> +		 */
>  		expected_vma_size = round_up(size, I915_GTT_PAGE_SIZE_64K);
> -		expected_node_size = round_up(size, I915_GTT_PAGE_SIZE_2M);
> +		if (NEEDS_COMPACT_PT(vm->i915) && !i915_is_ggtt(vm))
> +			expected_node_size = round_up(size, I915_GTT_PAGE_SIZE_2M);
> +		else
> +			expected_node_size = round_up(size, I915_GTT_PAGE_SIZE_64K);
>  	}
>  
>  	if (vma->size != expected_vma_size || vma->node.size != expected_node_size) {
> -- 
> 2.34.1
> 

  reply	other threads:[~2022-04-21  8:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 18:16 [Intel-gfx] [CI 1/4] drm/i915: consider min_page_size when migrating Matthew Auld
2022-04-20 18:16 ` Matthew Auld
2022-04-20 18:16 ` [Intel-gfx] [CI 2/4] drm/i915/buddy: sanity check the size Matthew Auld
2022-04-20 18:16   ` Matthew Auld
2022-04-20 18:16 ` [Intel-gfx] [CI 3/4] drm/i915/selftests: fixup min_alignment usage Matthew Auld
2022-04-20 18:16   ` Matthew Auld
2022-04-21  8:32   ` [Intel-gfx] " Ramalingam C
2022-04-21  8:32     ` Ramalingam C
2022-04-20 18:16 ` [Intel-gfx] [CI 4/4] drm/i915/selftests: tweak the misaligned_case Matthew Auld
2022-04-20 18:16   ` Matthew Auld
2022-04-21  8:46   ` Ramalingam C [this message]
2022-04-21  8:46     ` Ramalingam C
2022-04-20 22:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [CI,1/4] drm/i915: consider min_page_size when migrating Patchwork
2022-04-21  1:30 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-04-21  8:25   ` Matthew Auld
2022-04-25 16:05 ` [Intel-gfx] ✓ Fi.CI.IGT: success " 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=20220421084609.GD18679@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=thomas.hellstrom@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.