intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v1] drm/i915: Call intel_edp_init_connector only for eDP.
@ 2020-02-11 11:40 Stanislav Lisovskiy
  2020-02-11 12:16 ` Imre Deak
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Stanislav Lisovskiy @ 2020-02-11 11:40 UTC (permalink / raw)
  To: intel-gfx

I guess it would still be nice to make the code less confusing
and do not call eDP specific function, for non-eDP connectors
just to immediately return true(success) value as a hack.

So simply extracted that check out from this function,
that we simply don't call it for non-eDP connectors. Bingo.

Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index f4dede6253f8..9bd36197a43d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -7370,9 +7370,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
 	intel_wakeref_t wakeref;
 	struct edid *edid;
 
-	if (!intel_dp_is_edp(intel_dp))
-		return true;
-
 	INIT_DELAYED_WORK(&intel_dp->panel_vdd_work, edp_panel_vdd_work);
 
 	/*
@@ -7590,10 +7587,12 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 	intel_dp_mst_encoder_init(intel_dig_port,
 				  intel_connector->base.base.id);
 
-	if (!intel_edp_init_connector(intel_dp, intel_connector)) {
-		intel_dp_aux_fini(intel_dp);
-		intel_dp_mst_encoder_cleanup(intel_dig_port);
-		goto fail;
+	if (intel_dp_is_edp(intel_dp)) {
+		if (!intel_edp_init_connector(intel_dp, intel_connector)) {
+			intel_dp_aux_fini(intel_dp);
+			intel_dp_mst_encoder_cleanup(intel_dig_port);
+			goto fail;
+		}
 	}
 
 	intel_dp_add_properties(intel_dp, connector);
-- 
2.24.1.485.gad05a3d8e5

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

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

end of thread, other threads:[~2020-02-13 15:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 11:40 [Intel-gfx] [PATCH v1] drm/i915: Call intel_edp_init_connector only for eDP Stanislav Lisovskiy
2020-02-11 12:16 ` Imre Deak
2020-02-11 13:03 ` Jani Nikula
2020-02-11 13:33   ` Lisovskiy, Stanislav
2020-02-11 13:55     ` Jani Nikula
2020-02-11 14:03       ` Lisovskiy, Stanislav
2020-02-11 14:12         ` Jani Nikula
2020-02-11 14:27           ` Lisovskiy, Stanislav
2020-02-11 14:21       ` Imre Deak
2020-02-13 15:11 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).