diff mbox series

[v3,2/9] drm/i915/edp: reject modes with dimensions other than fixed mode

Message ID feb4c3b2b9c4da56a840bdb3c0e7fd0e58ee50de.1613054234.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/edp: enable eDP Multi-SST Operation (MSO) | expand

Commit Message

Jani Nikula Feb. 11, 2021, 2:52 p.m. UTC
Be more strict about filtering modes for eDP.

Cc: Nischal Varide <nischal.varide@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Shankar, Uma Feb. 22, 2021, 5:36 a.m. UTC | #1
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Jani Nikula
> Sent: Thursday, February 11, 2021 8:22 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani <jani.nikula@intel.com>; Varide, Nischal <nischal.varide@intel.com>
> Subject: [Intel-gfx] [PATCH v3 2/9] drm/i915/edp: reject modes with dimensions
> other than fixed mode
> 
> Be more strict about filtering modes for eDP.
> 
> Cc: Nischal Varide <nischal.varide@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 4f89e0de5dde..169b44c8ebbc 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -789,10 +789,10 @@ intel_dp_mode_valid(struct drm_connector *connector,
>  		return MODE_H_ILLEGAL;
> 
>  	if (intel_dp_is_edp(intel_dp) && fixed_mode) {
> -		if (mode->hdisplay > fixed_mode->hdisplay)
> +		if (mode->hdisplay != fixed_mode->hdisplay)
>  			return MODE_PANEL;

Looks fine as we practically will not have panels with multiple resolutions except maybe mode with varying
refresh rate incase of DRRS panels. But hdisplay and vdisplay will still remain same.

Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> -		if (mode->vdisplay > fixed_mode->vdisplay)
> +		if (mode->vdisplay != fixed_mode->vdisplay)
>  			return MODE_PANEL;
> 
>  		target_clock = fixed_mode->clock;
> --
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
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 4f89e0de5dde..169b44c8ebbc 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -789,10 +789,10 @@  intel_dp_mode_valid(struct drm_connector *connector,
 		return MODE_H_ILLEGAL;
 
 	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;