Skip to contentSkip to conversation

drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT

PATCH In review Manasi Navare 2 participants 4 messages Jan 4, 2018 – Jan 11, 2018

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

PATCH v2 1/5 drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT

This patch defines the DP DSC receiver capability size that gives total number of DP DSC DPCD registers.
This also adds a missing SHIFT define missed in the
commit id (ab6a46ea6842ce "Add DPCD definitions for DP 1.4 DSC feature")

v2:
* Missed the SHIFT define that I mentioned in the message

Cc Jani Nikula <[email protected]>
Cc Ville Syrjala <[email protected]>
Cc Anusha Srivatsa <[email protected]>
---
 include/drm/drm_dp_helper.h | 4 ++++
 1 file changed, 4 insertions(+)
include/drm/drm_dp_helper.h +4 -0
index da58a42..06e41b2 100644
@@ -223,6 +223,8 @@
 #define DP_DSC_MAX_BITS_PER_PIXEL_LOW       0x067   /* eDP 1.4 */
 
 #define DP_DSC_MAX_BITS_PER_PIXEL_HI        0x068   /* eDP 1.4 */
+# define DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK  (0x3 << 0)
+# define DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT 8
 
 #define DP_DSC_DEC_COLOR_FORMAT_CAP         0x069
 # define DP_DSC_RGB                         (1 << 0)
@@ -271,6 +273,7 @@
 # define DP_DSC_THROUGHPUT_MODE_1_1000      (14 << 4)
 
 #define DP_DSC_MAX_SLICE_WIDTH              0x06C
+#define DP_DSC_MAX_SLICE_WIDTH_VALUE        2560
 
 #define DP_DSC_SLICE_CAP_2                  0x06D
 # define DP_DSC_16_PER_DP_DSC_SINK          (1 << 0)
@@ -894,6 +897,7 @@ u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SI
 
 #define DP_BRANCH_OUI_HEADER_SIZE	0xc
 #define DP_RECEIVER_CAP_SIZE		0xf
+#define DP_DSC_RECEIVER_CAP_SIZE        0xf
 #define EDP_PSR_RECEIVER_CAP_SIZE	2
 #define EDP_DISPLAY_CTL_CAP_SIZE	3
 
Signature · 6 lines
2.7.4

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

PATCH v2 4/5 drm/dp: Macro for DSC eDP Output BPP

This returns the maximum output BPP supported by the eDP panel by reading the MAX_SUPPORTED_BPP DSC DPCD register.

Cc Jani Nikula <[email protected]>
Cc Ville Syrjala <[email protected]>
Cc Anusha Srivatsa <[email protected]>
---
 include/drm/drm_dp_helper.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
include/drm/drm_dp_helper.h +10 -0
index 06e41b2..4e8f357 100644
@@ -980,6 +980,16 @@ drm_dp_is_branch(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
 	return dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT;
 }
 
+/* DP/eDP DSC support */
+static inline u16
+drm_edp_dsc_get_output_bpp(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+{
+	return dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+		(dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+		 DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK <<
+		 DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);
+}
+
 /*
  * DisplayPort AUX channel
  */
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v2 4/5
#2 lore raw

RE: [PATCH v2 4/5] drm/dp: Macro for DSC eDP Output BPP

Looks good to me.

Quoted 9 lines

-----Original Message-----
From: Navare, Manasi D
Sent: Thursday, January 4, 2018 12:23 AM
To: [email protected]
Cc: Navare, Manasi D <[email protected]>; Jani Nikula <[email protected]>; Ville Syrjala <[email protected]>; Srivatsa, Anusha <[email protected]>; [email protected]
Subject: [PATCH v2 4/5] drm/dp: Macro for DSC eDP Output BPP

Quoted 8 lines

This returns the maximum output BPP supported by the eDP panel by reading the MAX_SUPPORTED_BPP DSC DPCD register.

Cc Jani Nikula <[email protected]>
Cc Ville Syrjala <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Quoted 26 lines

---
include/drm/drm_dp_helper.h | 10 ++++++++++

1 file changed, 10 insertions(+)
include/drm/drm_dp_helper.h index renamed from include/drm/drm_dp_helper.h +0 -0

06e41b2..4e8f357 100644

include/drm/drm_dp_helper.h +5 -0
@@ -980,6 +980,16 @@ drm_dp_is_branch(const u8
 dpcd[DP_RECEIVER_CAP_SIZE])
 	return dpcd[DP_DOWNSTREAMPORT_PRESENT] &
 DP_DWN_STRM_PORT_PRESENT;  }
 
+/* DP/eDP DSC support */
+static inline u16
+drm_edp_dsc_get_output_bpp(const u8
 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+{
+	return dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW -

DP_DSC_SUPPORT] |

include/drm/drm_dp_helper.h +1 -0
+		(dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI -

DP_DSC_SUPPORT] &

include/drm/drm_dp_helper.h +4 -0
+		 DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK <<
+		 DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);
+}
+
Quoted 5 lines

/*
* DisplayPort AUX channel
*/
--
2.7.4

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

Reviewed-by on v2 1/5
#3 lore raw
In reply to Manasi Navare
Quoted 5 lines · Manasi Navare

This patch defines the DP DSC receiver capability size that gives total number of DP DSC DPCD registers.
This also adds a missing SHIFT define missed in the
commit id (ab6a46ea6842ce "Add DPCD definitions for DP 1.4 DSC feature")

Quoted 8 lines

v2:
* Missed the SHIFT define that I mentioned in the message

Cc Jani Nikula <[email protected]>
Cc Ville Syrjala <[email protected]>
Cc Anusha Srivatsa <[email protected]>

Checked with the spec. Looks good to me.

Quoted 36 lines
---
 include/drm/drm_dp_helper.h | 4 ++++
 1 file changed, 4 insertions(+)
include/drm/drm_dp_helper.h +4 -0
index da58a42..06e41b2 100644
@@ -223,6 +223,8 @@
 #define DP_DSC_MAX_BITS_PER_PIXEL_LOW       0x067   /* eDP 1.4 */
 
 #define DP_DSC_MAX_BITS_PER_PIXEL_HI        0x068   /* eDP 1.4 */
+# define DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK  (0x3 << 0)
+# define DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT 8
 
 #define DP_DSC_DEC_COLOR_FORMAT_CAP         0x069
 # define DP_DSC_RGB                         (1 << 0)
@@ -271,6 +273,7 @@
 # define DP_DSC_THROUGHPUT_MODE_1_1000      (14 << 4)
 
 #define DP_DSC_MAX_SLICE_WIDTH              0x06C
+#define DP_DSC_MAX_SLICE_WIDTH_VALUE        2560
 
 #define DP_DSC_SLICE_CAP_2                  0x06D
 # define DP_DSC_16_PER_DP_DSC_SINK          (1 << 0)
@@ -894,6 +897,7 @@ u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SI
 
 #define DP_BRANCH_OUI_HEADER_SIZE	0xc
 #define DP_RECEIVER_CAP_SIZE		0xf
+#define DP_DSC_RECEIVER_CAP_SIZE        0xf
 #define EDP_PSR_RECEIVER_CAP_SIZE	2
 #define EDP_DISPLAY_CTL_CAP_SIZE	3
 
Signature · 1 line
2.7.4
Signature · 5 lines
Anusha Srivatsa
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel