summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-12 05:04:16 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-12 05:04:16 +0200
commit13679ba91052ae0fade5c9c534bf789d0e76c85d (patch)
tree263f93dcc7398f70bafea4efb88f47bd1271a20a /src
parentadd (absolute) support for 256 byte EDID:s (deprecated, and I think also rare) (diff)
downloadblueshift-13679ba91052ae0fade5c9c534bf789d0e76c85d.tar.gz
blueshift-13679ba91052ae0fade5c9c534bf789d0e76c85d.tar.bz2
blueshift-13679ba91052ae0fade5c9c534bf789d0e76c85d.tar.xz
m doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/blueshift_drm.pyx7
-rw-r--r--src/blueshift_drm_c.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/blueshift_drm.pyx b/src/blueshift_drm.pyx
index f4bfc06..dae3bb7 100644
--- a/src/blueshift_drm.pyx
+++ b/src/blueshift_drm.pyx
@@ -185,7 +185,9 @@ Get the extended display identification data for the monitor connected to a conn
@param connection The identifier for the connection to the card
@param connector_index The index of the connector
-@param edid Storage location for the EDID, it should be 128 bytes, 256 bytes + zero termination if hex
+@param edid Storage location for the EDID, it should be 128 bytes,
+ or 256 bytes if you are counting on the depricated EDID 2.0,
+ If hexadecimal, twice that + zero termiation.
@param size The size allocated to `edid` excluding your zero termination
@param hexadecimal Whether to convert to hexadecimal representation, this is preferable
@return The length of the found value, 0 if none, as if hex is false
@@ -519,6 +521,9 @@ def drm_get_edid(int connection, int connector_index):
# Prototype side of the hexadecimal representation
# of the EDID, should be exact
size = 256
+ # It could be twice that, but we will not base
+ # our start value on something that is unlikely.
+
# Allocate storage space for the EDID, with one
# extra character for NUL-termination
edid = <char*>malloc((size + 1) * sizeof(char))
diff --git a/src/blueshift_drm_c.c b/src/blueshift_drm_c.c
index 8da5ccf..1f010c0 100644
--- a/src/blueshift_drm_c.c
+++ b/src/blueshift_drm_c.c
@@ -403,7 +403,7 @@ const char* blueshift_drm_get_connector_type_name(int connection, int connector_
*
* @param connection The identifier for the connection to the card
* @param connector_index The index of the connector
- * @param edid Storage location for the EDID, it should be 128 bytes, 256 bytes + zero termination if hex
+ * @param edid Storage location for the EDID, it should be 256 bytes, 512 bytes + zero termination if hex
* @param size The size allocated to `edid` excluding your zero termination
* @param hexadecimal Whether to convert to hexadecimal representation, this is preferable
* @return The length of the found value, 0 if none, as if hex is false