07-22-2015 06:55 AM - edited 07-22-2015 06:56 AM
I've been working with the DisplayPort IP V6.0 for a while now and have come across some potentiall undesireable/unspecified behaviour. All transactions on the AUX channel have been monitored using a Unigraf DPA-400 1.2 for reference
We have the IP configured as sink device and have had reports recently that when a DP source is connected to our card and out card is repowered, the DP source (PC graphics card), seems to write to DPCD register 0x00600 and set us into the D3 power down mode (b'10'). Shortly after this the sink generates a HPD IRQ signal to the source to indicate that it requries attention (see BlackScreens_on_Projector_Reboot.html, lines 388 and 398) . However, conducting the same test (power down and then up of a Dell 4K monitor), does not generate this HPD IRQ after being set in the power down mode (see Dell_Monitor_Power_Down, line 153 onwards).
Every time I have monitored the AUX bus and seen the DIsplayPort IP being set into power down mode, a HPD_IRQ is generated.
The DP 1.2 specification states:
126.96.36.199 Link Maintenance
The Sink device must maintain the Link Status flags in DPCD registers 00202h-00204h during normal
operation. Upon loss of synchronization with the Source for any reason other than after receiving a
SET_POWER_STATE (DPCD 00600h) to 10b request, or to request retaining the link for any reason, the Sink
must clear INTERLANE_ALIGN_DONE and generate a distinct IRQ_HPD (i.e. distinct from an IRQ_HPR
generated for any other reason).
I have looked at the software to confirm it is not the software generating the HPD_IRQ by writing to register 0x02C and have also confirmed this by monitoring the internal AXI bus to the core using the ILA. No writes are occurring to this register, therefore something in the core would seem to be generating this IRQ when it shouldn't be. As the source code for the DisplayPort IP is encrypted it is difficult to trace this problem any further.
To test this in isolation would require and AUX channel master that would undertake link training and then write to the SET_POWER_STATE register. Unfortunately the only DP sources we have are graphics cards at this point. Any suggestions on this front would be appreciated.
I have raised this with our FAE but thought I'd post here to see if anyone else has seen this behaviour.
09-01-2017 05:57 PM
Very good post though it's been 3 years old.
After power down, HPD_IRQ is clearly generated from projector, but not on Dell monitor case. Were you able to resolve the issue? Curious of the finding...
09-04-2017 01:54 AM
Not sure we actually resolved the issue as such, but we ended up upgrading the IP to a newer version (as we found one revision of V6.0 of the IP to be less reliable than others for some reason) and I think that, in conjunction with a graphics card driver update, seemed to cure the issues we were having.
We had lots of "fun" getting this to work with various graphics cards especially when the behaviour of the graphics cards changes between driver updates! Every update to a driver seemed to change the way it works highlighting some new subtle effect that had not shown up during previous testing.
Even as recently as 3 weeks ago we had a driver update where,for 4K30 resolution, graphics card would use 2 lanes at 5.4G where previous drivers would use 4 lanes at 2.7G. This showed a bug in our DP driver code that did not occur when using a test pattern generator. It's been a long 3 years! :-(
I think we are now running with V7.0 Rev 0. We still haven't managed to achieve compliance with it yet though, but that is another story.
09-09-2017 10:18 AM
In a recent debug, I found different source behavior between Win10 & ubuntu. In ubuntu, Aux channel has a series of DPCD power-down commands right after HPD going false. Win10 DP source shows no such useless commands. Why is there a need of command after sink or monitor has unplugged?! Who is supposed to listen after they have left. That makes no sense at all.
Turned out that ubuntu community have been insisting on this. Their reasoning is "following DP spec". So, every DP port of every machine with ubuntu will emit power-down command into thin air after monitor is unplugged. This is the only time I like Windows over ubuntu.
09-11-2017 01:38 AM
That's very odd and completely non-sensical. I don't recall coming across any requirements like this during my work on it, but then again i haven't read every single page of the spec (I don't need help getting to sleep ;-) ).
In fact, section 5.1.4 if the DP V1.2 spec says:
" The Source device is not required to have an explicit response to Hot Unplug events. The Source may choose
to enter a power saving mode where it disables its Main Link after HPD has been de-asserted for longer than
the HPD_TimeOut (2ms). "
I seem to recall the nvidia graphics cards would, on assertion of HPD, send a power down immediately followed by power up before link training, which sort of makes sense, but sending power down after you've unplugged seems daft, unless you are not distinguishing between HPD_IRQ and HPD.
I don't suppose you have a link to any of this discussion in the Ubuntu community do you? I would be interested to read it.