summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2023-04-28 14:29:59 +0300
committerPekka Paalanen <pekka.paalanen@collabora.com>2023-04-28 16:18:22 +0300
commit8ca6c24c8fa08651ef75ff37f28677de0e01553d (patch)
tree4003a88e709e36a67bbdd24688c37bbe3465dec6
parentd6a4c58f07d70077460c40673b7ddce95aeebe1b (diff)
downloadweston-8ca6c24c8fa08651ef75ff37f28677de0e01553d.tar.gz
backend-drm: drop HDR without libdisplay-info
Hardcode the ad hoc EDID parser to always claim that only SDR is supported. Even though libdisplay-info is not yet asked for HDR capabilities, it shall be the only way to see them. To be nicer to experimenters, main.c adds a note that you really need libdisplay-info if you want to play with HDR. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-rw-r--r--compositor/main.c4
-rw-r--r--libweston/backend-drm/modes.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/compositor/main.c b/compositor/main.c
index 36f70e2b..c6144660 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -1401,6 +1401,10 @@ wet_output_set_eotf_mode(struct weston_output *output,
if ((weston_output_get_supported_eotf_modes(output) & eotf_mode) == 0) {
weston_log("Error: output '%s' does not support EOTF mode %s.\n",
output->name, str);
+#if !HAVE_LIBDISPLAY_INFO
+ weston_log_continue(STAMP_SPACE "Weston was built without libdisplay-info, "
+ "so HDR capabilities cannot be detected.\n");
+#endif
free(str);
return -1;
}
diff --git a/libweston/backend-drm/modes.c b/libweston/backend-drm/modes.c
index 66816572..901372bb 100644
--- a/libweston/backend-drm/modes.c
+++ b/libweston/backend-drm/modes.c
@@ -378,8 +378,8 @@ drm_head_info_from_edid(struct drm_head_info *dhi,
dhi->serial_number = xstrdup(edid.serial_number);
}
- /* TODO: parse this from EDID */
- dhi->eotf_mask = WESTON_EOTF_MODE_ALL_MASK;
+ /* This ad hoc code will never parse HDR data. */
+ dhi->eotf_mask = WESTON_EOTF_MODE_SDR;
}
#endif /* HAVE_LIBDISPLAY_INFO else */