All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/lspcon: Switch back to PCON mode after output replug
@ 2017-02-22 15:03 Imre Deak
  2017-02-22 15:10 ` [PATCH v2] " Imre Deak
  2017-02-22 17:52 ` ✓ Fi.CI.BAT: success for drm/i915/lspcon: Switch back to PCON mode after output replug (rev2) Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Imre Deak @ 2017-02-22 15:03 UTC (permalink / raw)
  To: intel-gfx; +Cc: raptorteak

At least a ParadTech PS175 LSPCON chip/firmware uses long instead of
short pulses to signal output unplug/plug events. This is contrary to
how branch devices normally work which use short HPD signaling. This
chip will also switch to LS mode after an unplug event, which could be
the consequence of the long HPD signaling semantics and an effort to
save power automatically. Because of this we'll fail to do AUX and
detect the output after a replug event.

To fix this make sure we are in PCON mode during connector detection.

Cc: raptorteak@gmail.com
Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98912
Reported-and-tested-by: raptorteak@gmail.com
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 024798a..2a3ec20 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4270,12 +4270,16 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
 static bool
 intel_dp_short_pulse(struct intel_dp *intel_dp)
 {
+	struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
 	struct drm_device *dev = intel_dp_to_dev(intel_dp);
 	struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
 	u8 sink_irq_vector = 0;
 	u8 old_sink_count = intel_dp->sink_count;
 	bool ret;
 
+	if (lspcon->active)
+		lspcon_resume(lspcon);
+
 	/*
 	 * Clearing compliance test variables to allow capturing
 	 * of values for next automated test request.
-- 
2.5.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 v2] drm/i915/lspcon: Switch back to PCON mode after output replug
  2017-02-22 15:03 [PATCH] drm/i915/lspcon: Switch back to PCON mode after output replug Imre Deak
@ 2017-02-22 15:10 ` Imre Deak
  2017-02-23 18:15   ` Ville Syrjälä
  2017-02-22 17:52 ` ✓ Fi.CI.BAT: success for drm/i915/lspcon: Switch back to PCON mode after output replug (rev2) Patchwork
  1 sibling, 1 reply; 5+ messages in thread
From: Imre Deak @ 2017-02-22 15:10 UTC (permalink / raw)
  To: intel-gfx; +Cc: raptorteak

At least a ParadTech PS175 LSPCON chip/firmware uses long instead of
short pulses to signal output unplug/plug events. This is contrary to
how branch devices normally work which use short HPD signaling. This
chip will also switch to LS mode after an unplug event, which could be
the consequence of the long HPD signaling semantics and an effort to
save power automatically. Because of this we'll fail to do AUX and
detect the output after a replug event.

To fix this make sure we are in PCON mode during connector detection.

v2:
- Switch the mode in the proper spot.

Cc: raptorteak@gmail.com
Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98912
Reported-and-tested-by: raptorteak@gmail.com
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 024798a..e1529ff 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4326,9 +4326,13 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
 static enum drm_connector_status
 intel_dp_detect_dpcd(struct intel_dp *intel_dp)
 {
+	struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
 	uint8_t *dpcd = intel_dp->dpcd;
 	uint8_t type;
 
+	if (lspcon->active)
+		lspcon_resume(lspcon);
+
 	if (!intel_dp_get_dpcd(intel_dp))
 		return connector_status_disconnected;
 
-- 
2.5.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

* ✓ Fi.CI.BAT: success for drm/i915/lspcon: Switch back to PCON mode after output replug (rev2)
  2017-02-22 15:03 [PATCH] drm/i915/lspcon: Switch back to PCON mode after output replug Imre Deak
  2017-02-22 15:10 ` [PATCH v2] " Imre Deak
@ 2017-02-22 17:52 ` Patchwork
  2017-02-24 14:07   ` Imre Deak
  1 sibling, 1 reply; 5+ messages in thread
From: Patchwork @ 2017-02-22 17:52 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/lspcon: Switch back to PCON mode after output replug (rev2)
URL   : https://patchwork.freedesktop.org/series/20072/
State : success

== Summary ==

Series 20072v2 drm/i915/lspcon: Switch back to PCON mode after output replug
https://patchwork.freedesktop.org/api/1.0/series/20072/revisions/2/mbox/

fi-bdw-5557u     total:253  pass:242  dwarn:0   dfail:0   fail:0   skip:11 
fi-bsw-n3050     total:253  pass:214  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:253  pass:234  dwarn:0   dfail:0   fail:0   skip:19 
fi-bxt-t5700     total:83   pass:70   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:253  pass:226  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:253  pass:222  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:253  pass:237  dwarn:0   dfail:0   fail:0   skip:16 
fi-hsw-4770r     total:253  pass:237  dwarn:0   dfail:0   fail:0   skip:16 
fi-ilk-650       total:253  pass:203  dwarn:0   dfail:0   fail:0   skip:50 
fi-ivb-3520m     total:253  pass:235  dwarn:0   dfail:0   fail:0   skip:18 
fi-ivb-3770      total:253  pass:235  dwarn:0   dfail:0   fail:0   skip:18 
fi-kbl-7500u     total:253  pass:235  dwarn:0   dfail:0   fail:0   skip:18 
fi-skl-6260u     total:253  pass:243  dwarn:0   dfail:0   fail:0   skip:10 
fi-skl-6700hq    total:253  pass:236  dwarn:0   dfail:0   fail:0   skip:17 
fi-skl-6700k     total:253  pass:231  dwarn:4   dfail:0   fail:0   skip:18 
fi-skl-6770hq    total:253  pass:243  dwarn:0   dfail:0   fail:0   skip:10 
fi-snb-2520m     total:253  pass:225  dwarn:0   dfail:0   fail:0   skip:28 
fi-snb-2600      total:253  pass:224  dwarn:0   dfail:0   fail:0   skip:29 

bf89ec45d0822835b03910371ac0baf46c4efa2d drm-tip: 2017y-02m-22d-14h-30m-04s UTC integration manifest
a6ef522 drm/i915/lspcon: Switch back to PCON mode after output replug

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3932/
_______________________________________________
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 v2] drm/i915/lspcon: Switch back to PCON mode after output replug
  2017-02-22 15:10 ` [PATCH v2] " Imre Deak
@ 2017-02-23 18:15   ` Ville Syrjälä
  0 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2017-02-23 18:15 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-gfx, raptorteak

On Wed, Feb 22, 2017 at 05:10:52PM +0200, Imre Deak wrote:
> At least a ParadTech PS175 LSPCON chip/firmware uses long instead of
> short pulses to signal output unplug/plug events. This is contrary to
> how branch devices normally work which use short HPD signaling. This
> chip will also switch to LS mode after an unplug event, which could be
> the consequence of the long HPD signaling semantics and an effort to
> save power automatically. Because of this we'll fail to do AUX and
> detect the output after a replug event.
> 
> To fix this make sure we are in PCON mode during connector detection.
> 
> v2:
> - Switch the mode in the proper spot.
> 
> Cc: raptorteak@gmail.com
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98912
> Reported-and-tested-by: raptorteak@gmail.com
> Signed-off-by: Imre Deak <imre.deak@intel.com>

lgtm

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dp.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 024798a..e1529ff 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4326,9 +4326,13 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
>  static enum drm_connector_status
>  intel_dp_detect_dpcd(struct intel_dp *intel_dp)
>  {
> +	struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
>  	uint8_t *dpcd = intel_dp->dpcd;
>  	uint8_t type;
>  
> +	if (lspcon->active)
> +		lspcon_resume(lspcon);
> +
>  	if (!intel_dp_get_dpcd(intel_dp))
>  		return connector_status_disconnected;
>  
> -- 
> 2.5.0

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
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: ✓ Fi.CI.BAT: success for drm/i915/lspcon: Switch back to PCON mode after output replug (rev2)
  2017-02-22 17:52 ` ✓ Fi.CI.BAT: success for drm/i915/lspcon: Switch back to PCON mode after output replug (rev2) Patchwork
@ 2017-02-24 14:07   ` Imre Deak
  0 siblings, 0 replies; 5+ messages in thread
From: Imre Deak @ 2017-02-24 14:07 UTC (permalink / raw)
  To: intel-gfx, raptorteak, Ville Syrjälä

On Wed, Feb 22, 2017 at 05:52:19PM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/lspcon: Switch back to PCON mode after output replug (rev2)
> URL   : https://patchwork.freedesktop.org/series/20072/
> State : success

I pushed the patch to -dinq, thanks for the report/testing and the
review.

> 
> == Summary ==
> 
> Series 20072v2 drm/i915/lspcon: Switch back to PCON mode after output replug
> https://patchwork.freedesktop.org/api/1.0/series/20072/revisions/2/mbox/
> 
> fi-bdw-5557u     total:253  pass:242  dwarn:0   dfail:0   fail:0   skip:11 
> fi-bsw-n3050     total:253  pass:214  dwarn:0   dfail:0   fail:0   skip:39 
> fi-bxt-j4205     total:253  pass:234  dwarn:0   dfail:0   fail:0   skip:19 
> fi-bxt-t5700     total:83   pass:70   dwarn:0   dfail:0   fail:0   skip:12 
> fi-byt-j1900     total:253  pass:226  dwarn:0   dfail:0   fail:0   skip:27 
> fi-byt-n2820     total:253  pass:222  dwarn:0   dfail:0   fail:0   skip:31 
> fi-hsw-4770      total:253  pass:237  dwarn:0   dfail:0   fail:0   skip:16 
> fi-hsw-4770r     total:253  pass:237  dwarn:0   dfail:0   fail:0   skip:16 
> fi-ilk-650       total:253  pass:203  dwarn:0   dfail:0   fail:0   skip:50 
> fi-ivb-3520m     total:253  pass:235  dwarn:0   dfail:0   fail:0   skip:18 
> fi-ivb-3770      total:253  pass:235  dwarn:0   dfail:0   fail:0   skip:18 
> fi-kbl-7500u     total:253  pass:235  dwarn:0   dfail:0   fail:0   skip:18 
> fi-skl-6260u     total:253  pass:243  dwarn:0   dfail:0   fail:0   skip:10 
> fi-skl-6700hq    total:253  pass:236  dwarn:0   dfail:0   fail:0   skip:17 
> fi-skl-6700k     total:253  pass:231  dwarn:4   dfail:0   fail:0   skip:18 
> fi-skl-6770hq    total:253  pass:243  dwarn:0   dfail:0   fail:0   skip:10 
> fi-snb-2520m     total:253  pass:225  dwarn:0   dfail:0   fail:0   skip:28 
> fi-snb-2600      total:253  pass:224  dwarn:0   dfail:0   fail:0   skip:29 
> 
> bf89ec45d0822835b03910371ac0baf46c4efa2d drm-tip: 2017y-02m-22d-14h-30m-04s UTC integration manifest
> a6ef522 drm/i915/lspcon: Switch back to PCON mode after output replug
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3932/
_______________________________________________
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

end of thread, other threads:[~2017-02-24 14:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-22 15:03 [PATCH] drm/i915/lspcon: Switch back to PCON mode after output replug Imre Deak
2017-02-22 15:10 ` [PATCH v2] " Imre Deak
2017-02-23 18:15   ` Ville Syrjälä
2017-02-22 17:52 ` ✓ Fi.CI.BAT: success for drm/i915/lspcon: Switch back to PCON mode after output replug (rev2) Patchwork
2017-02-24 14:07   ` Imre Deak

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.