tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabled
PATCH 1/6 tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabled
kms_fbcon_fbt was doing its own handling to wait for PSR to get enabled while it is already available in lib.
v2: splitted previous patch into this one and the previous one(Dhinakaran)
--- tests/kms_fbcon_fbt.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
tests/kms_fbcon_fbt.c +1 -10
@@ -182,18 +182,9 @@ static void psr_print_status(int debugfs_fd)igt_debug ("PSR status: %s\n" , buf); } -static bool psr_is_enabled (int debugfs_fd) -{ -char buf[PSR_STATUS_MAX_LEN ]; - -igt_debugfs_simple_read (debugfs_fd,"i915_edp_psr_status" , buf, -sizeof (buf)); -return strstr (buf,"\nHW Enabled & Active bit: yes\n" ); -} -static bool psr_wait_until_enabled (int debugfs_fd) { -bool r =igt_wait (psr_is_enabled (debugfs_fd),5000 ,1 ); +bool r =psr_wait_entry (debugfs_fd,PSR_MODE_1 );psr_print_status (debugfs_fd);return r;
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 2/6 tests/fbcon_fbt: Allow fbcon to bind when running this test
9c4114ec5d87 (lib: Always unbind the fbcon around igt) broke fbcon_fbt test as fbcon is not allowd to bind when executing any IGT test, so lets allow it again just for this test.
--- tests/kms_fbcon_fbt.c | 7 +++++++ 1 file changed, 7 insertions(+)
tests/kms_fbcon_fbt.c +7 -0
@@ -26,6 +26,7 @@#include "igt.h" #include "igt_psr.h" +#include "igt_sysfs.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>
@@ -279,6 +280,12 @@ static void setup_environment(void) drm_fd =drm_open_driver_master (DRIVER_INTEL );igt_require (drm_fd >=0 );igt_assert (close (drm_fd) ==0 ); + +/* +* igt_subtest_init_parse_opts() disable the fbcon bind, so to test it +* is necessary enable it again +*/ +bind_fbcon (true); }static void teardown_environment (void )
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 3/6 tests/fbcon_fbt: Add wait_until_update() callback to features
In reply to José Roberto de SouzaLets be more explicit and add and implement a callback to check if feature had a state update, that is what some points of the test want to test.
--- tests/kms_fbcon_fbt.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
tests/kms_fbcon_fbt.c +16 -3
@@ -130,6 +130,11 @@ static bool fbc_wait_until_enabled(int debugfs_fd)return r; } +static bool fbc_wait_until_update (int debugfs) +{ +return !fbc_wait_until_enabled (debugfs); +} +typedef bool (*connector_possible_fn )(drmModeConnectorPtr connector); static void set_mode_for_one_screen(struct drm_info *drm, struct igt_fb *fb,
@@ -196,6 +201,11 @@ static bool psr_supported_on_chipset(int debugfs_fd)return psr_sink_support (debugfs_fd,PSR_MODE_1 ); } +static bool psr_wait_until_update (int debugfs_fd) +{ +return !psr_wait_until_enabled (debugfs_fd); +} +static void disable_features (int debugfs_fd) {igt_set_module_param_int ("enable_fbc" ,0 );
@@ -215,16 +225,19 @@ static inline void psr_debugfs_enable(int debugfs_fd)struct feature {bool (*supported_on_chipset)(int debugfs_fd);bool (*wait_until_enabled)(int debugfs_fd); +bool (*wait_until_update)(int debugfs_fd);bool (*connector_possible_fn)(drmModeConnectorPtr connector);void (*enable)(int debugfs_fd); } fbc = { .supported_on_chipset = fbc_supported_on_chipset, .wait_until_enabled = fbc_wait_until_enabled, + .wait_until_update = fbc_wait_until_update, .connector_possible_fn = connector_can_fbc, .enable = fbc_modparam_enable, }, psr = { .supported_on_chipset = psr_supported_on_chipset, .wait_until_enabled = psr_wait_until_enabled, + .wait_until_update = psr_wait_until_update, .connector_possible_fn = connector_can_psr, .enable = psr_debugfs_enable, };
@@ -243,7 +256,7 @@ static void subtest(struct feature *feature, bool suspend)kmstest_unset_all_crtcs (drm.fd, drm.res);wait_user ("Modes unset." ); -igt_assert (!feature->wait_until_enabled (drm.debugfs_fd)); +igt_assert (feature->wait_until_update (drm.debugfs_fd));set_mode_for_one_screen (&drm, &fb, feature->connector_possible_fn);wait_user ("Screen set." );
@@ -263,13 +276,13 @@ static void subtest(struct feature *feature, bool suspend)sleep (3 );wait_user ("Back to fbcon." ); -igt_assert (!feature->wait_until_enabled (drm.debugfs_fd)); +igt_assert (feature->wait_until_update (drm.debugfs_fd));if (suspend) {igt_system_suspend_autoresume (SUSPEND_STATE_MEM ,SUSPEND_TEST_NONE );sleep (5 ); -igt_assert (!feature->wait_until_enabled (drm.debugfs_fd)); +igt_assert (feature->wait_until_update (drm.debugfs_fd)); } }
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 4/6 tests/fbcon_fbt: Use psr_wait_update() to test updates in PSR
In reply to José Roberto de SouzaIt will test was is intented and faster as in the first occurence of PSR exit it will return instead of wait the timeout of psr_wait_entry().
--- tests/kms_fbcon_fbt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_fbcon_fbt.c +1 -1
@@ -203,7 +203,7 @@ static bool psr_supported_on_chipset(int debugfs_fd)static bool psr_wait_until_update (int debugfs_fd) { -return !psr_wait_until_enabled (debugfs_fd); +return psr_wait_update (debugfs_fd,PSR_MODE_1 ); }static void disable_features (int debugfs_fd)
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 5/6 tests/fbcon_fbt: Add and use psr_long_wait_update() to test updates in PSR
In reply to José Roberto de SouzaAfter getting back to fbcon it tests if PSR had a update but since fbcon can take a while it have some big sleep in place, so what it is actualy testing is if fbcon is updating the screen.
In this test the update of the screen comes from the fbcon cursor blinking, the problem is that 40ms is a small interval to detect cursor blinking and the test can fail some times, so a bigger timeout to wait for a update is need.
--- lib/igt_psr.c | 5 +++++ lib/igt_psr.h | 1 + tests/kms_fbcon_fbt.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-)
lib/igt_psr.c +5 -0
@@ -54,6 +54,11 @@ bool psr_wait_update(int debugfs_fd, enum psr_mode mode)return igt_wait (!psr_active_check (debugfs_fd, mode),40 ,10 ); } +bool psr_long_wait_update (int debugfs_fd,enum psr_mode mode) +{ +return igt_wait (psr_active_check (debugfs_fd, mode),500 ,10 ); +} +static ssize_t psr_write (int debugfs_fd,const char *buf) { return igt_sysfs_write(debugfs_fd, "i915_edp_psr_debug", buf,
lib/igt_psr.h +1 -0
@@ -37,6 +37,7 @@ enum psr_mode {bool psr_wait_entry (int debugfs_fd,enum psr_mode mode);bool psr_wait_update (int debugfs_fd,enum psr_mode mode); +bool psr_long_wait_update (int debugfs_fd,enum psr_mode mode);bool psr_enable (int debugfs_fd,enum psr_mode );bool psr_disable (int debugfs_fd);bool psr_sink_support (int debugfs_fd,enum psr_mode );
tests/kms_fbcon_fbt.c +1 -1
@@ -203,7 +203,7 @@ static bool psr_supported_on_chipset(int debugfs_fd)static bool psr_wait_until_update (int debugfs_fd) { -return psr_wait_update (debugfs_fd,PSR_MODE_1 ); +return psr_long_wait_update (debugfs_fd,PSR_MODE_1 ); }static void disable_features (int debugfs_fd)
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 6/6 tests/fbcon_fbt: Enable cursor blinking
In reply to José Roberto de SouzaIf cursor blinking is disabled no screen updates will happen and fbcon_fbt subtests will fail, so lets enable cursor blink while running this test and restore to the previous value when exiting it.
--- lib/igt_sysfs.c | 46 +++++++++++++++++++++++++++++++++++++++++++ lib/igt_sysfs.h | 1 + tests/kms_fbcon_fbt.c | 1 + 3 files changed, 48 insertions(+)
lib/igt_sysfs.c +46 -0
@@ -629,3 +629,49 @@ void kick_snd_hda_intel(void) out:close (fd); } + +static int fbcon_blink_restore_debugfs_fd =-1 ; +static uint8_t fbcon_blink_restore_value; + +static void fbcon_blink_restore (int sig) +{ +char buffer[4 ]; +int r; + + r =snprintf (buffer,sizeof (buffer),"%u" , fbcon_blink_restore_value); +write (fbcon_blink_restore_debugfs_fd, buffer, r +1 ); +} + +/** +* fbcon_blink_enable: +* @enable: if true enables the fbcon cursor blinking otherwise disables it +* +* Enables or disables the cursor blinking in fbcon, it also restores the +* previous blinking state when exiting test. +* +*/ +void fbcon_blink_enable (bool enable) +{ +const char *cur_blink_path ="/sys/class/graphics/fbcon/cursor_blink" ; +char buffer[4 ]; +int fd, r; + + fd =open (cur_blink_path,O_RDWR ); +igt_assert (fd >=0 ); + +/* Restore original value on exit */ +if (fbcon_blink_restore_debugfs_fd ==-1 ) { + r =read (fd, buffer,sizeof (buffer)); +if (r >0 ) { + fbcon_blink_restore_value = (uint8_t )strtol (buffer, +NULL ,10 ); + fbcon_blink_restore_debugfs_fd =dup (fd); +igt_assert (fbcon_blink_restore_debugfs_fd >=0 ); +igt_install_exit_handler (fbcon_blink_restore); + } + } + + r =snprintf (buffer,sizeof (buffer), enable ?"1" :"0" ); +write (fd, buffer, r +1 ); +close (fd); +}
lib/igt_sysfs.h +1 -0
@@ -57,5 +57,6 @@ bool igt_sysfs_set_boolean(int dir, const char *attr, bool value);void bind_fbcon (bool enable);void kick_snd_hda_intel (void ); +void fbcon_blink_enable (bool enable);#endif /* __IGT_SYSFS_H__ */
tests/kms_fbcon_fbt.c +1 -0
@@ -299,6 +299,7 @@ static void setup_environment(void)* is necessary enable it again */ bind_fbcon (true); +fbcon_blink_enable (true); }static void teardown_environment (void )
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v1-rebased,1/6] tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabled
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,v1-rebased,1/6] tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabled
URL : https://patchwork.freedesktop.org/series/55880/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5498 -> IGTPW_2311
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/55880/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2311 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: PASS -> FAIL [fdo#103167]
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]
* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: PASS -> FAIL [fdo#103182] +1
#### Possible fixes ####
* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] -> PASS
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: FAIL [fdo#109485] -> PASS
* igt@kms_flip@basic-flip-vs-modeset:
- fi-skl-6700hq: DMESG-WARN [fdo#105998] -> PASS
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS
* igt@pm_rpm@basic-pci-d3-state:
- fi-byt-j1900: {SKIP} [fdo#109271] -> PASS
* igt@pm_rpm@basic-rte:
- fi-byt-j1900: FAIL [fdo#108800] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105998]: https://bugs.freedesktop.org/show_bug.cgi?id=105998
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
Participating hosts (44 -> 40)
------------------------------
Missing (4): fi-kbl-soraka fi-ilk-m540 fi-bsw-cyan fi-pnv-d510
Build changes
-------------
* IGT: IGT_4796 -> IGTPW_2311
CI_DRM_5498: bebd74b74f0c62ff61036fc2d349fc470502b565 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2311: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2311/
IGT_4796: d1bd9c6ad6f3482bbccf4aa6417dd449e9efbe39 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2311/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,v1-rebased,1/6] tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabled
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,v1-rebased,1/6] tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabled
URL : https://patchwork.freedesktop.org/series/55880/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5498_full -> IGTPW_2311_full
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with IGTPW_2311_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_2311_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/55880/revisions/1/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_2311_full:
### IGT changes ###
#### Warnings ####
* igt@kms_vblank@crtc-id:
- shard-snb: {SKIP} [fdo#109271] -> FAIL
Known issues
------------
Here are the changes found in IGTPW_2311_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@bcs0-dirty-create:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]
* igt@gem_mmap_gtt@forked-medium-copy-xy:
- shard-snb: PASS -> INCOMPLETE [fdo#105411] / [fdo#107469]
* igt@i915_suspend@debugfs-reader:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665] +1
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-apl: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-glk: PASS -> FAIL [fdo#108145]
- shard-kbl: PASS -> FAIL [fdo#107725] / [fdo#108145]
* igt@kms_cursor_crc@cursor-128x42-sliding:
- shard-apl: PASS -> FAIL [fdo#103232] +3
* igt@kms_cursor_crc@cursor-64x21-onscreen:
- shard-kbl: PASS -> FAIL [fdo#103232] +1
- shard-glk: PASS -> FAIL [fdo#103232] +3
* igt@kms_flip@2x-flip-vs-expired-vblank:
- shard-glk: PASS -> FAIL [fdo#105363]
* igt@kms_plane@plane-position-covered-pipe-c-planes:
- shard-apl: PASS -> FAIL [fdo#103166] +1
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-glk: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- shard-glk: PASS -> FAIL [fdo#103166] +3
* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: PASS -> FAIL [fdo#109016]
#### Possible fixes ####
* igt@kms_chv_cursor_fail@pipe-a-256x256-bottom-edge:
- shard-snb: {SKIP} [fdo#109271] / [fdo#109278] -> PASS
* igt@kms_color@pipe-a-legacy-gamma:
- shard-apl: FAIL [fdo#104782] / [fdo#108145] -> PASS +1
* igt@kms_color@pipe-c-legacy-gamma:
- shard-kbl: FAIL [fdo#104782] -> PASS
* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-apl: FAIL [fdo#103191] / [fdo#103232] -> PASS +1
* igt@kms_cursor_crc@cursor-64x64-dpms:
- shard-kbl: FAIL [fdo#103232] -> PASS +1
- shard-apl: FAIL [fdo#103232] -> PASS +2
* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-glk: FAIL [fdo#103232] -> PASS
- shard-kbl: FAIL [fdo#103191] / [fdo#103232] -> PASS
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS
* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-glk: FAIL [fdo#103166] -> PASS
- shard-apl: FAIL [fdo#103166] -> PASS +1
* igt@kms_setmode@basic:
- shard-apl: FAIL [fdo#99912] -> PASS
#### Warnings ####
* igt@i915_suspend@shrink:
- shard-kbl: INCOMPLETE [fdo#103665] / [fdo#106886] -> DMESG-WARN [fdo#109244]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#106886]: https://bugs.freedesktop.org/show_bug.cgi?id=106886
[fdo#107469]: https://bugs.freedesktop.org/show_bug.cgi?id=107469
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109244]: https://bugs.freedesktop.org/show_bug.cgi?id=109244
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (6 -> 5)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* IGT: IGT_4796 -> IGTPW_2311
* Piglit: piglit_4509 -> None
CI_DRM_5498: bebd74b74f0c62ff61036fc2d349fc470502b565 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2311: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2311/
IGT_4796: d1bd9c6ad6f3482bbccf4aa6417dd449e9efbe39 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2311/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev