All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT
@ 2019-05-28 14:06 Ville Syrjala
  2019-05-28 14:06 ` [PATCH 2/2] drm/i915: Skip SINK_COUNT read on CH7511 Ville Syrjala
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ville Syrjala @ 2019-05-28 14:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: David S ., Peteris Rudzusiks, dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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.

Cc: David S. <david@majinbuu.com>
Cc: Peteris Rudzusiks <peteris.rudzusiks@gmail.com>
Tested-by: Peteris Rudzusiks <peteris.rudzusiks@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105406
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_dp_helper.c | 4 +++-
 include/drm/drm_dp_helper.h     | 7 +++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index e6af758a7d22..0b994d083a89 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -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
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 3fc534ee8174..7e52eb81284a 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -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,
 };
 
 /**
-- 
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

* [PATCH 2/2] drm/i915: Skip SINK_COUNT read on CH7511
  2019-05-28 14:06 [PATCH 1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT Ville Syrjala
@ 2019-05-28 14:06 ` Ville Syrjala
  2019-05-28 15:42 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjala @ 2019-05-28 14:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: David S ., Peteris Rudzusiks, dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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.

Cc: David S. <david@majinbuu.com>
Cc: Peteris Rudzusiks <peteris.rudzusiks@gmail.com>
Tested-by: Peteris Rudzusiks <peteris.rudzusiks@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105406
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 24b56b2a76c8..8fe6571cda8f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -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) {
-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT
  2019-05-28 14:06 [PATCH 1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT Ville Syrjala
  2019-05-28 14:06 ` [PATCH 2/2] drm/i915: Skip SINK_COUNT read on CH7511 Ville Syrjala
@ 2019-05-28 15:42 ` Patchwork
  2019-05-28 16:09 ` ✓ Fi.CI.BAT: success " Patchwork
  2019-06-14 16:19 ` [PATCH 1/2] " Ville Syrjälä
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-05-28 15:42 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT
  2019-05-28 14:06 [PATCH 1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT Ville Syrjala
  2019-05-28 14:06 ` [PATCH 2/2] drm/i915: Skip SINK_COUNT read on CH7511 Ville Syrjala
  2019-05-28 15:42 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT Patchwork
@ 2019-05-28 16:09 ` Patchwork
  2019-06-14 16:19 ` [PATCH 1/2] " Ville Syrjälä
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-05-28 16:09 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== 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@gem_exec_suspend@basic-s4-devices.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13115/fi-icl-u3/igt@gem_exec_suspend@basic-s4-devices.html

  * 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@kms_frontbuffer_tracking@basic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13115/fi-icl-u3/igt@kms_frontbuffer_tracking@basic.html

  
#### 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@kms_busy@basic-flip-a.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13115/fi-icl-u3/igt@kms_busy@basic-flip-a.html

  
  [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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT
  2019-05-28 14:06 [PATCH 1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT Ville Syrjala
                   ` (2 preceding siblings ...)
  2019-05-28 16:09 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-06-14 16:19 ` Ville Syrjälä
  3 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2019-06-14 16:19 UTC (permalink / raw)
  To: intel-gfx; +Cc: David S ., Peteris Rudzusiks, dri-devel

On Tue, May 28, 2019 at 05:06:49PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> 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.
> 
> Cc: David S. <david@majinbuu.com>
> Cc: Peteris Rudzusiks <peteris.rudzusiks@gmail.com>
> Tested-by: Peteris Rudzusiks <peteris.rudzusiks@gmail.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105406
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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.

> ---
>  drivers/gpu/drm/drm_dp_helper.c | 4 +++-
>  include/drm/drm_dp_helper.h     | 7 +++++++
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index e6af758a7d22..0b994d083a89 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -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
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index 3fc534ee8174..7e52eb81284a 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -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,
>  };
>  
>  /**
> -- 
> 2.21.0

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-06-14 16:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28 14:06 [PATCH 1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT Ville Syrjala
2019-05-28 14:06 ` [PATCH 2/2] drm/i915: Skip SINK_COUNT read on CH7511 Ville Syrjala
2019-05-28 15:42 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT Patchwork
2019-05-28 16:09 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-14 16:19 ` [PATCH 1/2] " Ville Syrjälä

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.