DC Patches Feburary 7, 2022
Subsystems (3)
cover DC Patches Feburary 7, 2022
This DC patchset brings improvements in multiple areas. In summary, we have:
-fix for build failure uninitalized error
-Bug fix for DP2 using uncertified cable
-limit unbounded request to 5k
-fix DP LT sequence on EQ fail
-Bug fixes for S3/S4
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.103.0
Aric Cyr (1):
drm/amd/display: 3.2.172
Dmytro Laktyushkin (2):
drm/amd/display: limit unbounded requesting to 5k drm/amd/display: fix yellow carp wm clamping
Eric Bernstein (2):
drm/amd/display: Fix for variable may be used uninitialized error drm/amd/display: remove static from optc31_set_drr
Guo, Bing (1):
dc: do blocked MST topology discovery at resume from S3/S4
Ilya (1):
drm/amd/display: Fix DP LT sequence on EQ fail
Martin Tsai (1):
drm/amd/display: handle null link encoder
Nicholas Kazlauskas (1):
drm/amd/display: Fix stream->link_enc unassigned during stream removal
Oliver Logush (1):
drm/amd/display: Basic support with device ID
Paul Hsieh (1):
drm/amd/display: change fastboot timing validation
Zhan Liu (1):
drm/amd/display: keep eDP Vdd on when eDP stream is already enabled
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 +++++++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 27 ++------ .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +- .../gpu/drm/amd/display/dc/core/dc_resource.c | 8 +-- drivers/gpu/drm/amd/display/dc/dc.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_link.h | 1 + .../display/dc/dce110/dce110_hw_sequencer.c | 27 +++++++- .../drm/amd/display/dc/dcn20/dcn20_resource.c | 11 +--- .../drm/amd/display/dc/dcn31/dcn31_hubbub.c | 61 ++++++++++--------- .../gpu/drm/amd/display/dc/dcn31/dcn31_optc.c | 2 +- .../gpu/drm/amd/display/dc/dcn31/dcn31_optc.h | 2 + .../drm/amd/display/dc/dcn31/dcn31_resource.c | 3 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 +- .../gpu/drm/amd/display/include/dal_asic_id.h | 3 +- 17 files changed, 104 insertions(+), 83 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/13 drm/amd/display: Fix for variable may be used uninitialized error
From: Eric Bernstein <[email protected]>
[Why]
Build failure due to ‘status’ may be used uninitialized
[How]
Initialize status to LINK_TRAINING_SUCCESS
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
@@ -3199,7 +3199,7 @@ static bool dp_verify_link_cap(bool success = false;bool skip_video_pattern;enum clock_source_id dp_cs_id =get_clock_source_id (link); -enum link_training_result status; +enum link_training_result status =LINK_TRAINING_SUCCESS ;union hpd_irq_data irq_data;struct link_resource link_res;
Signature · 1 line
2.25.1
PATCH 2/13 drm/amd/display: Fix stream->link_enc unassigned during stream removal
In reply to Jasdeep DhillonFrom: Nicholas Kazlauskas <[email protected]>
[Why]
Found when running igt@kms_atomic.
Userspace attempts to do a TEST_COMMIT when 0 streams which calls dc_remove_stream_from_ctx. This in turn calls link_enc_unassign which ends up modifying stream->link = NULL directly, causing the global link_enc to be removed preventing further link activity and future link validation from passing.
[How]
We take care of link_enc unassignment at the start of link_enc_cfg_link_encs_assign so this call is no longer necessary.
Fixes global state from being modified while unlocked.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +0 -4
@@ -1965,10 +1965,6 @@ enum dc_status dc_remove_stream_from_ctx( dc->res_pool, del_pipe->stream_res.stream_enc, false); -/* Release link encoder from stream in new dc_state. */ -if (dc->res_pool->funcs->link_enc_unassign) - dc->res_pool->funcs->link_enc_unassign (new_ctx, del_pipe->stream); -if (is_dp_128b_132b_signal (del_pipe)) { update_hpo_dp_stream_engine_usage( &new_ctx->res_ctx, dc->res_pool,
Signature · 1 line
2.25.1
PATCH 3/13 drm/amd/display: limit unbounded requesting to 5k
In reply to Jasdeep DhillonFrom: Dmytro Laktyushkin <[email protected]>
Unbounded requesting is unsupported on pipe split modes and this change prevents us running into such a situation with wide modes.
--- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c +2 -1
@@ -1836,7 +1836,8 @@ static int dcn31_populate_dml_pipes_from_context(if (is_dual_plane (pipe->plane_state->format) && pipe->plane_state->src_rect.width <=1920 && pipe->plane_state->src_rect.height <=1080 ) { dc->config.enable_4to1MPC = true; - }else if (!is_dual_plane (pipe->plane_state->format)) { + }else if (!is_dual_plane (pipe->plane_state->format) && pipe->plane_state->src_rect.width <=5120 ) { +/* Limit to 5k max to avoid forced pipe split when there is not enough detile for swath */ context->bw_ctx.dml.ip.det_buffer_size_kbytes =192 ; pipes[0 ].pipe.src.unbounded_req_mode = true; }
Signature · 1 line
2.25.1
PATCH 4/13 drm/amd/display: Basic support with device ID
In reply to Jasdeep DhillonFrom: Oliver Logush <[email protected]>
[why]
To get the the cyan_skillfish check working
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 +++++++++++++++++-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 2 +- .../gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- .../gpu/drm/amd/display/include/dal_asic_id.h | 3 ++- 5 files changed, 27 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +22 -2
@@ -1014,6 +1014,14 @@ static void amdgpu_dm_audio_eld_notify(struct amdgpu_device *adev, int pin) } } +bool is_skillfish_series (struct amdgpu_device *adev) +{ +if (adev->asic_type ==CHIP_CYAN_SKILLFISH || adev->pdev->revision ==0x143F ) { +return true; + } +return false; +} +static int dm_dmub_hw_init (struct amdgpu_device *adev) {const struct dmcub_firmware_header_v1_0 *hdr;
@@ -1049,7 +1057,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)return -EINVAL ; } -if (!has_hw_support) { +if (is_skillfish_series (adev)) {DRM_INFO ("DMUB unsupported on ASIC\n" );return 0 ; }
@@ -1471,6 +1479,10 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)default :break ; } +if (is_skillfish_series (adev)) { + init_data.flags.disable_dmcu = true; +break ; + }break ; }
@@ -1777,7 +1789,6 @@ static int load_dmcu_fw(struct amdgpu_device *adev)case CHIP_VEGA10 :case CHIP_VEGA12 :case CHIP_VEGA20 : -return 0 ;case CHIP_NAVI12 : fw_name_dmcu =FIRMWARE_NAVI12_DMCU ;break ;
@@ -1805,6 +1816,9 @@ static int load_dmcu_fw(struct amdgpu_device *adev)default :break ; } +if (is_skillfish_series (adev)) { +return 0 ; + }DRM_ERROR ("Unsupported ASIC type: 0x%X\n" , adev->asic_type);return -EINVAL ; }
@@ -4515,6 +4529,12 @@ static int dm_early_init(void *handle) adev->mode_info.num_dig =6 ;break ;default : +if (is_skillfish_series (adev)) { + adev->mode_info.num_crtc =2 ; + adev->mode_info.num_hpd =2 ; + adev->mode_info.num_dig =2 ; +break ; + }#if defined(CONFIG_DRM_AMD_DC_DCN )switch (adev->ip_versions[DCE_HWIP ][0 ]) {case IP_VERSION (2 ,0 ,2 ):
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +1 -1
@@ -82,7 +82,7 @@ struct common_irq_params {enum dc_irq_source irq_src;atomic64_t previous_timestamp; }; - +bool is_skillfish_series (struct amdgpu_device *adev);/** * struct dm_compressor_info - Buffer info used by frame buffer compression * @cpu_addr: MMIO cpu addr
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +1 -1
@@ -259,7 +259,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *pdcn3_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg);return &clk_mgr->base; } -if (asic_id.chip_id ==DEVICE_ID_NV_13FE ) { +if (asic_id.chip_id ==DEVICE_ID_NV_NAVI10_LITE_P_13FE ) {dcn201_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg);return &clk_mgr->base; }
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
@@ -135,7 +135,7 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)case FAMILY_NV : dc_version =DCN_VERSION_2_0 ; -if (asic_id.chip_id ==DEVICE_ID_NV_13FE ) { +if (asic_id.chip_id ==DEVICE_ID_NV_NAVI10_LITE_P_13FE || asic_id.chip_id ==DEVICE_ID_NV_NAVI10_LITE_P_143F ) { dc_version =DCN_VERSION_2_01 ;break ; }
drivers/gpu/drm/amd/display/include/dal_asic_id.h +2 -1
@@ -211,7 +211,8 @@ enum {#ifndef ASICREV_IS_GREEN_SARDINE #define ASICREV_IS_GREEN_SARDINE (eChipRev) ((eChipRev >= GREEN_SARDINE_A0) && (eChipRev < 0xFF))#endif -#define DEVICE_ID_NV_13FE 0x13FE // CYAN_SKILLFISH +#define DEVICE_ID_NV_NAVI10_LITE_P_13FE 0x13FE // CYAN_SKILLFISH +#define DEVICE_ID_NV_NAVI10_LITE_P_143F 0x143F // ROBIN+#define FAMILY_VGH 144#define DEVICE_ID_VGH_163F 0x163F#define VANGOGH_A0 0x01
Signature · 1 line
2.25.1
PATCH 5/13 drm/amd/display: remove static from optc31_set_drr
In reply to Jasdeep DhillonFrom: Eric Bernstein <[email protected]>
remove static from optc31_set_drr
--- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c +1 -1
@@ -161,7 +161,7 @@ static bool optc31_immediate_disable_crtc(struct timing_generator *optc)return true; } -static void optc31_set_drr ( +void optc31_set_drr (struct timing_generator *optc,const struct drr_params *params) {
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.h +2 -0
@@ -256,4 +256,6 @@void dcn31_timing_generator_init (struct optc *optc1); +void optc31_set_drr (struct timing_generator *optc,const struct drr_params *params); +#endif /* __DC_OPTC_DCN31_H__ */
Signature · 1 line
2.25.1