diff --git a/src/backends/meta-output.c b/src/backends/meta-output.c index 9d9454fdf..a02feca90 100644 --- a/src/backends/meta-output.c +++ b/src/backends/meta-output.c @@ -55,6 +55,9 @@ typedef struct _MetaOutputPrivate gboolean is_underscanning; + gboolean has_max_bpc; + unsigned int max_bpc; + int backlight; } MetaOutputPrivate; @@ -177,6 +180,18 @@ meta_output_is_underscanning (MetaOutput *output) return priv->is_underscanning; } +gboolean +meta_output_get_max_bpc (MetaOutput *output, + unsigned int *max_bpc) +{ + MetaOutputPrivate *priv = meta_output_get_instance_private (output); + + if (priv->has_max_bpc && max_bpc) + *max_bpc = priv->max_bpc; + + return priv->has_max_bpc; +} + void meta_output_set_backlight (MetaOutput *output, int backlight) @@ -235,6 +250,10 @@ meta_output_assign_crtc (MetaOutput *output, priv->is_primary = output_assignment->is_primary; priv->is_presentation = output_assignment->is_presentation; priv->is_underscanning = output_assignment->is_underscanning; + + priv->has_max_bpc = output_assignment->has_max_bpc; + if (priv->has_max_bpc) + priv->max_bpc = output_assignment->max_bpc; } void diff --git a/src/backends/meta-output.h b/src/backends/meta-output.h index cbacabace..9970a7a45 100644 --- a/src/backends/meta-output.h +++ b/src/backends/meta-output.h @@ -107,6 +107,9 @@ typedef struct _MetaOutputInfo gboolean supports_underscanning; gboolean supports_color_transform; + unsigned int max_bpc_min; + unsigned int max_bpc_max; + /* * Get a new preferred mode on hotplug events, to handle dynamic guest * resizing. @@ -182,6 +185,10 @@ gboolean meta_output_is_presentation (MetaOutput *output); META_EXPORT_TEST gboolean meta_output_is_underscanning (MetaOutput *output); +META_EXPORT_TEST +gboolean meta_output_get_max_bpc (MetaOutput *output, + unsigned int *max_bpc); + void meta_output_set_backlight (MetaOutput *output, int backlight);