Skip to content

Commit

Permalink
drm/msm/dp: support setting the DP subconnector type
Browse files Browse the repository at this point in the history
Read the downstream port info and set the subconnector type accordingly.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/555531/
Link: https://lore.kernel.org/r/20230903222432.2894093-1-dmitry.baryshkov@linaro.org
Dmitry Baryshkov committed Oct 9, 2023
1 parent 6398e4d commit bfcc3d8
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/gpu/drm/msm/dp/dp_display.c
Original file line number Diff line number Diff line change
@@ -364,8 +364,12 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp,
}

/* reset video pattern flag on disconnect */
if (!hpd)
if (!hpd) {
dp->panel->video_test = false;
drm_dp_set_subconnector_property(dp->dp_display.connector,
connector_status_disconnected,
dp->panel->dpcd, dp->panel->downstream_ports);
}

dp->dp_display.is_connected = hpd;

@@ -393,6 +397,9 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp)

dp_link_process_request(dp->link);

drm_dp_set_subconnector_property(dp->dp_display.connector, connector_status_connected,
dp->panel->dpcd, dp->panel->downstream_ports);

edid = dp->panel->edid;

dp->dp_display.psr_supported = dp->panel->psr_cap.version && psr_enabled;
5 changes: 5 additions & 0 deletions drivers/gpu/drm/msm/dp/dp_panel.c
Original file line number Diff line number Diff line change
@@ -161,6 +161,11 @@ int dp_panel_read_sink_caps(struct dp_panel *dp_panel,
}
}

rc = drm_dp_read_downstream_info(panel->aux, dp_panel->dpcd,
dp_panel->downstream_ports);
if (rc)
return rc;

kfree(dp_panel->edid);
dp_panel->edid = NULL;

1 change: 1 addition & 0 deletions drivers/gpu/drm/msm/dp/dp_panel.h
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@ struct dp_panel_psr {
struct dp_panel {
/* dpcd raw data */
u8 dpcd[DP_RECEIVER_CAP_SIZE];
u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS];

struct dp_link_info link_info;
struct drm_dp_desc desc;

0 comments on commit bfcc3d8

Please sign in to comment.