• Douglas Anderson's avatar
    drm: bridge: dw-hdmi: Add hook for resume · 99d02ed5
    Douglas Anderson authored
    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: default avatarDouglas Anderson <dianders@chromium.org>
    Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190604204207.168085-1-dianders@chromium.org
    99d02ed5
dw-hdmi.c 78.1 KB