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>
dev
Pekka Paalanen 2 years ago committed by Pekka Paalanen
parent d24adbbe25
commit 8de94ec9c9
  1. 4
      compositor/main.c
  2. 9
      man/weston-drm.man

@ -2000,6 +2000,7 @@ drm_backend_output_configure(struct weston_output *output,
enum weston_drm_backend_output_mode mode = enum weston_drm_backend_output_mode mode =
WESTON_DRM_BACKEND_OUTPUT_PREFERRED; WESTON_DRM_BACKEND_OUTPUT_PREFERRED;
uint32_t transform = WL_OUTPUT_TRANSFORM_NORMAL; uint32_t transform = WL_OUTPUT_TRANSFORM_NORMAL;
uint32_t max_bpc;
char *s; char *s;
char *modeline = NULL; char *modeline = NULL;
char *gbm_format = NULL; char *gbm_format = NULL;
@ -2011,6 +2012,9 @@ drm_backend_output_configure(struct weston_output *output,
return -1; 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"); weston_config_section_get_string(section, "mode", &s, "preferred");
if (strcmp(s, "off") == 0) { if (strcmp(s, "off") == 0) {

@ -164,6 +164,15 @@ Defaults to false. Note that
When a connector is disconnected, there is no EDID information to provide 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 a list of video modes. Therefore a forced output should also have a
detailed mode line specified. 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 .SS Section remote-output
.TP .TP

Loading…
Cancel
Save