Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kunal Joshi <kunal1.joshi@intel.com>
Subject: [PATCH i-g-t v2 4/4] lib/kms: Clear connector_attrs[] upon setting the reset value
Date: Thu, 11 Apr 2024 21:34:50 +0300	[thread overview]
Message-ID: <20240411183450.6417-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20240411183450.6417-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@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@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@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


  parent reply	other threads:[~2024-04-11 18:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 18:34 [PATCH i-g-t v2 1/4] lib/kms: Introduce struct igt_forced_connector Ville Syrjala
2024-04-11 18:34 ` [PATCH i-g-t v2 2/4] lib/kms: Adjust forced_connectors[] traversal Ville Syrjala
2024-04-14  5:56   ` Joshi, Kunal1
2024-04-11 18:34 ` [PATCH i-g-t v2 3/4] lib/kms: Generalize forced_connectors[] to handle arbitrary attributes Ville Syrjala
2024-04-14  5:57   ` Joshi, Kunal1
2024-04-11 18:34 ` Ville Syrjala [this message]
2024-04-14  5:59   ` [PATCH i-g-t v2 4/4] lib/kms: Clear connector_attrs[] upon setting the reset value Joshi, Kunal1
2024-04-16 12:33     ` Ville Syrjälä
2024-04-11 19:17 ` ✓ CI.xeBAT: success for series starting with [i-g-t,v2,1/4] lib/kms: Introduce struct igt_forced_connector Patchwork
2024-04-11 19:26 ` ✓ Fi.CI.BAT: " Patchwork
2024-04-12  1:49 ` ✗ CI.xeFULL: failure " Patchwork
2024-04-12  5:17 ` ✗ Fi.CI.IGT: " Patchwork
2024-04-14  5:55 ` [PATCH i-g-t v2 1/4] " Joshi, Kunal1

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240411183450.6417-4-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kunal1.joshi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox