• Douglas Anderson's avatar
    drm/bridge: parade-ps8640: Provide wait_hpd_asserted() in struct drm_dp_aux · f5aa7d46
    Douglas Anderson authored
    This implements the callback added by the patch ("drm/dp: Add
    wait_hpd_asserted() callback to struct drm_dp_aux").
    
    With this change and all the two "DP AUX Endpoint" drivers changed to
    use wait_hpd_asserted(), we no longer need to have an long delay in
    the AUX transfer function. It's up to the panel code to make sure that
    the panel is powered now. If someone tried to call the aux transfer
    function without making sure the panel is powered we'll just get a
    normal transfer failure.
    
    We'll still keep the wait for HPD in the pre_enable() function. Though
    it's probably not actually needed there, this driver is used in the
    old mode (pre-DP AUX Endpoints) and it may be important for those
    cases. If nothing else, it shouldn't cause any big problems.
    
    NOTE: When handling the timeout for HPD we start the timer _after_
    we've runtime resumed the device. This is definitely important for the
    panel on my homestar which comes up 170 ms after we start timing (the
    panel specifies 200 ms max). It's a little unclear how much of this
    extra time is due to some internal state machine in the parade
    firmware vs. debouncing but it seems to work for the two test cases I
    have to do it this way.
    Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
    Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220614145327.v4.4.Ie827321ce263be52fdb8c1276f6f8cc00d78029f@changeid
    f5aa7d46
parade-ps8640.c 19.8 KB