diff mbox series

[08/15] UBUNTU: SAUCE: drm/i915/edp: reject modes with dimensions other than fixed mode

Message ID 20210326073009.515253-9-aaron.ma@canonical.com
State New
Headers show
Series UBUNTU: SAUCE: add support of MSO panel | expand

Commit Message

Aaron Ma March 26, 2021, 7:30 a.m. UTC
From: Jani Nikula <jani.nikula@intel.com>

BugLink: https://bugs.launchpad.net/bugs/1921318

Be more strict about filtering modes for eDP.

Cc: Nischal Varide <nischal.varide@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/feb4c3b2b9c4da56a840bdb3c0e7fd0e58ee50de.1613054234.git.jani.nikula@intel.com
(cherry picked from commit 8733932a72d73e2ae31e38ca995fb538aa2149e3
https://anongit.freedesktop.org/git/drm-intel.git drm-intel-next)
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index e0dbf285b7b6..7bd374c926b7 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -675,10 +675,10 @@  intel_dp_mode_valid(struct drm_connector *connector,
 		return MODE_NO_DBLESCAN;
 
 	if (intel_dp_is_edp(intel_dp) && fixed_mode) {
-		if (mode->hdisplay > fixed_mode->hdisplay)
+		if (mode->hdisplay != fixed_mode->hdisplay)
 			return MODE_PANEL;
 
-		if (mode->vdisplay > fixed_mode->vdisplay)
+		if (mode->vdisplay != fixed_mode->vdisplay)
 			return MODE_PANEL;
 
 		target_clock = fixed_mode->clock;