diff options
author | Douglas Anderson <dianders@chromium.org> | 2019-06-04 13:42:06 -0700 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2019-06-11 13:52:28 -0400 |
commit | 99d02ed523dcaf5be0c6a778708df2779cfb3ed6 (patch) | |
tree | f27957b552bdc64be3a637a0d4f0922fbaa1eb72 /include/drm/bridge | |
parent | ecf79e7ca1565e4d36482aa4d2950bc397313425 (diff) | |
download | lwn-99d02ed523dcaf5be0c6a778708df2779cfb3ed6.tar.gz lwn-99d02ed523dcaf5be0c6a778708df2779cfb3ed6.zip |
drm: bridge: dw-hdmi: Add hook for resume
On Rockchip rk3288-based Chromebooks when you do a suspend/resume
cycle:
1. You lose the ability to detect an HDMI device being plugged in.
2. If you're using the i2c bus built in to dw_hdmi then it stops
working.
Let's add a hook to the core dw-hdmi driver so that we can call it in
dw_hdmi-rockchip in the next commit.
NOTE: the exact set of steps I've done here in resume come from
looking at the normal dw_hdmi init sequence in upstream Linux plus the
sequence that we did in downstream Chrome OS 3.14. Testing show that
it seems to work, but if an extra step is needed or something here is
not needed we could improve it.
As part of this change we'll refactor the hardware init bits of
dw-hdmi to happen all in one function and all at the same time. Since
we need to init the interrupt mutes before we request the IRQ, this
means moving the hardware init earlier in the function, but there
should be no problems with that. Also as part of this we now
unconditionally init the "i2c" parts of dw-hdmi, but again that ought
to be fine.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190604204207.168085-1-dianders@chromium.org
Diffstat (limited to 'include/drm/bridge')
-rw-r--r-- | include/drm/bridge/dw_hdmi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index 66e70770cce5..601243b56b69 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -154,6 +154,8 @@ struct dw_hdmi *dw_hdmi_bind(struct platform_device *pdev, struct drm_encoder *encoder, const struct dw_hdmi_plat_data *plat_data); +void dw_hdmi_resume(struct dw_hdmi *hdmi); + void dw_hdmi_setup_rx_sense(struct dw_hdmi *hdmi, bool hpd, bool rx_sense); void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate); |