Skip to content

Commit 9351d3d

Browse files
alexVinarskislumag
authored andcommitted
drm/msm/dp: Fix support of LTTPR initialization
Initialize LTTPR before msm_dp_panel_read_sink_caps, as DPTX shall (re)read DPRX caps after LTTPR detection, as required by DP 2.1a, Section 3.6.7.6.1. Fixes: 72d0af4 ("drm/msm/dp: Add support for LTTPR handling") Reviewed-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Aleksandrs Vinarskis <[email protected]> Tested-by: Jessica Zhang <[email protected]> # SA8775P Tested-by: Johan Hovold <[email protected]> Tested-by: Rob Clark <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/652301/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent de01fc9 commit 9351d3d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

drivers/gpu/drm/msm/dp/dp_display.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,12 @@ static int msm_dp_display_send_hpd_notification(struct msm_dp_display_private *d
360360
return 0;
361361
}
362362

363-
static void msm_dp_display_lttpr_init(struct msm_dp_display_private *dp)
363+
static void msm_dp_display_lttpr_init(struct msm_dp_display_private *dp, u8 *dpcd)
364364
{
365365
u8 lttpr_caps[DP_LTTPR_COMMON_CAP_SIZE];
366366
int rc;
367367

368-
if (drm_dp_read_lttpr_common_caps(dp->aux, dp->panel->dpcd, lttpr_caps))
368+
if (drm_dp_read_lttpr_common_caps(dp->aux, dpcd, lttpr_caps))
369369
return;
370370

371371
rc = drm_dp_lttpr_init(dp->aux, drm_dp_lttpr_count(lttpr_caps));
@@ -378,12 +378,17 @@ static int msm_dp_display_process_hpd_high(struct msm_dp_display_private *dp)
378378
struct drm_connector *connector = dp->msm_dp_display.connector;
379379
const struct drm_display_info *info = &connector->display_info;
380380
int rc = 0;
381+
u8 dpcd[DP_RECEIVER_CAP_SIZE];
381382

382-
rc = msm_dp_panel_read_sink_caps(dp->panel, connector);
383+
rc = drm_dp_read_dpcd_caps(dp->aux, dpcd);
383384
if (rc)
384385
goto end;
385386

386-
msm_dp_display_lttpr_init(dp);
387+
msm_dp_display_lttpr_init(dp, dpcd);
388+
389+
rc = msm_dp_panel_read_sink_caps(dp->panel, connector);
390+
if (rc)
391+
goto end;
387392

388393
msm_dp_link_process_request(dp->link);
389394

0 commit comments

Comments
 (0)