aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson2015-03-04 04:07:19 -0600
committerChris Wilson2015-04-14 09:58:26 -0500
commit5ed5fa10600f0140b317ec07be6f24739c11bd18 (patch)
treed535444f960512bf8eb809f0359b8abcaa7a4080 /xf86drmMode.h
parent6f90b77ea903756c87ae614c093e3d816ebb26fc (diff)
downloadexternal-libgbm-5ed5fa10600f0140b317ec07be6f24739c11bd18.tar.gz
external-libgbm-5ed5fa10600f0140b317ec07be6f24739c11bd18.tar.xz
external-libgbm-5ed5fa10600f0140b317ec07be6f24739c11bd18.zip
mode: Retrieve only the current information for a Connector
Add a new API that allows the caller to skip any forced probing, which may require slow i2c to a remote display, and only report the currently active mode and encoder for a Connector. This is often the information of interest and is much, much faster than re-retrieving the link status and EDIDs, e.g. if the caller only wishes to count the number of active outputs. v2: Fix error path to avoid double free after a failed GETCONNECTOR ioctl. v3: Daniel strongly disapproved of my disjoint in behaviour between GetConnector and GetConnectorCurrent, and considering how best to make a drop in replacement for drmmode_output_init() convinced me keeping the API as consistent as possible was the right approach. v4: Avoid probing on the second calls to GETCONNECTOR for unconnected outputs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: David Herrmann <dh.herrmann@googlemail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'xf86drmMode.h')
-rw-r--r--xf86drmMode.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/xf86drmMode.h b/xf86drmMode.h
index 2d30184e..20c3f153 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -422,10 +422,23 @@ drmModeEncoderPtr drmModeGetEncoder(int fd, uint32_t encoder_id);
422 */ 422 */
423 423
424/** 424/**
425 * Retrive information about the connector connectorId. 425 * Retrieve all information about the connector connectorId. This will do a
426 * forced probe on the connector to retrieve remote information such as EDIDs
427 * from the display device.
426 */ 428 */
427extern drmModeConnectorPtr drmModeGetConnector(int fd, 429extern drmModeConnectorPtr drmModeGetConnector(int fd,
428 uint32_t connectorId); 430 uint32_t connectorId);
431
432/**
433 * Retrieve current information, i.e the currently active mode and encoder,
434 * about the connector connectorId. This will not do any probing on the
435 * connector or remote device, and only reports what is currently known.
436 * For the complete set of modes and encoders associated with the connector
437 * use drmModeGetConnector() which will do a probe to determine any display
438 * link changes first.
439 */
440extern drmModeConnectorPtr drmModeGetConnectorCurrent(int fd,
441 uint32_t connector_id);
429 442
430/** 443/**
431 * Attaches the given mode to an connector. 444 * Attaches the given mode to an connector.