backends: Get the RGB range from a monitor config to the output

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3535>
This commit is contained in:
Sebastian Wick 2024-01-19 19:28:20 +01:00 committed by Marge Bot
parent 3f866d22c9
commit 926f7ea26d
3 changed files with 8 additions and 2 deletions

View File

@ -285,7 +285,8 @@ assign_monitor_crtc (MetaMonitor *monitor,
.is_presentation = assign_output_as_presentation, .is_presentation = assign_output_as_presentation,
.is_underscanning = data->monitor_config->enable_underscanning, .is_underscanning = data->monitor_config->enable_underscanning,
.has_max_bpc = data->monitor_config->has_max_bpc, .has_max_bpc = data->monitor_config->has_max_bpc,
.max_bpc = data->monitor_config->max_bpc .max_bpc = data->monitor_config->max_bpc,
.rgb_range = data->monitor_config->rgb_range,
}; };
g_ptr_array_add (data->crtc_assignments, crtc_assignment); g_ptr_array_add (data->crtc_assignments, crtc_assignment);
@ -690,7 +691,8 @@ create_monitor_config (MetaMonitor *monitor,
*monitor_config = (MetaMonitorConfig) { *monitor_config = (MetaMonitorConfig) {
.monitor_spec = meta_monitor_spec_clone (monitor_spec), .monitor_spec = meta_monitor_spec_clone (monitor_spec),
.mode_spec = g_memdup2 (mode_spec, sizeof (MetaMonitorModeSpec)), .mode_spec = g_memdup2 (mode_spec, sizeof (MetaMonitorModeSpec)),
.enable_underscanning = meta_monitor_is_underscanning (monitor) .enable_underscanning = meta_monitor_is_underscanning (monitor),
.rgb_range = meta_monitor_get_rgb_range (monitor),
}; };
monitor_config->has_max_bpc = monitor_config->has_max_bpc =

View File

@ -106,6 +106,7 @@ struct _MetaOutputAssignment
gboolean is_underscanning; gboolean is_underscanning;
gboolean has_max_bpc; gboolean has_max_bpc;
unsigned int max_bpc; unsigned int max_bpc;
unsigned int rgb_range;
}; };
/* /*

View File

@ -269,6 +269,9 @@ meta_output_assign_crtc (MetaOutput *output,
priv->is_presentation = output_assignment->is_presentation; priv->is_presentation = output_assignment->is_presentation;
priv->is_underscanning = output_assignment->is_underscanning; priv->is_underscanning = output_assignment->is_underscanning;
if (output_assignment->rgb_range)
priv->rgb_range = output_assignment->rgb_range;
priv->has_max_bpc = output_assignment->has_max_bpc; priv->has_max_bpc = output_assignment->has_max_bpc;
if (priv->has_max_bpc) if (priv->has_max_bpc)
priv->max_bpc = output_assignment->max_bpc; priv->max_bpc = output_assignment->max_bpc;