Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Deak, Imre" <imre.deak@intel.com>
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915/adlp: Fix GEM VM asserts for DPT VMs
Date: Mon, 24 May 2021 17:59:20 +0000	[thread overview]
Message-ID: <c3457d39360f86cf45810f13a54bf909fec06888.camel@intel.com> (raw)
In-Reply-To: <20210524172703.2113058-2-imre.deak@intel.com>

On Mon, 2021-05-24 at 20:27 +0300, Imre Deak wrote:
> An object mapped via DPT can have remapped and rotated VMA instances
> besides the normal VMA instance, similarly to GGTT VMA instances.
> Adjust the corresponding VMA lookup asserts.
> 
> While at it also check if a DPT VM is passed incorrectly to
> i915_vm_to_ppgtt().
> 

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_gtt.h | 3 ++-
>  drivers/gpu/drm/i915/i915_vma.c     | 2 +-
>  drivers/gpu/drm/i915/i915_vma.h     | 2 +-
>  3 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.h b/drivers/gpu/drm/i915/gt/intel_gtt.h
> index ca00b45827b74..50a98ce39f74b 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gtt.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gtt.h
> @@ -359,6 +359,7 @@ struct i915_ppgtt {
>  
>  #define i915_is_ggtt(vm) ((vm)->is_ggtt)
>  #define i915_is_dpt(vm) ((vm)->is_dpt)
> +#define i915_is_ggtt_or_dpt(vm) (i915_is_ggtt(vm) || i915_is_dpt(vm))
>  
>  int __must_check
>  i915_vm_lock_objects(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww);
> @@ -393,7 +394,7 @@ static inline struct i915_ppgtt *
>  i915_vm_to_ppgtt(struct i915_address_space *vm)
>  {
>  	BUILD_BUG_ON(offsetof(struct i915_ppgtt, vm));
> -	GEM_BUG_ON(i915_is_ggtt(vm));
> +	GEM_BUG_ON(i915_is_ggtt_or_dpt(vm));
>  	return container_of(vm, struct i915_ppgtt, vm);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
> index a6cd0fa628477..b319fd3f91cc3 100644
> --- a/drivers/gpu/drm/i915/i915_vma.c
> +++ b/drivers/gpu/drm/i915/i915_vma.c
> @@ -274,7 +274,7 @@ i915_vma_instance(struct drm_i915_gem_object *obj,
>  {
>  	struct i915_vma *vma;
>  
> -	GEM_BUG_ON(view && !i915_is_ggtt(vm));
> +	GEM_BUG_ON(view && !i915_is_ggtt_or_dpt(vm));
>  	GEM_BUG_ON(!atomic_read(&vm->open));
>  
>  	spin_lock(&obj->vma.lock);
> diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
> index 8df784a026d21..2a108e66cd495 100644
> --- a/drivers/gpu/drm/i915/i915_vma.h
> +++ b/drivers/gpu/drm/i915/i915_vma.h
> @@ -158,7 +158,7 @@ i915_vma_compare(struct i915_vma *vma,
>  {
>  	ptrdiff_t cmp;
>  
> -	GEM_BUG_ON(view && !i915_is_ggtt(vm));
> +	GEM_BUG_ON(view && !i915_is_ggtt_or_dpt(vm));
>  
>  	cmp = ptrdiff(vma->vm, vm);
>  	if (cmp)

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

  reply	other threads:[~2021-05-24 17:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 17:27 [Intel-gfx] [PATCH 1/3] drm/i915/adlp: Require DPT FB CCS color planes to be 2MB aligned Imre Deak
2021-05-24 17:27 ` [Intel-gfx] [PATCH 2/3] drm/i915/adlp: Fix GEM VM asserts for DPT VMs Imre Deak
2021-05-24 17:59   ` Souza, Jose [this message]
2021-05-24 17:27 ` [Intel-gfx] [PATCH 3/3] drm/i915/debugfs: Print remap info for DPT VMAs as well Imre Deak
2021-05-24 17:59   ` Souza, Jose
2021-05-24 18:43 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/adlp: Require DPT FB CCS color planes to be 2MB aligned Patchwork
2021-05-24 19:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-05-25  0:22 ` [Intel-gfx] ✓ 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=c3457d39360f86cf45810f13a54bf909fec06888.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=imre.deak@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