Skip to contentSkip to conversation

drm: add constant N value in helper file

PATCH Superseded Tanmay Shah 3 participants 4 messages Jun 9, 2020 – Jun 11, 2020

Subsystems (6)

v6 of 12 Superseded Latest is v12 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 2/5 drm: add constant N value in helper file

From: Chandan Uddaraju <[email protected]>

The constant N value (0x8000) is used by i915 DP driver. Define this value in dp helper header file to use in multiple Display Port drivers. Change i915 driver accordingly.

Change in v6: Change commit message

---
 drivers/gpu/drm/i915/display/intel_display.c | 2 +-
 include/drm/drm_dp_helper.h                  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -1
index 9ea1a39..4b2cfff 100644
@@ -8085,7 +8085,7 @@ static void compute_m_n(unsigned int m, unsigned int n,
 	 * which the devices expect also in synchronous clock mode.
 	 */
 	if (constant_n)
-		*ret_n = 0x8000;
+		*ret_n = DP_LINK_CONSTANT_N_VALUE;
 	else
 		*ret_n = min_t(unsigned int, roundup_pow_of_two(n), DATA_LINK_N_MAX);
 
include/drm/drm_dp_helper.h +1 -0
index 2035ac4..589132a 100644
@@ -1134,6 +1134,7 @@
 #define DP_MST_PHYSICAL_PORT_0 0
 #define DP_MST_LOGICAL_PORT_0 8
 
+#define DP_LINK_CONSTANT_N_VALUE 0x8000
 #define DP_LINK_STATUS_SIZE	   6
 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
 			  int lane_count);
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Reviewed-by on v6 2/5
#1 lore raw

Quoting Tanmay Shah (2020-06-08 20:40:47)

Quoted 7 lines

From: Chandan Uddaraju <[email protected]>

The constant N value (0x8000) is used by i915 DP driver. Define this value in dp helper header file to use in multiple Display Port drivers. Change i915 driver accordingly.

Quoted 6 lines

Change in v6: Change commit message

---

Can you resend this series as an actual patch series? None of the patches have the proper In-Reply-To headers so it is hard to track the thread.

#2 lore raw
Quoted 15 lines · Stephen Boyd

Quoting Tanmay Shah (2020-06-08 20:40:47)

Quoted 7 lines

From: Chandan Uddaraju <[email protected]>

The constant N value (0x8000) is used by i915 DP driver. Define this value in dp helper header file to use in multiple Display Port drivers. Change i915 driver accordingly.

Quoted 6 lines

Change in v6: Change commit message

---

Quoted 5 lines

Can you resend this series as an actual patch series? None of the patches have the proper In-Reply-To headers so it is hard to track the thread.

Sure. Should I keep Message-ID of v5-patch-1 for in-reply-to header?
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

maintainer Acked-by on v6 2/5
#3 lore raw
In reply to Tanmay Shah
Quoted 7 lines · Tanmay Shah

From: Chandan Uddaraju <[email protected]>

The constant N value (0x8000) is used by i915 DP driver. Define this value in dp helper header file to use in multiple Display Port drivers. Change i915 driver accordingly.

Quoted 5 lines

Change in v6: Change commit message

for merging via drm-misc if that helps you.

Quoted 30 lines
---
 drivers/gpu/drm/i915/display/intel_display.c | 2 +-
 include/drm/drm_dp_helper.h                  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -1
index 9ea1a39..4b2cfff 100644
@@ -8085,7 +8085,7 @@ static void compute_m_n(unsigned int m, unsigned int n,
 	 * which the devices expect also in synchronous clock mode.
 	 */
 	if (constant_n)
-		*ret_n = 0x8000;
+		*ret_n = DP_LINK_CONSTANT_N_VALUE;
 	else
 		*ret_n = min_t(unsigned int, roundup_pow_of_two(n), DATA_LINK_N_MAX);
 
include/drm/drm_dp_helper.h +1 -0
index 2035ac4..589132a 100644
@@ -1134,6 +1134,7 @@
 #define DP_MST_PHYSICAL_PORT_0 0
 #define DP_MST_LOGICAL_PORT_0 8
 
+#define DP_LINK_CONSTANT_N_VALUE 0x8000
 #define DP_LINK_STATUS_SIZE	   6
 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
 			  int lane_count);
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center