[igt-dev] [PATCH i-g-t v2 2/9] lib/igt_chamelium: fix chamelium_port_set_edid docs

Simon Ser simon.ser at intel.com
Wed Jun 19 15:55:11 UTC 2019


There were two issues:

1. The documentation was wrong, the EDID ID 0 doesn't disable EDIDs, it just
   resets the EDID to Chamelium's default one.
2. My previous patch updating these docs missed the second line of the argument
   description. The result was that only reading the first line was fine, but
   reading both lines felt weird.

Signed-off-by: Simon Ser <simon.ser at intel.com>
Fixes: 1f67ee0d09d6 ("lib/igt_chamelium: replace EDID IDs with opaque structs")
---
 lib/igt_chamelium.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 966d78dce146..4a3f64b3585d 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -564,21 +564,22 @@ static void chamelium_destroy_edid(struct chamelium *chamelium, int edid_id)
  * chamelium_port_set_edid:
  * @chamelium: The Chamelium instance to use
  * @port: The port on the Chamelium to set the EDID on
- * @edid: The Chamelium EDID to set
- * #chamelium_new_edid, or 0 to disable the EDID on the port
+ * @edid: The Chamelium EDID to set or NULL to use the default Chamelium EDID
  *
  * Sets a port on the chamelium to use the specified EDID. This does not fire a
  * hotplug pulse on it's own, and merely changes what EDID the chamelium port
  * will report to us the next time we probe it. Users will need to reprobe the
  * connectors themselves if they want to see the EDID reported by the port
  * change.
+ *
+ * To create an EDID, see #chamelium_new_edid.
  */
 void chamelium_port_set_edid(struct chamelium *chamelium,
 			     struct chamelium_port *port,
 			     struct chamelium_edid *edid)
 {
 	xmlrpc_DECREF(chamelium_rpc(chamelium, NULL, "ApplyEdid", "(ii)",
-				    port->id, edid->id));
+				    port->id, edid ? edid->id : 0));
 }
 
 /**
-- 
2.22.0



More information about the igt-dev mailing list