Skip to contentSkip to conversation

drm/dp: Increase link status size

PATCH Superseded Thierry Reding 4 participants 5 messages Oct 29, 2019 – Oct 31, 2019

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

PATCH 1/1 drm/dp: Increase link status size

From: Thierry Reding <[email protected]>

The current link status contains bytes 0x202 through 0x207, but we also want to make sure to include the DP_ADJUST_REQUEST_POST_CURSOR2 (0x20c) so that the post-cursor adjustment can be queried during link training.

Addresses-Coverity-ID: 1487366 ("Memory - corruptions")

Fixes 79465e0ffeb9 ("drm/dp: Add helper to get post-cursor adjustments")

---
I vaguely recall once carrying a patch to do this, but I can't find any trace of it.

 include/drm/drm_dp_helper.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_dp_helper.h +1 -1
index 51ecb5112ef8..9581dec900ba 100644
@@ -1121,7 +1121,7 @@
 #define DP_MST_PHYSICAL_PORT_0 0
 #define DP_MST_LOGICAL_PORT_0 8
 
-#define DP_LINK_STATUS_SIZE	   6
+#define DP_LINK_STATUS_SIZE	   11
 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
 			  int lane_count);
 bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The current link status contains bytes 0x202 through 0x207, but we also want to make sure to include the DP_ADJUST_REQUEST_POST_CURSOR2 (0x20c) so that the post-cursor adjustment can be queried during link training.

We don't currently use this in i915 (we probably should), so the impact here is that we'll just read more DPCD than before. I quickly perused i915, and this does not appear to directly break anything. I think the change is probably fine, but at the same time it freaks me out a bit...

If you don't mind, please resend this with Cc:
[email protected] to have our CI crunch through it across a number of platforms. Would give me a warm fuzzy feeling. :)

With the caveat that I didn't look at any other drivers besides i915,

Quoted 25 lines

Addresses-Coverity-ID: 1487366 ("Memory - corruptions")

Fixes 79465e0ffeb9 ("drm/dp: Add helper to get post-cursor adjustments")

---
I vaguely recall once carrying a patch to do this, but I can't find any trace of it.

 include/drm/drm_dp_helper.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_dp_helper.h +1 -1
index 51ecb5112ef8..9581dec900ba 100644
@@ -1121,7 +1121,7 @@
 #define DP_MST_PHYSICAL_PORT_0 0
 #define DP_MST_LOGICAL_PORT_0 8
 
-#define DP_LINK_STATUS_SIZE	   6
+#define DP_LINK_STATUS_SIZE	   11
 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
 			  int lane_count);
 bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 12 lines · Jani Nikula
Quoted 5 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The current link status contains bytes 0x202 through 0x207, but we also want to make sure to include the DP_ADJUST_REQUEST_POST_CURSOR2 (0x20c) so that the post-cursor adjustment can be queried during link training.

We don't currently use this in i915 (we probably should), so the impact here is that we'll just read more DPCD than before. I quickly perused i915, and this does not appear to directly break anything. I think the change is probably fine, but at the same time it freaks me out a bit...

Quoted 7 lines

If you don't mind, please resend this with Cc:
[email protected] to have our CI crunch through it across a number of platforms. Would give me a warm fuzzy feeling. :)

With the caveat that I didn't look at any other drivers besides i915,

Done, thanks.

Thierry

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
In reply to Jani Nikula
Quoted 8 lines · Jani Nikula
Quoted 5 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The current link status contains bytes 0x202 through 0x207, but we also want to make sure to include the DP_ADJUST_REQUEST_POST_CURSOR2 (0x20c) so that the post-cursor adjustment can be queried during link training.

We don't currently use this in i915 (we probably should)

IIRC post cursor2 is already deprecated.

Quoted 46 lines

, so the impact
here is that we'll just read more DPCD than before. I quickly perused i915, and this does not appear to directly break anything. I think the change is probably fine, but at the same time it freaks me out a bit...

If you don't mind, please resend this with Cc:
[email protected] to have our CI crunch through it across a number of platforms. Would give me a warm fuzzy feeling. :)

With the caveat that I didn't look at any other drivers besides i915,

Quoted 25 lines

Addresses-Coverity-ID: 1487366 ("Memory - corruptions")

Fixes 79465e0ffeb9 ("drm/dp: Add helper to get post-cursor adjustments")

---
I vaguely recall once carrying a patch to do this, but I can't find any trace of it.

 include/drm/drm_dp_helper.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_dp_helper.h +1 -1
index 51ecb5112ef8..9581dec900ba 100644
@@ -1121,7 +1121,7 @@
 #define DP_MST_PHYSICAL_PORT_0 0
 #define DP_MST_LOGICAL_PORT_0 8
 
-#define DP_LINK_STATUS_SIZE	   6
+#define DP_LINK_STATUS_SIZE	   11
 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
 			  int lane_count);
 bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#4 lore raw
In reply to Thierry Reding
Quoted 30 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The current link status contains bytes 0x202 through 0x207, but we also want to make sure to include the DP_ADJUST_REQUEST_POST_CURSOR2 (0x20c) so that the post-cursor adjustment can be queried during link training.

Addresses-Coverity-ID: 1487366 ("Memory - corruptions")

Fixes 79465e0ffeb9 ("drm/dp: Add helper to get post-cursor adjustments")

---
I vaguely recall once carrying a patch to do this, but I can't find any trace of it.

 include/drm/drm_dp_helper.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_dp_helper.h +1 -1
index 51ecb5112ef8..9581dec900ba 100644
@@ -1121,7 +1121,7 @@
 #define DP_MST_PHYSICAL_PORT_0 0
 #define DP_MST_LOGICAL_PORT_0 8
 
-#define DP_LINK_STATUS_SIZE	   6
+#define DP_LINK_STATUS_SIZE	   11
 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
 			  int lane_count);
 bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
Signature · 7 lines
Cheers,
	Lyude Paul

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel