summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2025-06-15 19:43:33 -0700
committerVito Caputo <vcaputo@pengaru.com>2025-06-15 20:08:01 -0700
commit02401bbc93939803cbe0f12adcb956c77f648b21 (patch)
treeaad7a70ae6a6582e3945c0169e31d0c6b81f9cec
parent80a545ca46bf918fc535b5a617f00ecd906e8240 (diff)
drm_fb: suppress drmAvailable() checksHEADmaster
This is preventing --video=drm from working on my X230 today for no good reason. It seems libdrm is assuming /dev/dri/card0 will be present if drm's available. But for some reason my X230 only has /dev/dri/card1 presently. It didn't used to be this way, something is weird, but I'm not going to dig into it. If it happened here, it may happen elsewhere, and drmAvailable() is proving actively harmful. For now I'm just disabling the check w/#if 0
-rw-r--r--src/drm_fb.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/drm_fb.c b/src/drm_fb.c
index 8ba097c..7ac6f3f 100644
--- a/src/drm_fb.c
+++ b/src/drm_fb.c
@@ -339,12 +339,19 @@ static int drm_fb_init(const char *title, const til_video_setup_t *setup, void *
int r;
assert(setup);
-
+#if 0
+ /* This has proven to produce false negatives - on my X230 now I for some reason
+ * only have /dev/dri/card1, no card0, and this is causing libdrm to fail here.
+ * But if I disable this check, and specify /dev/dri/card1 instead of card0, I'm
+ * able to use rototiller on drm. I don't have time to investigate why libdrm
+ * is broken in this check, so I'm just disabling this check.
+ * FIXME
+ */
if (!drmAvailable()) {
r = -errno;
goto _err;
}
-
+#endif
if (!s->dev || !s->connector || !s->mode) {
r = -EINVAL;
goto _err;
@@ -592,10 +599,11 @@ static int drm_fb_setup(const til_settings_t *settings, til_setting_t **res_sett
.func = mode_desc_generator
},
};
-
+#if 0
+ /* FIXME: see comment above by other drmAvailable() call. */
if (!drmAvailable())
return -ENOSYS;
-
+#endif
if (!setup)
return -ENOMEM;
© All Rights Reserved