Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes
Browse files Browse the repository at this point in the history
Currently DP driver use drm_helper_hpd_irq_event(), bypassing drm bridge
framework, to report HPD status changes to user space frame work.
Replace it with drm_bridge_hpd_notify() since DP driver is part of drm
bridge.

Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/570067/
Link: https://lore.kernel.org/r/1701472789-25951-4-git-send-email-quic_khsieh@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
  • Loading branch information
Kuogee Hsieh authored and lumag committed Dec 3, 2023
1 parent aa11312 commit e467e0b
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions drivers/gpu/drm/msm/dp/dp_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,26 +340,10 @@ static const struct component_ops dp_display_comp_ops = {
.unbind = dp_display_unbind,
};

static void dp_display_send_hpd_event(struct msm_dp *dp_display)
{
struct dp_display_private *dp;
struct drm_connector *connector;

dp = container_of(dp_display, struct dp_display_private, dp_display);

connector = dp->dp_display.connector;
drm_helper_hpd_irq_event(connector->dev);
}

static int dp_display_send_hpd_notification(struct dp_display_private *dp,
bool hpd)
{
if ((hpd && dp->dp_display.link_ready) ||
(!hpd && !dp->dp_display.link_ready)) {
drm_dbg_dp(dp->drm_dev, "HPD already %s\n",
(hpd ? "on" : "off"));
return 0;
}
struct drm_bridge *bridge = dp->dp_display.bridge;

/* reset video pattern flag on disconnect */
if (!hpd) {
Expand All @@ -373,7 +357,7 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp,

drm_dbg_dp(dp->drm_dev, "type=%d hpd=%d\n",
dp->dp_display.connector_type, hpd);
dp_display_send_hpd_event(&dp->dp_display);
drm_bridge_hpd_notify(bridge, dp->dp_display.link_ready);

return 0;
}
Expand Down

0 comments on commit e467e0b

Please sign in to comment.