OSDN Git Service

drm/bridge/tc358767: Don't register DP AUX channel until bridge is attached
authorLyude Paul <lyude@redhat.com>
Fri, 19 Feb 2021 21:53:00 +0000 (16:53 -0500)
committerLyude Paul <lyude@redhat.com>
Tue, 23 Mar 2021 18:17:25 +0000 (14:17 -0400)
commit85ddbe2c4ac16e050d0d432b200ac8039d5ff2ac
treecf9500f132368f8946feb29f12f703a6af751648
parent835bc48380820d16102feb23819d456765efb692
drm/bridge/tc358767: Don't register DP AUX channel until bridge is attached

Since this is a bridge, we don't start out with a respective DRM device.
Likewise this means we don't have a connector, which also means that we
should be following drm_dp_aux_register()'s documentation advice and not
call drm_dp_aux_register() until we have a matching connector. Instead,
call drm_dp_aux_init() in tc_probe() and wait until tc_bridge_attach() to
register our AUX channel. We also add tc_bridge_detach() to handle
unregistering the AUX adapter once the bridge has been disconnected.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-5-lyude@redhat.com
drivers/gpu/drm/bridge/tc358767.c