DC patches for Aug 2, 2021
Subsystems (3)
cover DC patches for Aug 2, 2021
Its a small set of changes this week for DC. In summary, we have:
* DC version 3.2.147
* LTTPR, MPO Improvements
* General stability and bug fixes
--
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.77
Aric Cyr (1):
drm/amd/display: 3.2.147
Bing Guo (2):
drm/amd/display: Fix Dynamic bpp issue with 8K30 with Navi 1X drm/amd/display: Increase stutter watermark for dcn303
Jaehyun Chung (1):
drm/amd/display: Add check for validating unsupported ODM plus MPO
case
Jude Shih (1):
drm/amd/display: Fix resetting DCN3.1 HW when resuming from S4
Qingqing Zhuo (1):
drm/amd/display: workaround for hard hang on HPD on native DP
Roman Li (1):
drm/amd/display: Remove redundant vblank workqueues in DM
Wesley Chalmers (1):
drm/amd/display: Assume LTTPR interop for DCN31+
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++----- .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 4 +++- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 21 ++----------------- .../gpu/drm/amd/display/dc/core/dc_resource.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dc.h | 4 +++- .../gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 2 +- .../drm/amd/display/dc/dcn30/dcn30_resource.c | 20 ++++++++++++++++++ .../amd/display/dc/dcn303/dcn303_resource.c | 4 ++-- .../drm/amd/display/dc/dcn31/dcn31_resource.c | 16 ++++++++++++++ .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 ++-- .../gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 8 ++++--- 11 files changed, 61 insertions(+), 35 deletions(-)
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/9 drm/amd/display: Assume LTTPR interop for DCN31+
From: Wesley Chalmers <[email protected]>
[WHY]
For DCN31 onward, LTTPR is to be enabled and set to Transparent by VBIOS. Driver is to assume that VBIOS has done this without needing to check the VBIOS interop bit.
[HOW]
Add LTTPR enable and interop VBIOS bits into dc->caps, and force-set the interop bit to true for DCN31+.
--- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 21 ++----------------- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ .../drm/amd/display/dc/dcn30/dcn30_resource.c | 20 ++++++++++++++++++ .../drm/amd/display/dc/dcn31/dcn31_resource.c | 16 ++++++++++++++ 4 files changed, 40 insertions(+), 19 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +2 -19
@@ -3595,29 +3595,12 @@ static bool dpcd_read_sink_ext_caps(struct dc_link *link)bool dp_retrieve_lttpr_cap (struct dc_link *link) {uint8_t lttpr_dpcd_data[6 ]; -bool vbios_lttpr_enable = false; -bool vbios_lttpr_interop = false; -struct dc_bios *bios = link->dc->ctx->dc_bios; +bool vbios_lttpr_enable = link->dc->caps.vbios_lttpr_enable; +bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware;enum dc_status status =DC_ERROR_UNEXPECTED ;bool is_lttpr_present = false;memset (lttpr_dpcd_data,'\0' ,sizeof (lttpr_dpcd_data)); -/* Query BIOS to determine if LTTPR functionality is forced on by system */ -if (bios->funcs->get_lttpr_caps) { -enum bp_result bp_query_result; -uint8_t is_vbios_lttpr_enable =0 ; - - bp_query_result = bios->funcs->get_lttpr_caps (bios, &is_vbios_lttpr_enable); - vbios_lttpr_enable = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_lttpr_enable; - } - -if (bios->funcs->get_lttpr_interop) { -enum bp_result bp_query_result; -uint8_t is_vbios_interop_enabled =0 ; - - bp_query_result = bios->funcs->get_lttpr_interop (bios, &is_vbios_interop_enabled); - vbios_lttpr_interop = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_interop_enabled; - }/* * Logic to determine LTTPR mode
drivers/gpu/drm/amd/display/dc/dc.h +2 -0
@@ -183,6 +183,8 @@ struct dc_caps {unsigned int cursor_cache_size;struct dc_plane_cap planes[MAX_PLANES ];struct dc_color_caps color; +bool vbios_lttpr_aware; +bool vbios_lttpr_enable; };struct dc_bug_wa {
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +20 -0
@@ -2617,6 +2617,26 @@ static bool dcn30_resource_construct( dc->caps.color.mpc.ogam_rom_caps.hlg =0 ; dc->caps.color.mpc.ocsc =1 ; +/* read VBIOS LTTPR caps */ + { +if (ctx->dc_bios->funcs->get_lttpr_caps) { +enum bp_result bp_query_result; +uint8_t is_vbios_lttpr_enable =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps (ctx->dc_bios, &is_vbios_lttpr_enable); + dc->caps.vbios_lttpr_enable = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_lttpr_enable; + } + +if (ctx->dc_bios->funcs->get_lttpr_interop) { +enum bp_result bp_query_result; +uint8_t is_vbios_interop_enabled =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop (ctx->dc_bios, + &is_vbios_interop_enabled); + dc->caps.vbios_lttpr_aware = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_interop_enabled; + } + } +if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) dc->debug = debug_defaults_drv;else if (dc->ctx->dce_environment ==DCE_ENV_FPGA_MAXIMUS ) {
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c +16 -0
@@ -1967,6 +1967,22 @@ static bool dcn31_resource_construct( dc->caps.color.mpc.ogam_rom_caps.hlg =0 ; dc->caps.color.mpc.ocsc =1 ; +/* read VBIOS LTTPR caps */ + { +if (ctx->dc_bios->funcs->get_lttpr_caps) { +enum bp_result bp_query_result; +uint8_t is_vbios_lttpr_enable =0 ; + + bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps (ctx->dc_bios, &is_vbios_lttpr_enable); + dc->caps.vbios_lttpr_enable = (bp_query_result ==BP_RESULT_OK ) && !!is_vbios_lttpr_enable; + } + +/* interop bit is implicit */ + { + dc->caps.vbios_lttpr_aware = true; + } + } +if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) dc->debug = debug_defaults_drv;else if (dc->ctx->dce_environment ==DCE_ENV_FPGA_MAXIMUS ) {
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/9 drm/amd/display: Fix Dynamic bpp issue with 8K30 with Navi 1X
In reply to Aurabindo PillaiFrom: Bing Guo <[email protected]>
Why:
In DCN2x, HW doesn't automatically divide MASTER_UPDATE_LOCK_DB_X by the number of pipes ODM Combined.
How:
Set MASTER_UPDATE_LOCK_DB_X to the value that is adjusted by the number of pipes ODM Combined.
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c +1 -1
@@ -464,7 +464,7 @@ void optc2_lock_doublebuffer_enable(struct timing_generator *optc)REG_UPDATE_2 (OTG_GLOBAL_CONTROL1 ,MASTER_UPDATE_LOCK_DB_X , - h_blank_start -200 -1 , + (h_blank_start -200 -1 ) / optc1->opp_count,MASTER_UPDATE_LOCK_DB_Y , v_blank_start -1 ); }
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/9 drm/amd/display: Increase stutter watermark for dcn303
In reply to Aurabindo PillaiFrom: Bing Guo <[email protected]>
[Why&How]
Hardware team suggested to use SRExitTime= 35.5us as w/a to prevent underflow in certain modes.
--- drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c +2 -2
@@ -146,8 +146,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_03_soc = { .min_dcfclk = 500.0, /* TODO: set this to actual min DCFCLK */ .num_states = 1, - .sr_exit_time_us = 26.5, - .sr_enter_plus_exit_time_us = 31, + .sr_exit_time_us = 35.5, + .sr_enter_plus_exit_time_us = 40, .urgent_latency_us = 4.0, .urgent_latency_pixel_data_only_us = 4.0, .urgent_latency_pixel_mixed_with_vm_data_us = 4.0,
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/9 drm/amd/display: Remove redundant vblank workqueues in DM
In reply to Aurabindo PillaiFrom: Roman Li <[email protected]>
[Why]
Display Manager initializes array of vblank workqueues, but only 1 is used.
[How]
Use single instance init instead of array.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -6
@@ -1066,19 +1066,15 @@ static void event_mall_stutter(struct work_struct *work)static struct vblank_workqueue *vblank_create_workqueue (struct amdgpu_device *adev,struct dc *dc) { - -int max_caps = dc->caps.max_links;struct vblank_workqueue *vblank_work; -int i =0 ; - vblank_work =kcalloc (max_caps,sizeof (*vblank_work),GFP_KERNEL ); + vblank_work =kzalloc (sizeof (*vblank_work),GFP_KERNEL );if (ZERO_OR_NULL_PTR (vblank_work)) {kfree (vblank_work);return NULL ; } -for (i =0 ; i < max_caps; i++) -INIT_WORK (&vblank_work[i].mall_work, event_mall_stutter); +INIT_WORK (&vblank_work->mall_work, event_mall_stutter);return vblank_work; }
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/9 drm/amd/display: Fix resetting DCN3.1 HW when resuming from S4
In reply to Aurabindo PillaiFrom: Jude Shih <[email protected]>
[Why] On S4 resume we also need to fix detection of when to reload DMCUB firmware because we're currently using the VBIOS version which isn't compatible with the driver version.
[How] Update the hardware init check for DCN31 since it's the ASIC that has this issue.
--- drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +5 -3
@@ -270,11 +270,13 @@ void dmub_dcn31_set_outbox1_rptr(struct dmub_srv *dmub, uint32_t rptr_offset)bool dmub_dcn31_is_hw_init (struct dmub_srv *dmub) { -uint32_t is_hw_init; +union dmub_fw_boot_status status; +uint32_t is_enable; -REG_GET (DMCUB_CNTL ,DMCUB_ENABLE , &is_hw_init); + status.all =REG_READ (DMCUB_SCRATCH0 ); +REG_GET (DMCUB_CNTL ,DMCUB_ENABLE , &is_enable); -return is_hw_init !=0 ; +return is_enable !=0 && status.bits.dal_fw; }bool dmub_dcn31_is_supported (struct dmub_srv *dmub)
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/9 drm/amd/display: Add check for validating unsupported ODM plus MPO case
In reply to Aurabindo PillaiFrom: Jaehyun Chung <[email protected]>
[Why]
We do not currently support ODM plus MPO on only one side of the screen. This unsupported case causes validation calculations to divide by zero due to invalid viewport values.
[How]
Add stopgap for the validation of ODM plus MPO on one side of screen case.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +5 -0
@@ -1051,6 +1051,11 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)/* depends on scaling ratios and recout, does not calculate offset yet */ calculate_viewport_size (pipe_ctx); +/* Stopgap for validation of ODM + MPO on one side of screen case */ +if (pipe_ctx->plane_res.scl_data.viewport.height <1 || + pipe_ctx->plane_res.scl_data.viewport.width <1 ) +return false; +/* * LB calculations depend on vp size, h/v_active and scaling ratios * Setting line buffer pixel depth to 24bpp yields banding
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/9 drm/amd/display: workaround for hard hang on HPD on native DP
In reply to Aurabindo PillaiFrom: Qingqing Zhuo <[email protected]>
[Why]
HPD disable and enable sequences are not mutually exclusive on Linux. For HPDs that spans over 1s (i.e. HPD low = 1s), part of the disable sequence (specifically, a request to SMU to lower refclk) could come right before the call to PHY enable, causing DMUB to access an unresponsive PHY and thus a hard hang on the system.
[How]
Disable 48mhz refclk off on native DP.
--- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c +3 -1
@@ -66,9 +66,11 @@ int rn_get_active_display_cnt_wa(for (i =0 ; i < context->stream_count; i++) {const struct dc_stream_state *stream = context->streams[i]; +/* Extend the WA to DP for Linux*/ if (stream->signal ==SIGNAL_TYPE_HDMI_TYPE_A || stream->signal ==SIGNAL_TYPE_DVI_SINGLE_LINK || - stream->signal ==SIGNAL_TYPE_DVI_DUAL_LINK ) + stream->signal ==SIGNAL_TYPE_DVI_DUAL_LINK || + stream->signal ==SIGNAL_TYPE_DISPLAY_PORT ) tmds_present = true; }
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/9 drm/amd/display: [FW Promotion] Release 0.0.77
In reply to Aurabindo PillaiFrom: Anthony Koo <[email protected]>
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +2 -2
@@ -47,10 +47,10 @@/* Firmware versioning. */ #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0xe599e0896 +#define DMUB_FW_VERSION_GIT_HASH 0x6d13d5e2c#define DMUB_FW_VERSION_MAJOR 0#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 76 +#define DMUB_FW_VERSION_REVISION 77#define DMUB_FW_VERSION_TEST 0#define DMUB_FW_VERSION_VBIOS 0#define DMUB_FW_VERSION_HOTFIX 0
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/9 drm/amd/display: 3.2.147
In reply to Aurabindo PillaiFrom: Aric Cyr <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -45,7 +45,7 @@/* forward declaration */ struct aux_payload ; -#define DC_VER "3.2.146" +#define DC_VER "3.2.147"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 6 lines
2.32.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx