Skip to contentSkip to conversation

drm/msm/dp: attach the DP subconnector property

PATCH In review Dmitry Baryshkov 2 participants 4 messages Oct 18, 2023 – Oct 20, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm/dp: attach the DP subconnector property

While developing and testing the commit bfcc3d8f94f4 ("drm/msm/dp:
support setting the DP subconnector type") I had the patch [1] in my tree. I haven't noticed that it was a dependency for the commit in question. Mea culpa.

Since the patch has not landed yet (and even was not reviewed) and since one of the bridges erroneously uses USB connector type instead of DP, attach the property directly from the MSM DP driver.

This fixes the following oops on DP HPD event:

drm_object_property_set_value (drivers/gpu/drm/drm_mode_object.c:288) dp_display_process_hpd_high (drivers/gpu/drm/msm/dp/dp_display.c:402) dp_hpd_plug_handle.isra.0 (drivers/gpu/drm/msm/dp/dp_display.c:604) hpd_event_thread (drivers/gpu/drm/msm/dp/dp_display.c:1110) kthread (kernel/kthread.c:388)
ret_from_fork (arch/arm64/kernel/entry.S:858)

Fixes bfcc3d8f94f4 ("drm/msm/dp: support setting the DP subconnector type")
---
 drivers/gpu/drm/msm/dp/dp_drm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/msm/dp/dp_drm.c +3 -0
index 40e7344180e3..e3bdd7dd4cdc 100644
@@ -345,6 +345,9 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct dr
 	if (IS_ERR(connector))
 		return connector;
 
+	if (!dp_display->is_edp)
+		drm_connector_attach_dp_subconnector_property(connector);
+
 	drm_connector_attach_encoder(connector, encoder);
 
 	return connector;
Signature · 1 line
2.42.0
#1 lore raw
Quoted 5 lines · Dmitry Baryshkov

While developing and testing the commit bfcc3d8f94f4 ("drm/msm/dp:
support setting the DP subconnector type") I had the patch [1] in my tree. I haven't noticed that it was a dependency for the commit in question. Mea culpa.

[1] https://patchwork.freedesktop.org/patch/555530/

Quoted 12 lines

Since the patch has not landed yet (and even was not reviewed) and since one of the bridges erroneously uses USB connector type instead of DP, attach the property directly from the MSM DP driver.

This fixes the following oops on DP HPD event:

drm_object_property_set_value (drivers/gpu/drm/drm_mode_object.c:288) dp_display_process_hpd_high (drivers/gpu/drm/msm/dp/dp_display.c:402) dp_hpd_plug_handle.isra.0 (drivers/gpu/drm/msm/dp/dp_display.c:604) hpd_event_thread (drivers/gpu/drm/msm/dp/dp_display.c:1110) kthread (kernel/kthread.c:388)
ret_from_fork (arch/arm64/kernel/entry.S:858)

Signature · 2 lines
With best wishes
Dmitry
Reviewed-by on v1 1/1
#2 lore raw
In reply to Dmitry Baryshkov
Quoted 5 lines · Dmitry Baryshkov

While developing and testing the commit bfcc3d8f94f4 ("drm/msm/dp:
support setting the DP subconnector type") I had the patch [1] in my tree. I haven't noticed that it was a dependency for the commit in question. Mea culpa.

I agree with you that, we should be setting this in the framework is better.

Will review that one on the other patch.

But yes, we need to fix this regression first.

Quoted 13 lines

Since the patch has not landed yet (and even was not reviewed) and since one of the bridges erroneously uses USB connector type instead of DP, attach the property directly from the MSM DP driver.

This fixes the following oops on DP HPD event:

drm_object_property_set_value (drivers/gpu/drm/drm_mode_object.c:288) dp_display_process_hpd_high (drivers/gpu/drm/msm/dp/dp_display.c:402) dp_hpd_plug_handle.isra.0 (drivers/gpu/drm/msm/dp/dp_display.c:604) hpd_event_thread (drivers/gpu/drm/msm/dp/dp_display.c:1110) kthread (kernel/kthread.c:388)
ret_from_fork (arch/arm64/kernel/entry.S:858)

Quoted 3 lines
Fixes bfcc3d8f94f4 ("drm/msm/dp: support setting the DP subconnector type")

---

One question, while reviewing the code, I see you have two calls to drm_dp_set_subconnector_property() for the connect and disconnect case.

Why cant we have just one call in dp_display_send_hpd_notification() for both cases?

Quoted 17 lines
  drivers/gpu/drm/msm/dp/dp_drm.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/msm/dp/dp_drm.c +3 -0
index 40e7344180e3..e3bdd7dd4cdc 100644
@@ -345,6 +345,9 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct dr
  	if (IS_ERR(connector))
  		return connector;
 
+	if (!dp_display->is_edp)
+		drm_connector_attach_dp_subconnector_property(connector);
+
  	drm_connector_attach_encoder(connector, encoder);
 
  	return connector;
#3 lore raw
Quoted 29 lines · Abhinav Kumar
Quoted 5 lines · Dmitry Baryshkov

While developing and testing the commit bfcc3d8f94f4 ("drm/msm/dp:
support setting the DP subconnector type") I had the patch [1] in my tree. I haven't noticed that it was a dependency for the commit in question. Mea culpa.

I agree with you that, we should be setting this in the framework is better.

Will review that one on the other patch.

But yes, we need to fix this regression first.

Quoted 13 lines

Since the patch has not landed yet (and even was not reviewed) and since one of the bridges erroneously uses USB connector type instead of DP, attach the property directly from the MSM DP driver.

This fixes the following oops on DP HPD event:

drm_object_property_set_value (drivers/gpu/drm/drm_mode_object.c:288) dp_display_process_hpd_high (drivers/gpu/drm/msm/dp/dp_display.c:402) dp_hpd_plug_handle.isra.0 (drivers/gpu/drm/msm/dp/dp_display.c:604) hpd_event_thread (drivers/gpu/drm/msm/dp/dp_display.c:1110) kthread (kernel/kthread.c:388)
ret_from_fork (arch/arm64/kernel/entry.S:858)

Quoted 5 lines
Quoted 3 lines
Fixes bfcc3d8f94f4 ("drm/msm/dp: support setting the DP subconnector type")

---

Just to note, I'm going to send v2 in the next few days, fixing this code to also work in eDP.

Quoted 6 lines

One question, while reviewing the code, I see you have two calls to drm_dp_set_subconnector_property() for the connect and disconnect case.

Why cant we have just one call in dp_display_send_hpd_notification() for both cases?

Hmm, I'll have to check.

Quoted 19 lines
Quoted 19 lines

  drivers/gpu/drm/msm/dp/dp_drm.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/msm/dp/dp_drm.c +3 -0
index 40e7344180e3..e3bdd7dd4cdc 100644
@@ -345,6 +345,9 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct dr
      if (IS_ERR(connector))
              return connector;
 
+     if (!dp_display->is_edp)
+             drm_connector_attach_dp_subconnector_property(connector);
+
      drm_connector_attach_encoder(connector, encoder);
 
      return connector;
Signature · 2 lines
With best wishes
Dmitry