[Intel-gfx] [CI 4/7] drm/dp: DRM DP helper/macros to get DP sink DSC parameters

2018-10-30 Thread Manasi Navare
This patch adds inline functions and helpers for obtaining
DP sink's supported DSC parameters like DSC sink support,
eDP compressed BPP supported, maximum slice count supported
by the sink devices, DSC line buffer bit depth supported on DP sink,
DSC sink maximum color depth by parsing corresponding DPCD registers.

v4:
* Add helper to give line buf bit depth (Manasi)
* Correct the bit masking in color depth helper (manasi)
v3:
* Use SLICE_CAP_2 for DP (Anusha)
v2:
* Add DSC sink support macro (Jani N)

Cc: Gaurav K Singh 
Cc: dri-de...@lists.freedesktop.org
Cc: Jani Nikula 
Cc: Ville Syrjala 
Cc: Anusha Srivatsa 
Signed-off-by: Manasi Navare 
Reviewed-by: Anusha Srivatsa 
Reviewed-by: Gaurav K Singh 
---
 drivers/gpu/drm/drm_dp_helper.c | 90 +
 include/drm/drm_dp_helper.h | 30 +++
 2 files changed, 120 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 37c01b6076ec..6d483487f2b4 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -1352,3 +1352,93 @@ int drm_dp_read_desc(struct drm_dp_aux *aux, struct 
drm_dp_desc *desc,
return 0;
 }
 EXPORT_SYMBOL(drm_dp_read_desc);
+
+/**
+ * DRM DP Helpers for DSC
+ */
+u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+  bool is_edp)
+{
+   u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 - DP_DSC_SUPPORT];
+
+   if (is_edp) {
+   /* For eDP, register DSC_SLICE_CAPABILITIES_1 gives slice count 
*/
+   if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
+   return 4;
+   if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
+   return 2;
+   if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
+   return 1;
+   } else {
+   /* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */
+   u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 - DP_DSC_SUPPORT];
+
+   if (slice_cap2 & DP_DSC_24_PER_DP_DSC_SINK)
+   return 24;
+   if (slice_cap2 & DP_DSC_20_PER_DP_DSC_SINK)
+   return 20;
+   if (slice_cap2 & DP_DSC_16_PER_DP_DSC_SINK)
+   return 16;
+   if (slice_cap1 & DP_DSC_12_PER_DP_DSC_SINK)
+   return 12;
+   if (slice_cap1 & DP_DSC_10_PER_DP_DSC_SINK)
+   return 10;
+   if (slice_cap1 & DP_DSC_8_PER_DP_DSC_SINK)
+   return 8;
+   if (slice_cap1 & DP_DSC_6_PER_DP_DSC_SINK)
+   return 6;
+   if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
+   return 4;
+   if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
+   return 2;
+   if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
+   return 1;
+   }
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_dp_dsc_sink_max_slice_count);
+
+u8 drm_dp_dsc_sink_line_buf_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+{
+   u8 line_buf_depth = dsc_dpcd[DP_DSC_LINE_BUF_BIT_DEPTH - 
DP_DSC_SUPPORT];
+
+   switch (line_buf_depth & DP_DSC_LINE_BUF_BIT_DEPTH_MASK) {
+   case DP_DSC_LINE_BUF_BIT_DEPTH_9:
+   return 9;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_10:
+   return 10;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_11:
+   return 11;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_12:
+   return 12;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_13:
+   return 13;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_14:
+   return 14;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_15:
+   return 15;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_16:
+   return 16;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_8:
+   return 8;
+   }
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_dp_dsc_sink_line_buf_depth);
+
+u8 drm_dp_dsc_sink_max_color_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+{
+   u8 color_depth = dsc_dpcd[DP_DSC_DEC_COLOR_DEPTH_CAP - DP_DSC_SUPPORT];
+
+   if (color_depth & DP_DSC_12_BPC)
+   return 12;
+   if (color_depth & DP_DSC_10_BPC)
+   return 10;
+   if (color_depth & DP_DSC_8_BPC)
+   return 8;
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_dp_dsc_sink_max_color_depth);
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index e5ade5741642..72d0eb36521f 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1118,6 +1118,36 @@ 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 */
+u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+  bool is_edp);
+u8 drm_dp_dsc_sink_line_buf_depth(const u8 

Re: [Intel-gfx] [CI 4/7] drm/dp: DRM DP helper/macros to get DP sink DSC parameters

2018-10-30 Thread kbuild test robot
Hi Manasi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.19 next-20181030]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Manasi-Navare/drm-i915-dsc-Add-slice_row_per_frame-in-DSC-PPS-programming/20181030-054654
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   include/net/mac80211.h:977: warning: Function parameter or member 
'status.rates' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 
'status.ack_signal' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 
'status.ampdu_ack_len' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 
'status.ampdu_len' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 
'status.antenna' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 
'status.tx_time' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 
'status.is_valid_ack_signal' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 
'status.status_driver_data' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 
'driver_rates' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'pad' not 
described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 
'rate_driver_data' not described in 'ieee80211_tx_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'rx_stats_avg' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'rx_stats_avg.signal' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'rx_stats_avg.chain_signal' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.filtered' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.retry_failed' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.retry_count' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.lost_packets' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.last_tdls_pkt_time' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.msdu_retries' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.msdu_failed' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.last_ack' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.last_ack_signal' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.ack_signal_filled' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'status_stats.avg_ack_signal' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'tx_stats.packets' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'tx_stats.bytes' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'tx_stats.last_rate' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 
'tx_stats.msdu' not described in 'sta_info'
   include/linux/dma-buf.h:304: warning: Function parameter or member 
'cb_excl.cb' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 
'cb_excl.poll' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 
'cb_excl.active' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 
'cb_shared.cb' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 
'cb_shared.poll' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 
'cb_shared.active' not described in 'dma_buf'
   include/linux/dma-fence-array.h:54: warning: Function parameter or member 
'work' not described in 'dma_fence_array'
   

[Intel-gfx] [CI 4/7] drm/dp: DRM DP helper/macros to get DP sink DSC parameters

2018-10-29 Thread Manasi Navare
This patch adds inline functions and helpers for obtaining
DP sink's supported DSC parameters like DSC sink support,
eDP compressed BPP supported, maximum slice count supported
by the sink devices, DSC line buffer bit depth supported on DP sink,
DSC sink maximum color depth by parsing corresponding DPCD registers.

v4:
* Add helper to give line buf bit depth (Manasi)
* Correct the bit masking in color depth helper (manasi)
v3:
* Use SLICE_CAP_2 for DP (Anusha)
v2:
* Add DSC sink support macro (Jani N)

Cc: Gaurav K Singh 
Cc: dri-de...@lists.freedesktop.org
Cc: Jani Nikula 
Cc: Ville Syrjala 
Cc: Anusha Srivatsa 
Signed-off-by: Manasi Navare 
Reviewed-by: Anusha Srivatsa 
Reviewed-by: Gaurav K Singh 
---
 drivers/gpu/drm/drm_dp_helper.c | 90 +
 include/drm/drm_dp_helper.h | 30 +++
 2 files changed, 120 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 37c01b6076ec..6d483487f2b4 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -1352,3 +1352,93 @@ int drm_dp_read_desc(struct drm_dp_aux *aux, struct 
drm_dp_desc *desc,
return 0;
 }
 EXPORT_SYMBOL(drm_dp_read_desc);
+
+/**
+ * DRM DP Helpers for DSC
+ */
+u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+  bool is_edp)
+{
+   u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 - DP_DSC_SUPPORT];
+
+   if (is_edp) {
+   /* For eDP, register DSC_SLICE_CAPABILITIES_1 gives slice count 
*/
+   if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
+   return 4;
+   if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
+   return 2;
+   if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
+   return 1;
+   } else {
+   /* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */
+   u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 - DP_DSC_SUPPORT];
+
+   if (slice_cap2 & DP_DSC_24_PER_DP_DSC_SINK)
+   return 24;
+   if (slice_cap2 & DP_DSC_20_PER_DP_DSC_SINK)
+   return 20;
+   if (slice_cap2 & DP_DSC_16_PER_DP_DSC_SINK)
+   return 16;
+   if (slice_cap1 & DP_DSC_12_PER_DP_DSC_SINK)
+   return 12;
+   if (slice_cap1 & DP_DSC_10_PER_DP_DSC_SINK)
+   return 10;
+   if (slice_cap1 & DP_DSC_8_PER_DP_DSC_SINK)
+   return 8;
+   if (slice_cap1 & DP_DSC_6_PER_DP_DSC_SINK)
+   return 6;
+   if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
+   return 4;
+   if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
+   return 2;
+   if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
+   return 1;
+   }
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_dp_dsc_sink_max_slice_count);
+
+u8 drm_dp_dsc_sink_line_buf_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+{
+   u8 line_buf_depth = dsc_dpcd[DP_DSC_LINE_BUF_BIT_DEPTH - 
DP_DSC_SUPPORT];
+
+   switch (line_buf_depth & DP_DSC_LINE_BUF_BIT_DEPTH_MASK) {
+   case DP_DSC_LINE_BUF_BIT_DEPTH_9:
+   return 9;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_10:
+   return 10;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_11:
+   return 11;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_12:
+   return 12;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_13:
+   return 13;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_14:
+   return 14;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_15:
+   return 15;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_16:
+   return 16;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_8:
+   return 8;
+   }
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_dp_dsc_sink_line_buf_depth);
+
+u8 drm_dp_dsc_sink_max_color_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+{
+   u8 color_depth = dsc_dpcd[DP_DSC_DEC_COLOR_DEPTH_CAP - DP_DSC_SUPPORT];
+
+   if (color_depth & DP_DSC_12_BPC)
+   return 12;
+   if (color_depth & DP_DSC_10_BPC)
+   return 10;
+   if (color_depth & DP_DSC_8_BPC)
+   return 8;
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_dp_dsc_sink_max_color_depth);
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index dd33d59739f8..7f7f5b965466 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1067,6 +1067,36 @@ 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 */
+u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+  bool is_edp);
+u8 drm_dp_dsc_sink_line_buf_depth(const u8 

[Intel-gfx] [CI 4/7] drm/dp: DRM DP helper/macros to get DP sink DSC parameters

2018-10-25 Thread Manasi Navare
This patch adds inline functions and helpers for obtaining
DP sink's supported DSC parameters like DSC sink support,
eDP compressed BPP supported, maximum slice count supported
by the sink devices, DSC line buffer bit depth supported on DP sink,
DSC sink maximum color depth by parsing corresponding DPCD registers.

v4:
* Add helper to give line buf bit depth (Manasi)
* Correct the bit masking in color depth helper (manasi)
v3:
* Use SLICE_CAP_2 for DP (Anusha)
v2:
* Add DSC sink support macro (Jani N)

Cc: Gaurav K Singh 
Cc: dri-de...@lists.freedesktop.org
Cc: Jani Nikula 
Cc: Ville Syrjala 
Cc: Anusha Srivatsa 
Signed-off-by: Manasi Navare 
Reviewed-by: Anusha Srivatsa 
Reviewed-by: Gaurav K Singh 
---
 drivers/gpu/drm/drm_dp_helper.c | 90 +
 include/drm/drm_dp_helper.h | 30 +++
 2 files changed, 120 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 37c01b6076ec..6d483487f2b4 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -1352,3 +1352,93 @@ int drm_dp_read_desc(struct drm_dp_aux *aux, struct 
drm_dp_desc *desc,
return 0;
 }
 EXPORT_SYMBOL(drm_dp_read_desc);
+
+/**
+ * DRM DP Helpers for DSC
+ */
+u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+  bool is_edp)
+{
+   u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 - DP_DSC_SUPPORT];
+
+   if (is_edp) {
+   /* For eDP, register DSC_SLICE_CAPABILITIES_1 gives slice count 
*/
+   if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
+   return 4;
+   if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
+   return 2;
+   if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
+   return 1;
+   } else {
+   /* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */
+   u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 - DP_DSC_SUPPORT];
+
+   if (slice_cap2 & DP_DSC_24_PER_DP_DSC_SINK)
+   return 24;
+   if (slice_cap2 & DP_DSC_20_PER_DP_DSC_SINK)
+   return 20;
+   if (slice_cap2 & DP_DSC_16_PER_DP_DSC_SINK)
+   return 16;
+   if (slice_cap1 & DP_DSC_12_PER_DP_DSC_SINK)
+   return 12;
+   if (slice_cap1 & DP_DSC_10_PER_DP_DSC_SINK)
+   return 10;
+   if (slice_cap1 & DP_DSC_8_PER_DP_DSC_SINK)
+   return 8;
+   if (slice_cap1 & DP_DSC_6_PER_DP_DSC_SINK)
+   return 6;
+   if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
+   return 4;
+   if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
+   return 2;
+   if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
+   return 1;
+   }
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_dp_dsc_sink_max_slice_count);
+
+u8 drm_dp_dsc_sink_line_buf_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+{
+   u8 line_buf_depth = dsc_dpcd[DP_DSC_LINE_BUF_BIT_DEPTH - 
DP_DSC_SUPPORT];
+
+   switch (line_buf_depth & DP_DSC_LINE_BUF_BIT_DEPTH_MASK) {
+   case DP_DSC_LINE_BUF_BIT_DEPTH_9:
+   return 9;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_10:
+   return 10;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_11:
+   return 11;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_12:
+   return 12;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_13:
+   return 13;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_14:
+   return 14;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_15:
+   return 15;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_16:
+   return 16;
+   case DP_DSC_LINE_BUF_BIT_DEPTH_8:
+   return 8;
+   }
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_dp_dsc_sink_line_buf_depth);
+
+u8 drm_dp_dsc_sink_max_color_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+{
+   u8 color_depth = dsc_dpcd[DP_DSC_DEC_COLOR_DEPTH_CAP - DP_DSC_SUPPORT];
+
+   if (color_depth & DP_DSC_12_BPC)
+   return 12;
+   if (color_depth & DP_DSC_10_BPC)
+   return 10;
+   if (color_depth & DP_DSC_8_BPC)
+   return 8;
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_dp_dsc_sink_max_color_depth);
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index dd33d59739f8..7f7f5b965466 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1067,6 +1067,36 @@ 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 */
+u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+  bool is_edp);
+u8 drm_dp_dsc_sink_line_buf_depth(const u8