[mutter/gnome-3-38] output/kms: Only add common modes for single mode connectors
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-38] output/kms: Only add common modes for single mode connectors
- Date: Thu, 15 Apr 2021 12:12:00 +0000 (UTC)
commit 607803c4b5366a2ea7f0ffdc64bd7738856cc281
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Apr 14 09:03:12 2021 +0200
output/kms: Only add common modes for single mode connectors
If there was only a single mode, add the common modes to provide options
to select other resolutions than the built in default. This avoids
issues where the connector listed multiple supported modes, but where
the common modes added would exceed the possible bandwidth. We could
probably make an attempt to filter out more modes from the common mode
list to avoid these issues, but it's likely that the driver already
lists suitable modes, meaning there is no point in adding the common
modes.
The common modes were initially added[0] to add modes to connectors with
a single bundled mode, so we shouldn't regress the original bug fix.
[0] https://bugzilla.gnome.org/show_bug.cgi?id=744544
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1232
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1825>
src/backends/native/meta-output-kms.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/backends/native/meta-output-kms.c b/src/backends/native/meta-output-kms.c
index 2f27029ce8..c4cd4d4ab0 100644
--- a/src/backends/native/meta-output-kms.c
+++ b/src/backends/native/meta-output-kms.c
@@ -259,10 +259,7 @@ init_output_modes (MetaOutputInfo *output_info,
output_info->preferred_mode = output_info->modes[i];
}
- /* Presume that if the output supports scaling, then we have
- * a panel fitter capable of adjusting any mode to suit.
- */
- if (connector_state->has_scaling)
+ if (connector_state->has_scaling && connector_state->n_modes == 1)
add_common_modes (output_info, gpu_kms);
if (!output_info->modes)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]