Skip to contentSkip to conversation

drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT

PATCH In review Ville Syrjala 2 participants 5 messages May 28, 2019 – Jun 14, 2019

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

PATCH 1/2 drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT

From: Ville Syrjälä <[email protected]>

CH7511 eDP->LVDS bridge doesn't seem to set SINK_COUNT properly causing i915 to detect it as disconnected. Add a quirk to ignore SINK_COUNT on these devices.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105406

---
 drivers/gpu/drm/drm_dp_helper.c | 4 +++-
 include/drm/drm_dp_helper.h     | 7 +++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_helper.c +3 -1
index e6af758a7d22..0b994d083a89 100644
@@ -1280,7 +1280,9 @@ static const struct dpcd_quirk dpcd_quirk_list[] = {
 	/* LG LP140WF6-SPM1 eDP panel */
 	{ OUI(0x00, 0x22, 0xb9), DEVICE_ID('s', 'i', 'v', 'a', 'r', 'T'), false, BIT(DP_DPCD_QUIRK_CONSTANT_N) },
 	/* Apple panels need some additional handling to support PSR */
-	{ OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_NO_PSR) }
+	{ OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_NO_PSR) },
+	/* CH7511 seems to leave SINK_COUNT zeroed */
+	{ OUI(0x00, 0x00, 0x00), DEVICE_ID('C', 'H', '7', '5', '1', '1'), false, BIT(DP_DPCD_QUIRK_NO_SINK_COUNT) },
 };
 
 #undef OUI
include/drm/drm_dp_helper.h +7 -0
index 3fc534ee8174..7e52eb81284a 100644
@@ -1414,6 +1414,13 @@ enum drm_dp_quirk {
 	 * driver still need to implement proper handling for such device.
 	 */
 	DP_DPCD_QUIRK_NO_PSR,
+	/**
+	 * @DP_DPCD_QUIRK_NO_SINK_COUNT:
+	 *
+	 * The device does not set SINK_COUNT to a non-zero value.
+	 * The driver should ignore SINK_COUNT during detection.
+	 */
+	DP_DPCD_QUIRK_NO_SINK_COUNT,
 };
 
 /**
Signature · 6 lines
2.21.0

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

PATCH 2/2 drm/i915: Skip SINK_COUNT read on CH7511

From: Ville Syrjälä <[email protected]>

CH7511 doesn't update SINK_COUNT properly so in order to detect the device as connected we have to ignore SINK_COUNT.

In order to have access to the quirk list early enough we must move the drm_dp_read_desc() call to happen earlier. We can also skip re-reading this on eDP since we know it won't change.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105406

---
 drivers/gpu/drm/i915/intel_dp.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +9 -5
index 24b56b2a76c8..8fe6571cda8f 100644
@@ -4242,8 +4242,14 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
 	if (!intel_dp_read_dpcd(intel_dp))
 		return false;
 
-	/* Don't clobber cached eDP rates. */
+	/*
+	 * Don't clobber cached eDP rates. Also skip re-reading
+	 * the OUI/ID since we know it won't change.
+	 */
 	if (!intel_dp_is_edp(intel_dp)) {
+		drm_dp_read_desc(&intel_dp->aux, &intel_dp->desc,
+				 drm_dp_is_branch(intel_dp->dpcd));
+
 		intel_dp_set_sink_rates(intel_dp);
 		intel_dp_set_common_rates(intel_dp);
 	}
@@ -4252,7 +4258,8 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
 	 * Some eDP panels do not set a valid value for sink count, that is why
 	 * it don't care about read it here and in intel_edp_init_dpcd().
 	 */
-	if (!intel_dp_is_edp(intel_dp)) {
+	if (!intel_dp_is_edp(intel_dp) &&
+	    !drm_dp_has_quirk(&intel_dp->desc, DP_DPCD_QUIRK_NO_SINK_COUNT)) {
 		u8 count;
 		ssize_t r;
 
@@ -5586,9 +5593,6 @@ intel_dp_detect(struct drm_connector *connector,
 	if (INTEL_GEN(dev_priv) >= 11)
 		intel_dp_get_dsc_sink_cap(intel_dp);
 
-	drm_dp_read_desc(&intel_dp->aux, &intel_dp->desc,
-			 drm_dp_is_branch(intel_dp->dpcd));
-
 	intel_dp_configure_mst(intel_dp);
 
 	if (intel_dp->is_mst) {
Signature · 6 lines
2.21.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT
URL : https://patchwork.freedesktop.org/series/61248/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
87fb0e570f06 drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT
-:30: WARNING:LONG_LINE: line over 100 characters
#30: FILE: drivers/gpu/drm/drm_dp_helper.c:1285:
+	{ OUI(0x00, 0x00, 0x00), DEVICE_ID('C', 'H', '7', '5', '1', '1'), false, BIT(DP_DPCD_QUIRK_NO_SINK_COUNT) },

total: 0 errors, 1 warnings, 0 checks, 23 lines checked 72f1dc2325ea drm/i915: Skip SINK_COUNT read on CH7511

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

#3 lore raw

✓ Fi.CI.BAT: success for series starting with [1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT
URL : https://patchwork.freedesktop.org/series/61248/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6156 -> Patchwork_13115
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13115/

Known issues
------------

Here are the changes found in Patchwork_13115 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s4-devices:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6156/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13115/fi-icl-u3/igt@[email protected]

* igt@i915_selftest@live_hangcheck:
- fi-icl-u2: [PASS][3] -> [INCOMPLETE][4] ([fdo#107713] / [fdo#108569])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6156/fi-icl-u2/igt@i915_selftest@live_hangcheck.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13115/fi-icl-u2/igt@i915_selftest@live_hangcheck.html
- fi-icl-u3: [PASS][5] -> [INCOMPLETE][6] ([fdo#107713] / [fdo#108569])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6156/fi-icl-u3/igt@i915_selftest@live_hangcheck.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13115/fi-icl-u3/igt@i915_selftest@live_hangcheck.html

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: [PASS][7] -> [FAIL][8] ([fdo#103167])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6156/fi-icl-u3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13115/fi-icl-u3/igt@[email protected]

#### Possible fixes ####

* igt@kms_busy@basic-flip-a:
- fi-icl-u3: [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6156/fi-icl-u3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13115/fi-icl-u3/igt@[email protected]

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569

Participating hosts (53 -> 45)
------------------------------

Missing (8): fi-ilk-m540 fi-hsw-4200u fi-bdw-gvtdvm fi-byt-squawks fi-bsw-cyan fi-apl-guc fi-byt-clapper fi-bdw-samus

Build changes
-------------

* Linux: CI_DRM_6156 -> Patchwork_13115

CI_DRM_6156: ab906274557462611031af95a7c51570273f7d38 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5019: 0d0b4547c356734b03d61797f49c30281e8763ed @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13115: 72f1dc2325ea715e2dfd836863ed5572ee2b2e76 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

72f1dc2325ea drm/i915: Skip SINK_COUNT read on CH7511 87fb0e570f06 drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT

== Logs ==

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

#4 lore raw
In reply to Ville Syrjala
Quoted 11 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

CH7511 eDP->LVDS bridge doesn't seem to set SINK_COUNT properly causing i915 to detect it as disconnected. Add a quirk to ignore SINK_COUNT on these devices.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105406

Pushed patch 1 to drm-misc-next with Jani's irc ack.

I thought of pushing the i915 patch drm-misc-next too, but then thought better of it due to the current i915 code churn. I'll just wait for a backmerge instead.

Quoted 40 lines
---
 drivers/gpu/drm/drm_dp_helper.c | 4 +++-
 include/drm/drm_dp_helper.h     | 7 +++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_helper.c +3 -1
index e6af758a7d22..0b994d083a89 100644
@@ -1280,7 +1280,9 @@ static const struct dpcd_quirk dpcd_quirk_list[] = {
 	/* LG LP140WF6-SPM1 eDP panel */
 	{ OUI(0x00, 0x22, 0xb9), DEVICE_ID('s', 'i', 'v', 'a', 'r', 'T'), false, BIT(DP_DPCD_QUIRK_CONSTANT_N) },
 	/* Apple panels need some additional handling to support PSR */
-	{ OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_NO_PSR) }
+	{ OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_NO_PSR) },
+	/* CH7511 seems to leave SINK_COUNT zeroed */
+	{ OUI(0x00, 0x00, 0x00), DEVICE_ID('C', 'H', '7', '5', '1', '1'), false, BIT(DP_DPCD_QUIRK_NO_SINK_COUNT) },
 };
 
 #undef OUI
include/drm/drm_dp_helper.h +7 -0
index 3fc534ee8174..7e52eb81284a 100644
@@ -1414,6 +1414,13 @@ enum drm_dp_quirk {
 	 * driver still need to implement proper handling for such device.
 	 */
 	DP_DPCD_QUIRK_NO_PSR,
+	/**
+	 * @DP_DPCD_QUIRK_NO_SINK_COUNT:
+	 *
+	 * The device does not set SINK_COUNT to a non-zero value.
+	 * The driver should ignore SINK_COUNT during detection.
+	 */
+	DP_DPCD_QUIRK_NO_SINK_COUNT,
 };
 
 /**
Signature · 1 line
2.21.0
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel