tests/intel/kms_frontbuffer_tracking: Refine FBC test conditions for BMG variants
PATCH 1/1 tests/intel/kms_frontbuffer_tracking: Refine FBC test conditions for BMG variants
This update stops skipping fbc-* tests based on the BMG platform. Instead, tests are excluded only for specific unsupported BMG variants.
--- lib/igt_kms.c | 30 ++++++++++++++++++++++++++ lib/igt_kms.h | 1 + tests/intel/kms_frontbuffer_tracking.c | 7 +++--- 3 files changed, 35 insertions(+), 3 deletions(-)
lib/igt_kms.c +30 -0
@@ -61,6 +61,7 @@#include "igt_device.h" #include "igt_sysfs.h" #include "sw_sync.h" +#include "xe/xe_query.h" #ifdef HAVE_CHAMELIUM #include "igt_chamelium.h" #endif
@@ -7442,3 +7443,32 @@ int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *creturn 0 ; } + +/** +* igt_read_debugfs_wa: +* @drm_fd: A drm file descriptor +* @check_wa: Wa to be checked +*/ +bool igt_read_debugfs_wa (int drm_fd,const char *check_wa) +{ +char buf[4096 ]; +bool found = false; +char name[PATH_MAX ]; +unsigned int xe, debugfs_fd; + + debugfs_fd =igt_debugfs_dir (drm_fd); + +xe_for_each_gt (drm_fd, xe) { +sprintf (name,"gt%d/workarounds" , xe); +igt_require (igt_debugfs_exists (drm_fd, name,O_RDONLY )); + +if (igt_debugfs_simple_read (debugfs_fd, name, buf,sizeof (buf)) >0 ) { +if (strstr (buf, check_wa)) { + found = true; +break ; + } + } + } + +return found; +}
lib/igt_kms.h +1 -0
@@ -1279,5 +1279,6 @@ void igt_set_link_params(int drm_fd, igt_output_t *output, char *link_rate, char *lane_count);int igt_backlight_read (int *result,const char *fname,igt_backlight_context_t *context);int igt_backlight_write (int value,const char *fname,igt_backlight_context_t *context); +bool igt_read_debugfs_wa (int drm_fd,const char *check_wa);#endif /* __IGT_KMS_H__ */
tests/intel/kms_frontbuffer_tracking.c +4 -3
@@ -781,6 +781,7 @@*/ #define TIME SLOW_QUICK(1000, 10000) +#define CHECK_WA "16023588340"IGT_TEST_DESCRIPTION ("Test the Kernel's frontbuffer tracking mechanism and " "its related features: FBC, PSR and DRRS" );
@@ -2610,7 +2611,7 @@ static void prepare_subtest_data(const struct test_mode *t,static void prepare_subtest_screens (const struct test_mode *t) {/* FBC disabled: Wa_16023588340 */ -igt_skip_on_f ((IS_BATTLEMAGE (drm.devid) && t->feature ==FEATURE_FBC ), +igt_skip_on_f ((igt_read_debugfs_wa (drm.fd,CHECK_WA ) && t->feature ==FEATURE_FBC ),"FBC isn't supported on BMG\n" );if (t->pipes ==PIPE_DUAL )
@@ -2658,7 +2659,7 @@ static void prepare_subtest(const struct test_mode *t,static void rte_subtest (const struct test_mode *t) {/* FBC disabled: Wa_16023588340 */ -igt_skip_on_f ((IS_BATTLEMAGE (drm.devid) && t->feature ==FEATURE_FBC ), +igt_skip_on_f ((igt_read_debugfs_wa (drm.fd,CHECK_WA ) && t->feature ==FEATURE_FBC ),"FBC isn't supported on BMG\n" );prepare_subtest_data (t,NULL );
@@ -4157,7 +4158,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL) t.tiling = opt.tiling;/* FBC disabled: Wa_16023588340 */ -igt_skip_on_f ((IS_BATTLEMAGE (drm.devid) && t.feature ==FEATURE_FBC ), +igt_skip_on_f ((igt_read_debugfs_wa (drm.fd,CHECK_WA ) && t.feature ==FEATURE_FBC ),"FBC isn't supported on BMG\n" );for_each_pipe (&drm.display, pipe) {
Signature · 1 line
2.34.1
Patchwork
CI✓ Xe.CI.BAT: success for tests/intel/kms_frontbuffer_tracking: Refine FBC test conditions for BMG variants
== Series Details ==
== Series Details ==
Series: tests/intel/kms_frontbuffer_tracking: Refine FBC test conditions for BMG variants
URL : https://patchwork.freedesktop.org/series/148673/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_8355_BAT -> XEIGTPW_13088_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (9 -> 9)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in XEIGTPW_13088_BAT that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@xe_gt_freq@freq_fixed_idle:
- bat-adlp-vf: NOTRUN -> [SKIP][1] ([Intel XE#2464]) +2 other tests skip
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_13088/bat-adlp-vf/igt@xe_gt_freq@freq_fixed_idle.html
* igt@xe_mmap@vram:
- bat-adlp-vf: NOTRUN -> [SKIP][2] ([Intel XE#1008])
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_13088/bat-adlp-vf/igt@[email protected]
* igt@xe_pat@pat-index-xelp@render:
- bat-adlp-vf: NOTRUN -> [ABORT][3] ([Intel XE#3970]) +1 other test abort
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_13088/bat-adlp-vf/igt@xe_pat@[email protected]
* igt@xe_pm_residency@gt-c6-on-idle:
- bat-adlp-vf: NOTRUN -> [SKIP][4] ([Intel XE#2468])
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_13088/bat-adlp-vf/igt@[email protected]
* igt@xe_sriov_flr@flr-vf1-clear:
- bat-adlp-vf: NOTRUN -> [SKIP][5] ([Intel XE#3342])
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_13088/bat-adlp-vf/igt@[email protected]
#### Possible fixes ####
* igt@xe_exec_basic@twice-bindexecqueue-rebind:
- bat-adlp-vf: [ABORT][6] ([Intel XE#3970]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8355/bat-adlp-vf/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_13088/bat-adlp-vf/igt@[email protected]
[Intel XE#1008]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1008
[Intel XE#2464]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2464
[Intel XE#2468]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2468
[Intel XE#3342]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3342
[Intel XE#3970]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3970
Build changes
-------------
* IGT: IGT_8355 -> IGTPW_13088
IGTPW_13088: 13088
IGT_8355: 8355
xe-3044-b5600d5671f0e468c0c73bc7a1de942097ddaab4: b5600d5671f0e468c0c73bc7a1de942097ddaab4
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_13088/index.html
Patchwork
CI✗ i915.CI.BAT: failure for tests/intel/kms_frontbuffer_tracking: Refine FBC test conditions for BMG variants
In reply to Mohammed Thasleem== Series Details ==
== Series Details ==
Series: tests/intel/kms_frontbuffer_tracking: Refine FBC test conditions for BMG variants
URL : https://patchwork.freedesktop.org/series/148673/
State : failure
== Summary ==
CI Bug Log - changes from IGT_8355 -> IGTPW_13088
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_13088 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_13088, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/index.html
Participating hosts (44 -> 43)
------------------------------
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_13088:
### IGT changes ###
#### Possible regressions ####
* igt@kms_frontbuffer_tracking@basic:
- fi-cfl-8109u: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-cfl-8109u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-cfl-8109u/igt@[email protected]
- fi-ilk-650: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-ilk-650/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-ilk-650/igt@[email protected]
- fi-tgl-1115g4: [PASS][5] -> [FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-tgl-1115g4/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-tgl-1115g4/igt@[email protected]
- bat-adlp-6: [PASS][7] -> [FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-adlp-6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-adlp-6/igt@[email protected]
- fi-skl-6600u: [PASS][9] -> [FAIL][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-skl-6600u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-skl-6600u/igt@[email protected]
- bat-twl-2: [PASS][11] -> [FAIL][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-twl-2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-twl-2/igt@[email protected]
- bat-dg2-11: [PASS][13] -> [FAIL][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-dg2-11/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-dg2-11/igt@[email protected]
- fi-cfl-8700k: [PASS][15] -> [FAIL][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-cfl-8700k/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-cfl-8700k/igt@[email protected]
- bat-dg2-14: [PASS][17] -> [FAIL][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-dg2-14/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-dg2-14/igt@[email protected]
- fi-bsw-nick: [PASS][19] -> [FAIL][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-bsw-nick/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-bsw-nick/igt@[email protected]
- bat-mtlp-9: [PASS][21] -> [FAIL][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-mtlp-9/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-mtlp-9/igt@[email protected]
- bat-arls-6: [PASS][23] -> [FAIL][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-arls-6/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-arls-6/igt@[email protected]
- fi-hsw-4770: [PASS][25] -> [FAIL][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-hsw-4770/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-hsw-4770/igt@[email protected]
- fi-ivb-3770: [PASS][27] -> [FAIL][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-ivb-3770/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-ivb-3770/igt@[email protected]
- bat-mtlp-8: [PASS][29] -> [FAIL][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-mtlp-8/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-mtlp-8/igt@[email protected]
- fi-elk-e7500: [PASS][31] -> [FAIL][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-elk-e7500/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-elk-e7500/igt@[email protected]
- bat-dg2-8: [PASS][33] -> [FAIL][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-dg2-8/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-dg2-8/igt@[email protected]
- bat-adls-6: [PASS][35] -> [FAIL][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-adls-6/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-adls-6/igt@[email protected]
- fi-bsw-n3050: [PASS][37] -> [FAIL][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-bsw-n3050/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-bsw-n3050/igt@[email protected]
- bat-arlh-3: [PASS][39] -> [FAIL][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-arlh-3/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-arlh-3/igt@[email protected]
- bat-dg1-7: [PASS][41] -> [FAIL][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-dg1-7/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-dg1-7/igt@[email protected]
- fi-glk-j4005: [PASS][43] -> [FAIL][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-glk-j4005/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-glk-j4005/igt@[email protected]
- bat-adlp-9: [PASS][45] -> [FAIL][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-adlp-9/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-adlp-9/igt@[email protected]
- bat-rpls-4: [PASS][47] -> [FAIL][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-rpls-4/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-rpls-4/igt@[email protected]
- bat-twl-1: [PASS][49] -> [FAIL][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-twl-1/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-twl-1/igt@[email protected]
- bat-apl-1: [PASS][51] -> [FAIL][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-apl-1/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-apl-1/igt@[email protected]
- bat-arls-5: [PASS][53] -> [FAIL][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-arls-5/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-arls-5/igt@[email protected]
- bat-rplp-1: [PASS][55] -> [FAIL][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-rplp-1/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-rplp-1/igt@[email protected]
- fi-rkl-11600: [PASS][57] -> [FAIL][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-rkl-11600/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-rkl-11600/igt@[email protected]
- fi-cfl-guc: [PASS][59] -> [FAIL][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-cfl-guc/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-cfl-guc/igt@[email protected]
- bat-dg2-9: [PASS][61] -> [FAIL][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-dg2-9/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-dg2-9/igt@[email protected]
#### Warnings ####
* igt@kms_frontbuffer_tracking@basic:
- fi-kbl-7567u: [DMESG-WARN][63] ([i915#13735]) -> [DMESG-FAIL][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-kbl-7567u/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-kbl-7567u/igt@[email protected]
Known issues
------------
Here are the changes found in IGTPW_13088 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@late_gt_pm:
- fi-cfl-8109u: [PASS][65] -> [DMESG-WARN][66] ([i915#13735]) +32 other tests dmesg-warn
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html
* igt@i915_selftest@live@workarounds:
- bat-arls-6: [PASS][67] -> [DMESG-FAIL][68] ([i915#12061]) +1 other test dmesg-fail
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-arls-6/igt@i915_selftest@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-arls-6/igt@i915_selftest@[email protected]
* igt@kms_pipe_crc_basic@read-crc:
- fi-cfl-8109u: [PASS][69] -> [DMESG-WARN][70] ([i915#13890]) +48 other tests dmesg-warn
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-cfl-8109u/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-cfl-8109u/igt@[email protected]
* igt@kms_pm_rpm@basic-rte:
- bat-rpls-4: [PASS][71] -> [DMESG-WARN][72] ([i915#13400])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/bat-rpls-4/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/bat-rpls-4/igt@[email protected]
#### Possible fixes ####
* igt@dmabuf@all-tests@dma_fence_chain:
- fi-bsw-n3050: [INCOMPLETE][73] ([i915#12904]) -> [PASS][74] +1 other test pass
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8355/fi-bsw-n3050/igt@dmabuf@all-tests@dma_fence_chain.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/fi-bsw-n3050/igt@dmabuf@all-tests@dma_fence_chain.html
[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#12904]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12904
[i915#13400]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13400
[i915#13735]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13735
[i915#13890]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13890
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_8355 -> IGTPW_13088
CI-20190529: 20190529
CI_DRM_16509: b5600d5671f0e468c0c73bc7a1de942097ddaab4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_13088: 13088
IGT_8355: 8355
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13088/index.html
Hi Mohammed,
Quoted 23 lines · Mohammed Thasleem
This update stops skipping fbc-* tests based on the BMG platform. Instead, tests are excluded only for specific unsupported BMG variants.
Signed-off-by Mohammed Thasleem <[email protected]>--- lib/igt_kms.c | 30 ++++++++++++++++++++++++++ lib/igt_kms.h | 1 + tests/intel/kms_frontbuffer_tracking.c | 7 +++--- 3 files changed, 35 insertions(+), 3 deletions(-)lib/igt_kms.c +1
-0@@ -61,6 +61,7 @@#include "igt_device.h" #include "igt_sysfs.h" #include "sw_sync.h" +#include "xe/xe_query.h" #ifdef HAVE_CHAMELIUM #include "igt_chamelium.h" #endif
lib/igt_kms.c int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *c · line 7450
Quoted 8 lines
lib/igt_kms.c +5
-0@@ -7442,3 +7443,32 @@ int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *creturn 0 ; } + +/** +* igt_read_debugfs_wa: +* @drm_fd: A drm file descriptor +* @check_wa: Wa to be checked
Add here description when true will be returned, from implementation I see it will return true if WA is present in one of GTs.
lib/igt_kms.c int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *c · line 7452
Quoted 2 lines
lib/igt_kms.c +2
-0+*/ +bool igt_read_debugfs_wa (int drm_fd,const char *check_wa)
As name of this function suggest it should be placed in lib/igt_debugfs.h
Also, as this is intel specific, imho it's name should be
bool igt_has_intel_wa(int drm_fd, const char *check_wa)
lib/igt_kms.c int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *c · line 7458
Quoted 6 lines
lib/igt_kms.c +6
-0+{ +char buf[4096 ]; +bool found = false; +char name[PATH_MAX ]; +unsigned int xe, debugfs_fd; +
Add here check that drm_fd is for intel driver, i915 or xe.
lib/igt_kms.c int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *c · line 7463
Quoted 5 lines
lib/igt_kms.c +5
-0+ debugfs_fd =igt_debugfs_dir (drm_fd); + +xe_for_each_gt (drm_fd, xe) { +sprintf (name,"gt%d/workarounds" , xe); +igt_require (igt_debugfs_exists (drm_fd, name,O_RDONLY ));
Hmmm, please avoid igt_require, if you really need it add gt as param and just return false if no 'workarounds' file present.
Or add second function for all GTs checks, not one of them, but then why true when wa is present on one GT? Why not on all of them?
Regards,
Kamil
Quoted 64 lines
lib/igt_kms.c +11
-0+ +if (igt_debugfs_simple_read (debugfs_fd, name, buf,sizeof (buf)) >0 ) { +if (strstr (buf, check_wa)) { + found = true; +break ; + } + } + } + +return found; +}lib/igt_kms.h +1
-0@@ -1279,5 +1279,6 @@ void igt_set_link_params(int drm_fd, igt_output_t *output, char *link_rate, char *lane_count);int igt_backlight_read (int *result,const char *fname,igt_backlight_context_t *context);int igt_backlight_write (int value,const char *fname,igt_backlight_context_t *context); +bool igt_read_debugfs_wa (int drm_fd,const char *check_wa);#endif /* __IGT_KMS_H__ */ tests/intel/kms_frontbuffer_tracking.c +4
-3@@ -781,6 +781,7 @@*/ #define TIME SLOW_QUICK(1000, 10000) +#define CHECK_WA "16023588340"IGT_TEST_DESCRIPTION ("Test the Kernel's frontbuffer tracking mechanism and " "its related features: FBC, PSR and DRRS" );@@ -2610,7 +2611,7 @@ static void prepare_subtest_data(const struct test_mode *t,static void prepare_subtest_screens (const struct test_mode *t) {/* FBC disabled: Wa_16023588340 */ -igt_skip_on_f ((IS_BATTLEMAGE (drm.devid) && t->feature ==FEATURE_FBC ), +igt_skip_on_f ((igt_read_debugfs_wa (drm.fd,CHECK_WA ) && t->feature ==FEATURE_FBC ),"FBC isn't supported on BMG\n" );if (t->pipes ==PIPE_DUAL )@@ -2658,7 +2659,7 @@ static void prepare_subtest(const struct test_mode *t,static void rte_subtest (const struct test_mode *t) {/* FBC disabled: Wa_16023588340 */ -igt_skip_on_f ((IS_BATTLEMAGE (drm.devid) && t->feature ==FEATURE_FBC ), +igt_skip_on_f ((igt_read_debugfs_wa (drm.fd,CHECK_WA ) && t->feature ==FEATURE_FBC ),"FBC isn't supported on BMG\n" );prepare_subtest_data (t,NULL );@@ -4157,7 +4158,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL) t.tiling = opt.tiling;/* FBC disabled: Wa_16023588340 */ -igt_skip_on_f ((IS_BATTLEMAGE (drm.devid) && t.feature ==FEATURE_FBC ), +igt_skip_on_f ((igt_read_debugfs_wa (drm.fd,CHECK_WA ) && t.feature ==FEATURE_FBC ),"FBC isn't supported on BMG\n" );for_each_pipe (&drm.display, pipe) {Signature · 1 line
2.34.1
Hi
Some comments.
I would split this into two patches,
1. Enable the tests support variations based on the WAs
2. Add the FBC specific WA check
Quoted 27 lines · Mohammed Thasleem
This update stops skipping fbc-* tests based on the BMG platform. Instead, tests are excluded only for specific unsupported BMG variants.
Signed-off-by Mohammed Thasleem <[email protected]>---
lib/igt_kms.c | 30 ++++++++++++++++++++++++++ lib/igt_kms.h | 1 +tests/intel/kms_frontbuffer_tracking.c| 7 +++---3 files changed, 35 insertions(+), 3 deletions(-)lib/igt_kms.c +1
-0@@ -61,6 +61,7 @@ #include "igt_device.h" #include "igt_sysfs.h" #include "sw_sync.h" +#include "xe/xe_query.h" #ifdef HAVE_CHAMELIUM #include "igt_chamelium.h" #endif@@ -7442,3 +7443,32 @@ int igt_backlight_write(int value, const char *fname,
igt_backlight_context_t*c
return 0;
}
lib/igt_kms.c int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *c · line 7454
Quoted 9 lines
lib/igt_kms.c +9
-0+ +/** +* igt_read_debugfs_wa: +* @drm_fd: A drm file descriptor +* @check_wa: Wa to be checked +*/ +bool igt_read_debugfs_wa (int drm_fd,const char *check_wa) +{ +char buf[4096 ];
What if there are more WAs than it can fit into 4096 characters?
IMO, you might have to dump the whole wa sysfs file and then search for the wa. Ref: igt_sysfs_get()
lib/igt_kms.c int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *c · line 7467
Quoted 13 lines
lib/igt_kms.c +13
-0+bool found = false; +char name[PATH_MAX ]; +unsigned int xe, debugfs_fd; + + debugfs_fd =igt_debugfs_dir (drm_fd); + +xe_for_each_gt (drm_fd, xe) { +sprintf (name,"gt%d/workarounds" , xe); +igt_require (igt_debugfs_exists (drm_fd, name,O_RDONLY )); + +if (igt_debugfs_simple_read (debugfs_fd, name, buf,sizeof (buf)) >0 ) { +if (strstr (buf, check_wa)) { + found = true;
Also you may return directly from here if the wa is found and then you can avoid "found" and also this loop might look clean
Quoted 24 lines
lib/igt_kms.c +7
-0+break ; + } + } + } + +return found; +}lib/igt_kms.h +1
-0@@ -1279,5 +1279,6 @@ void igt_set_link_params(int drm_fd, igt_output_t *output, char *link_rate, char *lane_count); int igt_backlight_read(int *result, const char *fname, igt_backlight_context_t *context); int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *context); +bool igt_read_debugfs_wa (int drm_fd,const char *check_wa);
#endif /*__IGT_KMS_H__*/tests/intel/kms_frontbuffer_tracking.c +0
-0@@ -781,6 +781,7 @@*/
Quoted 3 lines
#define TIMESLOW_QUICK(1000, 10000)
+#defineCHECK_WA"16023588340"
May be a better name for this? WA_FBC_DISABLED or something like that?
Quoted 13 lines
IGT_TEST_DESCRIPTION("Test the Kernel's frontbuffer tracking mechanism and " "its related features: FBC, PSR and DRRS");tests/intel/kms_frontbuffer_tracking.c +1
-1@@ -2610,7 +2611,7 @@ static void prepare_subtest_data(const struct test_mode *t, static void prepare_subtest_screens(const struct test_mode *t) { /* FBC disabled: Wa_16023588340 */ -igt_skip_on_f ((IS_BATTLEMAGE (drm.devid) && t->feature ==FEATURE_FBC ), +igt_skip_on_f ((igt_read_debugfs_wa (drm.fd,CHECK_WA ) && t->feature ==FEATURE_FBC ), "FBC isn't supported on BMG\n");
if (t->pipes==PIPE_DUAL)
tests/intel/kms_frontbuffer_tracking.c static void prepare_subtest(const struct test_mode *t, · line 2663
Quoted 6 lines
tests/intel/kms_frontbuffer_tracking.c +1
-1@@ -2658,7 +2659,7 @@ static void prepare_subtest(const struct test_mode *t, static void rte_subtest(const struct test_mode *t) { /* FBC disabled: Wa_16023588340 */ -igt_skip_on_f ((IS_BATTLEMAGE (drm.devid) && t->feature ==FEATURE_FBC ), +igt_skip_on_f ((igt_read_debugfs_wa (drm.fd,CHECK_WA ) && t->feature ==FEATURE_FBC ), "FBC isn't supported on BMG\n");
May be align the description here to the WA?
Quoted 10 lines
prepare_subtest_data(t, NULL);tests/intel/kms_frontbuffer_tracking.c +0
-0@@ -4157,7 +4158,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL) t.tiling = opt.tiling;
/* FBC disabled:Wa_16023588340*/tests/intel/kms_frontbuffer_tracking.c +1
-1- igt_skip_on_f((IS_BATTLEMAGE(drm.devid) && t.feature == FEATURE_FBC), + igt_skip_on_f((igt_read_debugfs_wa(drm.fd, CHECK_WA) && t.feature ==
FEATURE_FBC),
"FBC isn't supported on BMG\n");
Same..
BR
Vinod
Quoted 2 lines
for_each_pipe(&drm.display, pipe){