Skip to content

Commit

Permalink
v4l: xilinx: dprx: Generate HPD interrupt in unplug handler
Browse files Browse the repository at this point in the history
When the unplug handler is called, bring down the HPD signal for 750us to
generate HPD interrupt so the source can train the link again based on
the link status.

Signed-off-by: Rajesh Gugulothu <gugulothu.rajesh@xilinx.com>
Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
  • Loading branch information
Rajesh Gugulothu authored and Michal Simek committed Jan 12, 2022
1 parent f6d1241 commit a83d69b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/media/platform/xilinx/xilinx-dprxss.c
Expand Up @@ -205,6 +205,10 @@
#define DP_LINK_BW_5_4G 5400 /* 1.2 */
#define DP_LINK_BW_8_1G 8100 /* 1.4 */

#define xdprxss_generate_hpd_intr(state, duration) \
xdprxss_write(state, XDPRX_HPD_INTR_REG, \
FIELD_PREP(XDPRX_HPD_PULSE_MASK, duration) |\
XDPRX_HPD_INTR_MASK)
#define xdprxss_disable_unplug_intr(state) \
xdprxss_set(state, XDPRX_INTR_MASK_REG, XDPRX_INTR_UNPLUG_MASK)

Expand Down Expand Up @@ -814,6 +818,7 @@ static void xdprxss_irq_unplug(struct xdprxss_state *state)
* disconnected
*/
xdprxss_disable_unplug_intr(state);
xdprxss_generate_hpd_intr(state, XDPRX_HPD_PULSE_750);

/*
* In a scenario, where the cable is plugged-in but the training
Expand Down

0 comments on commit a83d69b

Please sign in to comment.