drm/i915: Do a dummy DPCD read before the actual read
Subsystems (2)
PATCH 1/2 drm/i915: Do a dummy DPCD read before the actual read
From: Ville Syrjälä <[email protected]>
Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems particularly susceptible to this problem once it's gone into a sleep mode.
The issue seems to happen only for the first AUX message that wakes the sink up. But as the first AUX read we often do is the DPCD receiver cap it does wreak a bit of havoc with subsequent link training etc. when the receiver cap bw/lane/etc. information is garbage.
A sufficient workaround seems to be to perform a single byte dummy read before reading the actual data. I suppose that just wakes up the sink sufficiently and we can just throw away the returned data in case it's crap. DP_DPCD_REV seems like a sufficiently safe location to read here.
--- drivers/gpu/drm/i915/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +7 -0
@@ -2870,6 +2870,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,ssize_t ret;int i; +/* +* Sometime we just get the same incorrect byte repeated +* over the entire buffer. Doing just one throw away read +* initially seems to "solve" it. +*/ +drm_dp_dpcd_read (aux,DP_DPCD_REV , buffer,1 ); +for (i =0 ; i <3 ; i++) { ret =drm_dp_dpcd_read (aux, offset, buffer, size);if (ret == size)
Signature · 6 lines
2.0.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Ignore long hpds on eDP ports
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."
So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
--- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +12 -0
@@ -4611,6 +4611,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ; +if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) { +/* +* vdd off can generate a long pulse on eDP which +* would require vdd on to handle it, and thus we +* would end up in an endless cycle of +* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." +*/ +DRM_DEBUG_KMS ("ignoring long hpd on eDP port %c\n" , +port_name (intel_dig_port->port)); +return false; + } +DRM_DEBUG_KMS ("got hpd irq on port %c - %s\n" ,port_name (intel_dig_port->port), long_hpd ?"long" :"short" );
Signature · 6 lines
2.0.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
Quoted 32 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/i915/intel_dp.c +5
-0@@ -4611,6 +4611,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ; +if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) { +/* +* vdd off can generate a long pulse on eDP which +* would require vdd on to handle it, and thus we +* would end up in an endless cycle of
drivers/gpu/drm/i915/intel_dp.c intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) · line 4628
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." +*/ +DRM_DEBUG_KMS ("ignoring long hpd on eDP port %c\n" , +port_name (intel_dig_port->port)); +return false; + } +DRM_DEBUG_KMS ("got hpd irq on port %c - %s\n" ,port_name (intel_dig_port->port), long_hpd ?"long" :"short" );
I'm not sure that ignoring a long pulse is the best way to handle it. eDP does not appear to differentiate between short and long pulses per the specification (not to mention that HPD support for eDP is optional in the first place). It seems to me that it would probably be better to handle them as a normal (short) HPD pulse and just do the regular link maintenance stuff. As I said, the spec doesn't differentiate between the long and short pulses for eDP so it's a safer bet to handle them as a short pulse than to ignore them entirely.
-T
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
Quoted 44 lines · Todd Previte
Quoted 32 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/i915/intel_dp.c +5
-0@@ -4611,6 +4611,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ; +if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) { +/* +* vdd off can generate a long pulse on eDP which +* would require vdd on to handle it, and thus we +* would end up in an endless cycle of drivers/gpu/drm/i915/intel_dp.c intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) · line 4628
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." +*/ +DRM_DEBUG_KMS ("ignoring long hpd on eDP port %c\n" , +port_name (intel_dig_port->port)); +return false; + } +DRM_DEBUG_KMS ("got hpd irq on port %c - %s\n" ,port_name (intel_dig_port->port), long_hpd ?"long" :"short" );
Quoted 8 lines
I'm not sure that ignoring a long pulse is the best way to handle it. eDP does not appear to differentiate between short and long pulses per the specification (not to mention that HPD support for eDP is optional in the first place). It seems to me that it would probably be better to handle them as a normal (short) HPD pulse and just do the regular link maintenance stuff. As I said, the spec doesn't differentiate between the long and short pulses for eDP so it's a safer bet to handle them as a short pulse than to ignore them entirely.
The spec does talk a lot about IRQ_HPD (which is the short pulse) and the power sequencing diagrams explicitly show that HPD should be asserted after the T3 delay and deasserted immediately on VDD off, so those would be the long pulses. So based on that my patch seems to make sense.
It seems HPD is optional for the source only, in the sink it's madatory. But that doesn't really matter anyway because if either end doesn't have it it won't work. The spec does go on to say that we should periodically poll the sink status if HPD_IRQ isn't available. We don't do that currently, but it does sound like a sane idea in case the link drops out.
Signature · 2 lines
Ville Syrjälä Intel OTC
Todd Previte
Reviewed-byRe: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
Quoted 57 lines · Ville Syrjälä
Quoted 43 lines · Todd Previte
Quoted 32 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/i915/intel_dp.c +5
-0@@ -4611,6 +4611,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ; +if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) { +/* +* vdd off can generate a long pulse on eDP which +* would require vdd on to handle it, and thus we +* would end up in an endless cycle of drivers/gpu/drm/i915/intel_dp.c intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) · line 4628
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." +*/ +DRM_DEBUG_KMS ("ignoring long hpd on eDP port %c\n" , +port_name (intel_dig_port->port)); +return false; + } +DRM_DEBUG_KMS ("got hpd irq on port %c - %s\n" ,port_name (intel_dig_port->port), long_hpd ?"long" :"short" );Quoted 8 lines
I'm not sure that ignoring a long pulse is the best way to handle it. eDP does not appear to differentiate between short and long pulses per the specification (not to mention that HPD support for eDP is optional in the first place). It seems to me that it would probably be better to handle them as a normal (short) HPD pulse and just do the regular link maintenance stuff. As I said, the spec doesn't differentiate between the long and short pulses for eDP so it's a safer bet to handle them as a short pulse than to ignore them entirely.
The spec does talk a lot about
IRQ_HPD(which is the short pulse) and the power sequencing diagrams explicitly show that HPD should be asserted after the T3 delay and deasserted immediately on VDD off, so those would be the long pulses. So based on that my patch seems to make sense.
Quoted 6 lines
It seems HPD is optional for the source only, in the sink it's madatory. But that doesn't really matter anyway because if either end doesn't have it it won't work. The spec does go on to say that we should periodically poll the sink status if
HPD_IRQisn't available. We don't do that currently, but it does sound like a sane idea in case the link drops out.
Yeah I saw some of the info on IRQ_HPD but didn't see the long pulse stuff. In any case, my concern was with missing a valid HPD event. In light of the above, that doesn't look like it's an issue, so I'm good with this patch.
It looks like HPD support in an eDP sink device is optional as well, at least according to the table on pg.34 of the eDP 1.4 spec. As you pointed out though, unless both source and sink devices support HPD, it doesn't really matter. I saw the bit about polling in there, too. It might be worth implementing a polling mechanism as a backup, but I don't know how useful it would be. I don't recall running across a sink device that doesn't support HPD, but that's not to say they don't exist.
Re: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
Quoted 77 lines · Todd Previte
Quoted 56 lines · Ville Syrjälä
Quoted 42 lines · Todd Previte
Quoted 31 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/i915/intel_dp.c +5
-0@@ -4611,6 +4611,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ; +if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) { +/* +* vdd off can generate a long pulse on eDP which +* would require vdd on to handle it, and thus we +* would end up in an endless cycle of drivers/gpu/drm/i915/intel_dp.c intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) · line 4627
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." +*/ +DRM_DEBUG_KMS ("ignoring long hpd on eDP port %c\n" , +port_name (intel_dig_port->port)); +return false; + } +DRM_DEBUG_KMS ("got hpd irq on port %c - %s\n" ,port_name (intel_dig_port->port), long_hpd ?"long" :"short" );Quoted 8 lines
I'm not sure that ignoring a long pulse is the best way to handle it. eDP does not appear to differentiate between short and long pulses per the specification (not to mention that HPD support for eDP is optional in the first place). It seems to me that it would probably be better to handle them as a normal (short) HPD pulse and just do the regular link maintenance stuff. As I said, the spec doesn't differentiate between the long and short pulses for eDP so it's a safer bet to handle them as a short pulse than to ignore them entirely.
The spec does talk a lot about
IRQ_HPD(which is the short pulse) and the power sequencing diagrams explicitly show that HPD should be asserted after the T3 delay and deasserted immediately on VDD off, so those would be the long pulses. So based on that my patch seems to make sense.Quoted 6 lines
It seems HPD is optional for the source only, in the sink it's madatory. But that doesn't really matter anyway because if either end doesn't have it it won't work. The spec does go on to say that we should periodically poll the sink status if
HPD_IRQisn't available. We don't do that currently, but it does sound like a sane idea in case the link drops out.Yeah I saw some of the info on
IRQ_HPDbut didn't see the long pulse stuff. In any case, my concern was with missing a valid HPD event. In light of the above, that doesn't look like it's an issue, so I'm good with this patch.It looks like HPD support in an eDP sink device is optional as well, at least according to the table on pg.34 of the eDP 1.4 spec. As you pointed out though, unless both source and sink devices support HPD, it doesn't really matter. I saw the bit about polling in there, too. It might be worth implementing a polling mechanism as a backup, but I don't know how useful it would be. I don't recall running across a sink device that doesn't support HPD, but that's not to say they don't exist.
Quoted 1 line
Reviewed-by Todd Previte <[email protected]>
Aside: We don't handle hpd for port A anyway, so for most panels this doesn't matter all that much. Or we'd have piles more bug reports I think.
Anyway, Cc: [email protected] and one for Jani. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Dave Airlie
maintainerRe: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
Quoted 3 lines
Aside: We don't handle hpd for port A anyway, so for most panels this doesn't matter all that much. Or we'd have piles more bug reports I think.
https://bugzilla.redhat.com/show_bug.cgi?id=1118448
probably like this.
Dave.
Re: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
In reply to Daniel VetterQuoted 78 lines · Daniel Vetter
Quoted 77 lines · Todd Previte
Quoted 56 lines · Ville Syrjälä
Quoted 42 lines · Todd Previte
Quoted 31 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/i915/intel_dp.c +5
-0@@ -4611,6 +4611,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ; +if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) { +/* +* vdd off can generate a long pulse on eDP which +* would require vdd on to handle it, and thus we +* would end up in an endless cycle of drivers/gpu/drm/i915/intel_dp.c intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) · line 4627
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." +*/ +DRM_DEBUG_KMS ("ignoring long hpd on eDP port %c\n" , +port_name (intel_dig_port->port)); +return false; + } +DRM_DEBUG_KMS ("got hpd irq on port %c - %s\n" ,port_name (intel_dig_port->port), long_hpd ?"long" :"short" );Quoted 8 lines
I'm not sure that ignoring a long pulse is the best way to handle it. eDP does not appear to differentiate between short and long pulses per the specification (not to mention that HPD support for eDP is optional in the first place). It seems to me that it would probably be better to handle them as a normal (short) HPD pulse and just do the regular link maintenance stuff. As I said, the spec doesn't differentiate between the long and short pulses for eDP so it's a safer bet to handle them as a short pulse than to ignore them entirely.
The spec does talk a lot about
IRQ_HPD(which is the short pulse) and the power sequencing diagrams explicitly show that HPD should be asserted after the T3 delay and deasserted immediately on VDD off, so those would be the long pulses. So based on that my patch seems to make sense.Quoted 6 lines
It seems HPD is optional for the source only, in the sink it's madatory. But that doesn't really matter anyway because if either end doesn't have it it won't work. The spec does go on to say that we should periodically poll the sink status if
HPD_IRQisn't available. We don't do that currently, but it does sound like a sane idea in case the link drops out.Yeah I saw some of the info on
IRQ_HPDbut didn't see the long pulse stuff. In any case, my concern was with missing a valid HPD event. In light of the above, that doesn't look like it's an issue, so I'm good with this patch.It looks like HPD support in an eDP sink device is optional as well, at least according to the table on pg.34 of the eDP 1.4 spec. As you pointed out though, unless both source and sink devices support HPD, it doesn't really matter. I saw the bit about polling in there, too. It might be worth implementing a polling mechanism as a backup, but I don't know how useful it would be. I don't recall running across a sink device that doesn't support HPD, but that's not to say they don't exist.
Quoted 4 lines
Quoted 1 line
Reviewed-by Todd Previte <[email protected]>Aside: We don't handle hpd for port A anyway, so for most panels this doesn't matter all that much. Or we'd have piles more bug reports I think.
Yeah, but we should. Then we could actually enable PSR main-link off mode and the fallback to manual retrain would work if/when the automagic training fails.
Quoted 7 lines
Anyway, Cc: [email protected] and one for Jani. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Signature · 2 lines
Ville Syrjälä Intel OTC
Jani Nikula
maintainerRe: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
In reply to Daniel VetterQuoted 20 lines · Daniel Vetter
Quoted 19 lines · Todd Previte
Quoted 17 lines · Ville Syrjälä
Quoted 16 lines · Todd Previte
Quoted 15 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
Signed-off-by Ville Syrjälä <[email protected]>
...
Quoted 1 line
Anyway, Cc: [email protected] and one for Jani.
Pushed both patches to drm-intel-fixes, thanks for the patches and review.
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
In reply to [email protected]Quoted 7 lines · On 17 October 2014 03:46, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."
Quoted 8 lines
So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
Signed-off-by Ville Syrjälä <[email protected]>
Hell yes,
I think nouveau just disables the whole irq when they know the outputs isn't being used,
but this looks good to me.
Quoted 30 lines
--- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/i915/intel_dp.c +12
-1@@ -4611,6 +4611,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ; +if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) { +/* +* vdd off can generate a long pulse on eDP which +* would require vdd on to handle it, and thus we +* would end up in an endless cycle of +* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." +*/ +DRM_DEBUG_KMS ("ignoring long hpd on eDP port %c\n" , +port_name (intel_dig_port->port)); +return false; + } +DRM_DEBUG_KMS ("got hpd irq on port %c - %s\n" ,port_name (intel_dig_port->port), long_hpd ?"long" :"short" ); --2.0.4
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
In reply to [email protected]Quoted 7 lines · On Thu, 16 Oct 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."
Quoted 6 lines
So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
Did you test this with my short vs. long hpd fix applied?
In any case, makes sense,
Quoted 36 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/i915/intel_dp.c +12
-0@@ -4611,6 +4611,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ; +if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) { +/* +* vdd off can generate a long pulse on eDP which +* would require vdd on to handle it, and thus we +* would end up in an endless cycle of +* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." +*/ +DRM_DEBUG_KMS ("ignoring long hpd on eDP port %c\n" , +port_name (intel_dig_port->port)); +return false; + } +DRM_DEBUG_KMS ("got hpd irq on port %c - %s\n" ,port_name (intel_dig_port->port), long_hpd ?"long" :"short" );Signature · 6 lines
2.0.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports
Quoted 8 lines · Jani Nikula
Quoted 7 lines · On Thu, 16 Oct 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of
"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."
Quoted 8 lines
Quoted 6 lines
So ignore long hpd pulses on eDP ports. eDP panels should be physically tied to the machine anyway so they should not actually disappear and thus don't need long hpd handling. Short hpds are still needed for link re-train and whatnot so we can't just turn off the hpd interrupt entirely for eDP ports. Perhaps we could turn it off whenever the panel is disabled, but just ignoring the long hpd seems sufficient.
Did you test this with my short vs. long hpd fix applied?
Yes. Well, with my own version of it :)
Now someone should go and implement HPD support for port A.
Quoted 48 lines
In any case, makes sense,
Reviewed-by Jani Nikula <[email protected]>Quoted 36 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/i915/intel_dp.c +12
-0@@ -4611,6 +4611,18 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ; +if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) { +/* +* vdd off can generate a long pulse on eDP which +* would require vdd on to handle it, and thus we +* would end up in an endless cycle of +* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..." +*/ +DRM_DEBUG_KMS ("ignoring long hpd on eDP port %c\n" , +port_name (intel_dig_port->port)); +return false; + } +DRM_DEBUG_KMS ("got hpd irq on port %c - %s\n" ,port_name (intel_dig_port->port), long_hpd ?"long" :"short" );Signature · 6 lines
2.0.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 2 lines
Ville Syrjälä Intel OTC
Quoted 30 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems particularly susceptible to this problem once it's gone into a sleep mode.
The issue seems to happen only for the first AUX message that wakes the sink up. But as the first AUX read we often do is the DPCD receiver cap it does wreak a bit of havoc with subsequent link training etc. when the receiver cap bw/lane/etc. information is garbage.
A sufficient workaround seems to be to perform a single byte dummy read before reading the actual data. I suppose that just wakes up the sink sufficiently and we can just throw away the returned data in case it's crap.
DP_DPCD_REVseems like a sufficiently safe location to read here.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -2870,6 +2870,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,ssize_t ret;int i;
drivers/gpu/drm/i915/intel_dp.c intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset, · line 2882
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+/* +* Sometime we just get the same incorrect byte repeated +* over the entire buffer. Doing just one throw away read +* initially seems to "solve" it. +*/ +drm_dp_dpcd_read (aux,DP_DPCD_REV , buffer,1 ); +for (i =0 ; i <3 ; i++) { ret =drm_dp_dpcd_read (aux, offset, buffer, size);if (ret == size)
Seems like a reasonable workaround for this problem, though investigating the actual root cause might be worthwhile.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 32 lines · Todd Previte
Quoted 30 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems particularly susceptible to this problem once it's gone into a sleep mode.
The issue seems to happen only for the first AUX message that wakes the sink up. But as the first AUX read we often do is the DPCD receiver cap it does wreak a bit of havoc with subsequent link training etc. when the receiver cap bw/lane/etc. information is garbage.
A sufficient workaround seems to be to perform a single byte dummy read before reading the actual data. I suppose that just wakes up the sink sufficiently and we can just throw away the returned data in case it's crap.
DP_DPCD_REVseems like a sufficiently safe location to read here.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -2870,6 +2870,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,ssize_t ret;int i;
Quoted 12 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset, · line 2882
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+/* +* Sometime we just get the same incorrect byte repeated +* over the entire buffer. Doing just one throw away read +* initially seems to "solve" it. +*/ +drm_dp_dpcd_read (aux,DP_DPCD_REV , buffer,1 ); +for (i =0 ; i <3 ; i++) { ret =drm_dp_dpcd_read (aux, offset, buffer, size);if (ret == size)Seems like a reasonable workaround for this problem, though investigating the actual root cause might be worthwhile.
Sure. If someone has an AUX analyzer and a HP ZR24w monitor it should be trivial to look at the traffic and see if there's something bogus in our AUX communication. Sadly I don't have an AUX analyzer.
Quoted 6 lines
Reviewed-by Todd Previte <[email protected]>_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC
Quoted 44 lines · Ville Syrjälä
Quoted 31 lines · Todd Previte
Quoted 30 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems particularly susceptible to this problem once it's gone into a sleep mode.
The issue seems to happen only for the first AUX message that wakes the sink up. But as the first AUX read we often do is the DPCD receiver cap it does wreak a bit of havoc with subsequent link training etc. when the receiver cap bw/lane/etc. information is garbage.
A sufficient workaround seems to be to perform a single byte dummy read before reading the actual data. I suppose that just wakes up the sink sufficiently and we can just throw away the returned data in case it's crap.
DP_DPCD_REVseems like a sufficiently safe location to read here.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -2870,6 +2870,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,ssize_t ret;int i;Quoted 12 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset, · line 2882
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+/* +* Sometime we just get the same incorrect byte repeated +* over the entire buffer. Doing just one throw away read +* initially seems to "solve" it. +*/ +drm_dp_dpcd_read (aux,DP_DPCD_REV , buffer,1 ); +for (i =0 ; i <3 ; i++) { ret =drm_dp_dpcd_read (aux, offset, buffer, size);if (ret == size)Seems like a reasonable workaround for this problem, though investigating the actual root cause might be worthwhile.
Quoted 3 lines
Sure. If someone has an AUX analyzer and a HP ZR24w monitor it should be trivial to look at the traffic and see if there's something bogus in our AUX communication. Sadly I don't have an AUX analyzer.
I've got the monitor on my desk but no AUX analyzer to use. I'll see if I can track one down.
-T
Quoted 5 lines
Quoted 5 lines
Reviewed-by Todd Previte <[email protected]>_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 44 lines · Todd Previte
Quoted 29 lines · On 10/16/2014 10:46 AM, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems particularly susceptible to this problem once it's gone into a sleep mode.
The issue seems to happen only for the first AUX message that wakes the sink up. But as the first AUX read we often do is the DPCD receiver cap it does wreak a bit of havoc with subsequent link training etc. when the receiver cap bw/lane/etc. information is garbage.
A sufficient workaround seems to be to perform a single byte dummy read before reading the actual data. I suppose that just wakes up the sink sufficiently and we can just throw away the returned data in case it's crap.
DP_DPCD_REVseems like a sufficiently safe location to read here.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -2870,6 +2870,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,ssize_t ret;int i;drivers/gpu/drm/i915/intel_dp.c intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset, · line 2881
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+/* +* Sometime we just get the same incorrect byte repeated +* over the entire buffer. Doing just one throw away read +* initially seems to "solve" it. +*/ +drm_dp_dpcd_read (aux,DP_DPCD_REV , buffer,1 ); +for (i =0 ; i <3 ; i++) { ret =drm_dp_dpcd_read (aux, offset, buffer, size);if (ret == size)Seems like a reasonable workaround for this problem, though investigating the actual root cause might be worthwhile.
Quoted 1 line
Reviewed-by Todd Previte <[email protected]>
... one for Jani I guess. But I'm suspicious here too, so maybe we should extract this read_wake function to the core dp helpers and convince that some other driver should use it? Adding more people and lists. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Jani Nikula
maintainerQuoted 11 lines · On Thu, 16 Oct 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems particularly susceptible to this problem once it's gone into a sleep mode.
The issue seems to happen only for the first AUX message that wakes the sink up. But as the first AUX read we often do is the DPCD receiver cap it does wreak a bit of havoc with subsequent link training etc. when the receiver cap bw/lane/etc. information is garbage.
This makes me suspect our sink dpms and wake handling even more than I already did. Someone(tm) should dig into the DP and hw specs again with fresh eyes...
Quoted 4 lines
A sufficient workaround seems to be to perform a single byte dummy read before reading the actual data. I suppose that just wakes up the sink sufficiently and we can just throw away the returned data in case it's crap.
DP_DPCD_REVseems like a sufficiently safe location to read here.
Seems like a pretty harmless thing to do, and we already do loads of dpcd reads anyway. We should throw this at some related bugs.
So ack.
BR,
Jani.
Quoted 31 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_dp.c +7
-0@@ -2870,6 +2870,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,ssize_t ret;int i; +/* +* Sometime we just get the same incorrect byte repeated +* over the entire buffer. Doing just one throw away read +* initially seems to "solve" it. +*/ +drm_dp_dpcd_read (aux,DP_DPCD_REV , buffer,1 ); +for (i =0 ; i <3 ; i++) { ret =drm_dp_dpcd_read (aux, offset, buffer, size);if (ret == size)Signature · 6 lines
2.0.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Jani Nikula
Quoted 7 lines · On Thu, 16 Oct 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems particularly susceptible to this problem once it's gone into a sleep mode.
Quoted 8 lines
Quoted 4 lines
The issue seems to happen only for the first AUX message that wakes the sink up. But as the first AUX read we often do is the DPCD receiver cap it does wreak a bit of havoc with subsequent link training etc. when the receiver cap bw/lane/etc. information is garbage.
This makes me suspect our sink dpms and wake handling even more than I already did. Someone(tm) should dig into the DP and hw specs again with fresh eyes...
Yeah when I last looked at the spec it was rather vague on the subject. On the other hand it seems to suggest that you're supposed to wake up the sink via DP_SET_POWER before any other AUX transfer, but on the other hand it seems to say AUX is fine as long as you remember to do the extended retry in case the AUX circuitry was asleep in the sink.
However DPCD 1.0 doesn't even support DP_SET_POWER so that does suggest that it's not really mandatory to wake things up first. Well, assuming DPCD 1.0 devices even exist.
I was a bit suspicious of our AUX code as well, but IIRC didn't spot anything obviously incorrect there when I had a look. So might be this is just the sink being a bit buggy.
Quoted 49 lines
Quoted 5 lines
A sufficient workaround seems to be to perform a single byte dummy read before reading the actual data. I suppose that just wakes up the sink sufficiently and we can just throw away the returned data in case it's crap.
DP_DPCD_REVseems like a sufficiently safe location to read here.Seems like a pretty harmless thing to do, and we already do loads of dpcd reads anyway. We should throw this at some related bugs.
So ack.
BR,
Jani.Quoted 31 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_dp.c +7
-0@@ -2870,6 +2870,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,ssize_t ret;int i; +/* +* Sometime we just get the same incorrect byte repeated +* over the entire buffer. Doing just one throw away read +* initially seems to "solve" it. +*/ +drm_dp_dpcd_read (aux,DP_DPCD_REV , buffer,1 ); +for (i =0 ; i <3 ; i++) { ret =drm_dp_dpcd_read (aux, offset, buffer, size);if (ret == size)Signature · 6 lines
2.0.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 2 lines
Ville Syrjälä Intel OTC
Quoted 13 lines · Ville Syrjälä
Quoted 12 lines · Jani Nikula
Quoted 11 lines · On Thu, 16 Oct 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems particularly susceptible to this problem once it's gone into a sleep mode.
The issue seems to happen only for the first AUX message that wakes the sink up. But as the first AUX read we often do is the DPCD receiver cap it does wreak a bit of havoc with subsequent link training etc. when the receiver cap bw/lane/etc. information is garbage.
Quoted 8 lines
Quoted 3 lines
This makes me suspect our sink dpms and wake handling even more than I already did. Someone(tm) should dig into the DP and hw specs again with fresh eyes...
Yeah when I last looked at the spec it was rather vague on the subject. On the other hand it seems to suggest that you're supposed to wake up the sink via
DP_SET_POWERbefore any other AUX transfer, but on the other hand it seems to say AUX is fine as long as you remember to do the extended retry in case the AUX circuitry was asleep in the sink.
The sink is supposed to exit power-down mode within 1ms of detecting a differential signal voltage on the AUX lines, according to the spec. So in theory, any AUX transactions should be able to wake up the sink device. As you pointed out, the AUX retries will catch the case where the AUX channel is powered down. I know of one instance where the write to SET_POWER is required, and that's in one of the compliance tests. Outside of that though, I haven't seen anything where it's mandatory.
-T
Quoted 54 lines
However DPCD 1.0 doesn't even support
DP_SET_POWERso that does suggest that it's not really mandatory to wake things up first. Well, assuming DPCD 1.0 devices even exist.I was a bit suspicious of our AUX code as well, but IIRC didn't spot anything obviously incorrect there when I had a look. So might be this is just the sink being a bit buggy.
Quoted 45 lines
Quoted 4 lines
A sufficient workaround seems to be to perform a single byte dummy read before reading the actual data. I suppose that just wakes up the sink sufficiently and we can just throw away the returned data in case it's crap.
DP_DPCD_REVseems like a sufficiently safe location to read here.Seems like a pretty harmless thing to do, and we already do loads of dpcd reads anyway. We should throw this at some related bugs.
So ack.
BR,
Jani.Quoted 30 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_dp.c +7
-0@@ -2870,6 +2870,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,ssize_t ret;int i; +/* +* Sometime we just get the same incorrect byte repeated +* over the entire buffer. Doing just one throw away read +* initially seems to "solve" it. +*/ +drm_dp_dpcd_read (aux,DP_DPCD_REV , buffer,1 ); +for (i =0 ; i <3 ; i++) { ret =drm_dp_dpcd_read (aux, offset, buffer, size);if (ret == size)Signature · 6 lines
2.0.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 1 line
Jani Nikula, Intel Open Source Technology Center
Quoted 8 lines · Jani Nikula
Quoted 7 lines · On Thu, 16 Oct 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems particularly susceptible to this problem once it's gone into a sleep mode.
Quoted 7 lines
Quoted 4 lines
The issue seems to happen only for the first AUX message that wakes the sink up. But as the first AUX read we often do is the DPCD receiver cap it does wreak a bit of havoc with subsequent link training etc. when the receiver cap bw/lane/etc. information is garbage.
This makes me suspect our sink dpms and wake handling even more than I already did. Someone(tm) should dig into the DP and hw specs again with fresh eyes...
I can go look into this today/next week. This problem sounds vaguely similar to one I've run across before.
-T
Quoted 39 lines
Quoted 4 lines
A sufficient workaround seems to be to perform a single byte dummy read before reading the actual data. I suppose that just wakes up the sink sufficiently and we can just throw away the returned data in case it's crap.
DP_DPCD_REVseems like a sufficiently safe location to read here.Seems like a pretty harmless thing to do, and we already do loads of dpcd reads anyway. We should throw this at some related bugs.
So ack.
BR,
Jani.Quoted 26 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_dp.c +7
-0@@ -2870,6 +2870,13 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,ssize_t ret;int i; +/* +* Sometime we just get the same incorrect byte repeated +* over the entire buffer. Doing just one throw away read +* initially seems to "solve" it. +*/ +drm_dp_dpcd_read (aux,DP_DPCD_REV , buffer,1 ); +for (i =0 ; i <3 ; i++) { ret =drm_dp_dpcd_read (aux, offset, buffer, size);if (ret == size)Signature · 1 line
2.0.4
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx