Commit b4b527a1 authored by Stephen Boyd's avatar Stephen Boyd Committed by Dmitry Baryshkov

drm/msm/dp: Remove dp_display_is_ds_bridge()

This function is simply drm_dp_is_branch() so use that instead of
open-coding it.

Cc: Vinod Polimera <quic_vpolimer@quicinc.com>
Cc: Kuogee Hsieh <quic_khsieh@quicinc.com>
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Tested-by: default avatarKuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: default avatarKuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/554989/
Link: https://lore.kernel.org/r/20230829184735.2841739-8-swboyd@chromium.orgSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent c0977e0d
...@@ -341,19 +341,12 @@ static const struct component_ops dp_display_comp_ops = { ...@@ -341,19 +341,12 @@ static const struct component_ops dp_display_comp_ops = {
.unbind = dp_display_unbind, .unbind = dp_display_unbind,
}; };
static bool dp_display_is_ds_bridge(struct dp_panel *panel)
{
return (panel->dpcd[DP_DOWNSTREAMPORT_PRESENT] &
DP_DWN_STRM_PORT_PRESENT);
}
static bool dp_display_is_sink_count_zero(struct dp_display_private *dp) static bool dp_display_is_sink_count_zero(struct dp_display_private *dp)
{ {
drm_dbg_dp(dp->drm_dev, "present=%#x sink_count=%d\n", drm_dbg_dp(dp->drm_dev, "present=%#x sink_count=%d\n",
dp->panel->dpcd[DP_DOWNSTREAMPORT_PRESENT], dp->panel->dpcd[DP_DOWNSTREAMPORT_PRESENT],
dp->link->sink_count); dp->link->sink_count);
return dp_display_is_ds_bridge(dp->panel) && return drm_dp_is_branch(dp->panel->dpcd) && dp->link->sink_count == 0;
(dp->link->sink_count == 0);
} }
static void dp_display_send_hpd_event(struct msm_dp *dp_display) static void dp_display_send_hpd_event(struct msm_dp *dp_display)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment