All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Dave Airlie <airlied@redhat.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
Date: Tue, 01 Jun 2021 15:26:59 +0300	[thread overview]
Message-ID: <87lf7trcrw.fsf@intel.com> (raw)
In-Reply-To: <20210601082847.78389-1-zbigniew.kempczynski@intel.com>

On Tue, 01 Jun 2021, Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> wrote:
> We have established previously we stop using relocations starting
> from gen12 platforms with Tigerlake as an exception. We keep this
> statement but we want to enable relocations conditionally for
> Rocketlake and Alderlake under require_force_probe flag set.
>
> Keeping relocations under require_force_probe flag is interim solution
> until IGTs will be rewritten to use softpin.
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jason Ekstrand <jason@jlekstrand.net>
> ---
>  .../gpu/drm/i915/gem/i915_gem_execbuffer.c    | 26 +++++++++++++++----
>  1 file changed, 21 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index 297143511f99..c0562dd14837 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -491,16 +491,32 @@ eb_unreserve_vma(struct eb_vma *ev)
>  	ev->flags &= ~__EXEC_OBJECT_RESERVED;
>  }
>  
> +static inline bool

Please don't use the inline keyword in .c files. Let the compiler do its
job.


BR,
Jani.

> +platform_has_relocs_enabled(const struct i915_execbuffer *eb)
> +{
> +	/*
> +	 * Relocations are disallowed starting from gen12 with Tigerlake
> +	 * as an exception. We allow temporarily use relocations for Rocketlake
> +	 * and Alderlake when require_force_probe flag is set.
> +	 */
> +
> +	if (INTEL_GEN(eb->i915) < 12 || IS_TIGERLAKE(eb->i915))
> +		return true;
> +
> +	if (INTEL_INFO(eb->i915)->require_force_probe &&
> +		 (IS_ROCKETLAKE(eb->i915) || IS_ALDERLAKE_S(eb->i915) ||
> +		  IS_ALDERLAKE_P(eb->i915)))
> +		return true;
> +
> +	return false;
> +}
> +
>  static int
>  eb_validate_vma(struct i915_execbuffer *eb,
>  		struct drm_i915_gem_exec_object2 *entry,
>  		struct i915_vma *vma)
>  {
> -	/* Relocations are disallowed for all platforms after TGL-LP.  This
> -	 * also covers all platforms with local memory.
> -	 */
> -	if (entry->relocation_count &&
> -	    INTEL_GEN(eb->i915) >= 12 && !IS_TIGERLAKE(eb->i915))
> +	if (entry->relocation_count && !platform_has_relocs_enabled(eb))
>  		return -EINVAL;
>  
>  	if (unlikely(entry->flags & eb->invalid_flags))

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Dave Airlie <airlied@redhat.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
Date: Tue, 01 Jun 2021 15:26:59 +0300	[thread overview]
Message-ID: <87lf7trcrw.fsf@intel.com> (raw)
In-Reply-To: <20210601082847.78389-1-zbigniew.kempczynski@intel.com>

On Tue, 01 Jun 2021, Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> wrote:
> We have established previously we stop using relocations starting
> from gen12 platforms with Tigerlake as an exception. We keep this
> statement but we want to enable relocations conditionally for
> Rocketlake and Alderlake under require_force_probe flag set.
>
> Keeping relocations under require_force_probe flag is interim solution
> until IGTs will be rewritten to use softpin.
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jason Ekstrand <jason@jlekstrand.net>
> ---
>  .../gpu/drm/i915/gem/i915_gem_execbuffer.c    | 26 +++++++++++++++----
>  1 file changed, 21 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index 297143511f99..c0562dd14837 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -491,16 +491,32 @@ eb_unreserve_vma(struct eb_vma *ev)
>  	ev->flags &= ~__EXEC_OBJECT_RESERVED;
>  }
>  
> +static inline bool

Please don't use the inline keyword in .c files. Let the compiler do its
job.


BR,
Jani.

> +platform_has_relocs_enabled(const struct i915_execbuffer *eb)
> +{
> +	/*
> +	 * Relocations are disallowed starting from gen12 with Tigerlake
> +	 * as an exception. We allow temporarily use relocations for Rocketlake
> +	 * and Alderlake when require_force_probe flag is set.
> +	 */
> +
> +	if (INTEL_GEN(eb->i915) < 12 || IS_TIGERLAKE(eb->i915))
> +		return true;
> +
> +	if (INTEL_INFO(eb->i915)->require_force_probe &&
> +		 (IS_ROCKETLAKE(eb->i915) || IS_ALDERLAKE_S(eb->i915) ||
> +		  IS_ALDERLAKE_P(eb->i915)))
> +		return true;
> +
> +	return false;
> +}
> +
>  static int
>  eb_validate_vma(struct i915_execbuffer *eb,
>  		struct drm_i915_gem_exec_object2 *entry,
>  		struct i915_vma *vma)
>  {
> -	/* Relocations are disallowed for all platforms after TGL-LP.  This
> -	 * also covers all platforms with local memory.
> -	 */
> -	if (entry->relocation_count &&
> -	    INTEL_GEN(eb->i915) >= 12 && !IS_TIGERLAKE(eb->i915))
> +	if (entry->relocation_count && !platform_has_relocs_enabled(eb))
>  		return -EINVAL;
>  
>  	if (unlikely(entry->flags & eb->invalid_flags))

-- 
Jani Nikula, Intel Open Source Graphics Center

  parent reply	other threads:[~2021-06-01 12:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  8:28 [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms Zbigniew Kempczyński
2021-06-01  8:28 ` Zbigniew Kempczyński
2021-06-01  8:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add relocation exceptions for two other platforms (rev3) Patchwork
2021-06-01  9:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-06-01 11:36 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-01 12:38   ` Zbigniew Kempczyński
2021-06-01 12:26 ` Jani Nikula [this message]
2021-06-01 12:26   ` [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2021-06-17  5:44 Zbigniew Kempczyński
2021-06-17 10:19 ` Rodrigo Vivi
2021-06-16  9:48 Zbigniew Kempczyński
2021-06-16 13:54 ` Rodrigo Vivi
2021-06-11  6:23 Zbigniew Kempczyński
2021-06-10 10:39 Zbigniew Kempczyński
2021-06-10 14:36 ` Rodrigo Vivi
2021-06-10 14:36   ` Rodrigo Vivi
2021-06-11  6:09   ` Zbigniew Kempczyński
2021-06-11  6:09     ` Zbigniew Kempczyński
2021-06-11  8:54     ` Rodrigo Vivi
2021-06-11  8:54       ` Rodrigo Vivi
2021-06-14  8:35       ` Zbigniew Kempczyński
2021-06-14  8:35         ` Zbigniew Kempczyński
2021-06-14 16:28         ` Rodrigo Vivi
2021-06-14 16:28           ` Rodrigo Vivi
2021-06-01 14:24 Zbigniew Kempczyński
2021-06-03 19:45 ` David Airlie
2021-06-09 13:14 ` Daniel Vetter
2021-05-11  8:31 Zbigniew Kempczyński
2021-05-11 17:04 ` Daniel Vetter
2021-05-26  0:35   ` Dave Airlie
2021-05-26  0:35     ` Dave Airlie
2021-05-27 10:04     ` Daniel Vetter
2021-05-27 10:04       ` Daniel Vetter
2021-06-01  7:19       ` Dave Airlie
2021-06-01  7:19         ` Dave Airlie
2021-06-01  7:28         ` Daniel Vetter
2021-06-01  7:28           ` Daniel Vetter
2021-04-28 17:30 Zbigniew Kempczyński

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=87lf7trcrw.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@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 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.