On Wed, Jan 21, 2026 at 09:23:17AM +0530, Ankit Nautiyal wrote:
> Move check for bad hdisplay early as it is independent on other checks.
> 
> Signed-off-by: Ankit Nautiyal <[email protected]>

Reviewed-by: Imre Deak <[email protected]>

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 79fd3b8d8b25..126da297efc5 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1460,6 +1460,9 @@ intel_dp_mode_valid(struct drm_connector *_connector,
>       if (mode->clock < 10000)
>               return MODE_CLOCK_LOW;
>  
> +     if (intel_dp_hdisplay_bad(display, mode->hdisplay))
> +             return MODE_H_ILLEGAL;
> +
>       fixed_mode = intel_panel_fixed_mode(connector, mode);
>       if (intel_dp_is_edp(intel_dp) && fixed_mode) {
>               status = intel_panel_mode_valid(connector, mode);
> @@ -1483,9 +1486,6 @@ intel_dp_mode_valid(struct drm_connector *_connector,
>       if (target_clock > max_dotclk)
>               return MODE_CLOCK_HIGH;
>  
> -     if (intel_dp_hdisplay_bad(display, mode->hdisplay))
> -             return MODE_H_ILLEGAL;
> -
>       max_link_clock = intel_dp_max_link_rate(intel_dp);
>       max_lanes = intel_dp_max_lane_count(intel_dp);
>  
> -- 
> 2.45.2
> 

Reply via email to