Skip to content

Commit

Permalink
drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace
Browse files Browse the repository at this point in the history
Just adds some missing calls to
drm_dp_aux_register()/drm_dp_aux_unregister() for when we attach/detach the
bridge.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-2-lyude@redhat.com
Reviewed-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Lyude Paul committed Apr 27, 2021
1 parent 64bf149 commit eaf8974
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1719,10 +1719,14 @@ static int cdns_mhdp_attach(struct drm_bridge *bridge,

dev_dbg(mhdp->dev, "%s\n", __func__);

ret = drm_dp_aux_register(&mhdp->aux);
if (ret < 0)
return ret;

if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)) {
ret = cdns_mhdp_connector_init(mhdp);
if (ret)
return ret;
goto aux_unregister;
}

spin_lock(&mhdp->start_lock);
Expand All @@ -1738,6 +1742,9 @@ static int cdns_mhdp_attach(struct drm_bridge *bridge,
mhdp->regs + CDNS_APB_INT_MASK);

return 0;
aux_unregister:
drm_dp_aux_unregister(&mhdp->aux);
return ret;
}

static void cdns_mhdp_configure_video(struct cdns_mhdp_device *mhdp,
Expand Down Expand Up @@ -2082,6 +2089,8 @@ static void cdns_mhdp_detach(struct drm_bridge *bridge)

dev_dbg(mhdp->dev, "%s\n", __func__);

drm_dp_aux_unregister(&mhdp->aux);

spin_lock(&mhdp->start_lock);

mhdp->bridge_attached = false;
Expand Down

0 comments on commit eaf8974

Please sign in to comment.