Commit graph

62 commits

Author SHA1 Message Date
Andrei-Liviu Simion
3a23a15f09 dptx: Optimize read/write GUID functions to use new remote reads/writes.
The remote read/write functions serve as a wrapper in case the target RX device
is directly connected to the TX (link count total is equal to 1).
These functions may be called instead of the read/write GUID functions doing the
same thing.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:36 +05:30
Andrei-Liviu Simion
518eb68d03 dptx: Improved remote DPCD reads/writes to automatically work on 16-byte chunks.
Some monitors don't support sideband messages with AUX reads greater than 16
bytes. This improvement breaks up the higher-level read/write request into
multiple reads/writes that work with up to 16 bytes in size.

These higher-level remote DPCD read/write functions also serve as a wrapper for
an AUX read/write in case that the link count total is equal to 1 (a read/write
request to the RX device directly connected to the TX (not "remote")).

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:35 +05:30
Andrei-Liviu Simion
d796348e29 dptx: Made the I2C read function more robust.
- Changed the offset from type u8 to u16.
- In order to accomodate offsets greater than 255, a segment pointer is used.
	- The I2C read funciton is now able to access blocks other than the
	block 0 and 1 at a given address. E.g., EDID extension blocks may now be
	accessed by reading from I2C address 0x50 (raw=0xA0/0xA1) and writing
	the appropriate segment pointer and offset.
		- Input offset=0.
			- EDID block 0: I2C read on offset=0 and segptr=0.
		- Input offset=128.
			- EDID block 1: I2C read on offset=128 and segptr=0.
		- Input offset=256.
			- EDID block 2: I2C read on offset=0 and segptr=1.
		- Input offset=384.
			- EDID block 3: I2C read on offset=128 and segptr=1.
		- etc.
	- Writing to the I2C address 0x30 (raw=0x60/0x61) sets the segment
	pointer.
	- Writing to an I2C address sets the offset that will be read from that
	address. E.g., a read of the EDID, starting at offset 128 would be done
	by writing 128 to 0x50, then reading from 0x50.
	- Offsets that cross a 256-byte boundary requiring increment of the
	segment pointer is also handled. E.g. A 16 byte read on input offset 500
	results in the the returned 16 byte array having the first 11 bytes from
	segptr=1 (bytes 244-255) and the last 5 bytes from segptr=2 (bytes 0-4).

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:35 +05:30
Andrei-Liviu Simion
8e3f3c9863 dptx: I2C writes do not use an offset.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:34 +05:30
Andrei-Liviu Simion
d8f1ad28d3 dptx: Renamed some arguments to be more consistent among functions.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:34 +05:30
Andrei-Liviu Simion
7cc072277c dptx: Reset video streams and AUX logic upon core initialization.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:33 +05:30
Andrei-Liviu Simion
e7216fd45f dptx: Update configuration structure when MST is enabled/disabled in hardware.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:32 +05:30
Andrei-Liviu Simion
6b9640569f dptx: Clear the ACT event received bit upon successfully receiving it.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:32 +05:30
Andrei-Liviu Simion
db13a8bdf4 dptx: Reuse common allocation function for clearing streams.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:31 +05:30
Andrei-Liviu Simion
c98c7e2ee5 dptx: Made the allocation of streams function more flexible.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:31 +05:30
Andrei-Liviu Simion
c24a77a245 dptx: Added an offset argument for remote I2C reads.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:30 +05:30
Andrei-Liviu Simion
73a66c85ff dptx: Added remote IIC write sideband message.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:30 +05:30
Andrei-Liviu Simion
2d318f6d74 dptx: Broadcast messages need to have an LCR of 6.
An LCR (link count remaining) value of 6 is used to protect against loops.
If the LCR isn't processed at each node and attempted to be broadcasted on all
ports, waiting for a reply, a loop in the topology will result in the broadcast
message being forwarded infinitely.
Because of this, an LCR of 0 will prevent the message from being forwarded to
subsequent DP nodes.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:19 +05:30
Andrei-Liviu Simion
48ac21fccd dptx: Updated documentation for v2_0.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:14 +05:30
Andrei-Liviu Simion
24a0758d5d dptx: Updated header comments to reflect status of testing.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:13 +05:30
Andrei-Liviu Simion
af7d539249 dptx: MST: Improved example code.
- Reduced lines of code that weren't part of the minimal set required for MST
streams to appear on the monitors.
- By default, don't use delays for AUX or sideband messaging.
- Added a final check to make sure that the link hasn't been lost. If it was
lost, re-train and try the programming sequence again.
- Added some additional comments to example code.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:12 +05:30
Andrei-Liviu Simion
4b7667f2c8 dptx: Updated revision history.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:12 +05:30
Andrei-Liviu Simion
0572fea2ca dptx: MST: Minor tweaks to sideband messaging.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:11 +05:30
Andrei-Liviu Simion
116079118c dptx: MST: Clear any lingering responses before sending a sideband message.
In case the RX device fell into a weird state.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:10 +05:30
Andrei-Liviu Simion
3974e30158 dptx: Added retry when checking if a connection exists.
It was observed that in MST mode, some of the sideband message were failing
due to the first check not showing a connected device.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:10 +05:30
Andrei-Liviu Simion
37d4046df4 dptx: MST: Modified number of iterations before timing out.
Increased waiting for a response to a sideband message before timing out.

Reduced number of reads to check that the RX device received an ACT event.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:09 +05:30
Andrei-Liviu Simion
414d35c52e dptx: Improved stack size usage for topology discovery.
Reduced the stack size required by the topology discovery algorithm
significantly.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:08 +05:30
Andrei-Liviu Simion
9547cbc0a8 dptx: Upgrade MDD file version to v2_0 and remove trailing whitespace.
Changes to the API in v2_0:
- XDptx_FindAccessibleDpDevices returns u32 now instead of void previously.
- Added a wrapper function: u32 XDptx_DiscoverTopology(XDptx *InstancePtr);

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:08 +05:30
Andrei-Liviu Simion
8deec4b397 dptx: Updated Doxygen documentation.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:25 +05:30
Andrei-Liviu Simion
a448e98992 dptx: Added a method for overriding the user pixel width of the MSA structure.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:25 +05:30
Andrei-Liviu Simion
5c5f8b85a6 dptx: MST: Limit the number of streams to configure based on IP configuration.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:24 +05:30
Andrei-Liviu Simion
91575b5dc2 dptx: Changed stream indices to start from 0 instead of 1.
Next IP documentation release will follow this convention as well.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:24 +05:30
Andrei-Liviu Simion
d2697a6631 dptx: Update examples.
Testing with the new IP configuration parameter (payload data width) required
some changes to the examples.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:24 +05:30
Andrei-Liviu Simion
fa10a1a066 dptx: Handle new IP configuration parameter.
GT data width.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:24 +05:30
Andrei-Liviu Simion
adc89fae61 dptx: Allow introduction of AUX and sideband message latency delays.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:24 +05:30
Andrei-Liviu Simion
2ebd71bd56 dptx: Exporting additional IP configuration parameters.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:23 +05:30
Andrei-Liviu Simion
0ef01dc0d1 dptx: MST: Updated Doxygen documentation with MST content.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:23 +05:30
Andrei-Liviu Simion
d3a9371163 dptx: Fixed a Doxygen parameter comment.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:23 +05:30
Andrei-Liviu Simion
c630ec3c33 dptx: MST: Rearranged some example code.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:22 +05:30
Andrei-Liviu Simion
51622b762f dptx: MST: Added remote EDID read function.
Also, rearranged/grouped the GUID functions with the EDID read function as
"utility" functions.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:22 +05:30
Andrei-Liviu Simion
ee6966c323 dptx: Removed EDID structure from Dptx structure.
Instead, moved it to the application level and functions operating on the Edid
take a pointer to the Edid as an argument.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:22 +05:30
Andrei-Liviu Simion
701b2bca5f dptx: Added user control of custom voltage swing and pre-emphasis TX levels.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:22 +05:30
Andrei-Liviu Simion
be98293a83 dptx: Fixed some bugs introduced with asserts.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:22 +05:30
Andrei-Liviu Simion
a5ac285040 dptx: Fixed some asserts.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:22 +05:30
Andrei-Liviu Simion
62bab1fb77 dptx: MST: Added some missed documentation for some struct members.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:22 +05:30
Andrei-Liviu Simion
28db6e4a6b dptx: Added some missed asserts.
- The stream-policy maker functions were missing some asserts for checking that
the stream argument is valid.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:21 +05:30
Andrei-Liviu Simion
c45033d802 dptx: MST: Optimized I2C and AUX read.
ReadData is now filled only with actually data instead of sideband message reply
data (reply code, port number, etc) + data.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:21 +05:30
Andrei-Liviu Simion
1efc76acc9 dptx: Added function comments for the selftest example.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:21 +05:30
Andrei-Liviu Simion
71f96698d0 dptx: MST: Added check for MST capabilities before enabling.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:21 +05:30
Andrei-Liviu Simion
abd449945c dptx: MST: Removed dependency on math.h.
Added equivalent ceil functionality.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:20 +05:30
Andrei-Liviu Simion
6e222812f1 dptx: MST: Added asserts.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:20 +05:30
Andrei-Liviu Simion
32b81aa075 dptx: Removed trailing whitespace.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:20 +05:30
Andrei-Liviu Simion
16172f3743 dptx: MST: Added an MST example and updated existing examples.
Also added more MST comments.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:19 +05:30
Andrei-Liviu Simion
3d6faf54b3 dptx: MST: Clean-up, documentation, and general organization.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:19 +05:30
Andrei-Liviu Simion
79093491e1 dptx: Added dependencies file for common example code.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-09-02 11:21:19 +05:30