diff mbox series

drm/i915: Add relocation exceptions for two other platforms

Message ID 20210511083139.54002-1-zbigniew.kempczynski@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Add relocation exceptions for two other platforms | expand

Commit Message

Zbigniew Kempczyński May 11, 2021, 8:31 a.m. UTC
We have established previously we stop using relocations starting
from gen12 platforms with Tigerlake as an exception. Unfortunately
we need extend transition period and support relocations for two
other igfx platforms - Rocketlake and Alderlake.

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>
---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Daniel Vetter May 11, 2021, 5:04 p.m. UTC | #1
On Tue, May 11, 2021 at 10:31:39AM +0200, Zbigniew Kempczyński wrote:
> We have established previously we stop using relocations starting
> from gen12 platforms with Tigerlake as an exception. Unfortunately
> we need extend transition period and support relocations for two
> other igfx platforms - Rocketlake and Alderlake.
> 
> 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>

So the annoying thing here is that now media-driver is fixed:

https://github.com/intel/media-driver/commit/144020c37770083974bedf59902b70b8f444c799

Which means igt is really the only thing left.

Dave, is this still ok for an acked exception, or is this now leaning
towards "just fix igt"?
-Daniel
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 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..f80da1d6d9b2 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -496,11 +496,15 @@ 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.
> +	/*
> +	 * Relocations are disallowed starting from gen12 with some exceptions
> +	 * - TGL/RKL/ADL.
>  	 */
>  	if (entry->relocation_count &&
> -	    INTEL_GEN(eb->i915) >= 12 && !IS_TIGERLAKE(eb->i915))
> +	    INTEL_GEN(eb->i915) >= 12 && !(IS_TIGERLAKE(eb->i915) ||
> +					   IS_ROCKETLAKE(eb->i915) ||
> +					   IS_ALDERLAKE_S(eb->i915) ||
> +					   IS_ALDERLAKE_P(eb->i915)))
>  		return -EINVAL;
>  
>  	if (unlikely(entry->flags & eb->invalid_flags))
> -- 
> 2.26.0
>
Dave Airlie May 26, 2021, 12:35 a.m. UTC | #2
On Wed, 12 May 2021 at 03:05, Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Tue, May 11, 2021 at 10:31:39AM +0200, Zbigniew Kempczyński wrote:
> > We have established previously we stop using relocations starting
> > from gen12 platforms with Tigerlake as an exception. Unfortunately
> > we need extend transition period and support relocations for two
> > other igfx platforms - Rocketlake and Alderlake.
> >
> > 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>
>
> So the annoying thing here is that now media-driver is fixed:
>
> https://github.com/intel/media-driver/commit/144020c37770083974bedf59902b70b8f444c799
>
> Which means igt is really the only thing left.
>
> Dave, is this still ok for an acked exception, or is this now leaning
> towards "just fix igt"?

Oh that isn't great is it, I had thought it was the media-driver,
keeping a big uAPI like this open just for the test code seems a bit
silly. I get the tests are testing more than just relocs, but it's a
pretty big interface to leave lying around if we can avoid it.

Dave.
Daniel Vetter May 27, 2021, 10:04 a.m. UTC | #3
On Wed, May 26, 2021 at 10:35:49AM +1000, Dave Airlie wrote:
> On Wed, 12 May 2021 at 03:05, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Tue, May 11, 2021 at 10:31:39AM +0200, Zbigniew Kempczyński wrote:
> > > We have established previously we stop using relocations starting
> > > from gen12 platforms with Tigerlake as an exception. Unfortunately
> > > we need extend transition period and support relocations for two
> > > other igfx platforms - Rocketlake and Alderlake.
> > >
> > > 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>
> >
> > So the annoying thing here is that now media-driver is fixed:
> >
> > https://github.com/intel/media-driver/commit/144020c37770083974bedf59902b70b8f444c799
> >
> > Which means igt is really the only thing left.
> >
> > Dave, is this still ok for an acked exception, or is this now leaning
> > towards "just fix igt"?
> 
> Oh that isn't great is it, I had thought it was the media-driver,
> keeping a big uAPI like this open just for the test code seems a bit
> silly. I get the tests are testing more than just relocs, but it's a
> pretty big interface to leave lying around if we can avoid it.

So since we need to do the work anyway for DG1+ what about some interim
hack? Currently ADL still has the require_force_probe flag set. We could
re-enable relocations just for ADL, only while this flag is set. This
gives us a bunch of wiggle room, unblocks everything else (CI is a bit on
fire right now due to this and practially unuseable on ADL gem areay) and
we'll still make sure that when ADL is all done we wont expose relocations
just for igt.

Thoughts?
-Daniel
Dave Airlie June 1, 2021, 7:19 a.m. UTC | #4
On Thu, 27 May 2021 at 20:04, Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Wed, May 26, 2021 at 10:35:49AM +1000, Dave Airlie wrote:
> > On Wed, 12 May 2021 at 03:05, Daniel Vetter <daniel@ffwll.ch> wrote:
> > > On Tue, May 11, 2021 at 10:31:39AM +0200, Zbigniew Kempczyński wrote:
> > > > We have established previously we stop using relocations starting
> > > > from gen12 platforms with Tigerlake as an exception. Unfortunately
> > > > we need extend transition period and support relocations for two
> > > > other igfx platforms - Rocketlake and Alderlake.
> > > >
> > > > 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>
> > >
> > > So the annoying thing here is that now media-driver is fixed:
> > >
> > > https://github.com/intel/media-driver/commit/144020c37770083974bedf59902b70b8f444c799
> > >
> > > Which means igt is really the only thing left.
> > >
> > > Dave, is this still ok for an acked exception, or is this now leaning
> > > towards "just fix igt"?
> >
> > Oh that isn't great is it, I had thought it was the media-driver,
> > keeping a big uAPI like this open just for the test code seems a bit
> > silly. I get the tests are testing more than just relocs, but it's a
> > pretty big interface to leave lying around if we can avoid it.
>
> So since we need to do the work anyway for DG1+ what about some interim
> hack? Currently ADL still has the require_force_probe flag set. We could
> re-enable relocations just for ADL, only while this flag is set. This
> gives us a bunch of wiggle room, unblocks everything else (CI is a bit on
> fire right now due to this and practially unuseable on ADL gem areay) and
> we'll still make sure that when ADL is all done we wont expose relocations
> just for igt.
>
> Thoughts?

I can handle that as a compromise, though I'd not want to block ADL
getting out of alpha over some IGT that needs porting.

Dave.

> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
Daniel Vetter June 1, 2021, 7:28 a.m. UTC | #5
On Tue, Jun 1, 2021 at 9:19 AM Dave Airlie <airlied@gmail.com> wrote:
> On Thu, 27 May 2021 at 20:04, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Wed, May 26, 2021 at 10:35:49AM +1000, Dave Airlie wrote:
> > > On Wed, 12 May 2021 at 03:05, Daniel Vetter <daniel@ffwll.ch> wrote:
> > > > On Tue, May 11, 2021 at 10:31:39AM +0200, Zbigniew Kempczyński wrote:
> > > > > We have established previously we stop using relocations starting
> > > > > from gen12 platforms with Tigerlake as an exception. Unfortunately
> > > > > we need extend transition period and support relocations for two
> > > > > other igfx platforms - Rocketlake and Alderlake.
> > > > >
> > > > > 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>
> > > >
> > > > So the annoying thing here is that now media-driver is fixed:
> > > >
> > > > https://github.com/intel/media-driver/commit/144020c37770083974bedf59902b70b8f444c799
> > > >
> > > > Which means igt is really the only thing left.
> > > >
> > > > Dave, is this still ok for an acked exception, or is this now leaning
> > > > towards "just fix igt"?
> > >
> > > Oh that isn't great is it, I had thought it was the media-driver,
> > > keeping a big uAPI like this open just for the test code seems a bit
> > > silly. I get the tests are testing more than just relocs, but it's a
> > > pretty big interface to leave lying around if we can avoid it.
> >
> > So since we need to do the work anyway for DG1+ what about some interim
> > hack? Currently ADL still has the require_force_probe flag set. We could
> > re-enable relocations just for ADL, only while this flag is set. This
> > gives us a bunch of wiggle room, unblocks everything else (CI is a bit on
> > fire right now due to this and practially unuseable on ADL gem areay) and
> > we'll still make sure that when ADL is all done we wont expose relocations
> > just for igt.
> >
> > Thoughts?
>
> I can handle that as a compromise, though I'd not want to block ADL
> getting out of alpha over some IGT that needs porting.

Uh given that EHL/JSL are still in require_force_probe = true mode
because of a random igt (and shipping since a while) ... I guess worst
case if it's not sorted in a few months latest we can undo that again.
-Daniel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index 297143511f99..f80da1d6d9b2 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -496,11 +496,15 @@  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.
+	/*
+	 * Relocations are disallowed starting from gen12 with some exceptions
+	 * - TGL/RKL/ADL.
 	 */
 	if (entry->relocation_count &&
-	    INTEL_GEN(eb->i915) >= 12 && !IS_TIGERLAKE(eb->i915))
+	    INTEL_GEN(eb->i915) >= 12 && !(IS_TIGERLAKE(eb->i915) ||
+					   IS_ROCKETLAKE(eb->i915) ||
+					   IS_ALDERLAKE_S(eb->i915) ||
+					   IS_ALDERLAKE_P(eb->i915)))
 		return -EINVAL;
 
 	if (unlikely(entry->flags & eb->invalid_flags))