Skip to contentSkip to conversation

drm/dsc: use rc_model_size from DSC config for PPS

PATCH RESEND In review Jani Nikula 3 participants 12 messages Mar 27, 2020 – Apr 8, 2020

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

PATCH RESEND 1/7 drm/dsc: use rc_model_size from DSC config for PPS

The PPS is supposed to reflect the DSC config instead of hard coding the rc_model_size. Make it so.

Currently all users of drm_dsc_pps_payload_pack() hard code the size to 8192 also in the DSC config, so this change should have no impact, other than allowing the drivers to use other sizes as needed.

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>
---
 drivers/gpu/drm/drm_dsc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/drm_dsc.c +1 -2
index 4a475d9696ff..09afbc01ea94 100644
@@ -186,8 +186,7 @@ void drm_dsc_pps_payload_pack(struct drm_dsc_picture_parameter_set *pps_payload,
 	pps_payload->flatness_max_qp = dsc_cfg->flatness_max_qp;
 
 	/* PPS 38, 39 */
-	pps_payload->rc_model_size =
-		cpu_to_be16(DSC_RC_MODEL_SIZE_CONST);
+	pps_payload->rc_model_size = cpu_to_be16(dsc_cfg->rc_model_size);
 
 	/* PPS 40 */
 	pps_payload->rc_edge_factor = DSC_RC_EDGE_FACTOR_CONST;
Signature · 6 lines
2.20.1

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

PATCH RESEND 2/7 drm/dsc: add helper for calculating rc buffer size from DPCD

Add a helper for calculating the rc buffer size from the DCPD offsets DP_DSC_RC_BUF_BLK_SIZE and DP_DSC_RC_BUF_SIZE.

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>
---
 drivers/gpu/drm/drm_dsc.c | 27 +++++++++++++++++++++++++++
 include/drm/drm_dsc.h     |  1 +
 2 files changed, 28 insertions(+)
drivers/gpu/drm/drm_dsc.c +27 -0
index 09afbc01ea94..ff602f7ec65b 100644
@@ -49,6 +49,33 @@ void drm_dsc_dp_pps_header_init(struct dp_sdp_header *pps_header)
 }
 EXPORT_SYMBOL(drm_dsc_dp_pps_header_init);
 
+/**
+ * drm_dsc_dp_rc_buffer_size - get rc buffer size in bytes
+ * @rc_buffer_block_size: block size code, according to DPCD offset 62h
+ * @rc_buffer_size: number of blocks - 1, according to DPCD offset 63h
+ *
+ * return:
+ * buffer size in bytes, or 0 on invalid input
+ */
+int drm_dsc_dp_rc_buffer_size(u8 rc_buffer_block_size, u8 rc_buffer_size)
+{
+	int size = 1024 * (rc_buffer_size + 1);
+
+	switch (rc_buffer_block_size) {
+	case DP_DSC_RC_BUF_BLK_SIZE_1:
+		return 1 * size;
+	case DP_DSC_RC_BUF_BLK_SIZE_4:
+		return 4 * size;
+	case DP_DSC_RC_BUF_BLK_SIZE_16:
+		return 16 * size;
+	case DP_DSC_RC_BUF_BLK_SIZE_64:
+		return 64 * size;
+	default:
+		return 0;
+	}
+}
+EXPORT_SYMBOL(drm_dsc_dp_rc_buffer_size);
+
 /**
  * drm_dsc_pps_payload_pack() - Populates the DSC PPS
  *
include/drm/drm_dsc.h +1 -0
index 887954cbfc60..537a68330840 100644
@@ -602,6 +602,7 @@ struct drm_dsc_pps_infoframe {
 } __packed;
 
 void drm_dsc_dp_pps_header_init(struct dp_sdp_header *pps_header);
+int drm_dsc_dp_rc_buffer_size(u8 rc_buffer_block_size, u8 rc_buffer_size);
 void drm_dsc_pps_payload_pack(struct drm_dsc_picture_parameter_set *pps_sdp,
 				const struct drm_dsc_config *dsc_cfg);
 int drm_dsc_compute_rc_parameters(struct drm_dsc_config *vdsc_cfg);
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 2/7
#2 lore raw

RE: [PATCH RESEND 2/7] drm/dsc: add helper for calculating rc buffer size from DPCD

Quoted 11 lines

-----Original Message-----
From: Jani Nikula <[email protected]>
Sent: Friday, March 27, 2020 6:12 PM
To: [email protected]; [email protected]
Cc: Nikula, Jani <[email protected]>; Alex Deucher <[email protected]>; Harry Wentland <[email protected]>; Navare, Manasi D <[email protected]>; Kulkarni, Vandita <[email protected]>
Subject: [PATCH RESEND 2/7] drm/dsc: add helper for calculating rc buffer size from DPCD

Quoted 8 lines

Add a helper for calculating the rc buffer size from the DCPD offsets DP_DSC_RC_BUF_BLK_SIZE and DP_DSC_RC_BUF_SIZE.

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>

Looks good to me.

Quoted 52 lines
---
 drivers/gpu/drm/drm_dsc.c | 27 +++++++++++++++++++++++++++
 include/drm/drm_dsc.h     |  1 +
 2 files changed, 28 insertions(+)
drivers/gpu/drm/drm_dsc.c index renamed from drivers/gpu/drm/drm_dsc.c +0 -0

09afbc01ea94..ff602f7ec65b 100644

drivers/gpu/drm/drm_dsc.c +25 -0
@@ -49,6 +49,33 @@ void drm_dsc_dp_pps_header_init(struct dp_sdp_header
 *pps_header)  }  EXPORT_SYMBOL(drm_dsc_dp_pps_header_init);
 
+/**
+ * drm_dsc_dp_rc_buffer_size - get rc buffer size in bytes
+ * @rc_buffer_block_size: block size code, according to DPCD offset 62h
+ * @rc_buffer_size: number of blocks - 1, according to DPCD offset 63h
+ *
+ * return:
+ * buffer size in bytes, or 0 on invalid input  */ int
+drm_dsc_dp_rc_buffer_size(u8 rc_buffer_block_size, u8 rc_buffer_size) {
+	int size = 1024 * (rc_buffer_size + 1);
+
+	switch (rc_buffer_block_size) {
+	case DP_DSC_RC_BUF_BLK_SIZE_1:
+		return 1 * size;
+	case DP_DSC_RC_BUF_BLK_SIZE_4:
+		return 4 * size;
+	case DP_DSC_RC_BUF_BLK_SIZE_16:
+		return 16 * size;
+	case DP_DSC_RC_BUF_BLK_SIZE_64:
+		return 64 * size;
+	default:
+		return 0;
+	}
+}
+EXPORT_SYMBOL(drm_dsc_dp_rc_buffer_size);
+
 /**
  * drm_dsc_pps_payload_pack() - Populates the DSC PPS
  *
include/drm/drm_dsc.h index renamed from include/drm/drm_dsc.h +0 -0

887954cbfc60..537a68330840 100644

include/drm/drm_dsc.h +2 -0
@@ -602,6 +602,7 @@ struct drm_dsc_pps_infoframe {  } __packed;
 
 void drm_dsc_dp_pps_header_init(struct dp_sdp_header *pps_header);
+int drm_dsc_dp_rc_buffer_size(u8 rc_buffer_block_size, u8
+rc_buffer_size);
 void drm_dsc_pps_payload_pack(struct drm_dsc_picture_parameter_set
 *pps_sdp,
 				const struct drm_dsc_config *dsc_cfg);  int
Quoted 3 lines

drm_dsc_compute_rc_parameters(struct drm_dsc_config *vdsc_cfg); --
2.20.1

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

#3 lore raw

PATCH RESEND 3/7 drm/amd/display: use drm_dsc_dp_rc_buffer_size() to get rc buffer size

In reply to Jani Nikula

Use the new drm_dsc_dp_rc_buffer_size() helper to simplify rc buffer size computation. No functional changes.

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 37 ++++-----------------
 1 file changed, 7 insertions(+), 30 deletions(-)
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +7 -30
index 87d682d25278..290acff273ae 100644
@@ -85,31 +85,6 @@ static uint32_t dc_dsc_bandwidth_in_kbps_from_timing(
 
 }
 
-static bool dsc_buff_block_size_from_dpcd(int dpcd_buff_block_size, int *buff_block_size)
-{
-
-	switch (dpcd_buff_block_size) {
-	case DP_DSC_RC_BUF_BLK_SIZE_1:
-		*buff_block_size = 1024;
-		break;
-	case DP_DSC_RC_BUF_BLK_SIZE_4:
-		*buff_block_size = 4 * 1024;
-		break;
-	case DP_DSC_RC_BUF_BLK_SIZE_16:
-		*buff_block_size = 16 * 1024;
-		break;
-	case DP_DSC_RC_BUF_BLK_SIZE_64:
-		*buff_block_size = 64 * 1024;
-		break;
-	default: {
-			dm_error("%s: DPCD DSC buffer size not recognized.\n", __func__);
-			return false;
-		}
-	}
-
-	return true;
-}
-
 
 static bool dsc_line_buff_depth_from_dpcd(int dpcd_line_buff_bit_depth, int *line_buff_bit_depth)
 {
@@ -773,14 +748,16 @@ bool dc_dsc_parse_dsc_dpcd(const struct dc *dc, const uint8_t *dpcd_dsc_basic_da
 	dsc_sink_caps->dsc_version = dpcd_dsc_basic_data[DP_DSC_REV - DP_DSC_SUPPORT];
 
 	{
-		int buff_block_size;
-		int buff_size;
+		u8 buff_block_size = dpcd_dsc_basic_data[DP_DSC_RC_BUF_BLK_SIZE - DP_DSC_SUPPORT];
+		u8 buff_size = dpcd_dsc_basic_data[DP_DSC_RC_BUF_SIZE - DP_DSC_SUPPORT];
+		int size = drm_dsc_dp_rc_buffer_size(buff_block_size, buff_size);
 
-		if (!dsc_buff_block_size_from_dpcd(dpcd_dsc_basic_data[DP_DSC_RC_BUF_BLK_SIZE - DP_DSC_SUPPORT], &buff_block_size))
+		if (!size) {
+			dm_error("%s: DPCD DSC buffer size not recognized.\n", __func__);
 			return false;
+		}
 
-		buff_size = dpcd_dsc_basic_data[DP_DSC_RC_BUF_SIZE - DP_DSC_SUPPORT] + 1;
-		dsc_sink_caps->rc_buffer_size = buff_size * buff_block_size;
+		dsc_sink_caps->rc_buffer_size = size;
 	}
 
 	dsc_sink_caps->slice_caps1.raw = dpcd_dsc_basic_data[DP_DSC_SLICE_CAP_1 - DP_DSC_SUPPORT];
Signature · 6 lines
2.20.1

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

PATCH RESEND 4/7 drm/i915/dsc: configure hardware using specified rc_model_size

In reply to Jani Nikula

The rc_model_size is specified in the DSC config, and the hardware programming should respect that instead of hard coding a value of 8192.

Regardless, the rc_model_size in DSC config is currently hard coded to the same value, so this should have no impact, other than allowing the use of other sizes as needed.

Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_vdsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_vdsc.c +1 -1
index 95ad87d4ccb3..1f74b0174b1a 100644
@@ -740,7 +740,7 @@ static void intel_dsc_pps_configure(struct intel_encoder *encoder,
 
 	/* Populate PICTURE_PARAMETER_SET_9 registers */
 	pps_val = 0;
-	pps_val |= DSC_RC_MODEL_SIZE(DSC_RC_MODEL_SIZE_CONST) |
+	pps_val |= DSC_RC_MODEL_SIZE(vdsc_cfg->rc_model_size) |
 		DSC_RC_EDGE_FACTOR(DSC_RC_EDGE_FACTOR_CONST);
 	drm_info(&dev_priv->drm, "PPS9 = 0x%08x\n", pps_val);
 	if (!is_pipe_dsc(crtc_state)) {
Signature · 6 lines
2.20.1

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

RE: [PATCH RESEND 4/7] drm/i915/dsc: configure hardware using specified rc_model_size

Quoted 12 lines

-----Original Message-----
From: Jani Nikula <[email protected]>
Sent: Friday, March 27, 2020 6:12 PM
To: [email protected]; [email protected]
Cc: Nikula, Jani <[email protected]>; Navare, Manasi D <[email protected]>; Kulkarni, Vandita <[email protected]>
Subject: [PATCH RESEND 4/7] drm/i915/dsc: configure hardware using specified rc_model_size

The rc_model_size is specified in the DSC config, and the hardware programming should respect that instead of hard coding a value of 8192.

Quoted 7 lines

Regardless, the rc_model_size in DSC config is currently hard coded to the same value, so this should have no impact, other than allowing the use of other sizes as needed.

Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>

Looks good to me.

Quoted 18 lines
---
 drivers/gpu/drm/i915/display/intel_vdsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_vdsc.c +1 -1
index 95ad87d4ccb3..1f74b0174b1a 100644
@@ -740,7 +740,7 @@ static void intel_dsc_pps_configure(struct
 intel_encoder *encoder,
 
 	/* Populate PICTURE_PARAMETER_SET_9 registers */
 	pps_val = 0;
-	pps_val |= DSC_RC_MODEL_SIZE(DSC_RC_MODEL_SIZE_CONST) |
+	pps_val |= DSC_RC_MODEL_SIZE(vdsc_cfg->rc_model_size) |
 		DSC_RC_EDGE_FACTOR(DSC_RC_EDGE_FACTOR_CONST);
 	drm_info(&dev_priv->drm, "PPS9 = 0x%08x\n", pps_val);
Quoted 3 lines

if (!is_pipe_dsc(crtc_state)) {
--
2.20.1

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

#6 lore raw

PATCH RESEND 5/7 drm/i915/dsc: make rc_model_size an encoder defined value

In reply to Jani Nikula

Move the intialization of the rc_model_size from the common code into encoder code, allowing different encoders to specify the size according to their needs. Keep using the hard coded value in the encoders for now to make this a non-functional change.

Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>
---
 drivers/gpu/drm/i915/display/icl_dsi.c    | 3 +++
 drivers/gpu/drm/i915/display/intel_dp.c   | 8 ++++++++
 drivers/gpu/drm/i915/display/intel_vdsc.c | 2 --
 3 files changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/icl_dsi.c +3 -0
index 5a83df2fd723..ca299ae5a393 100644
@@ -1490,6 +1490,9 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
 
 	vdsc_cfg->convert_rgb = true;
 
+	/* FIXME: initialize from VBT */
+	vdsc_cfg->rc_model_size = DSC_RC_MODEL_SIZE_CONST;
+
 	ret = intel_dsc_compute_params(encoder, crtc_state);
 	if (ret)
 		return ret;
drivers/gpu/drm/i915/display/intel_dp.c +8 -0
index c33a39065704..dc54b31c0108 100644
@@ -2071,6 +2071,14 @@ static int intel_dp_dsc_compute_params(struct intel_encoder *encoder,
 	u8 line_buf_depth;
 	int ret;
 
+	/*
+	 * RC_MODEL_SIZE is currently a constant across all configurations.
+	 *
+	 * FIXME: Look into using sink defined DPCD DP_DSC_RC_BUF_BLK_SIZE and
+	 * DP_DSC_RC_BUF_SIZE for this.
+	 */
+	vdsc_cfg->rc_model_size = DSC_RC_MODEL_SIZE_CONST;
+
 	ret = intel_dsc_compute_params(encoder, crtc_state);
 	if (ret)
 		return ret;
drivers/gpu/drm/i915/display/intel_vdsc.c +0 -2
index 1f74b0174b1a..0ccb72cf3696 100644
@@ -455,8 +455,6 @@ int intel_dsc_compute_params(struct intel_encoder *encoder,
 	else if (vdsc_cfg->bits_per_component == 12)
 		vdsc_cfg->mux_word_size = DSC_MUX_WORD_SIZE_12_BPC;
 
-	/* RC_MODEL_SIZE is a constant across all configurations */
-	vdsc_cfg->rc_model_size = DSC_RC_MODEL_SIZE_CONST;
 	/* InitialScaleValue is a 6 bit value with 3 fractional bits (U3.3) */
 	vdsc_cfg->initial_scale_value = (vdsc_cfg->rc_model_size << 3) /
 		(vdsc_cfg->rc_model_size - vdsc_cfg->initial_offset);
Signature · 6 lines
2.20.1

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

PATCH RESEND 6/7 drm/i915/bios: fill in DSC rc_model_size from VBT

In reply to Jani Nikula

The VBT fields match the DPCD data, so use the same helper.

Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_bios.c +3 -8
index 839124647202..a4ea0e6c3286 100644
@@ -2494,16 +2494,11 @@ static void fill_dsc(struct intel_crtc_state *crtc_state,
 			      crtc_state->dsc.slice_count);
 
 	/*
-	 * FIXME: Use VBT rc_buffer_block_size and rc_buffer_size for the
-	 * implementation specific physical rate buffer size. Currently we use
-	 * the required rate buffer model size calculated in
-	 * drm_dsc_compute_rc_parameters() according to VESA DSC Annex E.
-	 *
 	 * The VBT rc_buffer_block_size and rc_buffer_size definitions
-	 * correspond to DP 1.4 DPCD offsets 0x62 and 0x63. The DP DSC
-	 * implementation should also use the DPCD (or perhaps VBT for eDP)
-	 * provided value for the buffer size.
+	 * correspond to DP 1.4 DPCD offsets 0x62 and 0x63.
 	 */
+	vdsc_cfg->rc_model_size = drm_dsc_dp_rc_buffer_size(dsc->rc_buffer_block_size,
+							    dsc->rc_buffer_size);
 
 	/* FIXME: DSI spec says bpc + 1 for this one */
 	vdsc_cfg->line_buf_depth = VBT_DSC_LINE_BUFFER_DEPTH(dsc->line_buffer_depth);
Signature · 6 lines
2.20.1

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

RE: [PATCH RESEND 6/7] drm/i915/bios: fill in DSC rc_model_size from VBT

Quoted 33 lines

-----Original Message-----
From: Jani Nikula <[email protected]>
Sent: Friday, March 27, 2020 6:12 PM
To: [email protected]; [email protected]
Cc: Nikula, Jani <[email protected]>; Navare, Manasi D <[email protected]>; Kulkarni, Vandita <[email protected]>
Subject: [PATCH RESEND 6/7] drm/i915/bios: fill in DSC rc_model_size from VBT

The VBT fields match the DPCD data, so use the same helper.

Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_bios.c +0 -5
index 839124647202..a4ea0e6c3286 100644
@@ -2494,16 +2494,11 @@ static void fill_dsc(struct intel_crtc_state
 *crtc_state,
 			      crtc_state->dsc.slice_count);
 
 	/*
-	 * FIXME: Use VBT rc_buffer_block_size and rc_buffer_size for the
-	 * implementation specific physical rate buffer size. Currently we use
-	 * the required rate buffer model size calculated in
-	 * drm_dsc_compute_rc_parameters() according to VESA DSC Annex E.
-	 *

drivers/gpu/drm/i915/display/intel_bios.c static void fill_dsc(struct intel_crtc_state · line 2504

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_bios.c +3 -3
 	 * The VBT rc_buffer_block_size and rc_buffer_size definitions
-	 * correspond to DP 1.4 DPCD offsets 0x62 and 0x63. The DP DSC
-	 * implementation should also use the DPCD (or perhaps VBT for eDP)
-	 * provided value for the buffer size.
+	 * correspond to DP 1.4 DPCD offsets 0x62 and 0x63.
 	 */
+	vdsc_cfg->rc_model_size = drm_dsc_dp_rc_buffer_size(dsc-
 >rc_buffer_block_size,
+							    dsc-
 >rc_buffer_size);

Do we need to handle the invalid case here?

Regards
Vandita

Quoted 6 lines
drivers/gpu/drm/i915/display/intel_bios.c +0 -0
 	/* FIXME: DSI spec says bpc + 1 for this one */
 	vdsc_cfg->line_buf_depth = VBT_DSC_LINE_BUFFER_DEPTH(dsc-
Quoted 1 line

line_buffer_depth);

--
2.20.1

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

#9 lore raw

PATCH RESEND 7/7 drm/i915/dsi: use VBT data for rc_model_size

In reply to Jani Nikula

Stop overriding the VBT defined value for rc_model_size.

Cc Vandita Kulkarni <[email protected]>
---
 drivers/gpu/drm/i915/display/icl_dsi.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/i915/display/icl_dsi.c +0 -3
index ca299ae5a393..5a83df2fd723 100644
@@ -1490,9 +1490,6 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
 
 	vdsc_cfg->convert_rgb = true;
 
-	/* FIXME: initialize from VBT */
-	vdsc_cfg->rc_model_size = DSC_RC_MODEL_SIZE_CONST;
-
 	ret = intel_dsc_compute_params(encoder, crtc_state);
 	if (ret)
 		return ret;
Signature · 6 lines
2.20.1

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

[Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [RESEND,1/7] drm/dsc: use rc_model_size from DSC config for PPS

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: series starting with [RESEND,1/7] drm/dsc: use rc_model_size from DSC config for PPS
URL : https://patchwork.freedesktop.org/series/75168/
State : failure

== Summary ==

CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
CHK include/generated/compile.h
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dsc/dc_dsc.o
drivers/gpu/drm/amd/amdgpu/../display/dc/dsc/dc_dsc.c: In function ‘dc_dsc_parse_dsc_dpcd’:
drivers/gpu/drm/amd/amdgpu/../display/dc/dsc/dc_dsc.c:753:14: error: implicit declaration of function ‘drm_dsc_dp_rc_buffer_size’ [-Werror=implicit-function-declaration]

   int size = drm_dsc_dp_rc_buffer_size(buff_block_size, buff_size);
              ^~~~~~~~~~~~~~~~~~~~~~~~~

cc1: some warnings being treated as errors
scripts/Makefile.build:267: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dsc/dc_dsc.o' failed make[4]: *** [drivers/gpu/drm/amd/amdgpu/../display/dc/dsc/dc_dsc.o] Error 1 scripts/Makefile.build:505: recipe for target 'drivers/gpu/drm/amd/amdgpu' failed
make[3]: *** [drivers/gpu/drm/amd/amdgpu] Error 2
scripts/Makefile.build:505: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:505: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1683: recipe for target 'drivers' failed
make: *** [drivers] Error 2

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

Reviewed-by on v1 1/7
#11 lore raw
In reply to Jani Nikula
Quoted 18 lines

-----Original Message-----
From: Jani Nikula <[email protected]>
Sent: Friday, March 27, 2020 6:12 PM
To: [email protected]; [email protected]
Cc: Nikula, Jani <[email protected]>; Alex Deucher <[email protected]>; Harry Wentland <[email protected]>; Navare, Manasi D <[email protected]>; Kulkarni, Vandita <[email protected]>
Subject: [PATCH RESEND 1/7] drm/dsc: use rc_model_size from DSC config for PPS

The PPS is supposed to reflect the DSC config instead of hard coding the rc_model_size. Make it so.

Currently all users of drm_dsc_pps_payload_pack() hard code the size to 8192 also in the DSC config, so this change should have no impact, other than allowing the drivers to use other sizes as needed.

Quoted 5 lines
Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Manasi Navare <[email protected]>
Cc Vandita Kulkarni <[email protected]>

Looks good to me.

Quoted 18 lines
---
 drivers/gpu/drm/drm_dsc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/drm_dsc.c index renamed from drivers/gpu/drm/drm_dsc.c +0 -0

4a475d9696ff..09afbc01ea94 100644

drivers/gpu/drm/drm_dsc.c +1 -2
@@ -186,8 +186,7 @@ void drm_dsc_pps_payload_pack(struct
 drm_dsc_picture_parameter_set *pps_payload,
 	pps_payload->flatness_max_qp = dsc_cfg->flatness_max_qp;
 
 	/* PPS 38, 39 */
-	pps_payload->rc_model_size =
-		cpu_to_be16(DSC_RC_MODEL_SIZE_CONST);
+	pps_payload->rc_model_size = cpu_to_be16(dsc_cfg->rc_model_size);
 
 	/* PPS 40 */
Quoted 3 lines

pps_payload->rc_edge_factor = DSC_RC_EDGE_FACTOR_CONST;
--
2.20.1

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