Commit 95134e58 authored by George Shen's avatar George Shen Committed by Alex Deucher

drm/amd/display: Add ASIC cap to limit DCC surface width

[Why]
Certain configurations of DCN401 require ODM4:1 to support DCC for 10K
surfaces. DCC should be conservatively disabled in those cases.

The issue is that current logic limits 10K surface DCC for all
configurations of DCN401.

[How]
Add DC ASIC cap to indicate max surface width that can support DCC.
Disable DCC if this ASIC cap is non-zero and surface width exceeds it.
Reviewed-by: default avatarJun Lei <jun.lei@amd.com>
Signed-off-by: default avatarJerry Zuo <jerry.zuo@amd.com>
Signed-off-by: default avatarGeorge Shen <george.shen@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 02b438af
...@@ -293,6 +293,8 @@ struct dc_caps { ...@@ -293,6 +293,8 @@ struct dc_caps {
bool cursor_not_scaled; bool cursor_not_scaled;
bool dcmode_power_limits_present; bool dcmode_power_limits_present;
bool sequential_ono; bool sequential_ono;
/* Conservative limit for DCC cases which require ODM4:1 to support*/
uint32_t dcc_plane_width_limit;
}; };
struct dc_bug_wa { struct dc_bug_wa {
......
...@@ -829,6 +829,7 @@ bool hubbub401_get_dcc_compression_cap(struct hubbub *hubbub, ...@@ -829,6 +829,7 @@ bool hubbub401_get_dcc_compression_cap(struct hubbub *hubbub,
struct dc_surface_dcc_cap *output) struct dc_surface_dcc_cap *output)
{ {
struct dc *dc = hubbub->ctx->dc; struct dc *dc = hubbub->ctx->dc;
const unsigned int max_dcc_plane_width = dc->caps.dcc_plane_width_limit;
/* DCN4_Programming_Guide_DCHUB.docx, Section 5.11.2.2 */ /* DCN4_Programming_Guide_DCHUB.docx, Section 5.11.2.2 */
enum dcc_control dcc_control; enum dcc_control dcc_control;
unsigned int plane0_bpe, plane1_bpe; unsigned int plane0_bpe, plane1_bpe;
...@@ -843,6 +844,11 @@ bool hubbub401_get_dcc_compression_cap(struct hubbub *hubbub, ...@@ -843,6 +844,11 @@ bool hubbub401_get_dcc_compression_cap(struct hubbub *hubbub,
if (dc->debug.disable_dcc == DCC_DISABLE) if (dc->debug.disable_dcc == DCC_DISABLE)
return false; return false;
/* Conservatively disable DCC for cases where ODM4:1 may be required. */
if (max_dcc_plane_width != 0 &&
(input->surface_size.width > max_dcc_plane_width || input->plane1_size.width > max_dcc_plane_width))
return false;
switch (input->format) { switch (input->format) {
default: default:
is_dual_plane = false; is_dual_plane = false;
......
...@@ -1822,6 +1822,9 @@ static bool dcn401_resource_construct( ...@@ -1822,6 +1822,9 @@ static bool dcn401_resource_construct(
dc->caps.extended_aux_timeout_support = true; dc->caps.extended_aux_timeout_support = true;
dc->caps.dmcub_support = true; dc->caps.dmcub_support = true;
if (ASICREV_IS_GC_12_0_1_A0(dc->ctx->asic_id.hw_internal_rev))
dc->caps.dcc_plane_width_limit = 7680;
/* Color pipeline capabilities */ /* Color pipeline capabilities */
dc->caps.color.dpp.dcn_arch = 1; dc->caps.color.dpp.dcn_arch = 1;
dc->caps.color.dpp.input_lut_shared = 0; dc->caps.color.dpp.input_lut_shared = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment