Revert "tests/kms_dirtyfb: Add new test for dirtyfb ioctl"
Subsystems (2)
PATCH 1/3 Revert "tests/kms_dirtyfb: Add new test for dirtyfb ioctl"
This reverts commit 832d4f87d9fde665933b11c329c5941e70a33184.
This patch is missing added kms_dirtyfb.c file. Due to this revert it.
--- tests/meson.build | 1 - 1 file changed, 1 deletion(-)
tests/meson.build +0 -1
@@ -240,7 +240,6 @@ i915_progs = [ 'kms_busy', 'kms_ccs', 'kms_cdclk', - 'kms_dirtyfb', 'kms_draw_crc', 'kms_dsc', 'kms_fb_coherency',
Signature · 1 line
2.34.1
PATCH 2/3 Revert "tests/i915/kms_frontbuffer_tracking: Split drrs into library"
This reverts commit bc3b24882550bbccbf072b428f51aa6edb75aea6.
This patch is missing added intel_drrs.h and intel_drrs.c files.
--- lib/meson.build | 1 - tests/i915/kms_frontbuffer_tracking.c | 83 ++++++++++++++++++++++++--- 2 files changed, 76 insertions(+), 8 deletions(-)
lib/meson.build +0 -1
@@ -12,7 +12,6 @@ lib_sources = [ 'i915/gem_mman.c', 'i915/gem_vm.c', 'i915/intel_decode.c', - 'i915/intel_drrs.c', 'i915/intel_fbc.c', 'i915/intel_memory_region.c', 'i915/i915_crc.c',
tests/i915/kms_frontbuffer_tracking.c +76 -7
146 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [igt-dev] [PATCH i-g-t 2/3] Revert "tests/i915/kms_frontbuffer_tracking: Split drrs into library"
Quoted 181 lines · Jouni Högander
This reverts commit
bc3b24882550bbccbf072b428f51aa6edb75aea6.This patch is missing added
intel_drrs.handintel_drrs.cfiles.Signed-off-by Jouni Högander <[email protected]>--- lib/meson.build | 1 - tests/i915/kms_frontbuffer_tracking.c | 83 ++++++++++++++++++++++++--- 2 files changed, 76 insertions(+), 8 deletions(-)lib/meson.build +0
-1@@ -12,7 +12,6 @@ lib_sources = [ 'i915/gem_mman.c', 'i915/gem_vm.c', 'i915/intel_decode.c', - 'i915/intel_drrs.c', 'i915/intel_fbc.c', 'i915/intel_memory_region.c', 'i915/i915_crc.c',tests/i915/kms_frontbuffer_tracking.c +76
-7@@ -32,7 +32,6 @@#include "i915/gem.h" #include "i915/gem_create.h" -#include "i915/intel_drrs.h" #include "i915/intel_fbc.h" #include "igt.h" #include "igt_sysfs.h" @@ -747,10 +746,54 @@ static void __debugfs_read_crtc(const char *param, char *buf, int len)close (dir); } +static int __debugfs_write_crtc (const char *param,const char *buf,int len) +{ +int dir, ret; +enum pipe pipe; + + pipe = prim_mode_params.pipe; + dir =igt_debugfs_pipe_dir (drm.fd, pipe,O_DIRECTORY ); +igt_require_fd (dir); + ret =igt_sysfs_write (dir, param, buf, len -1 ); +close (dir); + +return ret; +} + +static void __debugfs_read_connector (const char *param,char *buf,int len) +{ +int dir; +igt_output_t *output; + + output = prim_mode_params.output; + dir =igt_debugfs_connector_dir (drm.fd, output->name,O_DIRECTORY ); +igt_require_fd (dir); +igt_debugfs_simple_read (dir, param, buf, len); +close (dir); +} +#define debugfs_read_crtc (p, arr) __debugfs_read_crtc(p, arr, sizeof(arr))#define debugfs_write_crtc (p, arr) __debugfs_write_crtc(p, arr, sizeof(arr))#define debugfs_read_connector (p, arr) __debugfs_read_connector(p, arr, sizeof(arr)) +static void drrs_set (unsigned int val) +{ +char buf[2 ]; +int ret; + +igt_debug ("Manually %sabling DRRS. %u\n" , val ?"en" :"dis" , val); +snprintf (buf,sizeof (buf),"%d" , val); + ret =debugfs_write_crtc ("i915_drrs_ctl" , buf); + +/* +* drrs_enable() is called on DRRS capable platform only, +* whereas drrs_disable() is called on all platforms. +* So handle the failure of debugfs_write only for drrs_enable(). +*/ +if (val) +igt_assert_f (ret == (sizeof (buf) -1 ),"debugfs_write failed" ); +} +static bool is_drrs_high (void ) {char buf[MAX_DRRS_STATUS_BUF_LEN ];@@ -767,6 +810,22 @@ static bool is_drrs_low(void)return strstr (buf,"DRRS refresh rate: low" ); } +static bool is_drrs_supported (void ) +{ +char buf[MAX_DRRS_STATUS_BUF_LEN ]; + +debugfs_read_crtc ("i915_drrs_status" , buf); +return strcasestr (buf,"DRRS enabled:" ); +} + +static bool is_drrs_inactive (void ) +{ +char buf[MAX_DRRS_STATUS_BUF_LEN ]; + +debugfs_read_crtc ("i915_drrs_status" , buf); +return strstr (buf,"DRRS active: no" ); +} +static void drrs_print_status (void ) {char buf[MAX_DRRS_STATUS_BUF_LEN ];@@ -775,6 +834,14 @@ static void drrs_print_status(void)igt_info ("DRRS STATUS :\n%s\n" , buf); } +static bool output_has_drrs (void ) +{ +char buf[MAX_DRRS_STATUS_BUF_LEN ]; + +debugfs_read_connector ("i915_drrs_type" , buf); +return strstr (buf,"seamless" ); +} +static struct timespec fbc_get_last_action (void ) {struct timespec ret = {0 ,0 };@@ -888,6 +955,9 @@ static bool drrs_wait_until_rr_switch_to_low(void)return igt_wait (is_drrs_low (),5000 ,1 ); } +#define drrs_enable () drrs_set(1) +#define drrs_disable () drrs_set(0) +static struct rect pat1_get_rect (struct fb_region *fb,int r) {struct rect rect;@@ -1089,9 +1159,8 @@ static bool disable_features(const struct test_mode *t)if (t->feature ==FEATURE_DEFAULT )return false; +drrs_disable ();intel_fbc_disable (drm.fd); -intel_drrs_disable (drm.fd, prim_mode_params.pipe); -return psr.can_test ?psr_disable (drm.fd, drm.debugfs) : false; }@@ -1370,12 +1439,12 @@ static void teardown_psr(void)static void setup_drrs (void ) { -if (!intel_output_has_drrs (drm.fd, prim_mode_params.output)) { +if (!output_has_drrs ()) {igt_info ("Can't test DRRS: no usable screen.\n" );return ; } -if (!intel_is_drrs_supported (drm.fd, prim_mode_params.pipe)) { +if (!is_drrs_supported ()) {igt_info ("Can't test DRRS: Not supported.\n" );return ; }@@ -1533,7 +1602,7 @@ static void do_status_assertions(int flags)igt_assert_f (false,"DRRS LOW\n" ); } }else if (flags &ASSERT_DRRS_INACTIVE ) { -if (!intel_is_drrs_inactive (drm.fd, prim_mode_params.pipe)) { +if (!is_drrs_inactive ()) {drrs_print_status ();igt_assert_f (false,"DRRS INACTIVE\n" ); }@@ -1698,7 +1767,7 @@ static bool enable_features_for_test(const struct test_mode *t)if (t->feature &FEATURE_PSR ) ret =psr_enable (drm.fd, drm.debugfs,PSR_MODE_1 );if (t->feature &FEATURE_DRRS ) -intel_drrs_enable (drm.fd, prim_mode_params.pipe); +drrs_enable ();return ret; }
PATCH 3/3 Revert "tests/i915/kms_frontbuffer_tracking: Split fbc into library"
In reply to Jouni HöganderThis reverts commit 784af2df476fc63504c61919b6eba759c9972be1.
This patch is missing added intel_fbc.c and intel_fbc.h files.
--- lib/meson.build | 1 - tests/i915/kms_frontbuffer_tracking.c | 57 ++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 11 deletions(-)
lib/meson.build +0 -1
@@ -12,7 +12,6 @@ lib_sources = [ 'i915/gem_mman.c', 'i915/gem_vm.c', 'i915/intel_decode.c', - 'i915/intel_fbc.c', 'i915/intel_memory_region.c', 'i915/i915_crc.c', 'igt_collection.c',
tests/i915/kms_frontbuffer_tracking.c +47 -10
113 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [igt-dev] [PATCH i-g-t 3/3] Revert "tests/i915/kms_frontbuffer_tracking: Split fbc into library"
Quoted 146 lines · Jouni Högander
This reverts commit
784af2df476fc63504c61919b6eba759c9972be1.This patch is missing added
intel_fbc.candintel_fbc.hfiles.Signed-off-by Jouni Högander <[email protected]>--- lib/meson.build | 1 - tests/i915/kms_frontbuffer_tracking.c | 57 ++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 11 deletions(-)lib/meson.build +0
-1@@ -12,7 +12,6 @@ lib_sources = [ 'i915/gem_mman.c', 'i915/gem_vm.c', 'i915/intel_decode.c', - 'i915/intel_fbc.c', 'i915/intel_memory_region.c', 'i915/i915_crc.c', 'igt_collection.c',tests/i915/kms_frontbuffer_tracking.c +47
-10@@ -32,7 +32,6 @@#include "i915/gem.h" #include "i915/gem_create.h" -#include "i915/intel_fbc.h" #include "igt.h" #include "igt_sysfs.h" #include "igt_psr.h" @@ -776,6 +775,27 @@ static void __debugfs_read_connector(const char *param, char *buf, int len)#define debugfs_write_crtc (p, arr) __debugfs_write_crtc(p, arr, sizeof(arr))#define debugfs_read_connector (p, arr) __debugfs_read_connector(p, arr, sizeof(arr)) +static char last_fbc_buf[128 ]; + +static bool fbc_is_enabled (int lvl) +{ +char buf[128 ]; +bool print = true; + +debugfs_read_crtc ("i915_fbc_status" , buf); +if (lvl !=IGT_LOG_DEBUG ) + last_fbc_buf[0 ] ='\0' ; +else if (strcmp (last_fbc_buf, buf)) +strcpy (last_fbc_buf, buf); +else + print = false; + +if (print) +igt_log (IGT_LOG_DOMAIN , lvl,"fbc_is_enabled()?\n%s" , buf); + +return strstr (buf,"FBC enabled\n" ); +} +static void drrs_set (unsigned int val) {char buf[2 ];@@ -950,11 +970,20 @@ static bool fbc_mode_too_large(void)return strstr (buf,"FBC disabled: mode too large for compression\n" ); } +static bool fbc_wait_until_enabled (void ) +{ + last_fbc_buf[0 ] ='\0' ; + +return igt_wait (fbc_is_enabled (IGT_LOG_DEBUG ),2000 ,1 ); +} +static bool drrs_wait_until_rr_switch_to_low (void ) {return igt_wait (is_drrs_low (),5000 ,1 ); } +#define fbc_enable () igt_set_module_param_int(drm.fd, "enable_fbc", 1) +#define fbc_disable () igt_set_module_param_int(drm.fd, "enable_fbc", 0)#define drrs_enable () drrs_set(1)#define drrs_disable () drrs_set(0)@@ -1159,8 +1188,8 @@ static bool disable_features(const struct test_mode *t)if (t->feature ==FEATURE_DEFAULT )return false; +fbc_disable ();drrs_disable (); -intel_fbc_disable (drm.fd);return psr.can_test ?psr_disable (drm.fd, drm.debugfs) : false; }@@ -1402,9 +1431,20 @@ static void teardown_crcs(void)igt_pipe_crc_free (pipe_crc); } +static bool fbc_supported_on_chipset (void ) +{ +char buf[128 ]; + +debugfs_read_crtc ("i915_fbc_status" , buf); +if (*buf =='\0' ) +return false; + +return !strstr (buf,"FBC unsupported on this chipset\n" ); +} +static void setup_fbc (void ) { -if (!intel_fbc_supported_on_chipset (drm.fd, prim_mode_params.pipe)) { +if (!fbc_supported_on_chipset ()) {igt_info ("Can't test FBC: not supported on this chipset\n" );return ; }@@ -1612,18 +1652,15 @@ static void do_status_assertions(int flags)igt_require (!fbc_not_enough_stolen ());igt_require (!fbc_stride_not_supported ());igt_require (!fbc_mode_too_large ()); -if (!intel_fbc_wait_until_enabled (drm.fd, prim_mode_params.pipe)) { -igt_assert_f (intel_fbc_is_enabled (drm.fd, - prim_mode_params.pipe, -IGT_LOG_WARN ), +if (!fbc_wait_until_enabled ()) { +igt_assert_f (fbc_is_enabled (IGT_LOG_WARN ),"FBC disabled\n" ); }if (opt.fbc_check_compression)igt_assert (fbc_wait_for_compression ()); }else if (flags &ASSERT_FBC_DISABLED ) { -igt_assert (!intel_fbc_wait_until_enabled (drm.fd, - prim_mode_params.pipe)); +igt_assert (!fbc_wait_until_enabled ()); }if (flags &ASSERT_PSR_ENABLED )@@ -1763,7 +1800,7 @@ static bool enable_features_for_test(const struct test_mode *t)return false;if (t->feature &FEATURE_FBC ) -intel_fbc_enable (drm.fd); +fbc_enable ();if (t->feature &FEATURE_PSR ) ret =psr_enable (drm.fd, drm.debugfs,PSR_MODE_1 );if (t->feature &FEATURE_DRRS )
Quoted 21 lines · Jouni Högander
This reverts commit
832d4f87d9fde665933b11c329c5941e70a33184.This patch is missing added
kms_dirtyfb.cfile. Due to this revert it.Signed-off-by Jouni Högander <[email protected]>--- tests/meson.build | 1 - 1 file changed, 1 deletion(-)tests/meson.build +0
-1@@ -240,7 +240,6 @@ i915_progs = [ 'kms_busy', 'kms_ccs', 'kms_cdclk', - 'kms_dirtyfb', 'kms_draw_crc', 'kms_dsc', 'kms_fb_coherency',
Patchwork
CI[igt-dev] ✗ Fi.CI.BUILD: failure for series starting with [i-g-t,1/3] Revert "tests/kms_dirtyfb: Add new test for dirtyfb ioctl"
In reply to Jouni Högander== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/3] Revert "tests/kms_dirtyfb: Add new test for dirtyfb ioctl"
URL : https://patchwork.freedesktop.org/series/122156/
State : failure
== Summary ==
Applying: Revert "tests/kms_dirtyfb: Add new test for dirtyfb ioctl"
Using index info to reconstruct a base tree...
M tests/meson.build
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: Revert "tests/i915/kms_frontbuffer_tracking: Split drrs into library" Using index info to reconstruct a base tree...
M lib/meson.build
M tests/i915/kms_frontbuffer_tracking.c
Falling back to patching base and 3-way merge...
Auto-merging tests/i915/kms_frontbuffer_tracking.c
CONFLICT (content): Merge conflict in tests/i915/kms_frontbuffer_tracking.c Auto-merging lib/meson.build
CONFLICT (content): Merge conflict in lib/meson.build
Patch failed at 0002 Revert "tests/i915/kms_frontbuffer_tracking: Split drrs into library" When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".