drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits
Subsystems (2)
PATCH v2 1/1 drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits
On Gen8+ this register is not priviledged and we want to use it in Mesa to implement a feature required by GPA called Null Hardware. The idea is to have the command parser turn 3DPRIMITIVE/GPGPU_WALKER into NOOPs.
This patch just whitelists the bits that we need and that are currently not used by the kernel.
v2: Bump the command parser revision (Chris)
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 11 ++++++++++- drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_cmd_parser.c +10 -1
@@ -534,6 +534,14 @@ struct drm_i915_reg_descriptor { { .addr = _reg ## _UDW(idx) }static const struct drm_i915_reg_descriptor gen7_render_regs[] = { + REG32(INSTPM, + .mask = ~((INSTPM_3D_STATE_INSTRUCTION_DISABLE | +INSTPM_3D_RENDERING_INSTRUCTION_DISABLE | +INSTPM_3D_MEDIA_INSTRUCTION_DISABLE ) <<16 | + (INSTPM_3D_STATE_INSTRUCTION_DISABLE | +INSTPM_3D_RENDERING_INSTRUCTION_DISABLE | + INSTPM_3D_MEDIA_INSTRUCTION_DISABLE)), + .value =0 ),REG64 (GPGPU_THREADS_DISPATCHED ),REG64 (HS_INVOCATION_COUNT ),REG64 (DS_INVOCATION_COUNT ),
@@ -1382,6 +1390,7 @@ int i915_cmd_parser_get_version(struct drm_i915_private *dev_priv)* the parser enabled. * 9. Don't whitelist or handle oacontrol specially, as ownership * for oacontrol state is moving to i915-perf. +* 10. Whitelist INSTPM on Ivybridge & Haswell. */ -return 9 ; +return 10 ; }
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -2531,6 +2531,9 @@ enum i915_power_well_id {#define INSTPM_FORCE_ORDERING (1<<7)/* GEN6+ */ #define INSTPM_TLB_INVALIDATE (1<<9)#define INSTPM_SYNC_FLUSH (1<<5) +#define INSTPM_3D_MEDIA_INSTRUCTION_DISABLE (1 << 3)/* GEN6+ */ +#define INSTPM_3D_RENDERING_INSTRUCTION_DISABLE (1 << 2)/* GEN6+ */ +#define INSTPM_3D_STATE_INSTRUCTION_DISABLE (1 << 1)/* GEN6+ */ #define ACTHD _MMIO(0x20c8)#define MEM_MODE _MMIO(0x20cc)#define MEM_DISPLAY_B_TRICKLE_FEED_DISABLE (1<<3)/* 830 only */
Signature · 6 lines
2.17.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Lionel Landwerlin (2018-05-18 18:14:52)
drivers/gpu/drm/i915/i915_reg.h enum i915_power_well_id { · line 2534
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -2531,6 +2531,9 @@ enum i915_power_well_id {#define INSTPM_FORCE_ORDERING (1<<7)/* GEN6+ */ #define INSTPM_TLB_INVALIDATE (1<<9)#define INSTPM_SYNC_FLUSH (1<<5) +#define INSTPM_3D_MEDIA_INSTRUCTION_DISABLE (1 << 3)/* GEN6+ */
s/3D_MEDIA/MEDIA/
drivers/gpu/drm/i915/i915_reg.h enum i915_power_well_id { · line 2536
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define INSTPM_3D_RENDERING_INSTRUCTION_DISABLE (1 << 2)/* GEN6+ */ +#define INSTPM_3D_STATE_INSTRUCTION_DISABLE (1 << 1)/* GEN6+ */
#define INSTPM_TEXTURE_PALETTE_LOAD_INSTRUCTION_DISABLE (1 << 0)
"This bit instructs the Renderer instruction parser to parse and error -check Texture Palette Load instructions, but not execute them."
Seems relevant for blackhole as well.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits (rev2)
In reply to Lionel Landwerlin== Series Details ==
== Series Details ==
Series: drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits (rev2)
URL : https://patchwork.freedesktop.org/series/43420/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4209 -> Patchwork_9057 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/43420/revisions/2/mbox/
== Known issues ==
Here are the changes found in Patchwork_9057 that come from known issues:
=== IGT changes ===
==== Possible fixes ====
igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
fi-hsw-4200u: FAIL (fdo#103481) -> PASSfdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
== Participating hosts (43 -> 39) ==
Missing (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4209 -> Patchwork_9057
CI_DRM_4209: eecb2c1e793ed98c39876c92fc64cd18a7fe6412 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4487: eccae1360d6d01e73c6af2bd97122cef708207ef @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9057: 13252bf3238e58d1782e8e42b41f91323ddc8e8f @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4487: 6ab75f7eb5e1dccbb773e1739beeb2d7cbd6ad0d @ git://anongit.freedesktop.org/piglit
== Linux commits ==
13252bf3238e drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9057/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits (rev2)
In reply to Lionel Landwerlin== Series Details ==
== Series Details ==
Series: drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits (rev2)
URL : https://patchwork.freedesktop.org/series/43420/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4209_full -> Patchwork_9057_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9057_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9057_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/43420/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9057_full:
=== IGT changes ===
==== Warnings ====
igt@kms_plane_lowres@pipe-c-tiling-x:
shard-apl: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_9057_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_mmap_offset_exhaustion:
shard-apl: PASS -> DMESG-WARN (fdo#105602, fdo#103558) +2
igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#105707)
igt@kms_flip@2x-plain-flip-fb-recreate:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: PASS -> FAIL (fdo#105363, fdo#102887)
igt@kms_flip@plain-flip-fb-recreate:
shard-hsw: PASS -> FAIL (fdo#100368)
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: PASS -> FAIL (fdo#104724, fdo#103822)
igt@pm_rpm@cursor-dpms:
shard-apl: PASS -> DMESG-WARN (fdo#103558)
==== Possible fixes ====
igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
shard-glk: FAIL (fdo#105703) -> PASS
igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_flip_tiling@flip-to-x-tiled:
shard-glk: FAIL (fdo#104724) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt:
shard-apl: DMESG-FAIL (fdo#105602, fdo#103558) -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt:
shard-glk: FAIL (fdo#104724, fdo#103167) -> PASS +1
igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
shard-apl: DMESG-WARN (fdo#105602, fdo#103558) -> PASS +9
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#105707 https://bugs.freedesktop.org/show_bug.cgi?id=105707
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (9 -> 8) ==
Missing (1): shard-kbl
== Build changes ==
* Linux: CI_DRM_4209 -> Patchwork_9057
CI_DRM_4209: eecb2c1e793ed98c39876c92fc64cd18a7fe6412 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4487: eccae1360d6d01e73c6af2bd97122cef708207ef @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9057: 13252bf3238e58d1782e8e42b41f91323ddc8e8f @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4487: 6ab75f7eb5e1dccbb773e1739beeb2d7cbd6ad0d @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9057/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx