drm/i915: Shuffle DP .mode_valid() checks
Move some of the more trivial checks in the DP .mode_valid() hooks upwards to lessen the noise amongst the more complex checks. Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240402135148.23011-3-ville.syrjala@linux.intel.com
This commit is contained in:
parent
e00f20baee
commit
e9fa99dd47
@ -1229,6 +1229,9 @@ intel_dp_mode_valid(struct drm_connector *_connector,
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
return MODE_H_ILLEGAL;
|
||||
|
||||
if (mode->clock < 10000)
|
||||
return MODE_CLOCK_LOW;
|
||||
|
||||
fixed_mode = intel_panel_fixed_mode(connector, mode);
|
||||
if (intel_dp_is_edp(intel_dp) && fixed_mode) {
|
||||
status = intel_panel_mode_valid(connector, mode);
|
||||
@ -1238,9 +1241,6 @@ intel_dp_mode_valid(struct drm_connector *_connector,
|
||||
target_clock = fixed_mode->clock;
|
||||
}
|
||||
|
||||
if (mode->clock < 10000)
|
||||
return MODE_CLOCK_LOW;
|
||||
|
||||
if (intel_dp_need_bigjoiner(intel_dp, mode->hdisplay, target_clock)) {
|
||||
bigjoiner = true;
|
||||
max_dotclk *= 2;
|
||||
|
@ -1302,6 +1302,16 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
|
||||
if (*status != MODE_OK)
|
||||
return 0;
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK) {
|
||||
*status = MODE_H_ILLEGAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mode->clock < 10000) {
|
||||
*status = MODE_CLOCK_LOW;
|
||||
return 0;
|
||||
}
|
||||
|
||||
max_link_clock = intel_dp_max_link_rate(intel_dp);
|
||||
max_lanes = intel_dp_max_lane_count(intel_dp);
|
||||
|
||||
@ -1330,17 +1340,6 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
|
||||
*status = MODE_CLOCK_HIGH;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mode->clock < 10000) {
|
||||
*status = MODE_CLOCK_LOW;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK) {
|
||||
*status = MODE_H_ILLEGAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (intel_dp_need_bigjoiner(intel_dp, mode->hdisplay, target_clock)) {
|
||||
bigjoiner = true;
|
||||
max_dotclk *= 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user