[PATCH xf86-video-intel] Don't accept dblscan from xf86DefaultModes[]
From: Ville SyrjÃlÃ
Date: Wed May 23 2018 - 15:10:07 EST
---
src/sna/sna_display.c | 3 +++
src/uxa/intel_display.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 6f6bea2e9cad..b38a915ca4ec 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -4204,6 +4204,8 @@ sna_output_add_default_modes(xf86OutputPtr output, DisplayModePtr modes)
DisplayModePtr i, m, preferred = NULL;
int max_x = 0, max_y = 0, max_clock = 0;
float max_vrefresh = 0.0;
+ int flags = (output->interlaceAllowed ? V_INTERLACE : 0) |
+ (output->doubleScanAllowed ? V_DBLSCAN : 0);
if (mon && GTF_SUPPORTED(mon->features.msc))
return modes;
@@ -4220,6 +4222,7 @@ sna_output_add_default_modes(xf86OutputPtr output, DisplayModePtr modes)
m = default_modes(preferred);
xf86ValidateModesSize(output->scrn, m, max_x, max_y, 0);
+ xf86ValidateModesFlags(output->scrn, m, flags);
for (i = m; i; i = i->next) {
if (i->Clock > max_clock)
diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index 809cda1dd56b..431727fc4ac2 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -919,6 +919,8 @@ intel_output_panel_edid(xf86OutputPtr output, DisplayModePtr modes)
DisplayModePtr i, m, p = NULL;
int max_x = 0, max_y = 0;
float max_vrefresh = 0.0;
+ int flags = (output->interlaceAllowed ? V_INTERLACE : 0) |
+ (output->doubleScanAllowed ? V_DBLSCAN : 0);
for (m = modes; m; m = m->next) {
if (m->type & M_T_PREFERRED)
@@ -938,6 +940,7 @@ intel_output_panel_edid(xf86OutputPtr output, DisplayModePtr modes)
#endif
xf86ValidateModesSize(output->scrn, m, max_x, max_y, 0);
+ xf86ValidateModesFlags(output->scrn, m, flags);
for (i = m; i; i = i->next) {
if (xf86ModeVRefresh(i) > max_vrefresh)
--
2.16.1
--
Ville Syrjälä
Intel