Skip to contentSkip to conversation

tests/kms_frontbuffer_tracking: Pass the debugfs fd to psr_wait_entry()

PATCH Superseded José Roberto de Souza 3 participants 9 messages Sep 18, 2018 – Sep 20, 2018 Library code

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 tests/kms_frontbuffer_tracking: Pass the debugfs fd to psr_wait_entry()

psr_wait_entry() uses the fd to the debugfs directory not the fd the drm device.

This fix some kms_frontbuffers_tracking tests:
...
(kms_frontbuffer_tracking:1353) DEBUG: Calculated CRC: pipe:[94a0476d 00000000 00000000 00000000 00000000] (kms_frontbuffer_tracking:1353) DEBUG: Test requirement passed: !fbc_not_enough_stolen() (kms_frontbuffer_tracking:1353) DEBUG: Test requirement passed: !fbc_stride_not_supported() (kms_frontbuffer_tracking:1353) DEBUG: Test requirement passed: !fbc_mode_too_large()
(kms_frontbuffer_tracking:1353) DEBUG: fbc_is_enabled()?
FBC enabled
Compressing: yes
(kms_frontbuffer_tracking:1353) DEBUG: fbc_is_enabled(IGT_LOG_DEBUG) took 0ms
(kms_frontbuffer_tracking:1353) DEBUG: fbc_is_compressing() took 0ms
(kms_frontbuffer_tracking:1353) CRITICAL: Test assertion failure function do_status_assertions, file ../tests/kms_frontbuffer_tracking.c:1634:
(kms_frontbuffer_tracking:1353) CRITICAL: Failed assertion: psr_wait_entry(drm.fd)
(kms_frontbuffer_tracking:1353) CRITICAL: Last errno: 20, Not a directory
(kms_frontbuffer_tracking:1353) CRITICAL: PSR still disabled
(kms_frontbuffer_tracking:1353) igt_core-INFO: Stack trace:

(kms_frontbuffer_tracking:1353) igt_core-INFO:   #0 ../lib/igt_core.c:1467 __igt_fail_assert()
(kms_frontbuffer_tracking:1353) igt_core-INFO:   #1 ../tests/kms_frontbuffer_tracking.c:1635 do_status_assertions()
(kms_frontbuffer_tracking:1353) igt_core-INFO:   #2 ../tests/kms_frontbuffer_tracking.c:1663 __do_assertions()
(kms_frontbuffer_tracking:1353) igt_core-INFO:   #3 ../tests/kms_frontbuffer_tracking.c:1687 enable_prim_screen_and_wait()
(kms_frontbuffer_tracking:1353) igt_core-INFO:   #4 ../tests/kms_frontbuffer_tracking.c:1847 prepare_subtest_screens()
(kms_frontbuffer_tracking:1353) igt_core-INFO:   #5 ../tests/kms_frontbuffer_tracking.c:1867 prepare_subtest()
(kms_frontbuffer_tracking:1353) igt_core-INFO:   #6 ../tests/kms_frontbuffer_tracking.c:2987 tilingchange_subtest()
(kms_frontbuffer_tracking:1353) igt_core-INFO:   #7 ../tests/kms_frontbuffer_tracking.c:3474 main()
(kms_frontbuffer_tracking:1353) igt_core-INFO:   #8 ../csu/libc-start.c:344 __libc_start_main()
(kms_frontbuffer_tracking:1353) igt_core-INFO:   #9 [_start+0x2a]
---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +1 -1
index b33f3128..3bd2424c 100644
@@ -1631,7 +1631,7 @@ static void do_status_assertions(int flags)
 	}
 
 	if (flags & ASSERT_PSR_ENABLED)
-		igt_assert_f(psr_wait_entry(drm.fd), "PSR still disabled\n");
+		igt_assert_f(psr_wait_entry(drm.debugfs), "PSR still disabled\n");
 	else if (flags & ASSERT_PSR_DISABLED)
 		igt_assert_f(psr_active(drm.debugfs, false),
 			     "PSR still enabled\n");
Signature · 6 lines
2.19.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

PATCH 2/3 lib/igt_psr: Give a explicit parameter name to functions that expect debugfs fd

Let's rename to debugfs_fd all the parameters of the functions that expect debugfs fd to avoid call one those functions with the wrong file descriptor.

---
 lib/igt_psr.c | 36 +++++++++++++++++++-----------------
 lib/igt_psr.h |  8 ++++----
 2 files changed, 23 insertions(+), 21 deletions(-)
lib/igt_psr.c +19 -17
index 6c5cf43d..c2bae95b 100644
@@ -25,28 +25,30 @@
 #include "igt_sysfs.h"
 #include <errno.h>
 
-bool psr_active(int fd, bool check_active)
+bool psr_active(int debugfs_fd, bool check_active)
 {
 	bool active;
 	char buf[512];
 
-	igt_debugfs_simple_read(fd, "i915_edp_psr_status", buf, sizeof(buf));
+	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
+				sizeof(buf));
 	active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
 		(strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
 	return check_active ? active : !active;
 }
 
-bool psr_wait_entry(int fd)
+bool psr_wait_entry(int debugfs_fd)
 {
-	return igt_wait(psr_active(fd, true), 500, 1);
+	return igt_wait(psr_active(debugfs_fd, true), 500, 1);
 }
 
-static ssize_t psr_write(int fd, const char *buf)
+static ssize_t psr_write(int debugfs_fd, const char *buf)
 {
-	return igt_sysfs_write(fd, "i915_edp_psr_debug", buf, strlen(buf));
+	return igt_sysfs_write(debugfs_fd, "i915_edp_psr_debug", buf,
+			       strlen(buf));
 }
 
-static int has_psr_debugfs(int fd)
+static int has_psr_debugfs(int debugfs_fd)
 {
 	int ret;
 
@@ -55,14 +57,14 @@ static int has_psr_debugfs(int fd)
 	 * Legacy mode will return OK here, debugfs api will return -EINVAL.
 	 * -ENODEV is returned when PSR is unavailable.
 	 */
-	ret = psr_write(fd, "0xf");
+	ret = psr_write(debugfs_fd, "0xf");
 	if (ret == -EINVAL)
 		return 0;
 	else if (ret < 0)
 		return ret;
 
 	/* legacy debugfs api, we enabled irqs by writing, disable them. */
-	psr_write(fd, "0");
+	psr_write(debugfs_fd, "0");
 	return -EINVAL;
 }
 
@@ -86,11 +88,11 @@ static void restore_psr_debugfs(int sig)
 	psr_write(psr_restore_debugfs_fd, "0");
 }
 
-static bool psr_set(int fd, bool enable)
+static bool psr_set(int debugfs_fd, bool enable)
 {
 	int ret;
 
-	ret = has_psr_debugfs(fd);
+	ret = has_psr_debugfs(debugfs_fd);
 	if (ret == -ENODEV) {
 		igt_skip_on_f(enable, "PSR not available\n");
 		return false;
@@ -99,13 +101,13 @@ static bool psr_set(int fd, bool enable)
 	if (ret == -EINVAL) {
 		ret = psr_modparam_set(enable);
 	} else {
-		ret = psr_write(fd, enable ? "0x3" : "0x1");
+		ret = psr_write(debugfs_fd, enable ? "0x3" : "0x1");
 		igt_assert(ret > 0);
 	}
 
 	/* Restore original value on exit */
 	if (psr_restore_debugfs_fd == -1) {
-		psr_restore_debugfs_fd = dup(fd);
+		psr_restore_debugfs_fd = dup(debugfs_fd);
 		igt_assert(psr_restore_debugfs_fd >= 0);
 		igt_install_exit_handler(restore_psr_debugfs);
 	}
@@ -113,12 +115,12 @@ static bool psr_set(int fd, bool enable)
 	return ret;
 }
 
-bool psr_enable(int fd)
+bool psr_enable(int debugfs_fd)
 {
-	return psr_set(fd, true);
+	return psr_set(debugfs_fd, true);
 }
 
-bool psr_disable(int fd)
+bool psr_disable(int debugfs_fd)
 {
-	return psr_set(fd, false);
+	return psr_set(debugfs_fd, false);
 }
lib/igt_psr.h +4 -4
index 0ef22c3d..7c846afb 100644
@@ -28,9 +28,9 @@
 #include "igt_core.h"
 #include "igt_aux.h"
 
-bool psr_wait_entry(int fd);
-bool psr_active(int fd, bool check_active);
-bool psr_enable(int fd);
-bool psr_disable(int fd);
+bool psr_wait_entry(int debugfs_fd);
+bool psr_active(int debugfs_fd, bool check_active);
+bool psr_enable(int debugfs_fd);
+bool psr_disable(int debugfs_fd);
 
 #endif
Signature · 6 lines
2.19.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#2 lore raw

PATCH 3/3 test/kms_fbcon_fbt: Give a explicit parameter name to functions that expect debugfs fd

In reply to José Roberto de Souza

Let's rename to debugfs_fd all the parameters of the functions that expect debugfs fd to avoid call one those functions with the wrong file descriptor.

---
 tests/kms_fbcon_fbt.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
tests/kms_fbcon_fbt.c +11 -11
index 138eda9b..9869aa14 100644
@@ -203,34 +203,34 @@ static bool psr_is_enabled(int debugfs_fd)
 	return strstr(buf, "\nHW Enabled & Active bit: yes\n");
 }
 
-static bool psr_wait_until_enabled(int fd)
+static bool psr_wait_until_enabled(int debugfs_fd)
 {
-	bool r = igt_wait(psr_is_enabled(fd), 5000, 1);
-	psr_print_status(fd);
+	bool r = igt_wait(psr_is_enabled(debugfs_fd), 5000, 1);
+	psr_print_status(debugfs_fd);
 	return r;
 }
 
-static void disable_features(int fd)
+static void disable_features(int debugfs_fd)
 {
 	igt_set_module_param_int("enable_fbc", 0);
-	psr_disable(fd);
+	psr_disable(debugfs_fd);
 }
 
-static inline void fbc_modparam_enable(int fd)
+static inline void fbc_modparam_enable(int debugfs_fd)
 {
 	igt_set_module_param_int("enable_fbc", 1);
 }
 
-static inline void psr_debugfs_enable(int fd)
+static inline void psr_debugfs_enable(int debugfs_fd)
 {
-	psr_enable(fd);
+	psr_enable(debugfs_fd);
 }
 
 struct feature {
-	bool (*supported_on_chipset)(int fd);
-	bool (*wait_until_enabled)(int fd);
+	bool (*supported_on_chipset)(int debugfs_fd);
+	bool (*wait_until_enabled)(int debugfs_fd);
 	bool (*connector_possible_fn)(drmModeConnectorPtr connector);
-	void (*enable)(int fd);
+	void (*enable)(int debugfs_fd);
 } fbc = {
 	.supported_on_chipset = fbc_supported_on_chipset,
 	.wait_until_enabled = fbc_wait_until_enabled,
Signature · 6 lines
2.19.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#3 lore raw

Re: [igt-dev] [PATCH i-g-t 3/3] test/kms_fbcon_fbt: Give a explicit parameter name to functions that expect debugfs fd

Quoted 4 lines · José Roberto de Souza

Let's rename to debugfs_fd all the parameters of the functions that expect debugfs fd to avoid call one those functions with the wrong file descriptor.

Series Reviewed-by: Dhinakaran Pandiyan <[email protected]>

Quoted 56 lines
---
 tests/kms_fbcon_fbt.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
tests/kms_fbcon_fbt.c +11 -11
index 138eda9b..9869aa14 100644
@@ -203,34 +203,34 @@ static bool psr_is_enabled(int debugfs_fd)
 	return strstr(buf, "\nHW Enabled & Active bit: yes\n");
 }
 
-static bool psr_wait_until_enabled(int fd)
+static bool psr_wait_until_enabled(int debugfs_fd)
 {
-	bool r = igt_wait(psr_is_enabled(fd), 5000, 1);
-	psr_print_status(fd);
+	bool r = igt_wait(psr_is_enabled(debugfs_fd), 5000, 1);
+	psr_print_status(debugfs_fd);
 	return r;
 }
 
-static void disable_features(int fd)
+static void disable_features(int debugfs_fd)
 {
 	igt_set_module_param_int("enable_fbc", 0);
-	psr_disable(fd);
+	psr_disable(debugfs_fd);
 }
 
-static inline void fbc_modparam_enable(int fd)
+static inline void fbc_modparam_enable(int debugfs_fd)
 {
 	igt_set_module_param_int("enable_fbc", 1);
 }
 
-static inline void psr_debugfs_enable(int fd)
+static inline void psr_debugfs_enable(int debugfs_fd)
 {
-	psr_enable(fd);
+	psr_enable(debugfs_fd);
 }
 
 struct feature {
-	bool (*supported_on_chipset)(int fd);
-	bool (*wait_until_enabled)(int fd);
+	bool (*supported_on_chipset)(int debugfs_fd);
+	bool (*wait_until_enabled)(int debugfs_fd);
 	bool (*connector_possible_fn)(drmModeConnectorPtr
 connector);
-	void (*enable)(int fd);
+	void (*enable)(int debugfs_fd);
 } fbc = {
 	.supported_on_chipset = fbc_supported_on_chipset,
Quoted 1 line

.wait_until_enabled = fbc_wait_until_enabled,

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#7 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/kms_frontbuffer_tracking: Pass the debugfs fd to psr_wait_entry()

In reply to José Roberto de Souza
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/3] tests/kms_frontbuffer_tracking: Pass the debugfs fd to psr_wait_entry()
URL : https://patchwork.freedesktop.org/series/49876/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4836 -> IGTPW_1856 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/49876/revisions/1/mbox/

== Known issues ==

Here are the changes found in IGTPW_1856 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@mock_hugepages:
      fi-bwr-2160:        PASS -> DMESG-FAIL (fdo#107930)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000)

    
    ==== Possible fixes ====

    igt@drv_getparams_basic@basic-subslice-total:
      fi-snb-2520m:       DMESG-WARN (fdo#103713) -> PASS +9

    igt@drv_module_reload@basic-reload:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@gem_mmap_gtt@basic-read-write:
      fi-glk-dsi:         INCOMPLETE (fdo#103359, k.org#198133) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107930 https://bugs.freedesktop.org/show_bug.cgi?id=107930
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

== Participating hosts (47 -> 47) ==

Additional (6): fi-gdg-551 fi-pnv-d510 fi-elk-e7500 fi-bsw-kefka fi-byt-clapper fi-skl-6700hq
Missing (6): fi-cnl-u fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus

== Build changes ==

* IGT: IGT_4645 -> IGTPW_1856

CI_DRM_4836: b2b0444aa439ade1ed809a91a19d382fbb5e7700 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1856: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1856/
IGT_4645: 03b90a39ed12a568c9da752466ea708d6348e110 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1856/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#8 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/3] tests/kms_frontbuffer_tracking: Pass the debugfs fd to psr_wait_entry()

In reply to José Roberto de Souza
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/3] tests/kms_frontbuffer_tracking: Pass the debugfs fd to psr_wait_entry()
URL : https://patchwork.freedesktop.org/series/49876/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4645_full -> IGTPW_1856_full =

== Summary - WARNING ==

Minor unknown changes coming with IGTPW_1856_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_1856_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/49876/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in IGTPW_1856_full:

=== IGT changes ===

    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-snb:          PASS -> SKIP

== Known issues ==

Here are the changes found in IGTPW_1856_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_capture@capture-bsd:
      shard-snb:          SKIP -> INCOMPLETE (fdo#105411)

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
      shard-glk:          PASS -> DMESG-WARN (fdo#107956)

    igt@kms_cursor_legacy@cursora-vs-flipa-toggle:
      shard-glk:          PASS -> DMESG-WARN (fdo#105763, fdo#106538)

    igt@kms_fbcon_fbt@fbc-suspend:
      shard-glk:          PASS -> FAIL (fdo#103833, fdo#105681)

    igt@perf@polling:
      shard-hsw:          PASS -> FAIL (fdo#102252)

    igt@perf_pmu@rc6-runtime-pm:
      shard-apl:          PASS -> FAIL (fdo#105010)

    
    ==== Possible fixes ====

    igt@drv_suspend@shrink:
      shard-snb:          INCOMPLETE (fdo#106886, fdo#105411) -> PASS

    igt@kms_cursor_legacy@cursor-vs-flip-toggle:
      shard-hsw:          FAIL (fdo#103355) -> PASS

    igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-ytiled:
      shard-glk:          FAIL (fdo#107791) -> PASS

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#105363) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@kms_setmode@basic:
      shard-apl:          FAIL (fdo#99912) -> PASS

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103833 https://bugs.freedesktop.org/show_bug.cgi?id=103833
fdo#105010 https://bugs.freedesktop.org/show_bug.cgi?id=105010
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105681 https://bugs.freedesktop.org/show_bug.cgi?id=105681
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#107791 https://bugs.freedesktop.org/show_bug.cgi?id=107791
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

== Participating hosts (5 -> 5) ==

No changes in participating hosts

== Build changes ==

* IGT: IGT_4645 -> IGTPW_1856
* Linux: CI_DRM_4833 -> CI_DRM_4836

CI_DRM_4833: 75bb460b367a614d10b0fba220143bee42657d7e @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4836: b2b0444aa439ade1ed809a91a19d382fbb5e7700 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1856: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1856/
IGT_4645: 03b90a39ed12a568c9da752466ea708d6348e110 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1856/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw

Re: [igt-dev] [PATCH i-g-t 3/3] test/kms_fbcon_fbt: Give a explicit parameter name to functions that expect debugfs fd

In reply to José Roberto de Souza
Quoted 3 lines · José Roberto de Souza

Let's rename to debugfs_fd all the parameters of the functions that expect debugfs fd to avoid call one those functions with the wrong file descriptor.

I was about to merge the series but noticed fbc_wait_until_enabled(int fd) was missed.

Can you please fix that along with two other checkpatch errors that the series has?

WARNING: line over 80 characters
#56: FILE: tests/kms_frontbuffer_tracking.c:1634:
+ igt_assert_f(psr_wait_entry(drm.debugfs), "PSR still
disabled\n");

WARNING: Missing a blank line after declarations
#35: FILE: tests/kms_fbcon_fbt.c:209:
+ bool r = igt_wait(psr_is_enabled(debugfs_fd), 5000, 1);
+ psr_print_status(debugfs_fd);

-DK

Quoted 57 lines
---
 tests/kms_fbcon_fbt.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
tests/kms_fbcon_fbt.c +11 -11
index 138eda9b..9869aa14 100644
@@ -203,34 +203,34 @@ static bool psr_is_enabled(int debugfs_fd)
 	return strstr(buf, "\nHW Enabled & Active bit: yes\n");
 }
 
-static bool psr_wait_until_enabled(int fd)
+static bool psr_wait_until_enabled(int debugfs_fd)
 {
-	bool r = igt_wait(psr_is_enabled(fd), 5000, 1);
-	psr_print_status(fd);
+	bool r = igt_wait(psr_is_enabled(debugfs_fd), 5000, 1);
+	psr_print_status(debugfs_fd);
 	return r;
 }
 
-static void disable_features(int fd)
+static void disable_features(int debugfs_fd)
 {
 	igt_set_module_param_int("enable_fbc", 0);
-	psr_disable(fd);
+	psr_disable(debugfs_fd);
 }
 
-static inline void fbc_modparam_enable(int fd)
+static inline void fbc_modparam_enable(int debugfs_fd)
 {
 	igt_set_module_param_int("enable_fbc", 1);
 }
 
-static inline void psr_debugfs_enable(int fd)
+static inline void psr_debugfs_enable(int debugfs_fd)
 {
-	psr_enable(fd);
+	psr_enable(debugfs_fd);
 }
 
 struct feature {
-	bool (*supported_on_chipset)(int fd);
-	bool (*wait_until_enabled)(int fd);
+	bool (*supported_on_chipset)(int debugfs_fd);
+	bool (*wait_until_enabled)(int debugfs_fd);
 	bool (*connector_possible_fn)(drmModeConnectorPtr
 connector);
-	void (*enable)(int fd);
+	void (*enable)(int debugfs_fd);
 } fbc = {
 	.supported_on_chipset = fbc_supported_on_chipset,
Quoted 1 line

.wait_until_enabled = fbc_wait_until_enabled,

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

Re: [igt-dev] [PATCH i-g-t 3/3] test/kms_fbcon_fbt: Give a explicit parameter name to functions that expect debugfs fd

Quoted 5 lines · Dhinakaran
Quoted 3 lines · José Roberto de Souza

Let's rename to debugfs_fd all the parameters of the functions that expect debugfs fd to avoid call one those functions with the wrong file descriptor.

Quoted 7 lines

I was about to merge the series but noticed
fbc_wait_until_enabled(int
fd) was missed.

Can you please fix that along with two other checkpatch errors that the
series has?

Done

Quoted 61 lines

WARNING: line over 80 characters
#56: FILE: tests/kms_frontbuffer_tracking.c:1634:
+ igt_assert_f(psr_wait_entry(drm.debugfs), "PSR still
disabled\n");

WARNING: Missing a blank line after declarations
#35: FILE: tests/kms_fbcon_fbt.c:209:

tests/kms_fbcon_fbt.c +2 -1
+       bool r = igt_wait(psr_is_enabled(debugfs_fd), 5000, 1);
+       psr_print_status(debugfs_fd);
 
 
-DK
Quoted 47 lines
---
 tests/kms_fbcon_fbt.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
tests/kms_fbcon_fbt.c +8 -8
index 138eda9b..9869aa14 100644
@@ -203,34 +203,34 @@ static bool psr_is_enabled(int debugfs_fd)
 	return strstr(buf, "\nHW Enabled & Active bit: yes\n");
 }
 
-static bool psr_wait_until_enabled(int fd)
+static bool psr_wait_until_enabled(int debugfs_fd)
 {
-	bool r = igt_wait(psr_is_enabled(fd), 5000, 1);
-	psr_print_status(fd);
+	bool r = igt_wait(psr_is_enabled(debugfs_fd), 5000, 1);
+	psr_print_status(debugfs_fd);
 	return r;
 }
 
-static void disable_features(int fd)
+static void disable_features(int debugfs_fd)
 {
 	igt_set_module_param_int("enable_fbc", 0);
-	psr_disable(fd);
+	psr_disable(debugfs_fd);
 }
 
-static inline void fbc_modparam_enable(int fd)
+static inline void fbc_modparam_enable(int debugfs_fd)
 {
 	igt_set_module_param_int("enable_fbc", 1);
 }
 
-static inline void psr_debugfs_enable(int fd)
+static inline void psr_debugfs_enable(int debugfs_fd)
 {
-	psr_enable(fd);
+	psr_enable(debugfs_fd);
 }
 
Quoted 12 lines
Quoted 11 lines
tests/kms_fbcon_fbt.c +3 -3
 struct feature {
-	bool (*supported_on_chipset)(int fd);
-	bool (*wait_until_enabled)(int fd);
+	bool (*supported_on_chipset)(int debugfs_fd);
+	bool (*wait_until_enabled)(int debugfs_fd);
 	bool (*connector_possible_fn)(drmModeConnectorPtr
 connector);
-	void (*enable)(int fd);
+	void (*enable)(int debugfs_fd);
 } fbc = {
 	.supported_on_chipset = fbc_supported_on_chipset,
Quoted 1 line

.wait_until_enabled = fbc_wait_until_enabled,

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#6 lore raw

Re: [igt-dev] [PATCH i-g-t 3/3] test/kms_fbcon_fbt: Give a explicit parameter name to functions that expect debugfs fd

Quoted 12 lines · Jose
Quoted 11 lines · Dhinakaran
Quoted 5 lines · José Roberto de Souza

Let's rename to debugfs_fd all the parameters of the functions that
expect debugfs fd to avoid call one those functions with the wrong
file descriptor.

I was about to merge the series but noticed
fbc_wait_until_enabled(int
fd) was missed.

Quoted 6 lines
Quoted 3 lines

Can you please fix that along with two other checkpatch errors that the
series has?

Done

Thanks, I'll wait for CI to finish testing and push the patches.

-DK
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev