aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-06-03 08:23:52 +0200
committerMattias Andrée <maandree@operamail.com>2014-06-03 08:23:52 +0200
commit9ae52d88de80cbea384bf40eda0ad208203af6f4 (patch)
tree2586f51d8c4e073773fec0654b703582d65f5e04
parentadd missing % in an sprintf, why did the compiler not warn us? (diff)
downloadlibgamma-9ae52d88de80cbea384bf40eda0ad208203af6f4.tar.gz
libgamma-9ae52d88de80cbea384bf40eda0ad208203af6f4.tar.bz2
libgamma-9ae52d88de80cbea384bf40eda0ad208203af6f4.tar.xz
doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/lib/gamma-linux-drm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/gamma-linux-drm.c b/src/lib/gamma-linux-drm.c
index 8d6a0e9..5587a2a 100644
--- a/src/lib/gamma-linux-drm.c
+++ b/src/lib/gamma-linux-drm.c
@@ -452,8 +452,14 @@ static drmModeConnector* find_connector(libgamma_crtc_state_t* restrict this, in
/* Fill connector and encoder arrays. */
for (i = 0; i < n; i++)
{
+ /* Get connector, */
if ((card->connectors[i] = drmModeGetConnector(card->fd, card->res->connectors[i])) == NULL)
goto fail;
+ /* Get encoder if the connector is enabled.
+ If it is disabled it will not have an
+ encoder, which is indicated by the
+ encoder ID being 0. In such case, leave
+ the encoder to be `NULL`. */
if ((card->connectors[i]->encoder_id != 0) &&
((card->encoders[i] = drmModeGetEncoder(card->fd, card->connectors[i]->encoder_id)) == NULL))
goto fail;