Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Mon, Jun 14, 2021 at 10:35:30AM +0200, Zbigniew Kempczyński wrote: > On Fri, Jun 11, 2021 at 04:54:32AM -0400, Rodrigo Vivi wrote: > > On Fri, Jun 11, 2021 at 08:09:00AM +0200, Zbigniew Kempczyński wrote: > > > On Thu, Jun 10, 2021 at 10:36:12AM -0400, Rodrigo Vivi wrote: > > > > On Thu, Jun 10, 2021 at 12:39:55PM +0200, Zbigniew Kempczyński 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. > > > > > > > > hmm... to be really honest I'm not so happy that we are introducing > > > > a new criteria to the force_probe. > > > > > > > > The criteria was to have a functional driver and not to track uapi. > > > > > > > > But on the other hand I do recognize that the current definition > > > > of the flag allows that, because we have established that with > > > > this behavior, the "driver for new Intel graphics devices that > > > > are recognized but not properly supported by this kernel version" > > > > (as stated in the Kconfig for the DRM_I915_FORCE_PROBE). > > > > > > > > However... > > > > > > > > > > > > > > v2: - remove inline from function definition (Jani) > > > > > - fix indentation > > > > > > > > > > v3: change to GRAPHICS_VER() (Zbigniew) > > > > > > > > > > Signed-off-by: Zbigniew Kempczyński > > > > > Cc: Dave Airlie > > > > > Cc: Daniel Vetter > > > > > Cc: Jason Ekstrand > > > > > Acked-by: Dave Airlie > > > > > --- > > > > > .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 > > > > > +++ > > > > > 1 file changed, 19 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 a8abc9af5ff4..30c4f0549ea0 100644 > > > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > > > > @@ -491,16 +491,30 @@ eb_unreserve_vma(struct eb_vma *ev) > > > > > ev->flags &= ~__EXEC_OBJECT_RESERVED; > > > > > } > > > > > > > > > > +static bool 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 (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915)) > > > > > + return true; > > > > > + > > > > > + if (INTEL_INFO(eb->i915)->require_force_probe && > > > > > + (IS_ROCKETLAKE(eb->i915) > > > > > > > > This ship has sailed... RKL is not protected by this flag any longer. > > > > Should this be on the TGL side now? > > > > > > +Lucas > > > > > > I think no, RKL has relocations disabled so we cannot put it to TGL side. > > > So if RKL is already released then putting it under require_force_probe > > > flag is wrong and only I can do is to remove it from that condition. > > > There's no option to unblock RKL on IGT CI until we rewrite all the tests. > > > We have to rely then on ADL* with require_force_probe flag to check how > > > ADL will work with relocations. > > > > So... I'm confused now. I'm missing the point of this patch then. > > I thought the reason was to protect from any user space to attempt to > > use the relocation, unless using the force_probe temporarily only for > > these platforms. > > But if I'm understanding correctly now it is only to silence CI?! > > Is that the case? > > Is the CI noise so bad? > > The point of the patch is to verify driver on ADL. IGT still uses > relocations (we're rewriting them now but it takes time) so execbuf > on ADL just exits with failure. We're blind right now about driver > behavior and we want to address this - temporary enable relocations > on ADL (under flag) to see if driver works properly on that platform. Okay, so I believe we need a bigger code refactor here. Whenever we attempt to use the relocation but we are on ADL we need to have a big bold message saying this should not be used. That this code path is deprecated and getting removed... My fear is that after adding this some UMD, other than IGT, would start using relocation back again and then the removal of require_force_probe of ADL would mean regression and we would need to support that forever again. Ideally a bold drm_warn, but I understand this might impact CI so at least a drm_info with capital letters... > > > > > > > > > > > > > > > || IS_ALDERLAKE_S(eb->i915) || > > > > > + IS_ALDERLAKE
Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Fri, Jun 11, 2021 at 04:54:32AM -0400, Rodrigo Vivi wrote: > On Fri, Jun 11, 2021 at 08:09:00AM +0200, Zbigniew Kempczyński wrote: > > On Thu, Jun 10, 2021 at 10:36:12AM -0400, Rodrigo Vivi wrote: > > > On Thu, Jun 10, 2021 at 12:39:55PM +0200, Zbigniew Kempczyński 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. > > > > > > hmm... to be really honest I'm not so happy that we are introducing > > > a new criteria to the force_probe. > > > > > > The criteria was to have a functional driver and not to track uapi. > > > > > > But on the other hand I do recognize that the current definition > > > of the flag allows that, because we have established that with > > > this behavior, the "driver for new Intel graphics devices that > > > are recognized but not properly supported by this kernel version" > > > (as stated in the Kconfig for the DRM_I915_FORCE_PROBE). > > > > > > However... > > > > > > > > > > > v2: - remove inline from function definition (Jani) > > > > - fix indentation > > > > > > > > v3: change to GRAPHICS_VER() (Zbigniew) > > > > > > > > Signed-off-by: Zbigniew Kempczyński > > > > Cc: Dave Airlie > > > > Cc: Daniel Vetter > > > > Cc: Jason Ekstrand > > > > Acked-by: Dave Airlie > > > > --- > > > > .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 +++ > > > > 1 file changed, 19 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 a8abc9af5ff4..30c4f0549ea0 100644 > > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > > > @@ -491,16 +491,30 @@ eb_unreserve_vma(struct eb_vma *ev) > > > > ev->flags &= ~__EXEC_OBJECT_RESERVED; > > > > } > > > > > > > > +static bool 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 (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915)) > > > > + return true; > > > > + > > > > + if (INTEL_INFO(eb->i915)->require_force_probe && > > > > + (IS_ROCKETLAKE(eb->i915) > > > > > > This ship has sailed... RKL is not protected by this flag any longer. > > > Should this be on the TGL side now? > > > > +Lucas > > > > I think no, RKL has relocations disabled so we cannot put it to TGL side. > > So if RKL is already released then putting it under require_force_probe > > flag is wrong and only I can do is to remove it from that condition. > > There's no option to unblock RKL on IGT CI until we rewrite all the tests. > > We have to rely then on ADL* with require_force_probe flag to check how > > ADL will work with relocations. > > So... I'm confused now. I'm missing the point of this patch then. > I thought the reason was to protect from any user space to attempt to > use the relocation, unless using the force_probe temporarily only for > these platforms. > But if I'm understanding correctly now it is only to silence CI?! > Is that the case? > Is the CI noise so bad? The point of the patch is to verify driver on ADL. IGT still uses relocations (we're rewriting them now but it takes time) so execbuf on ADL just exits with failure. We're blind right now about driver behavior and we want to address this - temporary enable relocations on ADL (under flag) to see if driver works properly on that platform. > > > > > > > > > > || IS_ALDERLAKE_S(eb->i915) || > > > > +IS_ALDERLAKE_P(eb->i915))) > > > > > > How to ensure that we will easily catch this when removing the > > > flag? > > > > > > I mean, should we have a GEM_BUG or drm_err message when these > > > platforms in this list has not the required_force_probe? > > > > I don't think we need GEM_BUG()/drm_err() - when IGT tests will support > > both - reloc + no-reloc - then condition will be limited to: > > > > if (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915)) > > return true; > > > > return false; > > > > so require_force_probe condition will be deleted and we won't need it > > anymore (IGTs will be ready). > > yes... > but then, when we remove the flag we will forget to come here and remove > this check. I think we won't forget - this is cherry on top of rewriting IGT - to switch to n
Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Fri, Jun 11, 2021 at 08:09:00AM +0200, Zbigniew Kempczyński wrote: > On Thu, Jun 10, 2021 at 10:36:12AM -0400, Rodrigo Vivi wrote: > > On Thu, Jun 10, 2021 at 12:39:55PM +0200, Zbigniew Kempczyński 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. > > > > hmm... to be really honest I'm not so happy that we are introducing > > a new criteria to the force_probe. > > > > The criteria was to have a functional driver and not to track uapi. > > > > But on the other hand I do recognize that the current definition > > of the flag allows that, because we have established that with > > this behavior, the "driver for new Intel graphics devices that > > are recognized but not properly supported by this kernel version" > > (as stated in the Kconfig for the DRM_I915_FORCE_PROBE). > > > > However... > > > > > > > > v2: - remove inline from function definition (Jani) > > > - fix indentation > > > > > > v3: change to GRAPHICS_VER() (Zbigniew) > > > > > > Signed-off-by: Zbigniew Kempczyński > > > Cc: Dave Airlie > > > Cc: Daniel Vetter > > > Cc: Jason Ekstrand > > > Acked-by: Dave Airlie > > > --- > > > .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 +++ > > > 1 file changed, 19 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 a8abc9af5ff4..30c4f0549ea0 100644 > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > > @@ -491,16 +491,30 @@ eb_unreserve_vma(struct eb_vma *ev) > > > ev->flags &= ~__EXEC_OBJECT_RESERVED; > > > } > > > > > > +static bool 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 (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915)) > > > + return true; > > > + > > > + if (INTEL_INFO(eb->i915)->require_force_probe && > > > + (IS_ROCKETLAKE(eb->i915) > > > > This ship has sailed... RKL is not protected by this flag any longer. > > Should this be on the TGL side now? > > +Lucas > > I think no, RKL has relocations disabled so we cannot put it to TGL side. > So if RKL is already released then putting it under require_force_probe > flag is wrong and only I can do is to remove it from that condition. > There's no option to unblock RKL on IGT CI until we rewrite all the tests. > We have to rely then on ADL* with require_force_probe flag to check how > ADL will work with relocations. So... I'm confused now. I'm missing the point of this patch then. I thought the reason was to protect from any user space to attempt to use the relocation, unless using the force_probe temporarily only for these platforms. But if I'm understanding correctly now it is only to silence CI?! Is that the case? Is the CI noise so bad? > > > > > > || IS_ALDERLAKE_S(eb->i915) || > > > + IS_ALDERLAKE_P(eb->i915))) > > > > How to ensure that we will easily catch this when removing the > > flag? > > > > I mean, should we have a GEM_BUG or drm_err message when these > > platforms in this list has not the required_force_probe? > > I don't think we need GEM_BUG()/drm_err() - when IGT tests will support > both - reloc + no-reloc - then condition will be limited to: > > if (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915)) > return true; > > return false; > > so require_force_probe condition will be deleted and we won't need it > anymore (IGTs will be ready). yes... but then, when we remove the flag we will forget to come here and remove this check. Oh, and I just thought that we might need drm_error when the protection doesn't exist for the platform, but also a drm_info to the user to tell this is a temporary accepted behavior, but that will be removed later The concern is if any other userspace was using the flag and suddently move to a version without the flag, it would be considered a regression... > > -- > Zbigniew > > > > > > + 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. > > > - */
[PATCH] drm/i915: Add relocation exceptions for two other platforms
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 Alderlake S+P under require_force_probe flag set. Keeping relocations under require_force_probe flag is interim solution until IGTs will be rewritten to use softpin. v2: - remove inline from function definition (Jani) - fix indentation v3: change to GRAPHICS_VER() (Zbigniew) v4: remove RKL from flag as it is already shipped (Rodrigo) Signed-off-by: Zbigniew Kempczyński Cc: Dave Airlie Cc: Daniel Vetter Cc: Jason Ekstrand Cc: Rodrigo Vivi Acked-by: Dave Airlie --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 23 +++ 1 file changed, 18 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 a8abc9af5ff4..81064914640f 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -491,16 +491,29 @@ eb_unreserve_vma(struct eb_vma *ev) ev->flags &= ~__EXEC_OBJECT_RESERVED; } +static bool 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 Alderlake +* when require_force_probe flag is set. +*/ + if (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915)) + return true; + + if (INTEL_INFO(eb->i915)->require_force_probe && + (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 && - GRAPHICS_VER(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)) -- 2.26.0
Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Thu, Jun 10, 2021 at 10:36:12AM -0400, Rodrigo Vivi wrote: > On Thu, Jun 10, 2021 at 12:39:55PM +0200, Zbigniew Kempczyński 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. > > hmm... to be really honest I'm not so happy that we are introducing > a new criteria to the force_probe. > > The criteria was to have a functional driver and not to track uapi. > > But on the other hand I do recognize that the current definition > of the flag allows that, because we have established that with > this behavior, the "driver for new Intel graphics devices that > are recognized but not properly supported by this kernel version" > (as stated in the Kconfig for the DRM_I915_FORCE_PROBE). > > However... > > > > > v2: - remove inline from function definition (Jani) > > - fix indentation > > > > v3: change to GRAPHICS_VER() (Zbigniew) > > > > Signed-off-by: Zbigniew Kempczyński > > Cc: Dave Airlie > > Cc: Daniel Vetter > > Cc: Jason Ekstrand > > Acked-by: Dave Airlie > > --- > > .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 +++ > > 1 file changed, 19 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 a8abc9af5ff4..30c4f0549ea0 100644 > > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > @@ -491,16 +491,30 @@ eb_unreserve_vma(struct eb_vma *ev) > > ev->flags &= ~__EXEC_OBJECT_RESERVED; > > } > > > > +static bool 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 (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915)) > > + return true; > > + > > + if (INTEL_INFO(eb->i915)->require_force_probe && > > + (IS_ROCKETLAKE(eb->i915) > > This ship has sailed... RKL is not protected by this flag any longer. > Should this be on the TGL side now? +Lucas I think no, RKL has relocations disabled so we cannot put it to TGL side. So if RKL is already released then putting it under require_force_probe flag is wrong and only I can do is to remove it from that condition. There's no option to unblock RKL on IGT CI until we rewrite all the tests. We have to rely then on ADL* with require_force_probe flag to check how ADL will work with relocations. > > > || IS_ALDERLAKE_S(eb->i915) || > > +IS_ALDERLAKE_P(eb->i915))) > > How to ensure that we will easily catch this when removing the > flag? > > I mean, should we have a GEM_BUG or drm_err message when these > platforms in this list has not the required_force_probe? I don't think we need GEM_BUG()/drm_err() - when IGT tests will support both - reloc + no-reloc - then condition will be limited to: if (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915)) return true; return false; so require_force_probe condition will be deleted and we won't need it anymore (IGTs will be ready). -- Zbigniew > > > + 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 && > > - GRAPHICS_VER(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)) > > -- > > 2.26.0 > > > > ___ > > Intel-gfx mailing list > > intel-...@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Thu, Jun 10, 2021 at 12:39:55PM +0200, Zbigniew Kempczyński 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. hmm... to be really honest I'm not so happy that we are introducing a new criteria to the force_probe. The criteria was to have a functional driver and not to track uapi. But on the other hand I do recognize that the current definition of the flag allows that, because we have established that with this behavior, the "driver for new Intel graphics devices that are recognized but not properly supported by this kernel version" (as stated in the Kconfig for the DRM_I915_FORCE_PROBE). However... > > v2: - remove inline from function definition (Jani) > - fix indentation > > v3: change to GRAPHICS_VER() (Zbigniew) > > Signed-off-by: Zbigniew Kempczyński > Cc: Dave Airlie > Cc: Daniel Vetter > Cc: Jason Ekstrand > Acked-by: Dave Airlie > --- > .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 +++ > 1 file changed, 19 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 a8abc9af5ff4..30c4f0549ea0 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > @@ -491,16 +491,30 @@ eb_unreserve_vma(struct eb_vma *ev) > ev->flags &= ~__EXEC_OBJECT_RESERVED; > } > > +static bool 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 (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915)) > + return true; > + > + if (INTEL_INFO(eb->i915)->require_force_probe && > + (IS_ROCKETLAKE(eb->i915) This ship has sailed... RKL is not protected by this flag any longer. Should this be on the TGL side now? > || IS_ALDERLAKE_S(eb->i915) || > + IS_ALDERLAKE_P(eb->i915))) How to ensure that we will easily catch this when removing the flag? I mean, should we have a GEM_BUG or drm_err message when these platforms in this list has not the required_force_probe? > + 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 && > - GRAPHICS_VER(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)) > -- > 2.26.0 > > ___ > Intel-gfx mailing list > intel-...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[PATCH] drm/i915: Add relocation exceptions for two other platforms
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. v2: - remove inline from function definition (Jani) - fix indentation v3: change to GRAPHICS_VER() (Zbigniew) Signed-off-by: Zbigniew Kempczyński Cc: Dave Airlie Cc: Daniel Vetter Cc: Jason Ekstrand Acked-by: Dave Airlie --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 +++ 1 file changed, 19 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 a8abc9af5ff4..30c4f0549ea0 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -491,16 +491,30 @@ eb_unreserve_vma(struct eb_vma *ev) ev->flags &= ~__EXEC_OBJECT_RESERVED; } +static bool 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 (GRAPHICS_VER(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 && - GRAPHICS_VER(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)) -- 2.26.0
Re: [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Tue, Jun 01, 2021 at 04:24:42PM +0200, Zbigniew Kempczyński 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. > > v2: - remove inline from function definition (Jani) > - fix indentation > > Signed-off-by: Zbigniew Kempczyński > Cc: Dave Airlie > Cc: Daniel Vetter > Cc: Jason Ekstrand This conflicts with Lucas' switch from INTEL_GEN to GRAPHICS_VER. Can you pls rebase and resend (with Dave's ack included). -Daniel > --- > .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 +++ > 1 file changed, 19 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..78b86a7bc39a 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > @@ -491,16 +491,30 @@ eb_unreserve_vma(struct eb_vma *ev) > ev->flags &= ~__EXEC_OBJECT_RESERVED; > } > > +static bool 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)) > -- > 2.26.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Re: [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Wed, Jun 2, 2021 at 12:25 AM Zbigniew Kempczyński 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. > > v2: - remove inline from function definition (Jani) > - fix indentation > > Signed-off-by: Zbigniew Kempczyński > Cc: Dave Airlie > Cc: Daniel Vetter > Cc: Jason Ekstrand Acked-by: Dave Airlie > --- > .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 +++ > 1 file changed, 19 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..78b86a7bc39a 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > @@ -491,16 +491,30 @@ eb_unreserve_vma(struct eb_vma *ev) > ev->flags &= ~__EXEC_OBJECT_RESERVED; > } > > +static bool 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)) > -- > 2.26.0 >
[PATCH] drm/i915: Add relocation exceptions for two other platforms
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. v2: - remove inline from function definition (Jani) - fix indentation Signed-off-by: Zbigniew Kempczyński Cc: Dave Airlie Cc: Daniel Vetter Cc: Jason Ekstrand --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 +++ 1 file changed, 19 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..78b86a7bc39a 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -491,16 +491,30 @@ eb_unreserve_vma(struct eb_vma *ev) ev->flags &= ~__EXEC_OBJECT_RESERVED; } +static bool 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)) -- 2.26.0
Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Tue, 01 Jun 2021, Zbigniew Kempczyński 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 > Cc: Dave Airlie > Cc: Daniel Vetter > Cc: Jason Ekstrand > --- > .../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
[PATCH] drm/i915: Add relocation exceptions for two other platforms
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 Cc: Dave Airlie Cc: Daniel Vetter Cc: Jason Ekstrand --- .../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 +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)) -- 2.26.0
Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Tue, Jun 1, 2021 at 9:19 AM Dave Airlie wrote: > On Thu, 27 May 2021 at 20:04, Daniel Vetter wrote: > > On Wed, May 26, 2021 at 10:35:49AM +1000, Dave Airlie wrote: > > > On Wed, 12 May 2021 at 03:05, Daniel Vetter 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 > > > > > Cc: Dave Airlie > > > > > Cc: Daniel Vetter > > > > > Cc: Jason Ekstrand > > > > > > > > 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 -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Thu, 27 May 2021 at 20:04, Daniel Vetter wrote: > > On Wed, May 26, 2021 at 10:35:49AM +1000, Dave Airlie wrote: > > On Wed, 12 May 2021 at 03:05, Daniel Vetter 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 > > > > Cc: Dave Airlie > > > > Cc: Daniel Vetter > > > > Cc: Jason Ekstrand > > > > > > 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
Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Wed, May 26, 2021 at 10:35:49AM +1000, Dave Airlie wrote: > On Wed, 12 May 2021 at 03:05, Daniel Vetter 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 > > > Cc: Dave Airlie > > > Cc: Daniel Vetter > > > Cc: Jason Ekstrand > > > > 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 -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Re: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms
On Wed, 12 May 2021 at 03:05, Daniel Vetter 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 > > Cc: Dave Airlie > > Cc: Daniel Vetter > > Cc: Jason Ekstrand > > 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.
Re: [PATCH] drm/i915: Add relocation exceptions for two other platforms
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 > Cc: Dave Airlie > Cc: Daniel Vetter > Cc: Jason Ekstrand 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 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
[PATCH] drm/i915: Add relocation exceptions for two other platforms
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 Cc: Dave Airlie Cc: Daniel Vetter Cc: Jason Ekstrand --- 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
[PATCH] drm/i915: Add relocation exceptions for two other platforms
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. As Alderlake is coming in two variants - S and P and only S landed upstream already we will need to extend the relocation enabling condition one more time for P version in the future. Signed-off-by: Zbigniew Kempczyński Cc: Dave Airlie Cc: Daniel Vetter Cc: Jason Ekstrand --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 9 ++--- 1 file changed, 6 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..6d621898698f 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -496,11 +496,14 @@ 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))) return -EINVAL; if (unlikely(entry->flags & eb->invalid_flags)) -- 2.26.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel