compositor: add weston.ini option max-bpc

For working around hardware limitations as explained in the man page.
Now added for completeness' sake without knowing if anyone will ever
need this.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2022-06-07 15:02:55 +03:00 committed by Pekka Paalanen
parent d24adbbe25
commit 8de94ec9c9
2 changed files with 13 additions and 0 deletions

View File

@ -2000,6 +2000,7 @@ drm_backend_output_configure(struct weston_output *output,
enum weston_drm_backend_output_mode mode =
WESTON_DRM_BACKEND_OUTPUT_PREFERRED;
uint32_t transform = WL_OUTPUT_TRANSFORM_NORMAL;
uint32_t max_bpc;
char *s;
char *modeline = NULL;
char *gbm_format = NULL;
@ -2011,6 +2012,9 @@ drm_backend_output_configure(struct weston_output *output,
return -1;
}
weston_config_section_get_uint(section, "max-bpc", &max_bpc, 16);
api->set_max_bpc(output, max_bpc);
weston_config_section_get_string(section, "mode", &s, "preferred");
if (strcmp(s, "off") == 0) {

View File

@ -164,6 +164,15 @@ Defaults to false. Note that
When a connector is disconnected, there is no EDID information to provide
a list of video modes. Therefore a forced output should also have a
detailed mode line specified.
.TP
\fBmax-bpc\fR=\fIN\fR
.RB "Set \(dq" "max bpc" "\(dq KMS property to value"
.IR N ,
silenty clamped to the hardware driver supported range. This artificially
limits the driver chosen link bits-per-channel which may be useful for working
around sink hardware (e.g. monitor) limitations. The default is 16 which is
practically unlimited. If you need to work around hardware issues, try a lower
value like 8.
.SS Section remote-output
.TP