Message ID | 20220907212410.22623-1-matthew.d.roper@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Document and future-proof preemption control policy | expand |
On 9/7/22 2:24 PM, Matt Roper wrote: > Intel hardware allows some preemption settings to be controlled either > by the kernel-mode driver exclusively, or placed under control of the > user-mode drivers; on Linux we always select the userspace control > option. The various registers involved in this are not documented very > clearly; let's add some clarifying comments to help explain how this all > works and provide some history on why our Linux drivers take the > approach they do (which I believe differs from the path taken by certain > other operating systems' drivers). > > While we're at it, let's also remove the graphics version 12 upper bound > on this programming. As described, we don't have any plans to move away > from UMD control of preemption settings on future platforms, and there's > currently no reason to believe that the hardware will fundamentally > change how these registers and settings work after version 12. > > Bspec: 45921, 45858, 45863 > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > Cc: Jordan Justen <jordan.l.justen@intel.com> > Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> > Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Wayne Boyer <wayne.boyer@intel.com> > --- > drivers/gpu/drm/i915/gt/intel_workarounds.c | 58 +++++++++++++++++++-- > 1 file changed, 55 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c > index 6d2003d598e6..3e5a41378e81 100644 > --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c > +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c > @@ -2389,12 +2389,64 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) > FF_DOP_CLOCK_GATE_DISABLE); > } > > - if (IS_GRAPHICS_VER(i915, 9, 12)) { > - /* FtrPerCtxtPreemptionGranularityControl:skl,bxt,kbl,cfl,cnl,icl,tgl */ > + /* > + * Intel platforms that support fine-grained preemption (i.e., gen9 and > + * beyond) allow the kernel-mode driver to choose between two different > + * options for controlling preemption granularity and behavior. > + * > + * Option 1 (hardware default): > + * Preemption settings are controlled in a global manner via > + * kernel-only register CS_DEBUG_MODE1 (0x20EC). Any granularity > + * and settings chosen by the kernel-mode driver will apply to all > + * userspace clients. > + * > + * Option 2: > + * Preemption settings are controlled on a per-context basis via > + * register CS_CHICKEN1 (0x2580). CS_CHICKEN1 is saved/restored on > + * context switch and is writable by userspace (e.g., via > + * MI_LOAD_REGISTER_IMMEDIATE instructions placed in a batch buffer) > + * which allows different userspace drivers/clients to select > + * different settings, or to change those settings on the fly in > + * response to runtime needs. This option was known by name > + * "FtrPerCtxtPreemptionGranularityControl" at one time, although > + * that name is somewhat misleading as other non-granularity > + * preemption settings are also impacted by this decision. > + * > + * On Linux, our policy has always been to let userspace drivers > + * control preemption granularity/settings (Option 2). This was > + * originally mandatory on gen9 to prevent ABI breakage (old gen9 > + * userspace developed before object-level preemption was enabled would > + * not behave well if i915 were to go with Option 1 and enable that > + * preemption in a global manner). On gen9 each context would have > + * object-level preemption disabled by default (see > + * WaDisable3DMidCmdPreemption in gen9_ctx_workarounds_init), but > + * userspace drivers could opt-in to object-level preemption as they > + * saw fit. For post-gen9 platforms, we continue to utilize Option 2; > + * even though it is no longer necessary for ABI compatibility when > + * enabling a new platform, it does ensure that userspace will be able > + * to implement any workarounds that show up requiring temporary > + * adjustments to preemption behavior at runtime. > + * > + * Notes/Workarounds: > + * - Wa_14015141709: On DG2 and early steppings of MTL, > + * CS_CHICKEN1[0] does not disable object-level preemption as > + * it is supposed to (nor does CS_DEBUG_MODE1[0] if we had been > + * using Option 1). Effectively this means userspace is unable > + * to disable object-level preemption on these platforms/steppings > + * despite the setting here. > + * > + * - Wa_16013994831: May require that userspace program > + * CS_CHICKEN1[10] when certain runtime conditions are true. > + * Userspace requires Option 2 to be in effect for their update of > + * CS_CHICKEN1[10] to be effective. > + * > + * Other workarounds may appear in the future that will also require > + * Option 2 behavior to allow proper userspace implementation. > + */ > + if (GRAPHICS_VER(i915) >= 9) > wa_masked_en(wal, > GEN7_FF_SLICE_CS_CHICKEN1, > GEN9_FFSC_PERCTX_PREEMPT_CTRL); > - } > > if (IS_SKYLAKE(i915) || > IS_KABYLAKE(i915) ||
On Thu, Sep 08, 2022 at 05:06:02AM +0000, Patchwork wrote: > == Series Details == > > Series: drm/i915: Document and future-proof preemption control policy > URL : https://patchwork.freedesktop.org/series/108275/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_12090_full -> Patchwork_108275v1_full > ==================================================== > > Summary > ------- > > **SUCCESS** > > No regressions found. Applied to drm-intel-gt-next. Thanks Wayne and Tapani for the review/ack. Matt > > > > Participating hosts (12 -> 12) > ------------------------------ > > No changes in participating hosts > > Known issues > ------------ > > Here are the changes found in Patchwork_108275v1_full that come from known issues: > > ### IGT changes ### > > #### Issues hit #### > > * igt@feature_discovery@display-2x: > - shard-iclb: NOTRUN -> [SKIP][1] ([i915#1839]) > [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@feature_discovery@display-2x.html > > * igt@gem_eio@in-flight-contexts-10ms: > - shard-iclb: [PASS][2] -> [TIMEOUT][3] ([i915#3070]) > [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb6/igt@gem_eio@in-flight-contexts-10ms.html > [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb3/igt@gem_eio@in-flight-contexts-10ms.html > > * igt@gem_exec_balancer@parallel-keep-submit-fence: > - shard-iclb: [PASS][4] -> [SKIP][5] ([i915#4525]) > [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb2/igt@gem_exec_balancer@parallel-keep-submit-fence.html > [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb5/igt@gem_exec_balancer@parallel-keep-submit-fence.html > > * igt@gem_exec_capture@capture-recoverable: > - shard-iclb: NOTRUN -> [SKIP][6] ([i915#6344]) > [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@gem_exec_capture@capture-recoverable.html > > * igt@gem_exec_fair@basic-deadline: > - shard-glk: [PASS][7] -> [FAIL][8] ([i915#2846]) > [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-glk2/igt@gem_exec_fair@basic-deadline.html > [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-glk3/igt@gem_exec_fair@basic-deadline.html > > * igt@gem_exec_fair@basic-none@vcs1: > - shard-iclb: NOTRUN -> [FAIL][9] ([i915#2842]) > [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb2/igt@gem_exec_fair@basic-none@vcs1.html > > * igt@gem_exec_fair@basic-pace-share@rcs0: > - shard-glk: [PASS][10] -> [FAIL][11] ([i915#2842]) > [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-glk6/igt@gem_exec_fair@basic-pace-share@rcs0.html > [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-glk5/igt@gem_exec_fair@basic-pace-share@rcs0.html > > * igt@gem_exec_fair@basic-throttle@rcs0: > - shard-iclb: [PASS][12] -> [FAIL][13] ([i915#2842]) +1 similar issue > [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb8/igt@gem_exec_fair@basic-throttle@rcs0.html > [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@gem_exec_fair@basic-throttle@rcs0.html > > * igt@gem_lmem_swapping@verify-ccs: > - shard-iclb: NOTRUN -> [SKIP][14] ([i915#4613]) > [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@gem_lmem_swapping@verify-ccs.html > > * igt@gem_lmem_swapping@verify-random: > - shard-apl: NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#4613]) +2 similar issues > [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl4/igt@gem_lmem_swapping@verify-random.html > > * igt@gem_pread@exhaustion: > - shard-apl: NOTRUN -> [WARN][16] ([i915#2658]) > [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl7/igt@gem_pread@exhaustion.html > > * igt@gem_pxp@verify-pxp-stale-ctx-execution: > - shard-iclb: NOTRUN -> [SKIP][17] ([i915#4270]) > [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@gem_pxp@verify-pxp-stale-ctx-execution.html > > * igt@gem_userptr_blits@vma-merge: > - shard-iclb: NOTRUN -> [FAIL][18] ([i915#3318]) > [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@gem_userptr_blits@vma-merge.html > > * igt@gen9_exec_parse@batch-without-end: > - shard-iclb: NOTRUN -> [SKIP][19] ([i915#2856]) > [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@gen9_exec_parse@batch-without-end.html > > * igt@kms_big_fb@4-tiled-32bpp-rotate-270: > - shard-iclb: NOTRUN -> [SKIP][20] ([i915#5286]) > [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_big_fb@4-tiled-32bpp-rotate-270.html > > * igt@kms_big_fb@linear-16bpp-rotate-270: > - shard-iclb: NOTRUN -> [SKIP][21] ([fdo#110725] / [fdo#111614]) > [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_big_fb@linear-16bpp-rotate-270.html > > * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0-async-flip: > - shard-iclb: NOTRUN -> [SKIP][22] ([fdo#110723]) > [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0-async-flip.html > > * igt@kms_big_joiner@basic: > - shard-iclb: NOTRUN -> [SKIP][23] ([i915#2705]) > [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_big_joiner@basic.html > > * igt@kms_ccs@pipe-a-crc-primary-rotation-180-4_tiled_dg2_rc_ccs: > - shard-apl: NOTRUN -> [SKIP][24] ([fdo#109271]) +122 similar issues > [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl7/igt@kms_ccs@pipe-a-crc-primary-rotation-180-4_tiled_dg2_rc_ccs.html > > * igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc: > - shard-iclb: NOTRUN -> [SKIP][25] ([fdo#109278] / [i915#3886]) +1 similar issue > [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html > > * igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_mc_ccs: > - shard-apl: NOTRUN -> [SKIP][26] ([fdo#109271] / [i915#3886]) +3 similar issues > [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl4/igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_mc_ccs.html > > * igt@kms_ccs@pipe-d-random-ccs-data-4_tiled_dg2_mc_ccs: > - shard-iclb: NOTRUN -> [SKIP][27] ([fdo#109278]) +4 similar issues > [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_ccs@pipe-d-random-ccs-data-4_tiled_dg2_mc_ccs.html > > * igt@kms_chamelium@dp-crc-fast: > - shard-iclb: NOTRUN -> [SKIP][28] ([fdo#109284] / [fdo#111827]) > [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_chamelium@dp-crc-fast.html > > * igt@kms_chamelium@dp-frame-dump: > - shard-apl: NOTRUN -> [SKIP][29] ([fdo#109271] / [fdo#111827]) +3 similar issues > [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl4/igt@kms_chamelium@dp-frame-dump.html > > * igt@kms_content_protection@lic: > - shard-iclb: NOTRUN -> [SKIP][30] ([fdo#109300] / [fdo#111066]) > [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_content_protection@lic.html > > * igt@kms_cursor_crc@cursor-suspend@pipe-d-edp-1: > - shard-tglb: [PASS][31] -> [INCOMPLETE][32] ([i915#2411]) > [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-tglb2/igt@kms_cursor_crc@cursor-suspend@pipe-d-edp-1.html > [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-tglb1/igt@kms_cursor_crc@cursor-suspend@pipe-d-edp-1.html > > * igt@kms_flip@2x-flip-vs-absolute-wf_vblank: > - shard-iclb: NOTRUN -> [SKIP][33] ([fdo#109274]) > [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_flip@2x-flip-vs-absolute-wf_vblank.html > > * igt@kms_flip@dpms-off-confusion@a-dp1: > - shard-apl: [PASS][34] -> [DMESG-WARN][35] ([i915#1982] / [i915#62]) > [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl3/igt@kms_flip@dpms-off-confusion@a-dp1.html > [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl4/igt@kms_flip@dpms-off-confusion@a-dp1.html > > * igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-default-mode: > - shard-iclb: NOTRUN -> [SKIP][36] ([i915#2672]) +8 similar issues > [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb3/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-default-mode.html > > * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs-downscaling@pipe-a-default-mode: > - shard-iclb: NOTRUN -> [SKIP][37] ([i915#2672] / [i915#3555]) > [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb3/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs-downscaling@pipe-a-default-mode.html > > * igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-shrfb-draw-mmap-gtt: > - shard-iclb: NOTRUN -> [SKIP][38] ([fdo#109280]) +3 similar issues > [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-shrfb-draw-mmap-gtt.html > > * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max: > - shard-apl: NOTRUN -> [FAIL][39] ([fdo#108145] / [i915#265]) > [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl4/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max.html > > * igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-rotation@pipe-c-edp-1: > - shard-iclb: NOTRUN -> [SKIP][40] ([i915#5176]) +2 similar issues > [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-rotation@pipe-c-edp-1.html > > * igt@kms_plane_scaling@planes-scaler-unity-scaling@pipe-a-dp-1: > - shard-apl: [PASS][41] -> [DMESG-WARN][42] ([i915#165] / [i915#180] / [i915#62]) > [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl3/igt@kms_plane_scaling@planes-scaler-unity-scaling@pipe-a-dp-1.html > [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl4/igt@kms_plane_scaling@planes-scaler-unity-scaling@pipe-a-dp-1.html > > * igt@kms_plane_scaling@planes-scaler-unity-scaling@pipe-c-dp-1: > - shard-apl: [PASS][43] -> [DMESG-WARN][44] ([i915#62]) +29 similar issues > [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl3/igt@kms_plane_scaling@planes-scaler-unity-scaling@pipe-c-dp-1.html > [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl4/igt@kms_plane_scaling@planes-scaler-unity-scaling@pipe-c-dp-1.html > > * igt@kms_psr2_sf@overlay-plane-move-continuous-sf: > - shard-apl: NOTRUN -> [SKIP][45] ([fdo#109271] / [i915#658]) +2 similar issues > [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl8/igt@kms_psr2_sf@overlay-plane-move-continuous-sf.html > > * igt@kms_psr2_sf@overlay-plane-update-continuous-sf: > - shard-iclb: NOTRUN -> [SKIP][46] ([fdo#111068] / [i915#658]) > [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_psr2_sf@overlay-plane-update-continuous-sf.html > > * igt@kms_psr@psr2_primary_render: > - shard-iclb: NOTRUN -> [SKIP][47] ([fdo#109441]) > [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_psr@psr2_primary_render.html > > * igt@kms_psr@psr2_sprite_blt: > - shard-iclb: [PASS][48] -> [SKIP][49] ([fdo#109441]) +1 similar issue > [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb2/igt@kms_psr@psr2_sprite_blt.html > [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb5/igt@kms_psr@psr2_sprite_blt.html > > * igt@kms_psr_stress_test@flip-primary-invalidate-overlay: > - shard-iclb: [PASS][50] -> [SKIP][51] ([i915#5519]) > [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb1/igt@kms_psr_stress_test@flip-primary-invalidate-overlay.html > [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@kms_psr_stress_test@flip-primary-invalidate-overlay.html > > * igt@kms_pwrite_crc: > - shard-apl: [PASS][52] -> [DMESG-WARN][53] ([i915#165] / [i915#62]) +4 similar issues > [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl3/igt@kms_pwrite_crc.html > [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl4/igt@kms_pwrite_crc.html > > * igt@prime_nv_api@i915_nv_import_vs_close: > - shard-iclb: NOTRUN -> [SKIP][54] ([fdo#109291]) > [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@prime_nv_api@i915_nv_import_vs_close.html > > * igt@prime_vgem@fence-flip-hang: > - shard-iclb: NOTRUN -> [SKIP][55] ([fdo#109295]) > [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@prime_vgem@fence-flip-hang.html > > * igt@sysfs_clients@fair-3: > - shard-apl: NOTRUN -> [SKIP][56] ([fdo#109271] / [i915#2994]) +1 similar issue > [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl7/igt@sysfs_clients@fair-3.html > > * igt@sysfs_heartbeat_interval@mixed@vcs0: > - shard-apl: [PASS][57] -> [FAIL][58] ([i915#1731]) > [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl6/igt@sysfs_heartbeat_interval@mixed@vcs0.html > [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl3/igt@sysfs_heartbeat_interval@mixed@vcs0.html > > > #### Possible fixes #### > > * igt@gem_ctx_exec@basic-close-race: > - shard-iclb: [INCOMPLETE][59] -> [PASS][60] > [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb1/igt@gem_ctx_exec@basic-close-race.html > [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb1/igt@gem_ctx_exec@basic-close-race.html > > * igt@gem_eio@kms: > - {shard-tglu}: [INCOMPLETE][61] ([i915#5182]) -> [PASS][62] > [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-tglu-2/igt@gem_eio@kms.html > [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-tglu-1/igt@gem_eio@kms.html > > * igt@gem_exec_balancer@parallel-bb-first: > - shard-iclb: [SKIP][63] ([i915#4525]) -> [PASS][64] > [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb7/igt@gem_exec_balancer@parallel-bb-first.html > [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb2/igt@gem_exec_balancer@parallel-bb-first.html > > * igt@gem_exec_fair@basic-none-solo@rcs0: > - shard-apl: [FAIL][65] ([i915#2842]) -> [PASS][66] > [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl8/igt@gem_exec_fair@basic-none-solo@rcs0.html > [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl3/igt@gem_exec_fair@basic-none-solo@rcs0.html > > * igt@gem_exec_fair@basic-pace-share@rcs0: > - shard-tglb: [FAIL][67] ([i915#2842]) -> [PASS][68] > [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-tglb1/igt@gem_exec_fair@basic-pace-share@rcs0.html > [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-tglb7/igt@gem_exec_fair@basic-pace-share@rcs0.html > > * igt@gen9_exec_parse@allowed-single: > - shard-glk: [DMESG-WARN][69] ([i915#5566] / [i915#716]) -> [PASS][70] > [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-glk6/igt@gen9_exec_parse@allowed-single.html > [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-glk7/igt@gen9_exec_parse@allowed-single.html > > * igt@i915_pm_dc@dc6-dpms: > - shard-iclb: [FAIL][71] ([i915#454]) -> [PASS][72] > [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html > [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb8/igt@i915_pm_dc@dc6-dpms.html > > * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2: > - shard-glk: [FAIL][73] ([i915#79]) -> [PASS][74] > [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-glk9/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2.html > [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-glk9/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2.html > > * igt@kms_flip@flip-vs-suspend@c-edp1: > - shard-iclb: [DMESG-WARN][75] ([i915#2867]) -> [PASS][76] > [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb5/igt@kms_flip@flip-vs-suspend@c-edp1.html > [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb7/igt@kms_flip@flip-vs-suspend@c-edp1.html > > * igt@kms_psr_stress_test@invalidate-primary-flip-overlay: > - shard-tglb: [SKIP][77] ([i915#5519]) -> [PASS][78] > [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-tglb7/igt@kms_psr_stress_test@invalidate-primary-flip-overlay.html > [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-tglb7/igt@kms_psr_stress_test@invalidate-primary-flip-overlay.html > > * igt@kms_sequence@get-forked@edp-1-pipe-a: > - shard-iclb: [DMESG-WARN][79] ([i915#4391]) -> [PASS][80] > [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb7/igt@kms_sequence@get-forked@edp-1-pipe-a.html > [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb2/igt@kms_sequence@get-forked@edp-1-pipe-a.html > > * igt@kms_vblank@pipe-a-ts-continuation-suspend: > - shard-apl: [DMESG-WARN][81] ([i915#180]) -> [PASS][82] +3 similar issues > [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl3/igt@kms_vblank@pipe-a-ts-continuation-suspend.html > [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl7/igt@kms_vblank@pipe-a-ts-continuation-suspend.html > > > #### Warnings #### > > * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb: > - shard-apl: [FAIL][83] ([fdo#108145] / [i915#265]) -> [DMESG-FAIL][84] ([fdo#108145] / [i915#62]) > [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl3/igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb.html > [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl4/igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb.html > > * igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-fully-sf: > - shard-iclb: [SKIP][85] ([i915#2920]) -> [SKIP][86] ([i915#658]) > [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb2/igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-fully-sf.html > [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb5/igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-fully-sf.html > > * igt@kms_psr2_sf@plane-move-sf-dmg-area: > - shard-iclb: [SKIP][87] ([fdo#111068] / [i915#658]) -> [SKIP][88] ([i915#2920]) > [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-iclb7/igt@kms_psr2_sf@plane-move-sf-dmg-area.html > [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-iclb2/igt@kms_psr2_sf@plane-move-sf-dmg-area.html > > * igt@runner@aborted: > - shard-apl: ([FAIL][89], [FAIL][90], [FAIL][91], [FAIL][92], [FAIL][93], [FAIL][94]) ([i915#180] / [i915#3002] / [i915#4312] / [i915#5257] / [i915#6599]) -> ([FAIL][95], [FAIL][96]) ([i915#3002] / [i915#4312] / [i915#5257] / [i915#6599]) > [89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl3/igt@runner@aborted.html > [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl3/igt@runner@aborted.html > [91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl6/igt@runner@aborted.html > [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl8/igt@runner@aborted.html > [93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl8/igt@runner@aborted.html > [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12090/shard-apl2/igt@runner@aborted.html > [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl7/igt@runner@aborted.html > [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/shard-apl3/igt@runner@aborted.html > > > {name}: This element is suppressed. This means it is ignored when computing > the status of the difference (SUCCESS, WARNING, or FAILURE). > > [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145 > [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 > [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274 > [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 > [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280 > [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284 > [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289 > [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291 > [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295 > [fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300 > [fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302 > [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309 > [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441 > [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189 > [fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542 > [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723 > [fdo#110725]: https://bugs.freedesktop.org/show_bug.cgi?id=110725 > [fdo#111066]: https://bugs.freedesktop.org/show_bug.cgi?id=111066 > [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068 > [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614 > [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615 > [fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644 > [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825 > [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827 > [i915#1063]: https://gitlab.freedesktop.org/drm/intel/issues/1063 > [i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132 > [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397 > [i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165 > [i915#1731]: https://gitlab.freedesktop.org/drm/intel/issues/1731 > [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180 > [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825 > [i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839 > [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982 > [i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411 > [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527 > [i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530 > [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265 > [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658 > [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672 > [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705 > [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280 > [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842 > [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846 > [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856 > [i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867 > [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920 > [i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994 > [i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002 > [i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063 > [i915#3070]: https://gitlab.freedesktop.org/drm/intel/issues/3070 > [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116 > [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281 > [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299 > [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301 > [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318 > [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359 > [i915#3376]: https://gitlab.freedesktop.org/drm/intel/issues/3376 > [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555 > [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637 > [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689 > [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708 > [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734 > [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742 > [i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825 > [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886 > [i915#3987]: https://gitlab.freedesktop.org/drm/intel/issues/3987 > [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070 > [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270 > [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312 > [i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391 > [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525 > [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454 > [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613 > [i915#4941]: https://gitlab.freedesktop.org/drm/intel/issues/4941 > [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176 > [i915#5182]: https://gitlab.freedesktop.org/drm/intel/issues/5182 > [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235 > [i915#5257]: https://gitlab.freedesktop.org/drm/intel/issues/5257 > [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286 > [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325 > [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533 > [i915#5519]: https://gitlab.freedesktop.org/drm/intel/issues/5519 > [i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566 > [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095 > [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62 > [i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344 > [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497 > [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658 > [i915#6599]: https://gitlab.freedesktop.org/drm/intel/issues/6599 > [i915#6637]: https://gitlab.freedesktop.org/drm/intel/issues/6637 > [i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716 > [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79 > > > Build changes > ------------- > > * Linux: CI_DRM_12090 -> Patchwork_108275v1 > > CI-20190529: 20190529 > CI_DRM_12090: 7710b0d1501fc279a2f0e8571a48500017b6a4d3 @ git://anongit.freedesktop.org/gfx-ci/linux > IGT_6648: 3c9079c0b97445fbfc903b9c5a1d69707b80af80 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git > Patchwork_108275v1: 7710b0d1501fc279a2f0e8571a48500017b6a4d3 @ git://anongit.freedesktop.org/gfx-ci/linux > piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit > > == Logs == > > For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108275v1/index.html
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 6d2003d598e6..3e5a41378e81 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -2389,12 +2389,64 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) FF_DOP_CLOCK_GATE_DISABLE); } - if (IS_GRAPHICS_VER(i915, 9, 12)) { - /* FtrPerCtxtPreemptionGranularityControl:skl,bxt,kbl,cfl,cnl,icl,tgl */ + /* + * Intel platforms that support fine-grained preemption (i.e., gen9 and + * beyond) allow the kernel-mode driver to choose between two different + * options for controlling preemption granularity and behavior. + * + * Option 1 (hardware default): + * Preemption settings are controlled in a global manner via + * kernel-only register CS_DEBUG_MODE1 (0x20EC). Any granularity + * and settings chosen by the kernel-mode driver will apply to all + * userspace clients. + * + * Option 2: + * Preemption settings are controlled on a per-context basis via + * register CS_CHICKEN1 (0x2580). CS_CHICKEN1 is saved/restored on + * context switch and is writable by userspace (e.g., via + * MI_LOAD_REGISTER_IMMEDIATE instructions placed in a batch buffer) + * which allows different userspace drivers/clients to select + * different settings, or to change those settings on the fly in + * response to runtime needs. This option was known by name + * "FtrPerCtxtPreemptionGranularityControl" at one time, although + * that name is somewhat misleading as other non-granularity + * preemption settings are also impacted by this decision. + * + * On Linux, our policy has always been to let userspace drivers + * control preemption granularity/settings (Option 2). This was + * originally mandatory on gen9 to prevent ABI breakage (old gen9 + * userspace developed before object-level preemption was enabled would + * not behave well if i915 were to go with Option 1 and enable that + * preemption in a global manner). On gen9 each context would have + * object-level preemption disabled by default (see + * WaDisable3DMidCmdPreemption in gen9_ctx_workarounds_init), but + * userspace drivers could opt-in to object-level preemption as they + * saw fit. For post-gen9 platforms, we continue to utilize Option 2; + * even though it is no longer necessary for ABI compatibility when + * enabling a new platform, it does ensure that userspace will be able + * to implement any workarounds that show up requiring temporary + * adjustments to preemption behavior at runtime. + * + * Notes/Workarounds: + * - Wa_14015141709: On DG2 and early steppings of MTL, + * CS_CHICKEN1[0] does not disable object-level preemption as + * it is supposed to (nor does CS_DEBUG_MODE1[0] if we had been + * using Option 1). Effectively this means userspace is unable + * to disable object-level preemption on these platforms/steppings + * despite the setting here. + * + * - Wa_16013994831: May require that userspace program + * CS_CHICKEN1[10] when certain runtime conditions are true. + * Userspace requires Option 2 to be in effect for their update of + * CS_CHICKEN1[10] to be effective. + * + * Other workarounds may appear in the future that will also require + * Option 2 behavior to allow proper userspace implementation. + */ + if (GRAPHICS_VER(i915) >= 9) wa_masked_en(wal, GEN7_FF_SLICE_CS_CHICKEN1, GEN9_FFSC_PERCTX_PREEMPT_CTRL); - } if (IS_SKYLAKE(i915) || IS_KABYLAKE(i915) ||
Intel hardware allows some preemption settings to be controlled either by the kernel-mode driver exclusively, or placed under control of the user-mode drivers; on Linux we always select the userspace control option. The various registers involved in this are not documented very clearly; let's add some clarifying comments to help explain how this all works and provide some history on why our Linux drivers take the approach they do (which I believe differs from the path taken by certain other operating systems' drivers). While we're at it, let's also remove the graphics version 12 upper bound on this programming. As described, we don't have any plans to move away from UMD control of preemption settings on future platforms, and there's currently no reason to believe that the hardware will fundamentally change how these registers and settings work after version 12. Bspec: 45921, 45858, 45863 Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 58 +++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-)