mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
CHROMIUM: drm: bridge/dw_hdmi: Reorg hdmi_unmute_interrupts()
Reorganize hdmi_unmute_interrupts() to put all the HPD-related config together. This also eliminates an extra clearning of the HPD interrupt. BUG=chrome-os-partner:44922 TEST=HDMI still works fine. Change-Id: I9d3cd847a00f9c887e2d054ff2b5671b0eeb8a42 Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Yakir Yang <ykk@rock-chips.com> Reviewed-on: https://chromium-review.googlesource.com/299777 Reviewed-by: Yakir Yang <ykk@rock-chips.com>
This commit is contained in:
committed by
Huang, Tao
parent
d994162350
commit
7f3611ef45
@@ -2115,16 +2115,6 @@ int dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
*/
|
||||
hdmi_init_clk_regenerator(hdmi);
|
||||
|
||||
/*
|
||||
* Configure registers related to HDMI interrupt
|
||||
* generation before registering IRQ.
|
||||
*/
|
||||
hdmi_writeb(hdmi, HDMI_PHY_HPD | HDMI_PHY_RX_SENSE, HDMI_PHY_POL0);
|
||||
|
||||
/* Clear Hotplug interrupts */
|
||||
hdmi_writeb(hdmi, HDMI_IH_PHY_STAT0_HPD | HDMI_IH_PHY_STAT0_RX_SENSE,
|
||||
HDMI_IH_PHY_STAT0);
|
||||
|
||||
hdmi_writeb(hdmi, HDMI_PHY_I2CM_INT_ADDR_DONE_POL,
|
||||
HDMI_PHY_I2CM_INT_ADDR);
|
||||
|
||||
@@ -2132,18 +2122,16 @@ int dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
HDMI_PHY_I2CM_CTLINT_ADDR_ARBITRATION_POL,
|
||||
HDMI_PHY_I2CM_CTLINT_ADDR);
|
||||
|
||||
/* enable cable hot plug irq */
|
||||
hdmi_writeb(hdmi, hdmi->phy_mask, HDMI_PHY_MASK0);
|
||||
/* Re-init HPD polarity */
|
||||
hdmi_writeb(hdmi, HDMI_PHY_HPD | HDMI_PHY_RX_SENSE, HDMI_PHY_POL0);
|
||||
|
||||
/* Clear Hotplug interrupts */
|
||||
hdmi_writeb(hdmi, HDMI_IH_PHY_STAT0_HPD | HDMI_IH_PHY_STAT0_RX_SENSE,
|
||||
HDMI_IH_PHY_STAT0);
|
||||
/* Unmask HPD, clear transitory interrupts, then unmute */
|
||||
hdmi_writeb(hdmi, hdmi->phy_mask, HDMI_PHY_MASK0);
|
||||
|
||||
ret = dw_hdmi_register(drm, hdmi);
|
||||
if (ret)
|
||||
goto err_iahb;
|
||||
|
||||
/* Unmute interrupts */
|
||||
hdmi_writeb(hdmi, ~(HDMI_IH_PHY_STAT0_HPD | HDMI_IH_PHY_STAT0_RX_SENSE),
|
||||
HDMI_IH_MUTE_PHY_STAT0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user