tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabled
PATCH v3 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.21.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v3 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 allowed 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.21.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t v3 2/6] tests/fbcon_fbt: Allow fbcon to bind when running this test
Quoted 27 lines · José Roberto de Souza
9c4114ec5d87(lib: Always unbind the fbcon around igt) brokefbcon_fbttest as fbcon is not allowed to bind when executing any IGT test, so lets allow it again just for this test.Cc Paulo Zanoni <[email protected]>Cc Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Chris Wilson <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- tests/kms_fbcon_fbt.c | 7 +++++++ 1 file changed, 7 insertions(+)tests/kms_fbcon_fbt.c +1
-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>
tests/kms_fbcon_fbt.c static void setup_environment(void) · line 285
Quoted 6 lines
tests/kms_fbcon_fbt.c +3
-0@@ -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
nit: It is better to refer to the code that's actually called from this file - igt_main(). igt_subtest_init_parse_opts() in any case doesn't seem like a good choice as it does not call bind_fbcon() directly. It'd be great if you can fix this comment before merging.
tests/kms_fbcon_fbt.c static void setup_environment(void) · line 288
Quoted 3 lines
tests/kms_fbcon_fbt.c +3
-0+* is necessary enable it again +*/ +bind_fbcon (true);
bind_fbcon() fails silently if it cannot find/open the frame buffer device. We should have a skip somewhere since this test relies on bind_fbcon() succeeding. Perhaps, something to improve later.
tests/kms_fbcon_fbt.c static void setup_environment(void) · line 291
Quoted 3 lines
tests/kms_fbcon_fbt.c +0
-0}static void teardown_environment (void )
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v3 3/6 tests/fbcon_fbt: Add and user psr_long_wait_update()
In reply to José Roberto de SouzaWhen fbcon is enabled, PSR will be active between cursor blinks so what it should really use to test PSR is psr_wait_entry(), so a new feature callback was added.
But the fbcon cursor blinks at 5hz what give us 200ms between each screen update what make psr_wait_update() prone to fail the test because it timed out before a blink could happen, so here adding and using psr_long_wait_update() that have a longer timeout.
v3:
- 3 previous patches squashed in this one (Maarten)
- Back to !feature->wait_until_enabled() to test feature state when all CRTCS are disabled(Dhinakaran)
--- lib/igt_psr.c | 5 +++++ lib/igt_psr.h | 1 + tests/kms_fbcon_fbt.c | 17 +++++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-)
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 +15 -2
@@ -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_long_wait_update (debugfs_fd,PSR_MODE_1 ); +} +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, };
@@ -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.21.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t v3 3/6] tests/fbcon_fbt: Add and user psr_long_wait_update()
Quoted 3 lines · José Roberto de Souza
When fbcon is enabled, PSR will be active between cursor blinks so what it should really use to test PSR is
psr_wait_entry(), so a new feature callback was added.
We could add a PSR only blinking subtest that verifies both entry and exit happen as the next step.
Quoted 4 lines
But the fbcon cursor blinks at 5hz what give us 200ms between each screen update what make
psr_wait_update()prone to fail the test because it timed out before a blink could happen, so here adding and usingpsr_long_wait_update()that have a longer timeout.
Patch 4 that sets up the test conditions should come before this patch that validates the kernel's response.
Also, is there a way to read the blink rate?
Quoted 21 lines
v3:
- 3 previous patches squashed in this one (Maarten)
- Back to !feature->wait_until_enabled() to test feature state when all CRTCS are disabled(Dhinakaran)Cc Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Maarten Lankhorst <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- lib/igt_psr.c | 5 +++++ lib/igt_psr.h | 1 + tests/kms_fbcon_fbt.c | 17 +++++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-)lib/igt_psr.c +0
-0
lib/igt_psr.c bool psr_wait_update(int debugfs_fd, enum psr_mode mode) · line 59
Quoted 6 lines
lib/igt_psr.c +3
-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 );
nit: We could reduce the debugfs read frequency as the timeout is also larger, haven't really given enough though into what's a sensible upper limit. But, something like 50 should be okay.
Quoted 22 lines
lib/igt_psr.c +2
-0+} +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 +0
-0
tests/kms_fbcon_fbt.c static bool fbc_wait_until_enabled(int debugfs_fd) · line 134
Quoted 5 lines
tests/kms_fbcon_fbt.c +2
-0@@ -130,6 +130,11 @@ static bool fbc_wait_until_enabled(int debugfs_fd)return r; } +static bool fbc_wait_until_update (int debugfs) +{
This warrants an explanation as to why fbc_wait_until_update == !fbc_wait_until_enabled.
My understanding is that we do not expect fbc to become active at all with fbcon. Can you confirm that?
With an explanation included and patches re-ordered,
Quoted 45 lines
tests/kms_fbcon_fbt.c +11
-1+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_long_wait_update (debugfs_fd,PSR_MODE_1 ); +} +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, };@@ -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));
tests/kms_fbcon_fbt.c static void subtest(struct feature *feature, bool · line 288
Quoted 10 lines
tests/kms_fbcon_fbt.c +2
-1+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)); } }
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t v3 3/6] tests/fbcon_fbt: Add and user psr_long_wait_update()
Quoted 14 lines · Dhinakaran Pandiyan
Quoted 3 lines · José Roberto de Souza
When fbcon is enabled, PSR will be active between cursor blinks so what it should really use to test PSR is
psr_wait_entry(), so a new feature callback was added.We could add a PSR only blinking subtest that verifies both entry and exit
happen as the next step.Quoted 5 lines
But the fbcon cursor blinks at 5hz what give us 200ms between each screen update what make
psr_wait_update()prone to fail the test because it timed out before a blink could happen, so here adding and
usingpsr_long_wait_update()that have a longer timeout.
Quoted 3 lines
Patch 4 that sets up the test conditions should come before this patch that
validates the kernel's response.
Okay reordering.
Quoted 2 lines
Also, is there a way to read the blink rate?
There is no way, I found a old patch adding it but it was not merged.
Quoted 60 lines
Quoted 21 lines
v3:
- 3 previous patches squashed in this one (Maarten)
- Back to !feature->wait_until_enabled() to test feature state when all CRTCS are disabled(Dhinakaran)Cc Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Maarten Lankhorst <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- lib/igt_psr.c | 5 +++++ lib/igt_psr.h | 1 + tests/kms_fbcon_fbt.c | 17 +++++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-)lib/igt_psr.c +0
-0lib/igt_psr.c bool psr_wait_update(int debugfs_fd, enum · line 60
Quoted 7 lines
lib/igt_psr.c +3
-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 );nit: We could reduce the debugfs read frequency as the timeout is also larger,
haven't really given enough though into what's a sensible upper limit. But,
something like 50 should be okay.Quoted 26 lines
lib/igt_psr.c +2
-0+} +static ssize_t psr_write (int debugfs_fd,const char *buf) {lib/igt_psr.c +0
-0return 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 +0
-0@@ -130,6 +130,11 @@ static bool fbc_wait_until_enabled(int debugfs_fd)return r; }
Quoted 5 lines
tests/kms_fbcon_fbt.c static bool fbc_wait_until_enabled(int debugfs_fd) · line 134
Quoted 2 lines
tests/kms_fbcon_fbt.c +2
-0+static bool fbc_wait_until_update (int debugfs) +{This warrants an explanation as to why
fbc_wait_until_update== !fbc_wait_until_enabled.
This was just moved from what it was doing before.
Quoted 3 lines
My understanding is that we do not expect fbc to become active at all with
fbcon. Can you confirm that?
It is not expected because fbcon do not uses a tiled framebuffer so a fence can not be setup on the framebuffer and FBC code requires a fence to accurate track frontbuffer modifications(what maybe is not necessary anymore as we now have intel_fbc_invalidate()/flush()).
If one day fbcon starts to use a tiled framebuffer we would need to check the 'Compressing' status as in each blink it would disable the compressing but FBC would still be enabled.
Adding it.
Quoted 61 lines
With an explanation included and patches re-ordered,
Reviewed-by Dhinkaran Pandiyan <[email protected]>Quoted 56 lines
tests/kms_fbcon_fbt.c +3
-0+return !fbc_wait_until_enabled (debugfs); +} +typedef bool (*connector_possible_fn )(drmModeConnectorPtr connector);static void set_mode_for_one_screen(struct
drm_info*drm, structigt_fb*fb,tests/kms_fbcon_fbt.c +5
-0@@ -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_long_wait_update (debugfs_fd,PSR_MODE_1 ); +} +static void disable_features (int debugfs_fd) {tests/kms_fbcon_fbt.c +3
-0igt_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,};
tests/kms_fbcon_fbt.c +0
-0@@ -263,13 +276,13 @@ static void subtest(struct feature *feature,bool
suspend)tests/kms_fbcon_fbt.c +1
-2sleep (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-
Quoted 5 lines
tests/kms_fbcon_fbt.c static void subtest(struct feature *feature, bool suspend) · line 287
Quoted 5 lines
Quoted 1 line
wait_until_enabled(drm.debugfs_fd));tests/kms_fbcon_fbt.c +1
-0+igt_assert (feature->wait_until_update (drm.debugfs_fd)); } }
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v3 4/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
@@ -610,3 +610,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.21.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t v3 4/6] tests/fbcon_fbt: Enable cursor blinking
Quoted 3 lines · José Roberto de Souza
If cursor blinking is disabled no screen updates will happen and
fbcon_fbtsubtests will fail, so lets enable cursor blink while running this test and restore to the previous value when exiting it.
I'd also prefer the test doing a cursor update instead, but don't want to block this change as it is an improvement.
Quoted 18 lines
Cc Paulo Zanoni <[email protected]>Cc Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Chris Wilson <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- 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 +0
-0
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 614
Quoted 5 lines
lib/igt_sysfs.c +2
-0@@ -610,3 +610,49 @@ void kick_snd_hda_intel(void) out:close (fd); } + +static int fbcon_blink_restore_debugfs_fd =-1 ;
fbcon_cursor_blink_fd? A bit shorter and matches the file name.
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 623
Quoted 9 lines
lib/igt_sysfs.c +9
-0+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 );
Add an assert here too.
Missing
close(fbcon_blink_restore_debugfs_fd);
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 634
Quoted 11 lines
lib/igt_sysfs.c +11
-0+} + +/** +* 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)
Having the enable parameter is neat, we can add subtest disabling cursor and check if PSR remains active.
What'd be really cool though is to verify the blink rate against PSR exit rate.
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 641
Quoted 7 lines
lib/igt_sysfs.c +7
-0+{ +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 );
igt_require()
This is a test requirement than a failure of the test itself.
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 648
Quoted 7 lines
lib/igt_sysfs.c +7
-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 );
What is the point of this conversion if we are going to blindly write it back? Make buffer static instead.
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 656
Quoted 8 lines
lib/igt_sysfs.c +8
-0+ 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 );
Assert the return here?
Quoted 19 lines
lib/igt_sysfs.c +2
-0+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 +0
-0
tests/kms_fbcon_fbt.c static void setup_environment(void) · line 305
Quoted 7 lines
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 )
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t v3 4/6] tests/fbcon_fbt: Enable cursor blinking
Quoted 22 lines · Dhinakaran Pandiyan
Quoted 4 lines · José Roberto de Souza
If cursor blinking is disabled no screen updates will happen and
fbcon_fbtsubtests will fail, so lets enable cursor blink while running this test and restore to the previous value when exiting it.I'd also prefer the test doing a cursor update instead, but don't want to block
this change as it is an improvement.Quoted 13 lines
Cc Paulo Zanoni <[email protected]>Cc Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Chris Wilson <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- lib/igt_sysfs.c | 46 +++++++++++++++++++++++++++++++++++++++++++ lib/igt_sysfs.h | 1 + tests/kms_fbcon_fbt.c | 1 + 3 files changed, 48 insertions(+)
Quoted 11 lines
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 614
Quoted 10 lines
lib/igt_sysfs.c +2
-0@@ -610,3 +610,49 @@ void kick_snd_hda_intel(void) out:close (fd); } + +static int fbcon_blink_restore_debugfs_fd =-1 ;
fbcon_cursor_blink_fd? A bit shorter and matches the file name.
Okay
Quoted 12 lines
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 623
Quoted 11 lines
lib/igt_sysfs.c +8
-0+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);lib/igt_sysfs.c +1
-0+write (fbcon_blink_restore_debugfs_fd, buffer, r +1 );Add an assert here too.
Assert during test exit?
Quoted 3 lines
Missing
close(fbcon_blink_restore_debugfs_fd);
Done
Quoted 21 lines
Quoted 6 lines
lib/igt_sysfs.c +5
-0+} + +/** +* fbcon_blink_enable: +* @enable: if true enables the fbcon cursor blinking otherwise Quoted 8 lines
disables it
+ *
+ * Enables or disables the cursor blinking in fbcon, it also restores the
+ * previous blinking state when exiting test.
+ *
+ */
+voidfbcon_blink_enable(bool enable)Having the enable parameter is neat, we can add subtest disabling cursor and
check if PSR remains active.What'd be really cool though is to verify the blink rate against PSR exit rate.
Quoted 10 lines
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 641
Quoted 8 lines
lib/igt_sysfs.c +2
-0+{ + const char *cur_blink_path ="
/sys/class/graphics/fbcon/cursor_blink";lib/igt_sysfs.c +5
-0+char buffer[4 ]; +int fd, r; + + fd =open (cur_blink_path,O_RDWR ); +igt_assert (fd >=0 );
igt_require()
This is a test requirement than a failure of the test itself.
Done
Quoted 14 lines
Quoted 11 lines
lib/igt_sysfs.c +6
-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,
lib/igt_sysfs.c +1
-0+NUL L, 10);
What is the point of this conversion if we are going to blindly write it back?
Make buffer static instead.
saving one byte?!
but okay changing fbcon_blink_restore_value to char[2]
Quoted 11 lines
lib/igt_sysfs.c void kick_snd_hda_intel(void) · line 656
Quoted 10 lines
lib/igt_sysfs.c +2
-0+ fbcon_blink_restore_debugfs_fd =dup (fd); + igt_assert(fbcon_blink_restore_debugfs_fd >=0);
lib/igt_sysfs.c +6
-0+igt_install_exit_handler (fbcon_blink_restore); + } + } + + r =snprintf (buffer,sizeof (buffer), enable ?"1" :"0" ); +write (fd, buffer, r +1 );Assert the return here?
Done
Quoted 27 lines
Quoted 27 lines
lib/igt_sysfs.c +2
-0+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); }
Quoted 1 line
tests/kms_fbcon_fbt.c static void setup_environment(void) · line 305
Quoted 1 line
tests/kms_fbcon_fbt.c +0
-0static void teardown_environment (void )
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v3 5/6 tests/fbcon_fbt: Do not try to open the same driver twice as master
In reply to José Roberto de SouzaIf a subtest fail before the teardown_drm() call it will keep the driver open as master causing the test to fail when trying to open the driver again as master, so lets share the drm_info struct and check if driver is already open.
Starting subtest: psr
(kms_fbcon_fbt:5270) CRITICAL: Test assertion failure function subtest, file ../tests/kms_fbcon_fbt.c:259:
(kms_fbcon_fbt:5270) CRITICAL: Failed assertion: feature->wait_until_update(drm.debugfs_fd) Stack trace:
#0 ../lib/igt_core.c:1474 __igt_fail_assert()
#1 ../tests/kms_fbcon_fbt.c:261 subtest()
#2 ../tests/kms_fbcon_fbt.c:316 __real_main309()
#3 ../tests/kms_fbcon_fbt.c:309 main()
#4 ../csu/libc-start.c:325 __libc_start_main()
#5 [_start+0x29]
#6 [<unknown>+0x0]
Subtest psr failed.
**** DEBUG ****
(kms_fbcon_fbt:5270) drmtest-DEBUG: Test requirement passed: !(fd<0)
(kms_fbcon_fbt:5270) igt_debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/1' (kms_fbcon_fbt:5270) DEBUG: Test requirement passed: drm->res
(kms_fbcon_fbt:5270) igt_kms-DEBUG: VT: graphics mode set (mode was 0x0) (kms_fbcon_fbt:5270) DEBUG: Test requirement passed: feature->supported_on_chipset(drm.debugfs_fd) (kms_fbcon_fbt:5270) CRITICAL: Test assertion failure function subtest, file ../tests/kms_fbcon_fbt.c:259:
(kms_fbcon_fbt:5270) CRITICAL: Failed assertion: feature->wait_until_update(drm.debugfs_fd) (kms_fbcon_fbt:5270) igt_core-INFO: Stack trace:
(kms_fbcon_fbt:5270) igt_core-INFO: #0 ../lib/igt_core.c:1474 __igt_fail_assert() (kms_fbcon_fbt:5270) igt_core-INFO: #1 ../tests/kms_fbcon_fbt.c:261 subtest() (kms_fbcon_fbt:5270) igt_core-INFO: #2 ../tests/kms_fbcon_fbt.c:316 __real_main309() (kms_fbcon_fbt:5270) igt_core-INFO: #3 ../tests/kms_fbcon_fbt.c:309 main() (kms_fbcon_fbt:5270) igt_core-INFO: #4 ../csu/libc-start.c:325 __libc_start_main() (kms_fbcon_fbt:5270) igt_core-INFO: #5 [_start+0x29] (kms_fbcon_fbt:5270) igt_core-INFO: #6 [<unknown>+0x0]
**** END ****
Subtest psr: FAIL (0.845s)
Starting subtest: fbc-suspend
Test requirement not met in function igt_device_set_master, file ../lib/igt_device.c:55:
Test requirement: __igt_device_set_master(fd) == 0
Can't become DRM master, please check if no other DRM client is running. Subtest fbc-suspend: SKIP (0.001s)
Starting subtest: psr-suspend
Test requirement not met in function igt_device_set_master, file ../lib/igt_device.c:55:
Test requirement: __igt_device_set_master(fd) == 0
Can't become DRM master, please check if no other DRM client is running. Subtest psr-suspend: SKIP (0.000s)
--- tests/kms_fbcon_fbt.c | 53 ++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 23 deletions(-)
tests/kms_fbcon_fbt.c +30 -23
@@ -60,6 +60,9 @@ static void setup_drm(struct drm_info *drm) {int i; +if (drm->fd >=0 ) +return ; + drm->fd =drm_open_driver_master (DRIVER_INTEL ); drm->debugfs_fd =igt_debugfs_dir (drm->fd);
@@ -85,6 +88,7 @@ static void teardown_drm(struct drm_info *drm)drmModeFreeResources (drm->res);igt_assert (close (drm->fd) ==0 ); + drm->fd =-1 ; }static bool fbc_supported_on_chipset (int debugfs_fd)
@@ -242,51 +246,50 @@ struct feature { .enable = psr_debugfs_enable, }; -static void subtest (struct feature *feature,bool suspend) +static void subtest (struct drm_info *drm,struct feature *feature,bool suspend) { -struct drm_info drm;struct igt_fb fb; -setup_drm (&drm); +setup_drm (drm); -igt_require (feature->supported_on_chipset (drm.debugfs_fd)); +igt_require (feature->supported_on_chipset (drm->debugfs_fd)); -disable_features (drm.debugfs_fd); - feature->enable (drm.debugfs_fd); +disable_features (drm->debugfs_fd); + feature->enable (drm->debugfs_fd); -kmstest_unset_all_crtcs (drm.fd, drm.res); +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_enabled (drm->debugfs_fd)); -set_mode_for_one_screen (&drm, &fb, feature->connector_possible_fn); +set_mode_for_one_screen (drm, &fb, feature->connector_possible_fn);wait_user ("Screen set." ); -igt_assert (feature->wait_until_enabled (drm.debugfs_fd)); +igt_assert (feature->wait_until_enabled (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_enabled (drm->debugfs_fd)); } -igt_remove_fb (drm.fd, &fb); -teardown_drm (&drm); +igt_remove_fb (drm->fd, &fb); +teardown_drm (drm);/* Wait for fbcon to restore itself. */ sleep (3 );wait_user ("Back to fbcon." ); -igt_assert (feature->wait_until_update (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_update (drm.debugfs_fd)); +igt_assert (feature->wait_until_update (drm->debugfs_fd)); } } -static void setup_environment (void ) +static void setup_environment (struct drm_info *drm) {int drm_fd;
@@ -302,24 +305,28 @@ static void setup_environment(void)fbcon_blink_enable (true); } -static void teardown_environment (void ) +static void teardown_environment (struct drm_info *drm) { +if (drm->fd >=0 ) +teardown_drm (drm); } igt_main { +struct drm_info drm = { .fd =-1 }; +igt_fixture -setup_environment (); + setup_environment(&drm); igt_subtest("fbc") -subtest (&fbc, false); +subtest (&drm, &fbc, false); igt_subtest("psr") -subtest (&psr, false); +subtest (&drm, &psr, false); igt_subtest("fbc-suspend") -subtest (&fbc, true); +subtest (&drm, &fbc, true); igt_subtest("psr-suspend") -subtest (&psr, true); +subtest (&drm, &psr, true);igt_fixture -teardown_environment (); + teardown_environment(&drm); }
Signature · 6 lines
2.21.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t v3 5/6] tests/fbcon_fbt: Do not try to open the same driver twice as master
Quoted 63 lines · José Roberto de Souza
If a subtest fail before the
teardown_drm()call it will keep the driver open as master causing the test to fail when trying to open the driver again as master, so lets share thedrm_infostruct and check if driver is already open.Starting subtest: psr
(kms_fbcon_fbt:5270) CRITICAL: Test assertion failure function subtest, file../tests/kms_fbcon_fbt.c:259:
(kms_fbcon_fbt:5270) CRITICAL: Failed assertion: feature-Quoted 1 line
wait_until_update(drm.debugfs_fd)Stack trace:
#0../lib/igt_core.c:1474__igt_fail_assert()
#1../tests/kms_fbcon_fbt.c:261subtest()
#2../tests/kms_fbcon_fbt.c:316__real_main309()
#3../tests/kms_fbcon_fbt.c:309main()
#4../csu/libc-start.c:325__libc_start_main()
#5 [_start+0x29]
#6 [<unknown>+0x0]
Subtest psr failed.
**** DEBUG ****
(kms_fbcon_fbt:5270) drmtest-DEBUG: Test requirement passed: !(fd<0) (kms_fbcon_fbt:5270) igt_debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/1'
(kms_fbcon_fbt:5270) DEBUG: Test requirement passed:drm->res(kms_fbcon_fbt:5270) igt_kms-DEBUG: VT: graphics mode set (mode was0x0) (kms_fbcon_fbt:5270) DEBUG: Test requirement passed: feature-Quoted 1 line
supported_on_chipset(drm.debugfs_fd)(kms_fbcon_fbt:5270) CRITICAL: Test assertion failure function subtest, file
../tests/kms_fbcon_fbt.c:259:
(kms_fbcon_fbt:5270) CRITICAL: Failed assertion: feature-Quoted 1 line
wait_until_update(drm.debugfs_fd)(kms_fbcon_fbt:5270) igt_core-INFO: Stack trace:
(kms_fbcon_fbt:5270) igt_core-INFO: #0../lib/igt_core.c:1474__igt_fail_assert()
(kms_fbcon_fbt:5270) igt_core-INFO: #1../tests/kms_fbcon_fbt.c:261subtest()
(kms_fbcon_fbt:5270) igt_core-INFO: #2../tests/kms_fbcon_fbt.c:316__real_main309()
(kms_fbcon_fbt:5270) igt_core-INFO: #3../tests/kms_fbcon_fbt.c:309main()
(kms_fbcon_fbt:5270) igt_core-INFO: #4../csu/libc-start.c:325__libc_start_main()
(kms_fbcon_fbt:5270) igt_core-INFO: #5 [_start+0x29]
(kms_fbcon_fbt:5270) igt_core-INFO: #6 [<unknown>+0x0]
**** END ****
Subtest psr: FAIL (0.845s)
Starting subtest: fbc-suspend
Test requirement not met in functionigt_device_set_master, file../lib/igt_device.c:55:
Test requirement:__igt_device_set_master(fd)== 0
Can't become DRM master, please check if no other DRM client is running. Subtest fbc-suspend: SKIP (0.001s)
Starting subtest: psr-suspend
Test requirement not met in functionigt_device_set_master, file../lib/igt_device.c:55:
Test requirement:__igt_device_set_master(fd)== 0
Can't become DRM master, please check if no other DRM client is running. Subtest psr-suspend: SKIP (0.000s)Reviewed-by Maarten Lankhorst <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>---
tests/kms_fbcon_fbt.c struct feature { · line 294
Quoted 4 lines
tests/kms_fbcon_fbt.c +1
-1-static void setup_environment (void ) +static void setup_environment (struct drm_info *drm) {int drm_fd;
drm is unused.
Quoted 27 lines
tests/kms_fbcon_fbt.c +8
-4@@ -302,24 +305,28 @@ static void setup_environment(void)fbcon_blink_enable (true); } -static void teardown_environment (void ) +static void teardown_environment (struct drm_info *drm) { +if (drm->fd >=0 ) +teardown_drm (drm); } igt_main { +struct drm_info drm = { .fd =-1 }; +igt_fixture -setup_environment (); + setup_environment(&drm); igt_subtest("fbc") -subtest (&fbc, false); +subtest (&drm, &fbc, false); igt_subtest("psr") -subtest (&psr, false); +subtest (&drm, &psr, false);igt_subtest ("fbc-suspend" )
tests/kms_fbcon_fbt.c static void setup_environment(void) · line 332
Quoted 10 lines
tests/kms_fbcon_fbt.c +3
-3-subtest (&fbc, true); +subtest (&drm, &fbc, true); igt_subtest("psr-suspend") -subtest (&psr, true); +subtest (&drm, &psr, true);igt_fixture -teardown_environment (); + teardown_environment(&drm); }
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v3 6/6 tests/fbcon_fbt: Do not keep opening debugfs_fd at every setup_drm() call
In reply to José Roberto de SouzaAs debugfs_fd is used even after the teardown_drm(), it is not closed in this function or in any other place. And then it gets worse as every call to setup_drm() will open another file descriptor to debugfs dir.
So lets move the opening of debugfs_fd to setup_environment() and only open it once and close it before leave the test.
--- tests/kms_fbcon_fbt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/kms_fbcon_fbt.c +3 -1
@@ -64,7 +64,6 @@ static void setup_drm(struct drm_info *drm)return ; drm->fd =drm_open_driver_master (DRIVER_INTEL ); - drm->debugfs_fd =igt_debugfs_dir (drm->fd); drm->res =drmModeGetResources (drm->fd);igt_require (drm->res);
@@ -295,6 +294,7 @@ static void setup_environment(struct drm_info *drm) drm_fd =drm_open_driver_master (DRIVER_INTEL );igt_require (drm_fd >=0 ); + drm->debugfs_fd =igt_debugfs_dir (drm_fd);igt_assert (close (drm_fd) ==0 );/*
@@ -309,6 +309,8 @@ static void teardown_environment(struct drm_info *drm) {if (drm->fd >=0 )teardown_drm (drm); + +close (drm->debugfs_fd); } igt_main
Signature · 6 lines
2.21.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t v3 6/6] tests/fbcon_fbt: Do not keep opening debugfs_fd at every setup_drm() call
tests/kms_fbcon_fbt.c static void setup_environment(struct drm_info *drm)
Quoted 27 lines · José Roberto de Souza
As
debugfs_fdis used even after theteardown_drm(), it is not closed in this function or in any other place. And then it gets worse as every call tosetup_drm()will open another file descriptor to debugfs dir.So lets move the opening of
debugfs_fdtosetup_environment()and only open it once and close it before leave the test.Reviewed-by Maarten Lankhorst <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- tests/kms_fbcon_fbt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/kms_fbcon_fbt.c +0
-1@@ -64,7 +64,6 @@ static void setup_drm(struct drm_info *drm)return ; drm->fd =drm_open_driver_master (DRIVER_INTEL ); - drm->debugfs_fd =igt_debugfs_dir (drm->fd); drm->res =drmModeGetResources (drm->fd);igt_require (drm->res);@@ -295,6 +294,7 @@ static void setup_environment(struct drm_info *drm)
Looks like the hunk from the previous patch should have been here.
tests/kms_fbcon_fbt.c static void setup_environment(struct drm_info *drm)
Quoted 4 lines
tests/kms_fbcon_fbt.c +1
-0drm_fd =drm_open_driver_master (DRIVER_INTEL );igt_require (drm_fd >=0 ); + drm->debugfs_fd =igt_debugftos_dir (drm_fd);
With an igt_require( >= 0) and hunk moved
tests/kms_fbcon_fbt.c static void teardown_environment(struct drm_info *drm) · line 316
Quoted 12 lines
tests/kms_fbcon_fbt.c +2
-0igt_assert (close (drm_fd) ==0 );/* @@ -309,6 +309,8 @@ static void teardown_environment(struct drm_info *drm) {if (drm->fd >=0 )teardown_drm (drm); + +close (drm->debugfs_fd); } igt_main
_______________________________________________
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,v3,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,v3,1/6] tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabled
URL : https://patchwork.freedesktop.org/series/59305/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5904 -> IGTPW_2839
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/59305/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2839 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: PASS -> DMESG-WARN [fdo#108965]
* igt@amdgpu/amd_cs_nop@fork-compute0:
- fi-icl-y: NOTRUN -> SKIP [fdo#109315] +17
* igt@gem_exec_basic@basic-bsd2:
- fi-icl-y: NOTRUN -> SKIP [fdo#109276] +7
* igt@gem_exec_parse@basic-rejected:
- fi-icl-y: NOTRUN -> SKIP [fdo#109289] +1
* igt@i915_selftest@live_contexts:
- fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ]
- fi-icl-y: NOTRUN -> DMESG-FAIL [fdo#108569]
* igt@i915_selftest@live_hangcheck:
- fi-skl-iommu: PASS -> INCOMPLETE [fdo#108602] / [fdo#108744]
* igt@kms_addfb_basic@addfb25-y-tiled-small:
- fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] +56
* igt@kms_busy@basic-flip-c:
- fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_chamelium@dp-crc-fast:
- fi-icl-y: NOTRUN -> SKIP [fdo#109284] +8
* igt@kms_force_connector_basic@force-edid:
- fi-glk-dsi: NOTRUN -> SKIP [fdo#109271] +26
* igt@kms_force_connector_basic@force-load-detect:
- fi-icl-y: NOTRUN -> SKIP [fdo#109285] +3
* igt@kms_frontbuffer_tracking@basic:
- fi-glk-dsi: NOTRUN -> FAIL [fdo#103167]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]
* igt@kms_psr@primary_mmap_gtt:
- fi-skl-guc: NOTRUN -> SKIP [fdo#109271] +49
- fi-icl-y: NOTRUN -> SKIP [fdo#110189] +3
* igt@kms_psr@primary_page_flip:
- fi-apl-guc: NOTRUN -> SKIP [fdo#109271] +50
* igt@prime_vgem@basic-fence-flip:
- fi-icl-y: NOTRUN -> SKIP [fdo#109294]
* igt@runner@aborted:
- fi-skl-iommu: NOTRUN -> FAIL [fdo#104108] / [fdo#108602]
#### Possible fixes ####
* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: DMESG-FAIL [fdo#110235 ] -> PASS
* igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- fi-glk-dsi: INCOMPLETE [fdo#103359] / [k.org#198133] -> PASS
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
- fi-byt-clapper: FAIL [fdo#103191] -> PASS
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
[fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109294]: https://bugs.freedesktop.org/show_bug.cgi?id=109294
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (45 -> 39)
------------------------------
Additional (4): fi-icl-y fi-skl-guc fi-byt-n2820 fi-apl-guc
Missing (10): fi-ilk-m540 fi-bsw-n3050 fi-byt-j1900 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-ctg-p8600 fi-bsw-kefka fi-bdw-samus
Build changes
-------------
* IGT: IGT_4942 -> IGTPW_2839
CI_DRM_5904: f0ba5aa7a6ab956f01dbaf1b16720da3ca859230 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2839: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2839/
IGT_4942: ff8929d4d5b57b544e699fa428930f0fd66dd2dc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2839/
_______________________________________________
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,v3,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,v3,1/6] tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabled
URL : https://patchwork.freedesktop.org/series/59305/
State : success
== Summary ==
CI Bug Log - changes from IGT_4942_full -> IGTPW_2839_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/59305/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2839_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@bcs0-s3:
- shard-apl: NOTRUN -> DMESG-WARN [fdo#108566] +1
* igt@gem_exec_params@no-blt:
- shard-iclb: NOTRUN -> SKIP [fdo#109283]
* igt@gem_stolen@stolen-pwrite:
- shard-iclb: NOTRUN -> SKIP [fdo#109277]
* igt@gen3_render_tiledx_blits:
- shard-iclb: NOTRUN -> SKIP [fdo#109289] +2
* igt@i915_pm_lpsp@edp-panel-fitter:
- shard-iclb: NOTRUN -> SKIP [fdo#109301]
* igt@i915_pm_rps@waitboost:
- shard-iclb: NOTRUN -> FAIL [fdo#108059]
* igt@kms_atomic_transition@3x-modeset-transitions:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1
* igt@kms_atomic_transition@3x-modeset-transitions-fencing:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3
* igt@kms_atomic_transition@6x-modeset-transitions:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1
* igt@kms_busy@extended-modeset-hang-newfb-render-f:
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +8
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-d:
- shard-iclb: NOTRUN -> SKIP [fdo#109278] +1
* igt@kms_chamelium@hdmi-crc-fast:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +34
* igt@kms_chamelium@hdmi-edid-read:
- shard-iclb: NOTRUN -> SKIP [fdo#109284] +2
* igt@kms_color@pipe-a-degamma:
- shard-apl: PASS -> FAIL [fdo#104782] / [fdo#108145]
* igt@kms_color@pipe-a-gamma:
- shard-iclb: NOTRUN -> FAIL [fdo#104782]
* igt@kms_cursor_crc@cursor-256x256-sliding:
- shard-glk: NOTRUN -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-512x170-onscreen:
- shard-iclb: NOTRUN -> SKIP [fdo#109279]
* igt@kms_cursor_legacy@cursora-vs-flipb-varying-size:
- shard-iclb: NOTRUN -> SKIP [fdo#109274] +6
* igt@kms_flip@2x-plain-flip-ts-check:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +87
* igt@kms_flip@dpms-vs-vblank-race:
- shard-apl: PASS -> FAIL [fdo#103060]
* igt@kms_flip@flip-vs-suspend:
- shard-kbl: PASS -> DMESG-WARN [fdo#108566] +1
* igt@kms_force_connector_basic@force-edid:
- shard-iclb: NOTRUN -> SKIP [fdo#109285]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
- shard-iclb: PASS -> FAIL [fdo#103167] +2
* igt@kms_frontbuffer_tracking@fbc-2p-indfb-fliptrack:
- shard-iclb: NOTRUN -> SKIP [fdo#109280] +20
* igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
- shard-iclb: NOTRUN -> FAIL [fdo#103167] +2
* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-pwrite:
- shard-iclb: NOTRUN -> FAIL [fdo#109247] +1
* igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt:
- shard-iclb: PASS -> FAIL [fdo#109247] +13
* igt@kms_lease@atomic_implicit_crtc:
- shard-iclb: NOTRUN -> FAIL [fdo#110279]
* igt@kms_lease@setcrtc_implicit_plane:
- shard-iclb: NOTRUN -> FAIL [fdo#110281]
* igt@kms_panel_fitting@legacy:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +30
* igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
- shard-apl: NOTRUN -> FAIL [fdo#108145] +2
* igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-iclb: PASS -> FAIL [fdo#103166]
* igt@kms_plane_scaling@pipe-b-scaler-with-rotation:
- shard-iclb: NOTRUN -> FAIL [fdo#109052] +1
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: PASS -> SKIP [fdo#109642]
* igt@kms_psr@cursor_plane_onoff:
- shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +2
* igt@kms_psr@primary_render:
- shard-iclb: NOTRUN -> FAIL [fdo#107383] / [fdo#110215]
* igt@kms_psr@psr2_basic:
- shard-iclb: PASS -> SKIP [fdo#109441] +3
* igt@kms_psr@psr2_primary_mmap_gtt:
- shard-iclb: NOTRUN -> SKIP [fdo#109441] +1
* igt@kms_rotation_crc@multiplane-rotation:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] +23
* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: PASS -> DMESG-FAIL [fdo#105763]
* igt@kms_setmode@basic:
- shard-iclb: PASS -> FAIL [fdo#99912]
* igt@kms_universal_plane@disable-primary-vs-flip-pipe-d:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +4
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl: PASS -> DMESG-WARN [fdo#108566] +1
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]
* igt@prime_nv_pcopy@test3_3:
- shard-iclb: NOTRUN -> SKIP [fdo#109291] +2
* igt@prime_vgem@fence-wait-bsd1:
- shard-iclb: NOTRUN -> SKIP [fdo#109276] +13
* igt@v3d_get_bo_offset@get-bad-handle:
- shard-iclb: NOTRUN -> SKIP [fdo#109315]
* igt@v3d_get_param@get-bad-param:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +11
#### Possible fixes ####
* igt@gem_tiled_blits@interruptible:
- shard-apl: DMESG-WARN [fdo#110376] -> PASS
* igt@i915_suspend@fence-restore-untiled:
- shard-apl: DMESG-WARN [fdo#108566] -> PASS +5
* igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
- shard-apl: FAIL [fdo#109660] -> PASS
* igt@kms_cursor_crc@cursor-64x64-sliding:
- shard-apl: FAIL [fdo#103232] -> PASS
- shard-kbl: FAIL [fdo#103232] -> PASS
* igt@kms_fbcon_fbt@psr-suspend:
- shard-iclb: FAIL [fdo#103833] -> PASS +1
* igt@kms_flip@dpms-vs-vblank-race:
- shard-glk: FAIL [fdo#103060] -> PASS
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-kbl: DMESG-WARN [fdo#108566] -> PASS
* igt@kms_flip@flip-vs-wf_vblank-interruptible:
- shard-apl: SKIP [fdo#109271] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> PASS +5
* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-blt:
- shard-iclb: FAIL [fdo#105682] / [fdo#109247] -> PASS
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu:
- shard-iclb: FAIL [fdo#109247] -> PASS +22
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS
* igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS
* igt@kms_psr@psr2_sprite_blt:
- shard-iclb: SKIP [fdo#109441] -> PASS
* igt@kms_psr@sprite_mmap_gtt:
- shard-iclb: FAIL [fdo#107383] / [fdo#110215] -> PASS +5
* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: FAIL [fdo#109016] -> PASS
* igt@kms_setmode@basic:
- shard-apl: FAIL [fdo#99912] -> PASS
* igt@perf@short-reads:
- shard-kbl: FAIL [fdo#103183] -> PASS
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103183]: https://bugs.freedesktop.org/show_bug.cgi?id=103183
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103833]: https://bugs.freedesktop.org/show_bug.cgi?id=103833
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
[fdo#108059]: https://bugs.freedesktop.org/show_bug.cgi?id=108059
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109052]: https://bugs.freedesktop.org/show_bug.cgi?id=109052
[fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109277]: https://bugs.freedesktop.org/show_bug.cgi?id=109277
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109301]: https://bugs.freedesktop.org/show_bug.cgi?id=109301
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660
[fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
[fdo#110279]: https://bugs.freedesktop.org/show_bug.cgi?id=110279
[fdo#110281]: https://bugs.freedesktop.org/show_bug.cgi?id=110281
[fdo#110376]: https://bugs.freedesktop.org/show_bug.cgi?id=110376
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (7 -> 6)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* IGT: IGT_4942 -> IGTPW_2839
* Linux: CI_DRM_5900 -> CI_DRM_5904
CI_DRM_5900: 769a8fa8df6608ca386de13871aa789504b16665 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_5904: f0ba5aa7a6ab956f01dbaf1b16720da3ca859230 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2839: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2839/
IGT_4942: ff8929d4d5b57b544e699fa428930f0fd66dd2dc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2839/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev