summaryrefslogtreecommitdiff
path: root/drm.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2017-02-22 11:36:12 -0500
committerRob Clark <robdclark@gmail.com>2017-02-25 10:48:22 -0500
commit87e3ff5683ee54228b3e6e75f7d4de83901fadb0 (patch)
tree0aa767fb89bbf7c64670fb117f5a2b65cda9db4a /drm.c
parent1f1158fe1279e845420d3cb838eff3bbf2e5701a (diff)
add atomic kms support
Based mostly on original atomic conversion from Gustavo Padovan.
Diffstat (limited to 'drm.c')
-rw-r--r--drm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drm.c b/drm.c
index d9cd7e2..d082846 100644
--- a/drm.c
+++ b/drm.c
@@ -194,6 +194,13 @@ int init_drm(struct drm *drm, const char *device)
drm->crtc_id = crtc_id;
}
+ for (i = 0; i < resources->count_crtcs; i++) {
+ if (resources->crtcs[i] == drm->crtc_id) {
+ drm->crtc_index = i;
+ break;
+ }
+ }
+
drmModeFreeResources(resources);
drm->connector_id = connector->connector_id;