[PATCH i-g-t v2 4/4] lib/kms: Clear connector_attrs[] upon setting the reset value

Ville Syrjala ville.syrjala at linux.intel.com
Thu Apr 11 18:34:50 UTC 2024


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

When anyone manually sets the connector attr to the reset value
we can stop tracking said attr.

Cc: Kunal Joshi <kunal1.joshi at intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 lib/igt_kms.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 3da49d1ccb6e..3216fe7e434c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1572,6 +1572,9 @@ static bool connector_attr_set(int idx, drmModeConnector *connector,
 		return false;
 	}
 
+	if (!strcmp(c->value, c->reset_value))
+		connector_attr_free(c);
+
 	return true;
 }
 
-- 
2.43.2



More information about the igt-dev mailing list