Altera DisplayPort MegaCore Function User Manual

Page 103

Advertising
background image

The following figure shows a more detailed view of these operations. For a sink application, the user

application must initialize the DPCD content and the EDID. Additionally, for both source and sink

applications, an interrupt ISR must be registered.

Figure 8-2: Typical Source and Sink User Application Library Calls

btc_dprx_syslib_add_rx(...);

btc_dprx_syslib_init(...);

btc_dprx_dpcd_gpu_access(...);

btc_dprx_edid_set(...);

<Register the RX ISR>

BTC_DPRX_ENABLE_IRQ(...);

btc_dprx_syslib_monitor(...);

btc_dptx_syslib_init(...);

<Register the TX ISR>

BTC_DPTX_ENABLE_HPD_IRQ(...);

btc_dptx_syslib_monitor(...);

Source

Sink

Sink instantiations issue an interrupt to the GPU when an AUX channel Request is received from the

connected source. Source instantiations issue an interrupt to the GPU when a logic state change is

detected on the HPD signal generated by the connected DisplayPort sink.
Because sources always act as AUX channel masters, they can manage AUX communication by initiating

a transaction (by sending a request) and then polling the IP core registers waiting to receive a reply.

Optionally, source instantiations can also issue an interrupt to the GPU when an AUX channel reply is

received from the connected DisplayPort sink, allowing the GPU to execute other tasks while waiting for

AUX channel replies.
Enable or disable source and sink interrupts with the following library macros:

BTC_DPTX_ENABLE_HPD_

IRQ()

BTC_DPTX_DISABLE_HPD_

IRQ()

BTC_DPTX_ENABLE_AUX_

IRQ()

BTC_DPTX_DISABLE_AUX_

IRQ()

BTC_DPRX_ENABLE_

IRQ()

BTC_DPRX_DISABLE_

IRQ()

btc_dprx_syslib

manages one to four sink instances by disabling all GPU interrupts when invoked and

restoring them to their previous state on exiting. Therefore, most of the library public functions

implement critical sections.
The GPU main program should minimize overhead when serving interrupts generated by sink instances

(i.e., interrupts related to a connected source’s AUX channel requests).
Interrupts generated by source instances (i.e., interrupts related to a connected sink’s HPD activity) can be

served with a lower priority. In designs where the same GPU handles both source and sink instances, the

GPU must allow for nested interrupts originated by sinks. That is, a sink must be allowed to interrupt a

source interrupt service routine (but not another sink interrupt service routine).

8-2

Using the Library

UG-01131

2015.05.04

Altera Corporation

DisplayPort API Reference

Send Feedback

Advertising