Message ID | 20210610103955.67802-1-zbigniew.kempczynski@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Add relocation exceptions for two other platforms | expand |
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 <zbigniew.kempczynski@intel.com> > Cc: Dave Airlie <airlied@redhat.com> > Cc: Daniel Vetter <daniel.vetter@intel.com> > Cc: Jason Ekstrand <jason@jlekstrand.net> > Acked-by: Dave Airlie <airlied@redhat.com> > --- > .../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-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
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 <zbigniew.kempczynski@intel.com> > > Cc: Dave Airlie <airlied@redhat.com> > > Cc: Daniel Vetter <daniel.vetter@intel.com> > > Cc: Jason Ekstrand <jason@jlekstrand.net> > > Acked-by: Dave Airlie <airlied@redhat.com> > > --- > > .../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-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Thu, Jun 10, 2021 at 03:02:20PM +0000, Patchwork wrote: > Patch Details > > Series: drm/i915: Add relocation exceptions for two other platforms (rev5) > URL: https://patchwork.freedesktop.org/series/89594/ > State: failure > Details: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20330/index.html > > CI Bug Log - changes from CI_DRM_10204_full -> Patchwork_20330_full > > Summary > > FAILURE > > Serious unknown changes coming with Patchwork_20330_full absolutely need > to be > verified manually. > > If you think the reported changes have nothing to do with the changes > introduced in Patchwork_20330_full, please notify your bug team to allow > them > to document this new failure mode, which will reduce false positives in > CI. > > Possible new issues > > Here are the unknown changes that may have been introduced in > Patchwork_20330_full: > > IGT changes > > Possible regressions > > * igt@kms_draw_crc@draw-method-xrgb2101010-mmap-wc-xtiled: > * shard-skl: PASS -> FAIL Unrelated, patch doesn't touch SKL. -- Zbigniew > > Known issues > > Here are the changes found in Patchwork_20330_full that come from known > issues: > > IGT changes > > Issues hit > > * igt@gem_create@create-clear: > > * shard-glk: PASS -> FAIL (i915#1888 / i915#3160) > * igt@gem_ctx_persistence@clone: > > * shard-snb: NOTRUN -> SKIP (fdo#109271 / i915#1099) +3 similar > issues > * igt@gem_eio@unwedge-stress: > > * shard-snb: NOTRUN -> FAIL (i915#3354) > * igt@gem_exec_fair@basic-none-share@rcs0: > > * shard-glk: PASS -> FAIL (i915#2842) > * igt@gem_exec_fair@basic-none@vecs0: > > * shard-apl: PASS -> FAIL (i915#2842 / i915#3468) > * igt@gem_exec_fair@basic-pace-share@rcs0: > > * shard-tglb: PASS -> FAIL (i915#2842) > * igt@gem_exec_fair@basic-pace@vcs1: > > * shard-iclb: NOTRUN -> FAIL (i915#2842) +1 similar issue > > * shard-kbl: PASS -> FAIL (i915#2842) +1 similar issue > > * igt@gem_exec_whisper@basic-fds-all: > > * shard-glk: PASS -> DMESG-WARN (i915#118 / i915#95) > * igt@gem_huc_copy@huc-copy: > > * shard-kbl: NOTRUN -> SKIP (fdo#109271 / i915#2190) > * igt@gem_mmap_gtt@big-copy-odd: > > * shard-glk: PASS -> FAIL (i915#307) > * igt@gem_pwrite@basic-exhaustion: > > * shard-snb: NOTRUN -> WARN (i915#2658) > * igt@gem_userptr_blits@input-checking: > > * shard-apl: NOTRUN -> DMESG-WARN (i915#3002) +1 similar issue > * igt@i915_hangman@engine-error@vecs0: > > * shard-kbl: NOTRUN -> SKIP (fdo#109271) +37 similar issues > * igt@i915_selftest@live@execlists: > > * shard-apl: NOTRUN -> DMESG-FAIL (i915#3462) > * igt@kms_ccs@pipe-a-ccs-on-another-bo: > > * shard-snb: NOTRUN -> SKIP (fdo#109271) +288 similar issues > * igt@kms_chamelium@dp-crc-multiple: > > * shard-apl: NOTRUN -> SKIP (fdo#109271 / fdo#111827) +9 similar > issues > * igt@kms_color_chamelium@pipe-a-ctm-0-25: > > * shard-snb: NOTRUN -> SKIP (fdo#109271 / fdo#111827) +17 similar > issues > * igt@kms_color_chamelium@pipe-c-gamma: > > * shard-kbl: NOTRUN -> SKIP (fdo#109271 / fdo#111827) +3 similar > issues > * igt@kms_content_protection@srm: > > * shard-apl: NOTRUN -> TIMEOUT (i915#1319) > * igt@kms_cursor_crc@pipe-a-cursor-suspend: > > * shard-kbl: PASS -> DMESG-WARN (i915#180) +5 similar issues > * igt@kms_cursor_crc@pipe-b-cursor-alpha-opaque: > > * shard-snb: PASS -> SKIP (fdo#109271) +1 similar issue > * igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@ac-hdmi-a1-hdmi-a2: > > * shard-glk: PASS -> FAIL (i915#2122) > * igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1: > > * shard-skl: PASS -> FAIL (i915#79) > * igt@kms_flip@plain-flip-fb-recreate@b-edp1: > > * shard-skl: PASS -> FAIL (i915#2122) +1 similar issue > * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile: > > * shard-apl: NOTRUN -> SKIP (fdo#109271 / i915#2642) > * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile: > > * shard-kbl: NOTRUN -> SKIP (fdo#109271 / i915#2642) > * igt@kms_frontbuffer_tracking@psr-1p-primscrn-shrfb-msflip-blt: > > * shard-skl: PASS -> FAIL (i915#2546 / i915#49) > * igt@kms_hdr@bpc-switch-dpms: > > * shard-skl: PASS -> FAIL (i915#1188) +1 similar issue > * igt@kms_pipe_b_c_ivb@disable-pipe-b-enable-pipe-c: > > * shard-apl: NOTRUN -> SKIP (fdo#109271) +109 similar issues > * igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence: > > * shard-apl: NOTRUN -> SKIP (fdo#109271 / i915#533) +1 similar > issue > * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: > > * shard-apl: PASS -> DMESG-WARN (i915#180) +1 similar issue > * igt@kms_plane_alpha_blend@pipe-c-alpha-basic: > > * shard-apl: NOTRUN -> FAIL (fdo#108145 / i915#265) +1 similar > issue > * igt@kms_plane_alpha_blend@pipe-c-alpha-transparent-fb: > > * shard-apl: NOTRUN -> FAIL (i915#265) > * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min: > > * shard-skl: PASS -> FAIL (fdo#108145 / i915#265) > * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2: > > * shard-apl: NOTRUN -> SKIP (fdo#109271 / i915#658) +3 similar > issues > * igt@kms_psr@psr2_sprite_plane_move: > > * shard-iclb: PASS -> SKIP (fdo#109441) +1 similar issue > * igt@kms_setmode@basic: > > * shard-snb: NOTRUN -> FAIL (i915#31) > * igt@kms_writeback@writeback-check-output: > > * shard-apl: NOTRUN -> SKIP (fdo#109271 / i915#2437) > * igt@perf@gen12-mi-rpc: > > * shard-skl: NOTRUN -> SKIP (fdo#109271) > * igt@perf@polling-parameterized: > > * shard-skl: PASS -> FAIL (i915#1542) > * igt@sysfs_clients@fair-0: > > * shard-apl: NOTRUN -> SKIP (fdo#109271 / i915#2994) +1 similar > issue > > Possible fixes > > * igt@gem_ctx_isolation@preservation-s3@bcs0: > > * shard-kbl: INCOMPLETE -> PASS > * igt@gem_eio@unwedge-stress: > > * shard-tglb: TIMEOUT (i915#2369 / i915#3063) -> PASS > * igt@gem_exec_fair@basic-flow@rcs0: > > * shard-tglb: FAIL (i915#2842) -> PASS +1 similar issue > * igt@gem_exec_fair@basic-none-share@rcs0: > > * shard-iclb: FAIL (i915#2842) -> PASS > * igt@gem_exec_fair@basic-none@rcs0: > > * shard-kbl: FAIL (i915#2842) -> PASS > * igt@gem_exec_fair@basic-none@vcs0: > > * shard-apl: FAIL (i915#2842) -> PASS > * igt@gem_exec_fair@basic-pace-solo@rcs0: > > * shard-glk: FAIL (i915#2842) -> PASS +3 similar issues > * igt@gem_mmap_gtt@big-copy: > > * shard-skl: FAIL (i915#307) -> PASS > * igt@gem_mmap_gtt@cpuset-big-copy-odd: > > * shard-glk: FAIL (i915#307) -> PASS +1 similar issue > * igt@gem_mmap_offset@clear: > > * shard-skl: FAIL (i915#3160) -> PASS > * igt@gem_ppgtt@blt-vs-render-ctxn: > > * shard-glk: DMESG-WARN (i915#118 / i915#95) -> PASS +1 similar > issue > * igt@i915_selftest@live@hangcheck: > > * shard-snb: INCOMPLETE (i915#2782) -> PASS > * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions: > > * shard-skl: FAIL (i915#2346) -> PASS > * igt@kms_flip@absolute-wf_vblank-interruptible@a-edp1: > > * shard-skl: DMESG-WARN (i915#1982) -> PASS > * igt@kms_flip@flip-vs-suspend-interruptible@c-dp1: > > * shard-apl: DMESG-WARN (i915#180) -> PASS +2 similar issues > * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: > > * shard-kbl: DMESG-WARN (i915#180) -> PASS > * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min: > > * shard-kbl: FAIL (fdo#108145 / i915#265) -> PASS > * igt@kms_psr@psr2_cursor_render: > > * shard-iclb: SKIP (fdo#109441) -> PASS +2 similar issues > > Warnings > > * igt@gem_exec_fair@basic-throttle@rcs0: > > * shard-iclb: FAIL (i915#2842) -> FAIL (i915#2849) > * igt@i915_selftest@live@execlists: > > * shard-iclb: INCOMPLETE (i915#2782 / i915#3462) -> DMESG-FAIL > (i915#3462) > * igt@kms_psr2_sf@cursor-plane-update-sf: > > * shard-iclb: SKIP (i915#2920) -> SKIP (i915#658) +2 similar issues > * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3: > > * shard-iclb: SKIP (i915#658) -> SKIP (i915#2920) +2 similar issues > * igt@runner@aborted: > > * shard-kbl: (FAIL, FAIL, FAIL, FAIL, FAIL) (i915#1436 / i915#180 / > i915#1814 / i915#3002 / i915#3363) -> (FAIL, FAIL, FAIL, FAIL, > FAIL, FAIL, FAIL, FAIL) (i915#1436 / i915#180 / i915#1814 / > i915#2505 / i915#3002 / i915#3363 / i915#602) > > * shard-apl: (FAIL, FAIL, FAIL, FAIL) (i915#180 / i915#1814 / > i915#3363) -> (FAIL, FAIL, FAIL, FAIL, FAIL) (fdo#109271 / > i915#1814 / i915#3002 / i915#3363) > > * shard-skl: (FAIL, FAIL, FAIL) (i915#1436 / i915#3002 / i915#3363) > -> (FAIL, FAIL, FAIL) (i915#1436 / i915#2426 / i915#3002 / > i915#3363) > > Participating hosts (11 -> 10) > > Missing (1): pig-icl-1065g7 > > Build changes > > * Linux: CI_DRM_10204 -> Patchwork_20330 > > CI-20190529: 20190529 > CI_DRM_10204: 49f55716c1c64348b925292c6cbaca589a6480e6 @ > git://anongit.freedesktop.org/gfx-ci/linux > IGT_6103: 3aa79e55e73d4a49a5222e5dfde486b800a29fe7 @ > https://gitlab.freedesktop.org/drm/igt-gpu-tools.git > Patchwork_20330: 8ea98a31aee7205732d42302847a8b71264d76fc @ > git://anongit.freedesktop.org/gfx-ci/linux > piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ > git://anongit.freedesktop.org/piglit
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 <zbigniew.kempczynski@intel.com> > > > Cc: Dave Airlie <airlied@redhat.com> > > > Cc: Daniel Vetter <daniel.vetter@intel.com> > > > Cc: Jason Ekstrand <jason@jlekstrand.net> > > > Acked-by: Dave Airlie <airlied@redhat.com> > > > --- > > > .../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. > > > - */ > > > - 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-gfx@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
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 <zbigniew.kempczynski@intel.com> > > > > Cc: Dave Airlie <airlied@redhat.com> > > > > Cc: Daniel Vetter <daniel.vetter@intel.com> > > > > Cc: Jason Ekstrand <jason@jlekstrand.net> > > > > Acked-by: Dave Airlie <airlied@redhat.com> > > > > --- > > > > .../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 no-reloc on ADL, so that condition disappear. > > 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... That means I don't understand the meaning of that flag. I thought it is to enforce probe of driver on platform which behavior is not already well defined and we want to "try" driver on it. -- Zbigniew > > > > > -- > > 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-gfx@lists.freedesktop.org > > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
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 <zbigniew.kempczynski@intel.com> > > > > > Cc: Dave Airlie <airlied@redhat.com> > > > > > Cc: Daniel Vetter <daniel.vetter@intel.com> > > > > > Cc: Jason Ekstrand <jason@jlekstrand.net> > > > > > Acked-by: Dave Airlie <airlied@redhat.com> > > > > > --- > > > > > .../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_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 no-reloc on ADL, so that condition disappear. believe me, we will forget to remove this function if we don't start warning that ADL is not protected by the flag anymore... like we were about to add RKL and live that useless there forever... > > > > > 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... > > That means I don't understand the meaning of that flag. I thought it is > to enforce probe of driver on platform which behavior is not already > well defined and we want to "try" driver on it. The goal of the flag is to protect end users to get a unstable driver support. In special, linux installer .iso images where driver cannot be updated... if user gets a old .iso with driver from the enabling times and a brand new platform, the installation migh hang or get blank screens. It was a nightmare in the past. But the flag was never intended to be used with UAPI decisions, so this case here is changing this... > > -- > Zbigniew > > > > > > > > > -- > > > 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-gfx@lists.freedesktop.org > > > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
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))