Initialize LTTPR before msm_dp_panel_read_sink_caps, as DPTX shall
(re)read DPRX caps after LTTPR detection, as required by DP 2.1,
Section 3.6.7.6.1.
Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Rob Clark <robdclark@gmail.com>
---
drivers/gpu/drm/msm/dp/dp_display.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index bbc47d86ae9e..fc07cce68382 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -367,12 +367,12 @@ static int msm_dp_display_send_hpd_notification(struct msm_dp_display_private *d
return 0;
}
-static void msm_dp_display_lttpr_init(struct msm_dp_display_private *dp)
+static void msm_dp_display_lttpr_init(struct msm_dp_display_private *dp, u8 *dpcd)
{
u8 lttpr_caps[DP_LTTPR_COMMON_CAP_SIZE];
int rc;
- if (drm_dp_read_lttpr_common_caps(dp->aux, dp->panel->dpcd, lttpr_caps))
+ if (drm_dp_read_lttpr_common_caps(dp->aux, dpcd, lttpr_caps))
return;
rc = drm_dp_lttpr_init(dp->aux, drm_dp_lttpr_count(lttpr_caps));
@@ -385,12 +385,17 @@ static int msm_dp_display_process_hpd_high(struct msm_dp_display_private *dp)
struct drm_connector *connector = dp->msm_dp_display.connector;
const struct drm_display_info *info = &connector->display_info;
int rc = 0;
+ u8 dpcd[DP_RECEIVER_CAP_SIZE];
- rc = msm_dp_panel_read_sink_caps(dp->panel, connector);
+ rc = drm_dp_read_dpcd_caps(dp->aux, dpcd);
if (rc)
goto end;
- msm_dp_display_lttpr_init(dp);
+ msm_dp_display_lttpr_init(dp, dpcd);
+
+ rc = msm_dp_panel_read_sink_caps(dp->panel, connector);
+ if (rc)
+ goto end;
msm_dp_link_process_request(dp->link);
--
2.45.2
On 4/29/2025 5:09 PM, Aleksandrs Vinarskis wrote:
> Initialize LTTPR before msm_dp_panel_read_sink_caps, as DPTX shall
> (re)read DPRX caps after LTTPR detection, as required by DP 2.1,
> Section 3.6.7.6.1.
>
> Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling")
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
> Tested-by: Johan Hovold <johan+linaro@kernel.org>
> Tested-by: Rob Clark <robdclark@gmail.com>
Hi Aleksandrs,
For this patch and the rest of the series:
Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # SA8775P
Thanks,
Jessica Zhang
> ---
> drivers/gpu/drm/msm/dp/dp_display.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
> index bbc47d86ae9e..fc07cce68382 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -367,12 +367,12 @@ static int msm_dp_display_send_hpd_notification(struct msm_dp_display_private *d
> return 0;
> }
>
> -static void msm_dp_display_lttpr_init(struct msm_dp_display_private *dp)
> +static void msm_dp_display_lttpr_init(struct msm_dp_display_private *dp, u8 *dpcd)
> {
> u8 lttpr_caps[DP_LTTPR_COMMON_CAP_SIZE];
> int rc;
>
> - if (drm_dp_read_lttpr_common_caps(dp->aux, dp->panel->dpcd, lttpr_caps))
> + if (drm_dp_read_lttpr_common_caps(dp->aux, dpcd, lttpr_caps))
> return;
>
> rc = drm_dp_lttpr_init(dp->aux, drm_dp_lttpr_count(lttpr_caps));
> @@ -385,12 +385,17 @@ static int msm_dp_display_process_hpd_high(struct msm_dp_display_private *dp)
> struct drm_connector *connector = dp->msm_dp_display.connector;
> const struct drm_display_info *info = &connector->display_info;
> int rc = 0;
> + u8 dpcd[DP_RECEIVER_CAP_SIZE];
>
> - rc = msm_dp_panel_read_sink_caps(dp->panel, connector);
> + rc = drm_dp_read_dpcd_caps(dp->aux, dpcd);
> if (rc)
> goto end;
>
> - msm_dp_display_lttpr_init(dp);
> + msm_dp_display_lttpr_init(dp, dpcd);
> +
> + rc = msm_dp_panel_read_sink_caps(dp->panel, connector);
> + if (rc)
> + goto end;
>
> msm_dp_link_process_request(dp->link);
>
On Fri, May 02, 2025 at 10:41:41AM -0700, Jessica Zhang wrote:
>
>
> On 4/29/2025 5:09 PM, Aleksandrs Vinarskis wrote:
> > Initialize LTTPR before msm_dp_panel_read_sink_caps, as DPTX shall
> > (re)read DPRX caps after LTTPR detection, as required by DP 2.1,
> > Section 3.6.7.6.1.
> >
> > Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling")
> >
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
> > Tested-by: Johan Hovold <johan+linaro@kernel.org>
> > Tested-by: Rob Clark <robdclark@gmail.com>
>
> Hi Aleksandrs,
>
> For this patch and the rest of the series:
>
> Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # SA8775P
Were you testing in a setup with LTTPRs?
--
With best wishes
Dmitry
On 5/2/2025 2:54 PM, Dmitry Baryshkov wrote:
> On Fri, May 02, 2025 at 10:41:41AM -0700, Jessica Zhang wrote:
>>
>>
>> On 4/29/2025 5:09 PM, Aleksandrs Vinarskis wrote:
>>> Initialize LTTPR before msm_dp_panel_read_sink_caps, as DPTX shall
>>> (re)read DPRX caps after LTTPR detection, as required by DP 2.1,
>>> Section 3.6.7.6.1.
>>>
>>> Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling")
>>>
>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>> Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
>>> Tested-by: Johan Hovold <johan+linaro@kernel.org>
>>> Tested-by: Rob Clark <robdclark@gmail.com>
>>
>> Hi Aleksandrs,
>>
>> For this patch and the rest of the series:
>>
>> Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # SA8775P
>
> Were you testing in a setup with LTTPRs?
Hi Dmitry,
No, I have a setup with MST so I re-verified SST and MST with these changes.
Thanks,
Jessica Zhang
>
On Fri, May 02, 2025 at 04:01:35PM -0700, Jessica Zhang wrote:
>
>
> On 5/2/2025 2:54 PM, Dmitry Baryshkov wrote:
> > On Fri, May 02, 2025 at 10:41:41AM -0700, Jessica Zhang wrote:
> > >
> > >
> > > On 4/29/2025 5:09 PM, Aleksandrs Vinarskis wrote:
> > > > Initialize LTTPR before msm_dp_panel_read_sink_caps, as DPTX shall
> > > > (re)read DPRX caps after LTTPR detection, as required by DP 2.1,
> > > > Section 3.6.7.6.1.
> > > >
> > > > Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling")
> > > >
> > > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > > > Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
> > > > Tested-by: Johan Hovold <johan+linaro@kernel.org>
> > > > Tested-by: Rob Clark <robdclark@gmail.com>
> > >
> > > Hi Aleksandrs,
> > >
> > > For this patch and the rest of the series:
> > >
> > > Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # SA8775P
> >
> > Were you testing in a setup with LTTPRs?
>
> Hi Dmitry,
>
> No, I have a setup with MST so I re-verified SST and MST with these changes.
Ack, thank you. I was hoping that you have some interesting dock setup.
>
> Thanks,
>
> Jessica Zhang
>
> >
>
--
With best wishes
Dmitry
On 4/29/2025 5:09 PM, Aleksandrs Vinarskis wrote:
> Initialize LTTPR before msm_dp_panel_read_sink_caps, as DPTX shall
> (re)read DPRX caps after LTTPR detection, as required by DP 2.1,
> Section 3.6.7.6.1.
>
Thanks for the patch.
Small correction: this is section 3.6.7.6.1 of DP 2.1a not DP 2.1
> Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling")
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
> Tested-by: Johan Hovold <johan+linaro@kernel.org>
> Tested-by: Rob Clark <robdclark@gmail.com>
> ---
> drivers/gpu/drm/msm/dp/dp_display.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
No need to resend for this, I can even fix it up while applying,
With that addressed,
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
© 2016 - 2026 Red Hat, Inc.