From 13679ba91052ae0fade5c9c534bf789d0e76c85d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 12 Apr 2014 05:04:16 +0200 Subject: m doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blueshift_drm.pyx | 7 ++++++- src/blueshift_drm_c.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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 = 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 -- cgit v1.2.3-70-g09d2