Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector
@ 2024-04-10  6:44 Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 1/9] lib/igt_kms: Refacror forced_connector struct Kunal Joshi
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

We have kmstest_force_connector that allows forcing a state
to status sysfs, use the same mechanism for debugfs as well.
Haven't reused the kmstest_force_connector as its used for sysfs
and wanted to have seperate flows for debugfs and sysfs.

patch series adds kmstest_force_connector_debugfs which allows
set value to particular debugfs of a connector, also it adds an exit
handler to clear the state at exit.

Kunal Joshi (9):
  lib/igt_kms: Refacror forced_connector struct
  lib/igt_kms: add forced_connectors_debugfs array
  lib/igt_kms: add enum kmstest_force_type
  lib/igt_kms: refactor helpers forced_connectors helpers
  lib/igt_kms: add igt_reset_connectors_debugfs
  lib/igt_kms: add exit handler function to clear force debugfs state
  lib/igt_kms: add kmstest_force_connector_debugfs
  tests/intel/km_big_joiner: use kmstest_force_connector_debugfs for
    better cleanup functionality
  lib/igt_kms: remove unused igt_force_and_check_bigjoiner_status

 lib/igt_kms.c                | 203 +++++++++++++++++++++++++++--------
 lib/igt_kms.h                |  25 ++++-
 tests/intel/kms_big_joiner.c |  23 ++--
 3 files changed, 193 insertions(+), 58 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH i-g-t 1/9] lib/igt_kms: Refacror forced_connector struct
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
@ 2024-04-10  6:44 ` Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 2/9] lib/igt_kms: add forced_connectors_debugfs array Kunal Joshi
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev
  Cc: Kunal Joshi, Ville Syrjälä, Ankit Nautiyal,
	Bhanuprakash Modem, Karthik B S

refactor struct

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 2a518eb8d..e3b6c607e 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -91,12 +91,13 @@
 #define MAX_EDID 2
 #define DISPLAY_TILE_BLOCK 0x12
 
-static struct {
+struct forced_connector {
 	uint32_t connector_type;
 	uint32_t connector_type_id;
 	int idx;
 	int dir;
-} forced_connectors[MAX_CONNECTORS + 1];
+};
+static struct forced_connector forced_connectors[MAX_CONNECTORS + 1];
 
 /**
  * igt_kms_get_base_edid:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH i-g-t 2/9] lib/igt_kms: add forced_connectors_debugfs array
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 1/9] lib/igt_kms: Refacror forced_connector struct Kunal Joshi
@ 2024-04-10  6:44 ` Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 3/9] lib/igt_kms: add enum kmstest_force_type Kunal Joshi
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev
  Cc: Kunal Joshi, Ville Syrjälä, Ankit Nautiyal,
	Bhanuprakash Modem, Karthik B S

add forced_connectors_debugfs for tracking connector
having a force debugfs set

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index e3b6c607e..cc934a514 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -98,6 +98,7 @@ struct forced_connector {
 	int dir;
 };
 static struct forced_connector forced_connectors[MAX_CONNECTORS + 1];
+static struct forced_connector forced_connectors_debugfs[MAX_CONNECTORS + 1];
 
 /**
  * igt_kms_get_base_edid:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH i-g-t 3/9] lib/igt_kms: add enum kmstest_force_type
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 1/9] lib/igt_kms: Refacror forced_connector struct Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 2/9] lib/igt_kms: add forced_connectors_debugfs array Kunal Joshi
@ 2024-04-10  6:44 ` Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 4/9] lib/igt_kms: refactor helpers forced_connectors helpers Kunal Joshi
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev
  Cc: Kunal Joshi, Ville Syrjälä, Ankit Nautiyal,
	Bhanuprakash Modem, Karthik B S

add enum to seperate out force_type,
@FORCED_CONNECTOR: Uses sysfs and
@FORCED_CONNECTOR_DEBUGFS: Uses debugfs

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 6d13e5851..561edf98b 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -245,6 +245,17 @@ enum kmstest_force_connector_state {
 	FORCE_CONNECTOR_OFF
 };
 
+/**
+ * kmstest_force_type:
+ * @FORCED_CONNECTOR: Uses sysfs
+ * @FORCED_CONNECTOR_DEBUGFS: Uses debugfs
+ */
+enum kmstest_force_type {
+	FORCED_CONNECTOR,
+	FORCED_CONNECTOR_DEBUGFS,
+	FORCED_CONNECTOR_MAX
+};
+
 /**
  * intel_broadcast_rgb_mode:
  * @BROADCAST_RGB_AUTO: Choose the color range to use automatically
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH i-g-t 4/9] lib/igt_kms: refactor helpers forced_connectors helpers
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (2 preceding siblings ...)
  2024-04-10  6:44 ` [PATCH i-g-t 3/9] lib/igt_kms: add enum kmstest_force_type Kunal Joshi
@ 2024-04-10  6:44 ` Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 5/9] lib/igt_kms: add igt_reset_connectors_debugfs Kunal Joshi
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev
  Cc: Kunal Joshi, Ville Syrjälä, Ankit Nautiyal,
	Bhanuprakash Modem, Karthik B S

refactor connector_is_forced, forced_connector_free_index and
dump_forced_connectors to behave according to kmstest_force_type

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.c | 46 +++++++++++++++++++++++++++++-----------------
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index cc934a514..dac822c7a 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1495,28 +1495,37 @@ int igt_connector_sysfs_open(int drm_fd,
 	return conn_dir;
 }
 
-static bool connector_is_forced(int idx, drmModeConnector *connector)
+static bool connector_is_forced(int idx, drmModeConnector *connector, enum kmstest_force_type type)
 {
+	struct forced_connector *connectors;
+
+	igt_assert(type >= FORCED_CONNECTOR  && type < FORCED_CONNECTOR_MAX);
 	igt_assert(connector->connector_type != 0);
 
-	for (int i = 0; forced_connectors[i].connector_type; i++) {
-		if (forced_connectors[i].idx == idx &&
-		    forced_connectors[i].connector_type == connector->connector_type &&
-		    forced_connectors[i].connector_type_id == connector->connector_type_id)
+	connectors = type == FORCED_CONNECTOR ? forced_connectors : forced_connectors_debugfs;
+	for (int i = 0; connectors[i].connector_type; i++) {
+		if (connectors[i].idx == idx &&
+		    connectors[i].connector_type == connector->connector_type &&
+		    connectors[i].connector_type_id == connector->connector_type_id)
 			return true;
 	}
 
 	return false;
 }
 
-static int forced_connector_free_index(void)
+static int forced_connector_free_index(enum kmstest_force_type type)
 {
 	int i;
+	struct forced_connector *connectors;
+
+	igt_assert(type >= FORCED_CONNECTOR  && type < FORCED_CONNECTOR_MAX);
+	connectors = type == FORCED_CONNECTOR ? forced_connectors : forced_connectors_debugfs;
 
-	for (i = 0; forced_connectors[i].connector_type; i++)
+	for (i = 0; connectors[i].connector_type; i++)
 		;
 
-	return i < ARRAY_SIZE(forced_connectors) ? i : -1;
+	return i < (type == FORCED_CONNECTOR ? ARRAY_SIZE(forced_connectors) :
+		   ARRAY_SIZE(forced_connectors_debugfs)) ? i : -1;
 }
 
 static bool force_connector(int drm_fd,
@@ -1546,12 +1555,12 @@ static bool force_connector(int drm_fd,
 	igt_debug("Connector %s is now forced %s\n", name, value);
 
 	/* already tracked? */
-	if (connector_is_forced(idx, connector)) {
+	if (connector_is_forced(idx, connector, FORCED_CONNECTOR)) {
 		close(dir);
 		return true;
 	}
 
-	i = forced_connector_free_index();
+	i = forced_connector_free_index(FORCED_CONNECTOR);
 	if (i < 0) {
 		igt_warn("Connector limit reached, %s will not be reset\n", name);
 		close(dir);
@@ -1566,16 +1575,19 @@ static bool force_connector(int drm_fd,
 	return true;
 }
 
-static void dump_forced_connectors(void)
+static void dump_forced_connectors(enum kmstest_force_type type)
 {
 	char name[80];
+	struct forced_connector *connectors;
 
+	igt_assert(type >= FORCED_CONNECTOR  && type < FORCED_CONNECTOR_MAX);
+	connectors = type == FORCED_CONNECTOR ? forced_connectors : forced_connectors_debugfs;
 	igt_debug("Current forced connectors:\n");
 
-	for (int i = 0; forced_connectors[i].connector_type; i++) {
-		kmstest_connector_dirname(forced_connectors[i].idx,
-					  forced_connectors[i].connector_type,
-					  forced_connectors[i].connector_type_id,
+	for (int i = 0; connectors[i].connector_type; i++) {
+		kmstest_connector_dirname(connectors[i].idx,
+					  connectors[i].connector_type,
+					  connectors[i].connector_type_id,
 					  name, sizeof(name));
 		igt_debug("\t%s\n", name);
 	}
@@ -1625,7 +1637,7 @@ bool kmstest_force_connector(int drm_fd, drmModeConnector *connector,
 	if (!force_connector(drm_fd, connector, value))
 		return false;
 
-	dump_forced_connectors();
+	dump_forced_connectors(FORCED_CONNECTOR);
 
 	igt_install_exit_handler(reset_connectors_at_exit);
 
@@ -2618,7 +2630,7 @@ static void igt_handle_spurious_hpd(igt_display_t *display)
 			 conn->connector_type_id);
 	}
 
-	dump_forced_connectors();
+	dump_forced_connectors(FORCED_CONNECTOR);
 }
 
 /**
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH i-g-t 5/9] lib/igt_kms: add igt_reset_connectors_debugfs
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (3 preceding siblings ...)
  2024-04-10  6:44 ` [PATCH i-g-t 4/9] lib/igt_kms: refactor helpers forced_connectors helpers Kunal Joshi
@ 2024-04-10  6:44 ` Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 6/9] lib/igt_kms: add exit handler function to clear force debugfs state Kunal Joshi
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev
  Cc: Kunal Joshi, Ville Syrjälä, Ankit Nautiyal,
	Bhanuprakash Modem, Karthik B S

add igt_reset_connectors_debugfs to clean the state
along with some helpers to get debugfs attribute and default value
to set.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.c | 38 ++++++++++++++++++++++++++++++++++++++
 lib/igt_kms.h | 11 +++++++++++
 2 files changed, 49 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index dac822c7a..18605531b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1495,6 +1495,26 @@ int igt_connector_sysfs_open(int drm_fd,
 	return conn_dir;
 }
 
+static const char *get_debugfs_default_value(enum kmstest_force_debugfs debugfs)
+{
+	switch (debugfs) {
+	case FORCE_JOINER:
+		return "0";
+	default:
+		return "0";
+	}
+}
+
+static const char *get_debugfs_default_attr(enum kmstest_force_debugfs debugfs)
+{
+	switch (debugfs) {
+	case FORCE_JOINER:
+		return "i915_bigjoiner_force_enable";
+	default:
+		return "0";
+	}
+}
+
 static bool connector_is_forced(int idx, drmModeConnector *connector, enum kmstest_force_type type)
 {
 	struct forced_connector *connectors;
@@ -5320,6 +5340,24 @@ void igt_reset_connectors(void)
 		igt_sysfs_set(forced_connectors[i].dir, "status",  "detect");
 }
 
+/**
+ * igt_reset_connectors_debugfs:
+ *
+ * Remove any forced state from the connectors debugfs.
+ */
+void igt_reset_connectors_debugfs(void)
+{
+	/*
+	 * reset the connectors debugfs avoiding any
+	 * functions that are not safe to call in signal handlers
+	 */
+	for (int i = FORCE_JOINER; i < FORCE_DEBUGFS_MAX; i++)
+		for (int j = 0; j < forced_connectors_debugfs[j].connector_type; j++)
+			igt_sysfs_set(forced_connectors_debugfs[i].dir,
+				      get_debugfs_default_attr(i),
+				      get_debugfs_default_value(i));
+}
+
 /**
  * igt_watch_uevents:
  *
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 561edf98b..f676de737 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -256,6 +256,16 @@ enum kmstest_force_type {
 	FORCED_CONNECTOR_MAX
 };
 
+/**
+ * kmstest_force_type:
+ * @FORCED_CONNECTOR: Uses sysfs
+ * @FORCED_CONNECTOR_DEBUGFS: Uses debugfs
+*/
+enum kmstest_force_debugfs {
+	FORCE_JOINER,
+	FORCE_DEBUGFS_MAX
+};
+
 /**
  * intel_broadcast_rgb_mode:
  * @BROADCAST_RGB_AUTO: Choose the color range to use automatically
@@ -1094,6 +1104,7 @@ void igt_pipe_refresh(igt_display_t *display, enum pipe pipe, bool force);
 
 void igt_enable_connectors(int drm_fd);
 void igt_reset_connectors(void);
+void igt_reset_connectors_debugfs(void);
 
 uint32_t kmstest_get_vbl_flag(int crtc_offset);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH i-g-t 6/9] lib/igt_kms: add exit handler function to clear force debugfs state
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (4 preceding siblings ...)
  2024-04-10  6:44 ` [PATCH i-g-t 5/9] lib/igt_kms: add igt_reset_connectors_debugfs Kunal Joshi
@ 2024-04-10  6:44 ` Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 7/9] lib/igt_kms: add kmstest_force_connector_debugfs Kunal Joshi
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev
  Cc: Kunal Joshi, Ville Syrjälä, Ankit Nautiyal,
	Bhanuprakash Modem, Karthik B S

add exit handler which will be initialized on
kmstest_force_connector_debugfs

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 18605531b..80070d935 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1454,6 +1454,11 @@ static void reset_connectors_at_exit(int sig)
 	igt_reset_connectors();
 }
 
+static void reset_connectors_debugfs_at_exit(int sig)
+{
+	igt_reset_connectors_debugfs();
+}
+
 static char *kmstest_connector_dirname(int idx,
 				       uint32_t connector_type,
 				       uint32_t connector_type_id,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH i-g-t 7/9] lib/igt_kms: add kmstest_force_connector_debugfs
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (5 preceding siblings ...)
  2024-04-10  6:44 ` [PATCH i-g-t 6/9] lib/igt_kms: add exit handler function to clear force debugfs state Kunal Joshi
@ 2024-04-10  6:44 ` Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 8/9] tests/intel/km_big_joiner: use kmstest_force_connector_debugfs for better cleanup functionality Kunal Joshi
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev
  Cc: Kunal Joshi, Ville Syrjälä, Ankit Nautiyal,
	Bhanuprakash Modem, Karthik B S

allow to set debugfs for a connector with particular value and install
exit handler for cleanup.

This is same kmstest_force_connector just that one uses sysfs and
limited to only status sysfs.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_kms.h |  2 ++
 2 files changed, 82 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 80070d935..56c9dae9b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1600,6 +1600,52 @@ static bool force_connector(int drm_fd,
 	return true;
 }
 
+static bool force_connector_debugfs(int drm_fd,
+				    drmModeConnector *connector,
+				    const char *attr, const char *value)
+{
+	char name[80];
+	int i, idx, dir;
+
+	if (!connector)
+		return false;
+
+	snprintf(name, sizeof(name), "%s-%d",
+		 kmstest_connector_type_str(connector->connector_type),
+		 connector->connector_type_id);
+
+	dir = igt_debugfs_connector_dir(drm_fd, name, O_DIRECTORY);
+	if (dir < 0)
+		return false;
+
+	if (!igt_sysfs_set(dir, attr, value)) {
+		close(dir);
+		return false;
+	}
+
+	igt_debug("Debugfs %s of Connector %s is now forced %s\n", attr, name, value);
+
+	/* already tracked? */
+	if (connector_is_forced(idx, connector, FORCED_CONNECTOR_DEBUGFS)) {
+		close(dir);
+		return true;
+	}
+
+	i = forced_connector_free_index(FORCED_CONNECTOR_DEBUGFS);
+	if (i < 0) {
+		igt_warn("Connector limit reached, %s will not be reset\n", name);
+		close(dir);
+		return true;
+	}
+
+	forced_connectors_debugfs[i].idx = idx;
+	forced_connectors_debugfs[i].connector_type = connector->connector_type;
+	forced_connectors_debugfs[i].connector_type_id = connector->connector_type_id;
+	forced_connectors_debugfs[i].dir = dir;
+
+	return true;
+}
+
 static void dump_forced_connectors(enum kmstest_force_type type)
 {
 	char name[80];
@@ -1674,6 +1720,40 @@ bool kmstest_force_connector(int drm_fd, drmModeConnector *connector,
 	return true;
 }
 
+/**
+ * kmstest_force_connector_debugfs:
+ * @fd: drm file descriptor
+ * @connector: connector
+ * @attr: debugfs of the connector
+ * @value: value to set
+ *
+ * Force the specified state on the specified connector.
+ *
+ * Returns: True on success
+ */
+bool kmstest_force_connector_debugfs(int drm_fd, drmModeConnector *connector,
+				     enum kmstest_force_debugfs debugfs, const char *value)
+{
+	drmModeConnector *temp;
+	const char *attr = get_debugfs_default_attr(debugfs);
+
+	if (!force_connector_debugfs(drm_fd, connector, attr, value))
+		return false;
+
+	dump_forced_connectors(FORCED_CONNECTOR_DEBUGFS);
+
+	igt_install_exit_handler(reset_connectors_debugfs_at_exit);
+
+	/*
+	 * To allow callers to always use GetConnectorCurrent we need to force a
+	 * redetection here.
+	 */
+	temp = drmModeGetConnector(drm_fd, connector->connector_id);
+	drmModeFreeConnector(temp);
+
+	return true;
+}
+
 /**
  * kmstest_force_edid:
  * @drm_fd: drm file descriptor
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index f676de737..4980d4791 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -283,6 +283,8 @@ struct edid;
 
 bool kmstest_force_connector(int fd, drmModeConnector *connector,
 			     enum kmstest_force_connector_state state);
+bool kmstest_force_connector_debugfs(int drm_fd, drmModeConnector *connector,
+				     enum kmstest_force_debugfs debugfs, const char *value);
 void kmstest_force_edid(int drm_fd, drmModeConnector *connector,
 			const struct edid *edid);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH i-g-t 8/9] tests/intel/km_big_joiner: use kmstest_force_connector_debugfs for better cleanup functionality
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (6 preceding siblings ...)
  2024-04-10  6:44 ` [PATCH i-g-t 7/9] lib/igt_kms: add kmstest_force_connector_debugfs Kunal Joshi
@ 2024-04-10  6:44 ` Kunal Joshi
  2024-04-10  6:44 ` [PATCH i-g-t 9/9] lib/igt_kms: remove unused igt_force_and_check_bigjoiner_status Kunal Joshi
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev
  Cc: Kunal Joshi, Ville Syrjälä, Ankit Nautiyal,
	Bhanuprakash Modem, Karthik B S

use kmstest_force_connector_debugfs instead of igt_force_and_check_bigjoiner_status
for better cleanup of i915_bigjoiner_force_enable state.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/intel/kms_big_joiner.c | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c
index 078f76ac1..ebeeaff9c 100644
--- a/tests/intel/kms_big_joiner.c
+++ b/tests/intel/kms_big_joiner.c
@@ -87,7 +87,7 @@ static void set_all_master_pipes_for_platform(data_t *data)
 	}
 }
 
-static void toggle_force_joiner_on_all_non_big_joiner_outputs(data_t *data, bool toggle)
+static void enable_force_joiner_on_all_non_big_joiner_outputs(data_t *data)
 {
 	bool status;
 	igt_output_t *output;
@@ -95,7 +95,9 @@ static void toggle_force_joiner_on_all_non_big_joiner_outputs(data_t *data, bool
 
 	for (i = 0; i < data->non_big_joiner_output_count; i++) {
 		output = data->non_big_joiner_output[i];
-		status = igt_force_and_check_bigjoiner_status(data->drm_fd, output->name, toggle);
+		status = kmstest_force_connector_debugfs(data->drm_fd,
+							 output->config.connector,
+							 FORCE_JOINER, "1");
 		igt_assert_f(status, "Failed to toggle force joiner\n");
 	}
 }
@@ -380,15 +382,15 @@ igt_main
 		igt_require_f(data.n_pipes > 1,
 			      "Minimum 2 pipes required\n");
 		igt_dynamic_f("single") {
-			toggle_force_joiner_on_all_non_big_joiner_outputs(&data, true);
+			enable_force_joiner_on_all_non_big_joiner_outputs(&data);
 			test_single_joiner(&data, data.non_big_joiner_output_count, true);
-			toggle_force_joiner_on_all_non_big_joiner_outputs(&data, false);
+			igt_reset_connectors_debugfs();
 		}
 		if (data.non_big_joiner_output_count > 1) {
 			igt_dynamic_f("multi") {
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, true);
+				enable_force_joiner_on_all_non_big_joiner_outputs(&data);
 				test_multi_joiner(&data, data.non_big_joiner_output_count, true);
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, false);
+				igt_reset_connectors_debugfs();
 			}
 		}
 	}
@@ -402,16 +404,16 @@ igt_main
 			      "Minimum of 2 pipes are required\n");
 		if (data.non_big_joiner_output_count >= 1) {
 			igt_dynamic_f("big_joiner_on_last_pipe") {
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, true);
+				enable_force_joiner_on_all_non_big_joiner_outputs(&data);
 				test_joiner_on_last_pipe(&data, true);
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, false);
+				igt_reset_connectors_debugfs();
 			}
 		}
 		if (data.non_big_joiner_output_count > 1) {
 			igt_dynamic_f("invalid_combinations") {
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, true);
+				enable_force_joiner_on_all_non_big_joiner_outputs(&data);
 				test_invalid_modeset_two_joiner(&data, false, true);
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, false);
+				igt_reset_connectors_debugfs();
 			}
 		}
 	}
@@ -419,5 +421,6 @@ igt_main
 	igt_fixture {
 		igt_display_fini(&data.display);
 		drm_close_driver(data.drm_fd);
+		igt_reset_connectors_debugfs();
 	}
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH i-g-t 9/9] lib/igt_kms: remove unused igt_force_and_check_bigjoiner_status
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (7 preceding siblings ...)
  2024-04-10  6:44 ` [PATCH i-g-t 8/9] tests/intel/km_big_joiner: use kmstest_force_connector_debugfs for better cleanup functionality Kunal Joshi
@ 2024-04-10  6:44 ` Kunal Joshi
  2024-04-10  6:54 ` ✗ GitLab.Pipeline: warning for enhancements for forcing debugfs of connector Patchwork
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Kunal Joshi @ 2024-04-10  6:44 UTC (permalink / raw)
  To: igt-dev
  Cc: Kunal Joshi, Ville Syrjälä, Ankit Nautiyal,
	Bhanuprakash Modem, Karthik B S

remove unused igt_force_and_check_bigjoiner_status

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.c | 28 ----------------------------
 lib/igt_kms.h |  1 -
 2 files changed, 29 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 56c9dae9b..e2d5c176a 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -6331,34 +6331,6 @@ bool igt_has_force_joiner_debugfs(int drmfd, igt_output_t *output)
 	return ret >= 0;
 }
 
-/**
- * Forces the enable/disable state of big joiner for a specific connector.
- *
- * @drmfd The file descriptor of the DRM device.
- * @connector_name The name of the connector.
- * @enable The desired state of big joiner (true for enable, false for disable).
- * Returns:
- *  true if writing the debugfs was successful
- *  and the state was set as requested, false otherwise.
- */
-bool igt_force_and_check_bigjoiner_status(int drmfd, char *connector_name, bool enable)
-{
-	int debugfs_fd, ret;
-	char buf[512];
-
-	igt_assert_f(connector_name, "Connector name cannot be NULL\n");
-	debugfs_fd = igt_debugfs_connector_dir(drmfd, connector_name, O_DIRECTORY);
-	igt_assert_f(debugfs_fd >= 0, "Could not open debugfs for connector %s\n", connector_name);
-	ret = igt_sysfs_write(debugfs_fd, "i915_bigjoiner_force_enable", enable ? "1" : "0", 1);
-	igt_assert_f(ret > 0, "Could not write i915_bigjoiner_force_enable for connector %s\n", connector_name);
-	ret = igt_debugfs_simple_read(debugfs_fd, "i915_bigjoiner_force_enable", buf, sizeof(buf));
-	close(debugfs_fd);
-	igt_assert_f(ret > 0, "Could not read i915_bigjoiner_force_enable for connector %s\n", connector_name);
-
-	return enable ? strstr(buf, "Y") :
-			strstr(buf, "N");
-}
-
 /**
  * igt_check_bigjoiner_support:
  * @display: a pointer to an #igt_display_t structure
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 4980d4791..d9a54384b 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -1239,7 +1239,6 @@ bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock);
 bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector,
 			  int max_dotclock, drmModeModeInfo *mode);
 bool igt_has_force_joiner_debugfs(int drmfd, igt_output_t *output);
-bool igt_force_and_check_bigjoiner_status(int drmfd, char *connector_name, bool enable);
 bool igt_check_bigjoiner_support(igt_display_t *display);
 bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode);
 bool intel_pipe_output_combo_valid(igt_display_t *display);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* ✗ GitLab.Pipeline: warning for enhancements for forcing debugfs of connector
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (8 preceding siblings ...)
  2024-04-10  6:44 ` [PATCH i-g-t 9/9] lib/igt_kms: remove unused igt_force_and_check_bigjoiner_status Kunal Joshi
@ 2024-04-10  6:54 ` Patchwork
  2024-04-10  7:20 ` ✓ CI.xeBAT: success " Patchwork
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2024-04-10  6:54 UTC (permalink / raw)
  To: Joshi, Kunal1; +Cc: igt-dev

== Series Details ==

Series: enhancements for forcing debugfs of connector
URL   : https://patchwork.freedesktop.org/series/132249/
State : warning

== Summary ==

Pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1150344 for the overview.

build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/57412571):
  section_start:1712731897:get_sources
  Getting source from Git repository
  $ /host/bin/curl -s -L --cacert /host/ca-certificates.crt --retry 4 -f --retry-delay 60 https://gitlab.freedesktop.org/freedesktop/helm-gitlab-infra/-/raw/main/runner-gating/runner-gating.sh | sh -s -- pre_get_sources_script
  Checking if the user of the pipeline is allowed...
  Checking if the job's project is part of a well-known group...
  Thank you for contributing to freedesktop.org
  Fetching changes...
  Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/
  Checking out 97515ebd as detached HEAD (ref is intel/IGTPW_10996)...
  
  Skipping Git submodules setup
  section_end:1712731904:get_sources
  section_start:1712731904:step_script
  Executing "step_script" stage of the job script
  Using docker image sha256:ca01fc804bb92e5df42a202dd7e0470610c6711c66a808525defcb8bbb774078 for registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian:commit-97515ebd1b6b74533f44d0468fb8665fe3f81f22 with digest registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian@sha256:b9fe73c6ff5d68f5692fd18b9076735679c8bfa7ed393e752dd4927a2cdf9874 ...
  section_end:1712731908:step_script
  section_start:1712731908:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1712731909:cleanup_file_variables
  ERROR: Job failed (system failure): Error response from daemon: no such image: docker.io/library/sha256:ca01fc804bb92e5df42a202dd7e0470610c6711c66a808525defcb8bbb774078: image not known (docker.go:570:0s)

build:tests-debian-meson-arm64 has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/57412574):
  Checking if the user of the pipeline is allowed...
  Checking if the job's project is part of a well-known group...
  Thank you for contributing to freedesktop.org
  Fetching changes...
  Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/
  Checking out 97515ebd as detached HEAD (ref is intel/IGTPW_10996)...
  Removing build/
  Removing lib/i915/perf-configs/__pycache__/
  Removing scripts/__pycache__/
  
  Skipping Git submodules setup
  section_end:1712731904:get_sources
  section_start:1712731904:step_script
  Executing "step_script" stage of the job script
  Using docker image sha256:7360075a71dacfc66f0b49b3271b9a459904dbe51c5760efac48fe52da27946c for registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-arm64:commit-97515ebd1b6b74533f44d0468fb8665fe3f81f22 with digest registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-arm64@sha256:df8438cd0e218646c3bdc2eb6abccb43c4e884bfd40a1a4dd0365f1f8031d21f ...
  section_end:1712731908:step_script
  section_start:1712731908:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1712731910:cleanup_file_variables
  ERROR: Job failed (system failure): Error response from daemon: container create: reading image "7360075a71dacfc66f0b49b3271b9a459904dbe51c5760efac48fe52da27946c": locating image with ID "7360075a71dacfc66f0b49b3271b9a459904dbe51c5760efac48fe52da27946c": image not known (docker.go:570:0s)

build:tests-debian-meson-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/57412573):
  section_start:1712731897:get_sources
  Getting source from Git repository
  $ /host/bin/curl -s -L --cacert /host/ca-certificates.crt --retry 4 -f --retry-delay 60 https://gitlab.freedesktop.org/freedesktop/helm-gitlab-infra/-/raw/main/runner-gating/runner-gating.sh | sh -s -- pre_get_sources_script
  Checking if the user of the pipeline is allowed...
  Checking if the job's project is part of a well-known group...
  Thank you for contributing to freedesktop.org
  Fetching changes...
  Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/
  Checking out 97515ebd as detached HEAD (ref is intel/IGTPW_10996)...
  
  Skipping Git submodules setup
  section_end:1712731904:get_sources
  section_start:1712731904:step_script
  Executing "step_script" stage of the job script
  Using docker image sha256:4a4103f1a476d355d866b481ff96ac05a32a3a715cefcc1cbc1356a8959fb5f8 for registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-armhf:commit-97515ebd1b6b74533f44d0468fb8665fe3f81f22 with digest registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-armhf@sha256:3a0ffeb305cdc6ef081dde81d86afee76102e74f76c0f7bd5685fc2457ec707b ...
  section_end:1712731908:step_script
  section_start:1712731908:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1712731909:cleanup_file_variables
  ERROR: Job failed (system failure): Error response from daemon: no such image: docker.io/library/sha256:4a4103f1a476d355d866b481ff96ac05a32a3a715cefcc1cbc1356a8959fb5f8: image not known (docker.go:570:0s)

build:tests-debian-meson-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/57412575):
  Checking if the user of the pipeline is allowed...
  Checking if the job's project is part of a well-known group...
  Thank you for contributing to freedesktop.org
  Fetching changes...
  Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/
  Checking out 97515ebd as detached HEAD (ref is intel/IGTPW_10996)...
  Removing build/
  Removing lib/i915/perf-configs/__pycache__/
  Removing scripts/__pycache__/
  
  Skipping Git submodules setup
  section_end:1712731904:get_sources
  section_start:1712731904:step_script
  Executing "step_script" stage of the job script
  Using docker image sha256:cc55efdc667be826910d414a562c76ce1130a9c15255a0dd115431bc42f83448 for registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-mips:commit-97515ebd1b6b74533f44d0468fb8665fe3f81f22 with digest registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-mips@sha256:c829c44880da4782b7a72626c259ac6904b4bd5f08601e66b3be889ca1c0cf79 ...
  section_end:1712731908:step_script
  section_start:1712731908:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1712731909:cleanup_file_variables
  ERROR: Job failed (system failure): Error response from daemon: no such image: docker.io/library/sha256:cc55efdc667be826910d414a562c76ce1130a9c15255a0dd115431bc42f83448: image not known (docker.go:570:0s)

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1150344

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✓ CI.xeBAT: success for enhancements for forcing debugfs of connector
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (9 preceding siblings ...)
  2024-04-10  6:54 ` ✗ GitLab.Pipeline: warning for enhancements for forcing debugfs of connector Patchwork
@ 2024-04-10  7:20 ` Patchwork
  2024-04-10  7:26 ` ✗ Fi.CI.BAT: failure " Patchwork
  2024-04-10 15:03 ` [PATCH i-g-t 0/9] " Ville Syrjälä
  12 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2024-04-10  7:20 UTC (permalink / raw)
  To: Joshi, Kunal1; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]

== Series Details ==

Series: enhancements for forcing debugfs of connector
URL   : https://patchwork.freedesktop.org/series/132249/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_7803_BAT -> XEIGTPW_10996_BAT
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

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

  No changes in participating hosts

Possible new issues
-------------------

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

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_pipe_crc_basic@nonblocking-crc:
    - {bat-lnl-1}:        [PASS][1] -> [DMESG-WARN][2] +1 other test dmesg-warn
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7803/bat-lnl-1/igt@kms_pipe_crc_basic@nonblocking-crc.html
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10996/bat-lnl-1/igt@kms_pipe_crc_basic@nonblocking-crc.html

  
Known issues
------------

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

### IGT changes ###

  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [Intel XE#886]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/886


Build changes
-------------

  * IGT: IGT_7803 -> IGTPW_10996
  * Linux: xe-1063-7be27f645de2f00384b862d2812a90675e8392fa -> xe-1064-057ec21a54cddd595a7725fa8731eb4c5bd5abff

  IGTPW_10996: 10996
  IGT_7803: 9669a17ae56f1dcd22ba4c5cb39b3cd334a46862 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-1063-7be27f645de2f00384b862d2812a90675e8392fa: 7be27f645de2f00384b862d2812a90675e8392fa
  xe-1064-057ec21a54cddd595a7725fa8731eb4c5bd5abff: 057ec21a54cddd595a7725fa8731eb4c5bd5abff

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10996/index.html

[-- Attachment #2: Type: text/html, Size: 2546 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✗ Fi.CI.BAT: failure for enhancements for forcing debugfs of connector
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (10 preceding siblings ...)
  2024-04-10  7:20 ` ✓ CI.xeBAT: success " Patchwork
@ 2024-04-10  7:26 ` Patchwork
  2024-04-10 15:03 ` [PATCH i-g-t 0/9] " Ville Syrjälä
  12 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2024-04-10  7:26 UTC (permalink / raw)
  To: Joshi, Kunal1; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 8004 bytes --]

== Series Details ==

Series: enhancements for forcing debugfs of connector
URL   : https://patchwork.freedesktop.org/series/132249/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14552 -> IGTPW_10996
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_10996 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_10996, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/index.html

Participating hosts (37 -> 32)
------------------------------

  Additional (3): bat-kbl-2 fi-rkl-11600 fi-cfl-8109u 
  Missing    (8): fi-kbl-7567u bat-dg1-7 fi-bsw-n3050 fi-glk-j4005 fi-kbl-8809g fi-elk-e7500 bat-dg2-11 bat-arls-3 

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_ctx_create@basic-files:
    - bat-arls-2:         [PASS][1] -> [ABORT][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-arls-2/igt@gem_ctx_create@basic-files.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/bat-arls-2/igt@gem_ctx_create@basic-files.html

  
Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@debugfs_test@basic-hwmon:
    - fi-rkl-11600:       NOTRUN -> [SKIP][3] ([i915#9318])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@debugfs_test@basic-hwmon.html

  * igt@fbdev@info:
    - bat-kbl-2:          NOTRUN -> [SKIP][4] ([i915#1849])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/bat-kbl-2/igt@fbdev@info.html

  * igt@gem_huc_copy@huc-copy:
    - fi-cfl-8109u:       NOTRUN -> [SKIP][5] ([i915#2190])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-cfl-8109u/igt@gem_huc_copy@huc-copy.html
    - fi-rkl-11600:       NOTRUN -> [SKIP][6] ([i915#2190])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - bat-kbl-2:          NOTRUN -> [SKIP][7] +39 other tests skip
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/bat-kbl-2/igt@gem_lmem_swapping@parallel-random-engines.html
    - fi-rkl-11600:       NOTRUN -> [SKIP][8] ([i915#4613]) +3 other tests skip
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_lmem_swapping@verify-random:
    - fi-cfl-8109u:       NOTRUN -> [SKIP][9] ([i915#4613]) +3 other tests skip
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-cfl-8109u/igt@gem_lmem_swapping@verify-random.html

  * igt@gem_tiled_pread_basic:
    - fi-rkl-11600:       NOTRUN -> [SKIP][10] ([i915#3282])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@gem_tiled_pread_basic.html

  * igt@i915_module_load@load:
    - bat-dg2-9:          [PASS][11] -> [DMESG-WARN][12] ([i915#10014])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-dg2-9/igt@i915_module_load@load.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/bat-dg2-9/igt@i915_module_load@load.html

  * igt@i915_selftest@live@hangcheck:
    - bat-mtlp-6:         [PASS][13] -> [DMESG-WARN][14] ([i915#9522])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-mtlp-6/igt@i915_selftest@live@hangcheck.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/bat-mtlp-6/igt@i915_selftest@live@hangcheck.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-rkl-11600:       NOTRUN -> [SKIP][15] ([i915#4103]) +1 other test skip
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
    - fi-rkl-11600:       NOTRUN -> [SKIP][16] ([i915#3555] / [i915#3840])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@kms_dsc@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-rkl-11600:       NOTRUN -> [SKIP][17]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_pm_backlight@basic-brightness:
    - fi-rkl-11600:       NOTRUN -> [SKIP][18] ([i915#5354])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@kms_pm_backlight@basic-brightness.html
    - fi-cfl-8109u:       NOTRUN -> [SKIP][19] +11 other tests skip
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-cfl-8109u/igt@kms_pm_backlight@basic-brightness.html

  * igt@kms_psr@psr-sprite-plane-onoff:
    - fi-rkl-11600:       NOTRUN -> [SKIP][20] ([i915#1072] / [i915#9732]) +3 other tests skip
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@kms_psr@psr-sprite-plane-onoff.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - fi-rkl-11600:       NOTRUN -> [SKIP][21] ([i915#3555])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-read:
    - fi-rkl-11600:       NOTRUN -> [SKIP][22] ([i915#3291] / [i915#3708]) +2 other tests skip
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/fi-rkl-11600/igt@prime_vgem@basic-read.html

  
#### Possible fixes ####

  * igt@gem_lmem_swapping@basic@lmem0:
    - bat-dg2-9:          [FAIL][23] ([i915#10378]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-dg2-9/igt@gem_lmem_swapping@basic@lmem0.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/bat-dg2-9/igt@gem_lmem_swapping@basic@lmem0.html

  * igt@i915_selftest@live@gt_contexts:
    - bat-dg2-8:          [ABORT][25] ([i915#10366]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-dg2-8/igt@i915_selftest@live@gt_contexts.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/bat-dg2-8/igt@i915_selftest@live@gt_contexts.html

  
  [i915#10014]: https://gitlab.freedesktop.org/drm/intel/issues/10014
  [i915#10366]: https://gitlab.freedesktop.org/drm/intel/issues/10366
  [i915#10378]: https://gitlab.freedesktop.org/drm/intel/issues/10378
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
  [i915#9522]: https://gitlab.freedesktop.org/drm/intel/issues/9522
  [i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_7803 -> IGTPW_10996

  CI-20190529: 20190529
  CI_DRM_14552: 057ec21a54cddd595a7725fa8731eb4c5bd5abff @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_10996: 10996
  IGT_7803: 9669a17ae56f1dcd22ba4c5cb39b3cd334a46862 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10996/index.html

[-- Attachment #2: Type: text/html, Size: 9283 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector
  2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
                   ` (11 preceding siblings ...)
  2024-04-10  7:26 ` ✗ Fi.CI.BAT: failure " Patchwork
@ 2024-04-10 15:03 ` Ville Syrjälä
  12 siblings, 0 replies; 14+ messages in thread
From: Ville Syrjälä @ 2024-04-10 15:03 UTC (permalink / raw)
  To: Kunal Joshi; +Cc: igt-dev

On Wed, Apr 10, 2024 at 12:14:17PM +0530, Kunal Joshi wrote:
> We have kmstest_force_connector that allows forcing a state
> to status sysfs, use the same mechanism for debugfs as well.
> Haven't reused the kmstest_force_connector as its used for sysfs
> and wanted to have seperate flows for debugfs and sysfs.
> 
> patch series adds kmstest_force_connector_debugfs which allows
> set value to particular debugfs of a connector, also it adds an exit
> handler to clear the state at exit.

I had a look at this and thought we could generalize
the code quite a bit. I took a quick stab at doing just
that: https://patchwork.freedesktop.org/series/132284/

> 
> Kunal Joshi (9):
>   lib/igt_kms: Refacror forced_connector struct
>   lib/igt_kms: add forced_connectors_debugfs array
>   lib/igt_kms: add enum kmstest_force_type
>   lib/igt_kms: refactor helpers forced_connectors helpers
>   lib/igt_kms: add igt_reset_connectors_debugfs
>   lib/igt_kms: add exit handler function to clear force debugfs state
>   lib/igt_kms: add kmstest_force_connector_debugfs
>   tests/intel/km_big_joiner: use kmstest_force_connector_debugfs for
>     better cleanup functionality
>   lib/igt_kms: remove unused igt_force_and_check_bigjoiner_status
> 
>  lib/igt_kms.c                | 203 +++++++++++++++++++++++++++--------
>  lib/igt_kms.h                |  25 ++++-
>  tests/intel/kms_big_joiner.c |  23 ++--
>  3 files changed, 193 insertions(+), 58 deletions(-)
> 
> -- 
> 2.34.1

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-04-10 15:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10  6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
2024-04-10  6:44 ` [PATCH i-g-t 1/9] lib/igt_kms: Refacror forced_connector struct Kunal Joshi
2024-04-10  6:44 ` [PATCH i-g-t 2/9] lib/igt_kms: add forced_connectors_debugfs array Kunal Joshi
2024-04-10  6:44 ` [PATCH i-g-t 3/9] lib/igt_kms: add enum kmstest_force_type Kunal Joshi
2024-04-10  6:44 ` [PATCH i-g-t 4/9] lib/igt_kms: refactor helpers forced_connectors helpers Kunal Joshi
2024-04-10  6:44 ` [PATCH i-g-t 5/9] lib/igt_kms: add igt_reset_connectors_debugfs Kunal Joshi
2024-04-10  6:44 ` [PATCH i-g-t 6/9] lib/igt_kms: add exit handler function to clear force debugfs state Kunal Joshi
2024-04-10  6:44 ` [PATCH i-g-t 7/9] lib/igt_kms: add kmstest_force_connector_debugfs Kunal Joshi
2024-04-10  6:44 ` [PATCH i-g-t 8/9] tests/intel/km_big_joiner: use kmstest_force_connector_debugfs for better cleanup functionality Kunal Joshi
2024-04-10  6:44 ` [PATCH i-g-t 9/9] lib/igt_kms: remove unused igt_force_and_check_bigjoiner_status Kunal Joshi
2024-04-10  6:54 ` ✗ GitLab.Pipeline: warning for enhancements for forcing debugfs of connector Patchwork
2024-04-10  7:20 ` ✓ CI.xeBAT: success " Patchwork
2024-04-10  7:26 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-04-10 15:03 ` [PATCH i-g-t 0/9] " Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox