Skip to contentSkip to conversation

drm/i915/dp: Clean up/Get rid of detect_done flag

PATCH New Manasi Navare 2 participants 2 messages Feb 8, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/dp: Clean up/Get rid of detect_done flag

Detect_done flag was added previously when intel_dp_long_pulse was called from multiple places. However now it is called only from intel_dp_detect(). So this flag becomes redundant. Anyway now, we set this to false right away after intel_dp_long_pulse so it calls long pulse handler always for all calls to .detect()

---
 drivers/gpu/drm/i915/intel_dp.c  | 10 +---------
 drivers/gpu/drm/i915/intel_drv.h |  1 -
 2 files changed, 1 insertion(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +1 -9
index 21924cf..2a2aaa3 100644
@@ -4667,7 +4667,6 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
 	intel_dp_set_edid(intel_dp);
 	if (is_edp(intel_dp) || intel_connector->detect_edid)
 		status = connector_status_connected;
-	intel_dp->detect_done = true;
 
 	/* Try to read the source of the interrupt */
 	if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
@@ -4701,11 +4700,7 @@ intel_dp_detect(struct drm_connector *connector, bool force)
 	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
 		      connector->base.id, connector->name);
 
-	/* If full detect is not performed yet, do a full detect */
-	if (!intel_dp->detect_done)
-		status = intel_dp_long_pulse(intel_dp->attached_connector);
-
-	intel_dp->detect_done = false;
+	status = intel_dp_long_pulse(intel_dp->attached_connector);
 
 	return status;
 }
@@ -5079,7 +5074,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
 		      long_hpd ? "long" : "short");
 
 	if (long_hpd) {
-		intel_dp->detect_done = false;
 		return IRQ_NONE;
 	}
 
@@ -5097,14 +5091,12 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
 			intel_dp->is_mst = false;
 			drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr,
 							intel_dp->is_mst);
-			intel_dp->detect_done = false;
 			goto put_power;
 		}
 	}
 
 	if (!intel_dp->is_mst) {
 		if (!intel_dp_short_pulse(intel_dp)) {
-			intel_dp->detect_done = false;
 			goto put_power;
 		}
 	}
drivers/gpu/drm/i915/intel_drv.h +0 -1
index fbe5c72..ec264e5 100644
@@ -921,7 +921,6 @@ struct intel_dp {
 	uint8_t sink_count;
 	bool link_mst;
 	bool has_audio;
-	bool detect_done;
 	bool channel_eq_status;
 	enum hdmi_force_audio force_audio;
 	bool limited_color_range;
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915/dp: Clean up/Get rid of detect_done flag

== Series Details ==

== Series Details ==

Series: drm/i915/dp: Clean up/Get rid of detect_done flag
URL : https://patchwork.freedesktop.org/series/19276/
State : success

== Summary ==

Series 19276v1 drm/i915/dp: Clean up/Get rid of detect_done flag
https://patchwork.freedesktop.org/api/1.0/series/19276/revisions/1/mbox/

fi-bdw-5557u     total:252  pass:238  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:252  pass:213  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:252  pass:230  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:83   pass:70   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:252  pass:225  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:252  pass:221  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:252  pass:233  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:252  pass:233  dwarn:0   dfail:0   fail:0   skip:19 
fi-ilk-650       total:252  pass:199  dwarn:0   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:252  pass:231  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:252  pass:231  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:252  pass:229  dwarn:0   dfail:0   fail:2   skip:21 
fi-skl-6260u     total:252  pass:239  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:252  pass:232  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:252  pass:227  dwarn:4   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:252  pass:239  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:252  pass:221  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:252  pass:220  dwarn:0   dfail:0   fail:0   skip:32 

7f1b128ee8d8cdd07a558d77e914dd99cc641b0f drm-tip: 2017y-02m-07d-21h-44m-07s UTC integration manifest 1525b8b drm/i915/dp: Clean up/Get rid of detect_done flag

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3731/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx