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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 25, 2021 at 05:52:26PM +0200, Jani Nikula wrote:
> Be more strict about filtering modes for eDP.
> 
> Cc: Nischal Varide <nischal.varide@xxxxxxxxx>
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> ---
>  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 8979996f1747..6afea0681ce9 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -787,10 +787,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;

Yeah, I think this makes sense since we never use anything
but the fixed_mode for the actual timings. I don't think I've
ever seen a display that would advertise multiple resolution.
And I think that would actually indicate that the panel can
really accept different resolutions, which we would never do
anyway.

The old behaviour would make more sense if we allowed userspace
to add custom modes to the mode list. But we don't. All custom
pfit scaled modes I think are always a purely userspace thing
(based on the presence of the scaling mode prop).

We should probably do this for the output types as well.
Not quite sure what to do about SDVO (and maybe DVO) so
probably ignore those for now.


>  
>  		target_clock = fixed_mode->clock;
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux