Commit graph

102 commits

Author SHA1 Message Date
Andrei-Liviu Simion
f06d5e04dc dptx: XDPTX_EDID_SIZE->XDPTX_EDID_BLOCK_SIZE.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:34:22 +05:30
Andrei-Liviu Simion
1d05464884 dptx: Update to use common video driver.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:34:22 +05:30
Andrei-Liviu Simion
d94ec8f60e dptx: Updated Doxygen documentation.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:32:12 +05:30
Andrei-Liviu Simion
b37ecd25c7 dptx: Updated modification history.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:32:11 +05:30
Andrei-Liviu Simion
0c7ec45a82 dptx: Updated driver information in documentation.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:32:10 +05:30
Andrei-Liviu Simion
1ae5c266b8 dptx: Optimized some video calculations.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:32:10 +05:30
Andrei-Liviu Simion
a22e5d1367 dptx: Update to use common video library.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:32:09 +05:30
Andrei-Liviu Simion
942a00d5c0 dptx: Stream indices now start at 1 rather than 0.
Following the naming convention used in the IP product guide and the IP
hardware.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:43 +05:30
Andrei-Liviu Simion
e63417da3e dptx: Fixed a bit mask.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:42 +05:30
Andrei-Liviu Simion
4c0b1bdaee dptx: Added parameter comment to XDptx_SetVswingPreemp function header.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:41 +05:30
Andrei-Liviu Simion
375c80052a dptx: Preserve main link enable status while link training.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:41 +05:30
Andrei-Liviu Simion
dc83ef949f dptx: Modified the asserts for the establish link function.
Since the check link status function is no longer being called within the
establish link function, some additional assertions need to be done.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:40 +05:30
Andrei-Liviu Simion
29af856045 dptx: Optimized burst AUX writes.
Use burst writes when possible.
- Detached writing the voltage swing and preemphasis settings to the core from
writing to the sink using AUX writes. Now, a pointer to an array is taken as an
argument and the array is modified with the data to write over AUX. This allows
preparation of a burst write when the voltage swing and preemphasis settings can
be written at the same time as another adjacent DPCD access.

The scrambler is now enabled/disabled while writing the training patterns.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:39 +05:30
Andrei-Liviu Simion
431de2ef88 dptx: Force retrain when the establish link function is called.
Previously, the establish link function was checking the status of all lanes and
only retraining if the link isn't trained. This results in no retraining if the
application reduces the lane count.

The link should always be retrained on a change in lane count.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:38 +05:30
Andrei-Liviu Simion
bba7e0e8d3 dptx: Waiting for the PHY to come out of reset based on lane count.
Previously, the PHY status for all lanes was being checked. This results in the
driver thinking that the PHY never comes out of reset if the core is limited to
a maximum lane count of 1 or 2 at the time the core is initialized.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:37 +05:30
Andrei-Liviu Simion
f2498c9273 dptx: Mask interrupts while they are being serviced.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:36 +05:30
Andrei-Liviu Simion
b303829cdd dptx: Increased HPD pulse duration to 0.500 ms to allow for debouncing.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:35 +05:30
Andrei-Liviu Simion
fff069f3e4 dptx: Reduced the RX capability read to 16 bytes.
No need to read and store unused capability information by the driver.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:35 +05:30
Andrei-Liviu Simion
de578f8a0e dptx: Synchronized argument naming between function declarations/definitions.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2015-04-26 10:31:34 +05:30
Kishore Kumar Korathaluri
25189f269f dptx : added common namespace to all common tcl commands.
Signed-off-by: Kishore Kumar Korathaluri <kkorath@xilinx.com>
2015-04-26 10:30:45 +05:30
Andrei-Liviu Simion
ec95e33596 dptx: Updated Doxygen documentation.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:49 +05:30
Andrei-Liviu Simion
d98aa35095 dptx: Fixed some documentation for Doxygen.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:48 +05:30
Andrei-Liviu Simion
048a0cc949 dptx: Added macro header comments describing new functionality.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:48 +05:30
Andrei-Liviu Simion
89ececd8d1 dptx: Improved sink reordering.
The sink reordering would fail on retrieval of tiling information from a sink
that does not have a Tiled Display Topology (TDT) data block. This behavior is
incorrect since subsequent sinks may be a part of a tiled display.
Modified the function to be void.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:47 +05:30
Andrei-Liviu Simion
9fc3a2bd3e dptx: Added function header comments describing new functionality.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:47 +05:30
Andrei-Liviu Simion
7c47ed85dd dptx: Added functions that reorder the sink numbering of the topology.
Added functionality that reorders the sink list such that topologies containing
tiled display(s) will have the contained sinks reordered in a consistent manner.

The need for such functionality exists because not all tiled displays will have
the same internal topologies.
It was observed that two 4k2k MST based monitors (tiled display, 2 sinks) from
different manufacturers would have the left and right images swapped using
identical stream-to-sink mappings.
Thus, the need to obtain the tiled display topology information of all sinks and
their relative tile location is required to send the correct stream to the
desired sink.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:46 +05:30
Andrei-Liviu Simion
4a31173fbc dptx: Added macros related to tile ordering.
These macros parse tile location, total horizontal and vertical tiles, and tile
order from the Tiled Display Topology section data block.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:46 +05:30
Andrei-Liviu Simion
136b180907 dptx: Added a function that retrieves the Tiled Display Topology of a sink.
Given a sink, the function will attempt to retrieve the Tiled Display Topology
section data block which is part of the DisplayID structure.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:45 +05:30
Andrei-Liviu Simion
186fc02763 dptx: Added definitions for the Tiled Display Topology section data block.
The Tiled Display Topology (TDT) section data block is part of the DisplayID.
The driver currently supports DisplayID as an extension block to the base EDID
structure.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:44 +05:30
Andrei-Liviu Simion
9437435007 dptx: Added a function to retrieve a specified data block from the DisplayId.
Search for a section data block that matched a specified section tag.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:44 +05:30
Andrei-Liviu Simion
04f47a0ead dptx: Added some DisplayID register defines.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:43 +05:30
Andrei-Liviu Simion
394de11837 dptx: Added a function that fetches a DisplayID EDID extension block.
Given a sink, the function will attempt to retrieve an EDID extension block of
type DisplayID.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:43 +05:30
Andrei-Liviu Simion
d509ffc520 dptx: Reuse retrieval of EDID blocks for retrieval of the base EDID.
Base EDID = EDID block #0.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:42 +05:30
Andrei-Liviu Simion
d49f9f84fc dptx: Moved functions related to retrieval of EDID information into xdptx_edid.c
Consolidated the functions that obtain the base EDID block into the EDID utility
file.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:41 +05:30
Andrei-Liviu Simion
f2ad8b171d dptx: Added EDID utility file and functions for fetching an EDID block.
Created a file containing utility functions related to the Extended Display
Identification Information (EDID).
The initial functions included are used to fetch EDID blocks.

Block numbering starts with 0 being the base EDID block, and extension block
starting at 1.

EDID blocks are 128 bytes in size.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:41 +05:30
Andrei-Liviu Simion
63001153f7 dptx: Optimized immediate I2C read transaction.
The 16-byte chunking is already done by XDptx_AuxCommon, so there is no need to
do it in XDptx_IicRead.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:40 +05:30
Andrei-Liviu Simion
ba2c1ce602 dptx: Reorganized and commented I2C and DPCD reads/writes.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:39 +05:30
Andrei-Liviu Simion
64efde0148 dptx: Add and update the function header comments for I2C and DPCD reads/writes.
- Added function header comments for the remote I2C and remote DPCD read and
write functions.
- Updated the function header comments for immediate I2C and AUX read and write
functions.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:38 +05:30
Andrei-Liviu Simion
9fe0c8ca59 dptx: Define the I2C segment pointer address (0x30).
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
2014-11-25 21:38:37 +05:30
Andrei-Liviu Simion
52ebe1260c dptx: Improved remote IIC reads/writes to automatically work on 16-byte chunks.
Some monitors don't support sideband messages with IIC 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 IIC read/write functions also serve as a wrapper for
an IIC 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:37 +05:30
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