summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stokes <tomstokes@radixengineering.com>2021-07-12 16:22:34 -0600
committerEric Engestrom <eric@engestrom.ch>2022-09-02 11:20:50 +0000
commit61782fc62c9a47deae3d23755a996b2c89ae93b8 (patch)
tree2669a66658a38a60aeed93600c16bdc38e820bb1
parentb45ccf10d2e2323a284ee62ab53ed74a6527f3f0 (diff)
drm: fix crtc not found conditional
find_crtc_for_connector returns -1 if no crtc found, not 0
-rw-r--r--drm-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drm-common.c b/drm-common.c
index 5c9cca2..eb5ac20 100644
--- a/drm-common.c
+++ b/drm-common.c
@@ -310,7 +310,7 @@ int init_drm(struct drm *drm, const char *device, const char *mode_str,
drm->crtc_id = encoder->crtc_id;
} else {
uint32_t crtc_id = find_crtc_for_connector(drm, resources, connector);
- if (crtc_id == 0) {
+ if (crtc_id == -1) {
printf("no crtc found!\n");
return -1;
}