All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Don't call bxt_ddi_phy_calc_lane_lat_optim_mask() after failing intel_dp_compute_config()
@ 2019-04-11 14:35 Ville Syrjala
  2019-04-11 16:49 ` [PATCH v2] drm/i915: Restore correct bxt_ddi_phy_calc_lane_lat_optim_mask() calculation Ville Syrjala
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ville Syrjala @ 2019-04-11 14:35 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@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@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-12 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-11 14:35 [PATCH] drm/i915: Don't call bxt_ddi_phy_calc_lane_lat_optim_mask() after failing intel_dp_compute_config() Ville Syrjala
2019-04-11 16:49 ` [PATCH v2] drm/i915: Restore correct bxt_ddi_phy_calc_lane_lat_optim_mask() calculation Ville Syrjala
2019-04-12 13:38   ` Ville Syrjälä
2019-04-12  0:20 ` ✓ Fi.CI.BAT: success for drm/i915: Don't call bxt_ddi_phy_calc_lane_lat_optim_mask() after failing intel_dp_compute_config() (rev2) Patchwork
2019-04-12 11:47 ` ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.