mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
drm/msm/dp: pass panel to display enable/disable helpers
Pass struct msm_dp_panel to the display enable/disable helpers to make them easier to reuse for MST stream handling. Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/742752/ Link: https://lore.kernel.org/r/20260728-dp_mstclean-v9-14-f7779fce10f4@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
parent
e8d91d17f7
commit
c16ba6ba3d
|
|
@ -652,7 +652,8 @@ static int msm_dp_display_prepare_link(struct msm_dp_display_private *dp)
|
|||
return msm_dp_ctrl_prepare_stream_on(dp->ctrl, dp->panel, force_link_train);
|
||||
}
|
||||
|
||||
static int msm_dp_display_enable(struct msm_dp_display_private *dp)
|
||||
static int msm_dp_display_enable(struct msm_dp_display_private *dp,
|
||||
struct msm_dp_panel *msm_dp_panel)
|
||||
{
|
||||
int rc = 0;
|
||||
struct msm_dp *msm_dp_display = &dp->msm_dp_display;
|
||||
|
|
@ -663,7 +664,7 @@ static int msm_dp_display_enable(struct msm_dp_display_private *dp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
rc = msm_dp_ctrl_on_stream(dp->ctrl, dp->panel);
|
||||
rc = msm_dp_ctrl_on_stream(dp->ctrl, msm_dp_panel);
|
||||
if (!rc)
|
||||
msm_dp_display->power_on = true;
|
||||
|
||||
|
|
@ -709,22 +710,23 @@ static void msm_dp_display_audio_notify_disable(struct msm_dp_display_private *d
|
|||
msm_dp_display->audio_enabled = false;
|
||||
}
|
||||
|
||||
static int msm_dp_display_disable(struct msm_dp_display_private *dp)
|
||||
static int msm_dp_display_disable(struct msm_dp_display_private *dp,
|
||||
struct msm_dp_panel *msm_dp_panel)
|
||||
{
|
||||
struct msm_dp *msm_dp_display = &dp->msm_dp_display;
|
||||
|
||||
if (!msm_dp_display->power_on)
|
||||
return 0;
|
||||
|
||||
msm_dp_panel_disable_vsc_sdp(dp->panel);
|
||||
msm_dp_panel_disable_vsc_sdp(msm_dp_panel);
|
||||
|
||||
msm_dp_ctrl_off_pixel_clk(dp->ctrl);
|
||||
|
||||
/* dongle is still connected but sinks are disconnected */
|
||||
if (dp->link->sink_count == 0)
|
||||
msm_dp_link_psm_config(dp->link, &dp->panel->link_info, true);
|
||||
msm_dp_link_psm_config(dp->link, &msm_dp_panel->link_info, true);
|
||||
|
||||
msm_dp_ctrl_off_link(dp->ctrl, dp->panel);
|
||||
msm_dp_ctrl_off_link(dp->ctrl, msm_dp_panel);
|
||||
|
||||
if (dp->link->sink_count == 0)
|
||||
/* re-init the PHY so that we can listen to Dongle disconnect */
|
||||
|
|
@ -739,7 +741,7 @@ static int msm_dp_display_disable(struct msm_dp_display_private *dp)
|
|||
}
|
||||
|
||||
/**
|
||||
* msm_dp_bridge_mode_valid - callback to determine if specified mode is valid
|
||||
* msm_dp_display_mode_valid - callback to determine if specified mode is valid
|
||||
* @dp: Pointer to dp display structure
|
||||
* @info: display info
|
||||
* @mode: Pointer to drm mode structure
|
||||
|
|
@ -1437,14 +1439,14 @@ void msm_dp_display_atomic_enable(struct msm_dp *msm_dp_display,
|
|||
return;
|
||||
}
|
||||
|
||||
rc = msm_dp_display_enable(dp);
|
||||
rc = msm_dp_display_enable(dp, dp->panel);
|
||||
if (rc)
|
||||
DRM_ERROR("DP display enable failed, rc=%d\n", rc);
|
||||
|
||||
rc = msm_dp_display_post_enable(msm_dp_display);
|
||||
if (rc) {
|
||||
DRM_ERROR("DP display post enable failed, rc=%d\n", rc);
|
||||
msm_dp_display_disable(dp);
|
||||
msm_dp_display_disable(dp, dp->panel);
|
||||
}
|
||||
|
||||
drm_dbg_dp(msm_dp_display->drm_dev, "type=%d Done\n", msm_dp_display->connector_type);
|
||||
|
|
@ -1479,7 +1481,7 @@ void msm_dp_display_atomic_post_disable(struct msm_dp *dp)
|
|||
|
||||
msm_dp_display_audio_notify_disable(msm_dp_display);
|
||||
|
||||
msm_dp_display_disable(msm_dp_display);
|
||||
msm_dp_display_disable(msm_dp_display, msm_dp_display->panel);
|
||||
|
||||
msm_dp_display_unprepare(msm_dp_display);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user