Skip to content

Commit 6d824ed

Browse files
Wenjing Liualexdeucher
authored andcommitted
drm/amd/display: rename dsc extended caps as dsc branch decoder caps
[why] The capability fields are reserved for DSC branch only to report the capability related to the branch's DSC decoder. Signed-off-by: Wenjing Liu <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Qingqing Zhuo <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 5cb3241 commit 6d824ed

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4542,7 +4542,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
45424542
#if defined(CONFIG_DRM_AMD_DC_DCN)
45434543
dc_dsc_parse_dsc_dpcd(aconnector->dc_link->ctx->dc,
45444544
aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.raw,
4545-
aconnector->dc_link->dpcd_caps.dsc_caps.dsc_ext_caps.raw,
4545+
aconnector->dc_link->dpcd_caps.dsc_caps.dsc_branch_decoder_caps.raw,
45464546
&dsc_caps);
45474547
#endif
45484548
link_bandwidth_kbps = dc_link_bandwidth_kbps(aconnector->dc_link,

drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3519,8 +3519,8 @@ static bool retrieve_link_cap(struct dc_link *link)
35193519
status = core_link_read_dpcd(
35203520
link,
35213521
DP_DSC_BRANCH_OVERALL_THROUGHPUT_0,
3522-
link->dpcd_caps.dsc_caps.dsc_ext_caps.raw,
3523-
sizeof(link->dpcd_caps.dsc_caps.dsc_ext_caps.raw));
3522+
link->dpcd_caps.dsc_caps.dsc_branch_decoder_caps.raw,
3523+
sizeof(link->dpcd_caps.dsc_caps.dsc_branch_decoder_caps.raw));
35243524
}
35253525

35263526
if (!dpcd_read_sink_ext_caps(link))

drivers/gpu/drm/amd/display/dc/dc_dp_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ union dpcd_dsc_basic_capabilities {
726726
uint8_t raw[16];
727727
};
728728

729-
union dpcd_dsc_ext_capabilities {
729+
union dpcd_dsc_branch_decoder_capabilities {
730730
struct {
731731
uint8_t BRANCH_OVERALL_THROUGHPUT_0;
732732
uint8_t BRANCH_OVERALL_THROUGHPUT_1;
@@ -737,7 +737,7 @@ union dpcd_dsc_ext_capabilities {
737737

738738
struct dpcd_dsc_capabilities {
739739
union dpcd_dsc_basic_capabilities dsc_basic_caps;
740-
union dpcd_dsc_ext_capabilities dsc_ext_caps;
740+
union dpcd_dsc_branch_decoder_capabilities dsc_branch_decoder_caps;
741741
};
742742

743743
/* These parameters are from PSR capabilities reported by Sink DPCD */

drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ static bool setup_dsc_config(
747747
return is_dsc_possible;
748748
}
749749

750-
bool dc_dsc_parse_dsc_dpcd(const struct dc *dc, const uint8_t *dpcd_dsc_basic_data, const uint8_t *dpcd_dsc_ext_data, struct dsc_dec_dpcd_caps *dsc_sink_caps)
750+
bool dc_dsc_parse_dsc_dpcd(const struct dc *dc, const uint8_t *dpcd_dsc_basic_data, const uint8_t *dpcd_dsc_branch_decoder_caps, struct dsc_dec_dpcd_caps *dsc_sink_caps)
751751
{
752752
if (!dpcd_dsc_basic_data)
753753
return false;
@@ -818,14 +818,14 @@ bool dc_dsc_parse_dsc_dpcd(const struct dc *dc, const uint8_t *dpcd_dsc_basic_da
818818
}
819819

820820
/* Extended caps */
821-
if (dpcd_dsc_ext_data == NULL) { // Extended DPCD DSC data can be null, e.g. because it doesn't apply to SST
821+
if (dpcd_dsc_branch_decoder_caps == NULL) { // branch decoder DPCD DSC data can be null for non branch device
822822
dsc_sink_caps->branch_overall_throughput_0_mps = 0;
823823
dsc_sink_caps->branch_overall_throughput_1_mps = 0;
824824
dsc_sink_caps->branch_max_line_width = 0;
825825
return true;
826826
}
827827

828-
dsc_sink_caps->branch_overall_throughput_0_mps = dpcd_dsc_ext_data[DP_DSC_BRANCH_OVERALL_THROUGHPUT_0 - DP_DSC_BRANCH_OVERALL_THROUGHPUT_0];
828+
dsc_sink_caps->branch_overall_throughput_0_mps = dpcd_dsc_branch_decoder_caps[DP_DSC_BRANCH_OVERALL_THROUGHPUT_0 - DP_DSC_BRANCH_OVERALL_THROUGHPUT_0];
829829
if (dsc_sink_caps->branch_overall_throughput_0_mps == 0)
830830
dsc_sink_caps->branch_overall_throughput_0_mps = 0;
831831
else if (dsc_sink_caps->branch_overall_throughput_0_mps == 1)
@@ -835,7 +835,7 @@ bool dc_dsc_parse_dsc_dpcd(const struct dc *dc, const uint8_t *dpcd_dsc_basic_da
835835
dsc_sink_caps->branch_overall_throughput_0_mps += 600;
836836
}
837837

838-
dsc_sink_caps->branch_overall_throughput_1_mps = dpcd_dsc_ext_data[DP_DSC_BRANCH_OVERALL_THROUGHPUT_1 - DP_DSC_BRANCH_OVERALL_THROUGHPUT_0];
838+
dsc_sink_caps->branch_overall_throughput_1_mps = dpcd_dsc_branch_decoder_caps[DP_DSC_BRANCH_OVERALL_THROUGHPUT_1 - DP_DSC_BRANCH_OVERALL_THROUGHPUT_0];
839839
if (dsc_sink_caps->branch_overall_throughput_1_mps == 0)
840840
dsc_sink_caps->branch_overall_throughput_1_mps = 0;
841841
else if (dsc_sink_caps->branch_overall_throughput_1_mps == 1)
@@ -845,7 +845,7 @@ bool dc_dsc_parse_dsc_dpcd(const struct dc *dc, const uint8_t *dpcd_dsc_basic_da
845845
dsc_sink_caps->branch_overall_throughput_1_mps += 600;
846846
}
847847

848-
dsc_sink_caps->branch_max_line_width = dpcd_dsc_ext_data[DP_DSC_BRANCH_MAX_LINE_WIDTH - DP_DSC_BRANCH_OVERALL_THROUGHPUT_0] * 320;
848+
dsc_sink_caps->branch_max_line_width = dpcd_dsc_branch_decoder_caps[DP_DSC_BRANCH_MAX_LINE_WIDTH - DP_DSC_BRANCH_OVERALL_THROUGHPUT_0] * 320;
849849
ASSERT(dsc_sink_caps->branch_max_line_width == 0 || dsc_sink_caps->branch_max_line_width >= 5120);
850850

851851
return true;

0 commit comments

Comments
 (0)