]> git.baikalelectronics.ru Git - kernel.git/commit
drm: bridge: dw-hdmi: Fix the PHY power up sequence
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sun, 5 Mar 2017 23:35:57 +0000 (01:35 +0200)
committerArchit Taneja <architt@codeaurora.org>
Fri, 10 Mar 2017 10:04:04 +0000 (15:34 +0530)
commit9666ab97c48f88f3af12364388fedb9bb0f3eddf
tree3ea777db22007f9d5e6f368fec59714ad0c2aaff
parentc33696b99c9e7b4c79f5e586a1dcc425b5f4a0d0
drm: bridge: dw-hdmi: Fix the PHY power up sequence

When powering the PHY up we need to wait for the PLL to lock. This is
done by polling the TX_PHY_LOCK bit in the HDMI_PHY_STAT0 register
(interrupt-based wait could be implemented as well but is likely
overkill). The bit is asserted when the PLL locks, but the current code
incorrectly waits for the bit to be deasserted. Fix it, and while at it,
replace the udelay() with a sleep as the code never runs in
non-sleepable context.

To be consistent with the power down implementation move the poll loop
to the power off function.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170305233557.11945-1-laurent.pinchart+renesas@ideasonboard.com
drivers/gpu/drm/bridge/dw-hdmi.c