[Intel-gfx] [PATCH] drm/i915: Don't call bxt_ddi_phy_calc_lane_lat_optim_mask() after failing intel_dp_compute_config()
Ville Syrjala
ville.syrjala at linux.intel.com
Thu Apr 11 14:35:08 UTC 2019
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
If intel_dp_compute_config() fails it may not have populated
crtc_state->lane_count, which means
bxt_ddi_phy_calc_lane_lat_optim_mask() may end up with a MISSING_CASE().
Bail out immediately if intel_dp_compute_config() (or the HDMI
counterpart) fails so that we avoid triggeringing this MISSING_CASE
warning.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109373
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/intel_ddi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 3ae55274056c..3733e5858e08 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -3857,6 +3857,8 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder,
ret = intel_hdmi_compute_config(encoder, pipe_config, conn_state);
else
ret = intel_dp_compute_config(encoder, pipe_config, conn_state);
+ if (ret)
+ return ret;
if (IS_GEN9_LP(dev_priv) && ret)
pipe_config->lane_lat_optim_mask =
@@ -3864,7 +3866,7 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder,
intel_ddi_compute_min_voltage_level(dev_priv, pipe_config);
- return ret;
+ return 0;
}
--
2.21.0
More information about the Intel-gfx
mailing list