DC Patches Nov 2nd, 2020
cover DC Patches Nov 2nd, 2020
This DC patchset brings improvements in multiple areas. In summary, we have:
* DC 3.2.110
* Firmware release 0.0.40
* Enable CRC calculation on specific frame region
* Bug fixes on GSL, recout calculation, missing pflip irq and more.
---
Alvin Lee (2):
drm/amd/display: Keep GSL for full updates with planes that flip VSYNC drm/amd/display: Reset flip_immediate to topmost plane
Anthony Koo (2):
drm/amd/display: [FW Promotion] Release 0.0.39
drm/amd/display: [FW Promotion] Release 0.0.40
Aric Cyr (2):
drm/amd/display: 3.2.109
drm/amd/display: 3.2.110
Ashley Thomas (1):
drm/amd/display: fail instead of div by zero/bugcheck
Bhawanpreet Lakha (1):
drm/amd/display: Add missing pflip irq
Chris Park (1):
drm/amd/display: Update panel register
Dale Zhao (1):
drm/amd/display: WA to ensure MUX chip gets SUPPORTED_LINK_RATES of
eDP
Dmytro Laktyushkin (1):
drm/amd/display: fix recout calculation for left side clip
Eryk Brol (1):
drm/amd/display: Update connector on DSC property change
Hugo Hu (1):
drm/amd/display: correct eDP T9 delay
Isabel Zhang (1):
drm/amd/display: Force prefetch mode to 0
Jacky Liao (2):
drm/amd/display: Add MPC memory shutdown support for DCN3 drm/amd/display: Add OPTC memory low power support
Jake Wang (1):
drm/amd/display: set hdcp1 wa re-auth delay to 200ms
Joshua Aberback (3):
drm/amd/display: Blank HUBP during pixel data blank for DCN30 drm/amd/display: Blank HUBP during pixel data blank for DCN30 v2 drm/amd/display: Revert HUBP blank behaviour for now
Lewis Huang (1):
drm/amd/display: stop top_mgr when type change to non-MST during s3
Tao.Huang (1):
drm/amd/display: Fix compilation error
Victor Lu (1):
drm/amd/display: Do not warn NULL dc_sink if forcing connector
Wayne Lin (1):
drm/amd/display: Calculate CRC on specific frame region
Yongqiang Sun (1):
drm/amd/display: only check available pipe to disable vbios mode.
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 + .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 +- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 124 ++++++++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc.c | 21 ++- .../gpu/drm/amd/display/dc/core/dc_debug.c | 2 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 12 ++ .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 72 +++++----- .../drm/amd/display/dc/core/dc_link_hwss.c | 13 +- .../gpu/drm/amd/display/dc/core/dc_resource.c | 4 + drivers/gpu/drm/amd/display/dc/dc.h | 11 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 + .../gpu/drm/amd/display/dc/dce/dce_hwseq.h | 12 +- .../display/dc/dce110/dce110_hw_sequencer.c | 16 +-- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 42 +++++- .../drm/amd/display/dc/dcn20/dcn20_hwseq.h | 9 ++ .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + .../drm/amd/display/dc/dcn21/dcn21_resource.c | 4 +- .../gpu/drm/amd/display/dc/dcn30/dcn30_dpp.h | 2 +- .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 18 +++ .../drm/amd/display/dc/dcn30/dcn30_hwseq.h | 8 ++ .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 1 + .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 56 +++++++- .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.h | 9 ++ .../amd/display/dc/dcn302/dcn302_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c | 6 +- drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h | 4 +- .../gpu/drm/amd/display/dc/inc/core_status.h | 1 + .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 8 ++ .../gpu/drm/amd/display/dc/inc/link_hwss.h | 1 + .../display/dc/irq/dcn30/irq_service_dcn30.c | 4 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 11 +- .../display/modules/hdcp/hdcp1_transition.c | 2 +- 34 files changed, 418 insertions(+), 72 deletions(-)
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/25 drm/amd/display: Fix compilation error
From: "Tao.Huang" <[email protected]>
[Why]
The C standard does not specify whether an enum is signed or unsigned. In the function prototype, one of the argument is defined as an enum but its declaration was unit32_t. Fix this by changing the function argument to enum in the declaration.
--- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.h | 2 +- drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.h +1 -1
@@ -585,7 +585,7 @@ void dpp3_cm_set_gamut_remap( const struct dpp_grph_csc_adjustment *adjust);void dpp3_set_pre_degam (struct dpp *dpp_base, -uint32_t degamma_lut_selection); +enum dc_transfer_func_predefined tr); void dpp3_set_cursor_attributes( struct dpp *dpp_base,
drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c +3 -3
@@ -51,7 +51,7 @@ static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc,const struct qp_entry *table =0L ;// alias enum -enum { min =MM_MIN , max =MM_MAX }; +enum { min =DAL_MM_MIN , max =DAL_MM_MAX };switch (sel) {TABLE_CASE (444 ,8 , max);TABLE_CASE (444 ,8 , min);
@@ -233,8 +233,8 @@ static void _do_calc_rc_params(struct rc_params *rc, enum colour_mode cm, rc->flatness_max_qp = ((bpc ==BPC_8 ) ? (12 ) : ((bpc ==BPC_10 ) ? (16 ) : (20 ))) - ((minor_version ==1 && cm ==CM_444 ) ?1 :0 ); rc->flatness_det_thresh =2 << (bpc -8 ); -get_qp_set (rc->qp_min, cm, bpc,MM_MIN , bpp); -get_qp_set (rc->qp_max, cm, bpc,MM_MAX , bpp); +get_qp_set (rc->qp_min, cm, bpc,DAL_MM_MIN , bpp); +get_qp_set (rc->qp_max, cm, bpc,DAL_MM_MAX , bpp);if (cm ==CM_444 && minor_version ==1 ) {for (i =0 ; i <QP_SET_SIZE ; ++i) { rc->qp_min[i] = rc->qp_min[i] >0 ? rc->qp_min[i] -1 :0 ;
drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h +2 -2
@@ -66,8 +66,8 @@ enum bits_per_comp { };enum max_min { -MM_MIN =0 , -MM_MAX =1 +DAL_MM_MIN =0 , +DAL_MM_MAX =1 };struct qp_entry {
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/25 drm/amd/display: Add MPC memory shutdown support for DCN3
In reply to Qingqing ZhuoFrom: Jacky Liao <[email protected]>
[Why]
The MPC memory blocks in DCN3 should be powered down completely when they are not in use. This will reduce power consumption.
[How]
This commits changes behaviour for dcn3 and does the following:
1. Write to MPC_RMU<X>_LOW_PWR_MODE and MPCC_OGAM_MEM_LOW_PWR_MODE to automatically shut down memory when not in use
2. mpc3_power_on_shaper_3dlut and mpc3_power_on_ogam_lut are called to disable force power on when configuration finishes
3. Added a debug option to allow this behaviour to be turned off
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 56 ++++++++++++++++++- .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.h | 9 +++ 3 files changed, 63 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -506,6 +506,7 @@ struct dc_debug_options {bool disable_dsc;bool enable_dram_clock_change_one_display_vactive;bool force_ignore_link_settings; + bool enable_mpc_mem_powerdown: 1; };struct dc_debug_data {
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c +53 -3
106 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.h +9 -0
@@ -300,6 +300,7 @@SF (MPCC0_MPCC_STATUS ,MPCC_DISABLED , mask_sh),\SF (MPCC0_MPCC_MEM_PWR_CTRL ,MPCC_OGAM_MEM_PWR_FORCE , mask_sh),\SF (MPCC0_MPCC_MEM_PWR_CTRL ,MPCC_OGAM_MEM_PWR_DIS , mask_sh),\ +SF (MPCC0_MPCC_MEM_PWR_CTRL ,MPCC_OGAM_MEM_PWR_STATE , mask_sh),\SF (MPC_OUT0_DENORM_CONTROL ,MPC_OUT_DENORM_MODE , mask_sh),\SF (MPC_OUT0_DENORM_CONTROL ,MPC_OUT_DENORM_CLAMP_MAX_R_CR , mask_sh),\ SF(MPC_OUT0_DENORM_CONTROL, MPC_OUT_DENORM_CLAMP_MIN_R_CR, mask_sh),\
@@ -406,6 +407,8 @@SF (MPCC0_MPCC_STATUS ,MPCC_DISABLED , mask_sh),\SF (MPCC0_MPCC_MEM_PWR_CTRL ,MPCC_OGAM_MEM_PWR_FORCE , mask_sh),\SF (MPCC0_MPCC_MEM_PWR_CTRL ,MPCC_OGAM_MEM_PWR_DIS , mask_sh),\ +SF (MPCC0_MPCC_MEM_PWR_CTRL ,MPCC_OGAM_MEM_LOW_PWR_MODE , mask_sh),\ +SF (MPCC0_MPCC_MEM_PWR_CTRL ,MPCC_OGAM_MEM_PWR_STATE , mask_sh),\SF (MPC_OUT0_DENORM_CONTROL ,MPC_OUT_DENORM_MODE , mask_sh),\SF (MPC_OUT0_DENORM_CONTROL ,MPC_OUT_DENORM_CLAMP_MAX_R_CR , mask_sh),\ SF(MPC_OUT0_DENORM_CONTROL, MPC_OUT_DENORM_CLAMP_MIN_R_CR, mask_sh),\
@@ -492,10 +495,12 @@SF (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU0_MEM_PWR_DIS , mask_sh),\SF (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU0_SHAPER_MEM_PWR_STATE , mask_sh),\SF (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU0_3DLUT_MEM_PWR_STATE , mask_sh),\ +SF (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU0_MEM_LOW_PWR_MODE , mask_sh),\SF (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU1_MEM_PWR_FORCE , mask_sh),\SF (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU1_MEM_PWR_DIS , mask_sh),\SF (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU1_SHAPER_MEM_PWR_STATE , mask_sh),\SF (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU1_3DLUT_MEM_PWR_STATE , mask_sh),\ +SF (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU1_MEM_LOW_PWR_MODE , mask_sh),\SF (MPC_RMU0_SHAPER_CONTROL ,MPC_RMU_SHAPER_MODE_CURRENT , mask_sh),\SF (CUR_VUPDATE_LOCK_SET0 ,CUR_VUPDATE_LOCK_SET , mask_sh)
@@ -519,10 +524,12 @@type MPC_RMU1_MUX_STATUS ; \type MPC_RMU0_MEM_PWR_FORCE ;\type MPC_RMU0_MEM_PWR_DIS ;\ +type MPC_RMU0_MEM_LOW_PWR_MODE ;\type MPC_RMU0_SHAPER_MEM_PWR_STATE ;\type MPC_RMU0_3DLUT_MEM_PWR_STATE ;\type MPC_RMU1_MEM_PWR_FORCE ;\type MPC_RMU1_MEM_PWR_DIS ;\ +type MPC_RMU1_MEM_LOW_PWR_MODE ;\type MPC_RMU1_SHAPER_MEM_PWR_STATE ;\type MPC_RMU1_3DLUT_MEM_PWR_STATE ;\type MPCC_OGAM_RAMA_EXP_REGION_START_SLOPE_B ; \
@@ -541,6 +548,8 @@type MPCC_OGAM_LUT_CONFIG_MODE ; \type MPCC_OGAM_LUT_STATUS ; \type MPCC_OGAM_RAMA_START_BASE_CNTL_B ;\ +type MPCC_OGAM_MEM_LOW_PWR_MODE ;\ +type MPCC_OGAM_MEM_PWR_STATE ;\type MPC_RMU_3DLUT_MODE ; \type MPC_RMU_3DLUT_SIZE ; \type MPC_RMU_3DLUT_MODE_CURRENT ; \
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/25 drm/amd/display: only check available pipe to disable vbios mode.
In reply to Qingqing ZhuoFrom: Yongqiang Sun <[email protected]>
[Why & How]
1. only need to check first ODM pipe.
2. Only need to check eDP which is on.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +5 -1
@@ -861,12 +861,16 @@ static void disable_vbios_mode_if_required(if (stream ==NULL )continue ; +// only looking for first odm pipe +if (pipe->prev_odm_pipe) +continue ; +if (stream->link->local_sink && stream->link->local_sink->sink_signal ==SIGNAL_TYPE_EDP ) { link = stream->link; } -if (link !=NULL ) { +if (link !=NULL && link->link_enc->funcs->is_dig_enabled (link->link_enc)) {unsigned int enc_inst, tg_inst =0 ;unsigned int pix_clk_100hz;
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/25 drm/amd/display: Force prefetch mode to 0
In reply to Qingqing ZhuoFrom: Isabel Zhang <[email protected]>
[Why]
On APU should be always using prefetch mode 0. Currently, sometimes prefetch mode 1 is being used causing system to hard hang due to minTTUVBlank being too low.
[How]
Any ASIC running DCN21 will by default allow self refresh and mclk switch. This sets both min and max prefetch mode to 0 by default.
--- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +3 -1
@@ -301,7 +301,9 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = { .xfc_bus_transport_time_us = 4, .xfc_xbuf_latency_tolerance_us = 4, .use_urgent_burst_bw = 1, - .num_states = 8 + .num_states = 8, + .allow_dram_self_refresh_or_dram_clock_change_in_vblank + = dm_allow_self_refresh_and_mclk_switch };#ifndef MAX
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/25 drm/amd/display: Keep GSL for full updates with planes that flip VSYNC
In reply to Qingqing ZhuoFrom: Alvin Lee <[email protected]>
[Why]
When enabling PIP in Heaven, the PIP planes are VSYNC flip and is also the top-most pipe. In this case GSL will be disabled because we only check immediate flip for the top pipe. However, the desktop planes are still flip immediate so we should at least keep GSL on until the full update.
[How]
Check each pipe in the tree to see if any planes are flip immediate. Maintain the GSL lock if yes, and take it down after when unlocking if any planes are flipping VSYNC. Keeping GSL on with VSYNC + flip immediate planes causes corruption.
--- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +19 -0
@@ -1158,6 +1158,7 @@ void dcn20_pipe_control_lock( struct pipe_ctx *pipe, bool lock) { +struct pipe_ctx *temp_pipe;bool flip_immediate = false;/* use TG master update lock to lock everything on the TG
@@ -1169,6 +1170,13 @@ void dcn20_pipe_control_lock(if (pipe->plane_state !=NULL ) flip_immediate = pipe->plane_state->flip_immediate; + temp_pipe = pipe->bottom_pipe; +while (!flip_immediate && temp_pipe) { +if (temp_pipe->plane_state !=NULL ) + flip_immediate = temp_pipe->plane_state->flip_immediate; + temp_pipe = temp_pipe->bottom_pipe; + } +if (flip_immediate && lock) {const int TIMEOUT_FOR_FLIP_PENDING =100000 ;int i;
@@ -1196,6 +1204,17 @@ void dcn20_pipe_control_lock( (!flip_immediate && pipe->stream_res.gsl_group > 0))dcn20_setup_gsl_group_as_lock (dc, pipe, flip_immediate); + temp_pipe = pipe->bottom_pipe; +while (flip_immediate && temp_pipe) { +if (temp_pipe->plane_state !=NULL ) + flip_immediate = temp_pipe->plane_state->flip_immediate; + temp_pipe = temp_pipe->bottom_pipe; + } + +if (!lock && pipe->stream_res.gsl_group >0 && pipe->plane_state && + !flip_immediate) +dcn20_setup_gsl_group_as_lock (dc, pipe, false); +if (pipe->stream &&should_use_dmub_lock (pipe->stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/25 drm/amd/display: [FW Promotion] Release 0.0.39
In reply to Qingqing ZhuoFrom: 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
@@ -36,10 +36,10 @@/* Firmware versioning. */ #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0x8aafc9acc +#define DMUB_FW_VERSION_GIT_HASH 0x26ad601d9#define DMUB_FW_VERSION_MAJOR 0#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 38 +#define DMUB_FW_VERSION_REVISION 39#define DMUB_FW_VERSION_TEST 0#define DMUB_FW_VERSION_VBIOS 0#define DMUB_FW_VERSION_HOTFIX 0
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/25 drm/amd/display: stop top_mgr when type change to non-MST during s3
In reply to Qingqing ZhuoFrom: Lewis Huang <[email protected]>
[Why]
Driver keeps the invalid information cause report the incorrect monitor which save in remote sink to OS
[How]
When connector type change from MST to non-MST, stop the topology manager.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +8 -0
@@ -854,6 +854,7 @@ static bool dc_link_detect_helper(struct dc_link *link,struct dpcd_caps prev_dpcd_caps;bool same_dpcd = true;enum dc_connection_type new_connection_type = dc_connection_none; +enum dc_connection_type pre_connection_type = dc_connection_none;bool perform_dp_seamless_boot = false;const uint32_t post_oui_delay =30 ;// 30ms
@@ -889,6 +890,7 @@ static bool dc_link_detect_helper(struct dc_link *link,link_disconnect_sink (link);if (new_connection_type != dc_connection_none) { + pre_connection_type = link->type; link->type = new_connection_type; link->link_state_valid = false;
@@ -962,6 +964,12 @@ static bool dc_link_detect_helper(struct dc_link *link,return true; } +// link switch from MST to non-MST stop topology manager +if (pre_connection_type == dc_connection_mst_branch && + link->type != dc_connection_mst_branch) { +dm_helpers_dp_mst_stop_top_mgr (link->ctx, link); + } +if (link->type == dc_connection_mst_branch) {LINK_INFO ("link=%d, mst branch is now Connected\n" , link->link_index);
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/25 drm/amd/display: Blank HUBP during pixel data blank for DCN30
In reply to Qingqing ZhuoFrom: Joshua Aberback <[email protected]>
[Why]
There are some timings for which we support p-state switching in active, but not in blank. There was a previous issue where a timing that had active-only support would hang a p-state request when we were in an extended blanking period. The workaround for that issue was to block active-only p-state switching, but that resulted in a lack of p-state support for some common timings such as 1440p60. We want to fix that issue properly by un-blocking p-state requests while the display is blanked, so that we can re-enable active-only p-state switching.
[How]
- new version of blank_pixel_data for DCN30
- call hubp->set_blank from dcn30_blank_pixel_data
- blank every hubp in the mpcc tree, and odm tree
- on blank enable, wait until the next frame before blanking HUBP
--- .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 83 +++++++++++++++++++ .../drm/amd/display/dc/dcn30/dcn30_hwseq.h | 2 + .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 2 +- .../dc/dml/dcn30/display_mode_vba_30.c | 2 +- 4 files changed, 87 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +83 -0
@@ -794,3 +794,86 @@ void dcn30_hardware_release(struct dc *dc) dc->res_pool->hubbub->funcs->force_pstate_change_control ( dc->res_pool->hubbub, true, true); } + +void dcn30_blank_pixel_data (struct dc *dc,struct pipe_ctx *pipe_ctx,bool blank) +{ +struct tg_color black_color = {0 }; +struct stream_resource *stream_res = &pipe_ctx->stream_res; +struct dc_stream_state *stream = pipe_ctx->stream; +enum dc_color_space color_space = stream->output_color_space; +enum controller_dp_test_pattern test_pattern =CONTROLLER_DP_TEST_PATTERN_SOLID_COLOR ; +enum controller_dp_color_space test_pattern_color_space =CONTROLLER_DP_COLOR_SPACE_UDEFINED ; +struct pipe_ctx *odm_pipe; +struct pipe_ctx *mpcc_pipe; +int odm_cnt =1 ; + +int width = stream->timing.h_addressable + stream->timing.h_border_left + stream->timing.h_border_right; +int height = stream->timing.v_addressable + stream->timing.v_border_bottom + stream->timing.v_border_top; + +if (stream->link->test_pattern_enabled) +return ; + +/* get opp dpg blank color */ +color_space_to_black_color (dc, color_space, &black_color); + +for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) + odm_cnt++; + + width = width / odm_cnt; + +if (blank) { + dc->hwss.set_abm_immediate_disable (pipe_ctx); + +if (dc->debug.visual_confirm !=VISUAL_CONFIRM_DISABLE ) { + test_pattern =CONTROLLER_DP_TEST_PATTERN_COLORSQUARES ; + test_pattern_color_space =CONTROLLER_DP_COLOR_SPACE_RGB ; + } + }else { + test_pattern =CONTROLLER_DP_TEST_PATTERN_VIDEOMODE ; + } + + stream_res->opp->funcs->opp_set_disp_pattern_generator ( + stream_res->opp, + test_pattern, + test_pattern_color_space, + stream->timing.display_color_depth, + &black_color, + width, + height, +0 ); + +/* wait for the next frame when enabling DPG */ +if (blank && stream_res->tg->funcs->is_tg_enabled (stream_res->tg)) + dc->hwseq->funcs.wait_for_blank_complete (pipe_ctx->stream_res.opp); + +/* Blank HUBP to allow p-state during blank on all timings */ + pipe_ctx->plane_res.hubp->funcs->set_blank (pipe_ctx->plane_res.hubp, blank); +for (mpcc_pipe = pipe_ctx->bottom_pipe; mpcc_pipe; mpcc_pipe = mpcc_pipe->bottom_pipe) + mpcc_pipe->plane_res.hubp->funcs->set_blank (mpcc_pipe->plane_res.hubp, blank); + +for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) { + odm_pipe->stream_res.opp->funcs->opp_set_disp_pattern_generator ( + odm_pipe->stream_res.opp, + dc->debug.visual_confirm !=VISUAL_CONFIRM_DISABLE && blank ? +CONTROLLER_DP_TEST_PATTERN_COLORRAMP : test_pattern, + test_pattern_color_space, + stream->timing.display_color_depth, + &black_color, + width, + height, +0 ); + +if (blank && stream_res->tg->funcs->is_tg_enabled (stream_res->tg)) + dc->hwseq->funcs.wait_for_blank_complete (pipe_ctx->stream_res.opp); + + odm_pipe->plane_res.hubp->funcs->set_blank (odm_pipe->plane_res.hubp, blank); +for (mpcc_pipe = odm_pipe->bottom_pipe; mpcc_pipe; mpcc_pipe = mpcc_pipe->bottom_pipe) + mpcc_pipe->plane_res.hubp->funcs->set_blank (mpcc_pipe->plane_res.hubp, blank); + } + +if (!blank) +if (stream_res->abm) { + dc->hwss.set_pipe (pipe_ctx); + stream_res->abm->funcs->set_abm_level (stream_res->abm, stream->abm_level); + } +}
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.h +2 -0
@@ -69,4 +69,6 @@ bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable);void dcn30_hardware_release (struct dc *dc); +void dcn30_blank_pixel_data (struct dc *dc,struct pipe_ctx *pipe_ctx,bool blank); +#endif /* __DC_HWSS_DCN30_H__ */
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c +1 -1
@@ -106,7 +106,7 @@ static const struct hwseq_private_funcs dcn30_private_funcs = { .set_output_transfer_func = dcn30_set_output_transfer_func, .power_down = dce110_power_down, .enable_display_power_gating = dcn10_dummy_display_power_gating, - .blank_pixel_data = dcn20_blank_pixel_data, + .blank_pixel_data = dcn30_blank_pixel_data, .reset_hw_ctx_wrap = dcn20_reset_hw_ctx_wrap, .enable_stream_timing = dcn20_enable_stream_timing, .edp_backlight_control = dce110_edp_backlight_control,
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +1 -1
@@ -5558,7 +5558,7 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport( } } -if (mode_lib->vba.MinActiveDRAMClockChangeMargin >0 && PrefetchMode ==0 ) { +if (mode_lib->vba.MinActiveDRAMClockChangeMargin >0 ) { *DRAMClockChangeSupport = dm_dram_clock_change_vactive; }else if (((mode_lib->vba.SynchronizedVBlank == true || mode_lib->vba.TotalNumberOfActiveOTG ==1 || SecondMinActiveDRAMClockChangeMarginOneDisplayInVBLank >0 ) && PrefetchMode ==0 )) { *DRAMClockChangeSupport = dm_dram_clock_change_vblank;
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/25 drm/amd/display: 3.2.109
In reply to Qingqing ZhuoFrom: 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
@@ -42,7 +42,7 @@#include "inc/hw/dmcu.h" #include "dml/display_mode_lib.h" -#define DC_VER "3.2.108" +#define DC_VER "3.2.109"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/25 drm/amd/display: fail instead of div by zero/bugcheck
In reply to Qingqing ZhuoFrom: Ashley Thomas <[email protected]>
[why]
If pbn_per_slot is 0, fail instead of dividing by zero and bugchecking.
[how]
Check for zero divisor before division operation.
--- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++++ drivers/gpu/drm/amd/display/dc/inc/core_status.h | 1 + 3 files changed, 7 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_debug.c +2 -0
@@ -420,6 +420,8 @@ char *dc_status_to_str(enum dc_status status)return "Fail clk below required CFG (hard_min in PPLIB)" ;case DC_NOT_SUPPORTED :return "The operation is not supported." ; +case DC_UNSUPPORTED_VALUE : +return "The value specified is not supported." ;case DC_ERROR_UNEXPECTED :return "Unexpected error" ; }
drivers/gpu/drm/amd/display/dc/core/dc_link.c +4 -0
@@ -2951,6 +2951,10 @@ enum dc_status dc_link_allocate_mst_payload(struct pipe_ctx *pipe_ctx)/* slot X.Y for only current stream */ pbn_per_slot =get_pbn_per_slot (stream); +if (pbn_per_slot.value ==0 ) { +DC_LOG_ERROR ("Failure: pbn_per_slot==0 not allowed. Cannot continue, returning DC_UNSUPPORTED_VALUE.\n" ); +return DC_UNSUPPORTED_VALUE ; + } pbn =get_pbn_from_timing (pipe_ctx); avg_time_slots_per_mtp =dc_fixpt_div (pbn, pbn_per_slot);
drivers/gpu/drm/amd/display/dc/inc/core_status.h +1 -0
@@ -51,6 +51,7 @@ enum dc_status {DC_FAIL_CLK_BELOW_CFG_REQUIRED =23 ,/*THIS IS hard_min in PPLIB*/ DC_NOT_SUPPORTED =24 , +DC_UNSUPPORTED_VALUE =25 , DC_ERROR_UNEXPECTED = -1 };
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/25 drm/amd/display: Update panel register
In reply to Qingqing ZhuoFrom: Chris Park <[email protected]>
[Why]
Incorrect panel register settings are
applied for power sequence because the
register macro is not defined in resource.
[How]
Implement same register space to future
resource files.
--- drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +1 -1
@@ -967,7 +967,7 @@ static const struct encoder_feature_support link_enc_feature = { [id] = {\LE_DCN3_REG_LIST (id), \UNIPHY_DCN2_REG_LIST (phyid), \ -DPCS_DCN2_REG_LIST (id), \ +SRI (DP_DPHY_INTERNAL_CTRL ,DP , id) \ } static const struct dcn10_link_enc_registers link_enc_regs[] = {
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/25 drm/amd/display: Add OPTC memory low power support
In reply to Qingqing ZhuoFrom: Jacky Liao <[email protected]>
[Why]
The OPTC memory blocks should be powered down when they are not in use. This will reduce power consumption.
[How]
1. Set ODM_MEM_UNASSIGNED_PWR_MODE to shutdown memory when unassigned
2. Set ODM_MEM_VBLANK_PWR_MODE to light sleep mode when in vblank
3. Added a debug option to allow this behaviour to be turned off
4. Restructured debug options to use a bitfield in a way that's more clear
--- drivers/gpu/drm/amd/display/dc/dc.h | 10 +++++++++- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 12 ++++++++++-- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 14 +++++++------- 4 files changed, 32 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +9 -1
@@ -414,6 +414,14 @@ struct dc_bw_validation_profile { } \ } +union mem_low_power_enable_options { +struct { +bool mpc:1 ; +bool optc:1 ; + } bits; +uint32_t u32All; +}; +struct dc_debug_options {enum visual_confirm visual_confirm;bool sanity_checks;
@@ -506,7 +514,7 @@ struct dc_debug_options {bool disable_dsc;bool enable_dram_clock_change_one_display_vactive;bool force_ignore_link_settings; - bool enable_mpc_mem_powerdown: 1; +union mem_low_power_enable_options enable_mem_low_power; };struct dc_debug_data {
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h +10 -2
@@ -607,6 +607,10 @@ struct dce_hwseq_registers {uint32_t MC_VM_XGMI_LFB_CNTL ;uint32_t AZALIA_AUDIO_DTO ;uint32_t AZALIA_CONTROLLER_CLOCK_GATING ; +#if defined(CONFIG_DRM_AMD_DC_DCN3_0 ) +uint32_t HPO_TOP_CLOCK_CONTROL ; +uint32_t ODM_MEM_PWR_CTRL3 ; +#endif };/* set field name */ #define HWS_SF (blk_name, reg_name, field_name, post_fix)\
@@ -845,7 +849,9 @@ struct dce_hwseq_registers {#if defined(CONFIG_DRM_AMD_DC_DCN3_0 )#define HWSEQ_DCN30_MASK_SH_LIST (mask_sh)\ HWSEQ_DCN2_MASK_SH_LIST(mask_sh), \ - HWS_SF(, AZALIA_AUDIO_DTO, AZALIA_AUDIO_DTO_MODULE, mask_sh) + HWS_SF(, AZALIA_AUDIO_DTO, AZALIA_AUDIO_DTO_MODULE, mask_sh), \ + HWS_SF(, ODM_MEM_PWR_CTRL3, ODM_MEM_UNASSIGNED_PWR_MODE, mask_sh), \ + HWS_SF(, ODM_MEM_PWR_CTRL3, ODM_MEM_VBLANK_PWR_MODE, mask_sh)#endif #if defined(CONFIG_DRM_AMD_DC_DCN3_01 )
@@ -1059,7 +1065,9 @@ struct dce_hwseq_registers {type D2VGA_MODE_ENABLE ; \type D3VGA_MODE_ENABLE ; \type D4VGA_MODE_ENABLE ; \ -type AZALIA_AUDIO_DTO_MODULE ; +type AZALIA_AUDIO_DTO_MODULE ; \ +type ODM_MEM_UNASSIGNED_PWR_MODE ; \ +type ODM_MEM_VBLANK_PWR_MODE ;#if defined(CONFIG_DRM_AMD_DC_DCN3_0 )#define HWSEQ_DCN3_REG_FIELD_LIST (type) \
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +6 -0
@@ -462,6 +462,12 @@ void dcn30_init_hw(struct dc *dc) hws->funcs.disable_vga (dc->hwseq); } +// Set default OPTC memory power states +if (dc->debug.enable_mem_low_power.bits.optc) { +// Shutdown when unassigned and light sleep in VBLANK +REG_SET_2 (ODM_MEM_PWR_CTRL3 ,0 ,ODM_MEM_UNASSIGNED_PWR_MODE ,3 ,ODM_MEM_VBLANK_PWR_MODE ,1 ); + } +if (dc->ctx->dc_bios->fw_info_valid) { res_pool->ref_clocks.xtalin_clock_inKhz = dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c +7 -7
@@ -143,7 +143,7 @@ static void mpc3_power_on_ogam_lut( {struct dcn30_mpc *mpc30 =TO_DCN30_MPC (mpc); -if (mpc->ctx->dc->debug.enable_mpc_mem_powerdown) { +if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc) {// Force power on REG_UPDATE (MPCC_MEM_PWR_CTRL [mpcc_id],MPCC_OGAM_MEM_PWR_DIS , power_on == true ?1 :0 );// Wait for confirmation when powering on
@@ -369,7 +369,7 @@ void mpc3_set_output_gamma(REG_UPDATE (MPCC_OGAM_CONTROL [mpcc_id],MPCC_OGAM_SELECT , next_mode ==LUT_RAM_A ?0 :1 ); -if (mpc->ctx->dc->debug.enable_mpc_mem_powerdown) +if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc)mpc3_power_on_ogam_lut (mpc, mpcc_id, false); }
@@ -818,7 +818,7 @@ static void mpc3_power_on_shaper_3dlut(REG_SET (MPC_RMU_MEM_PWR_CTRL ,0 ,MPC_RMU0_MEM_PWR_DIS , power_on == true ?1 :0 );/* wait for memory to fully power up */ -if (power_on && mpc->ctx->dc->debug.enable_mpc_mem_powerdown) { +if (power_on && mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc) {REG_WAIT (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU0_SHAPER_MEM_PWR_STATE ,0 ,1 , max_retries);REG_WAIT (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU0_3DLUT_MEM_PWR_STATE ,0 ,1 , max_retries); }
@@ -829,7 +829,7 @@ static void mpc3_power_on_shaper_3dlut( }else if (rmu_idx ==1 ) {REG_SET (MPC_RMU_MEM_PWR_CTRL ,0 ,MPC_RMU1_MEM_PWR_DIS , power_on == true ?1 :0 ); -if (power_on && mpc->ctx->dc->debug.enable_mpc_mem_powerdown) { +if (power_on && mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc) {REG_WAIT (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU1_SHAPER_MEM_PWR_STATE ,0 ,1 , max_retries);REG_WAIT (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU1_3DLUT_MEM_PWR_STATE ,0 ,1 , max_retries); }
@@ -862,7 +862,7 @@ bool mpc3_program_shaper(return false; } -if (mpc->ctx->dc->debug.enable_mpc_mem_powerdown) +if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc)mpc3_power_on_shaper_3dlut (mpc, rmu_idx, true); current_mode =mpc3_get_shaper_current (mpc, rmu_idx);
@@ -1223,7 +1223,7 @@ bool mpc3_program_3dlut(mpc3_set_3dlut_mode (mpc, mode, is_12bits_color_channel, is_17x17x17, rmu_idx); -if (mpc->ctx->dc->debug.enable_mpc_mem_powerdown) +if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc)mpc3_power_on_shaper_3dlut (mpc, rmu_idx, false);return true;
@@ -1386,7 +1386,7 @@ static void mpc3_mpc_init(struct mpc *mpc)mpc1_mpc_init (mpc); -if (mpc->ctx->dc->debug.enable_mpc_mem_powerdown) { +if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc) {if (mpc30->mpc_mask->MPC_RMU0_MEM_LOW_PWR_MODE && mpc30->mpc_mask->MPC_RMU1_MEM_LOW_PWR_MODE) {REG_UPDATE (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU0_MEM_LOW_PWR_MODE ,3 );REG_UPDATE (MPC_RMU_MEM_PWR_CTRL ,MPC_RMU1_MEM_LOW_PWR_MODE ,3 );
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/25 drm/amd/display: correct eDP T9 delay
In reply to Qingqing ZhuoFrom: Hugo Hu <[email protected]>
[Why]
The current end of T9 delay is relay on polling sink status by DPCD. But the polling for sink status change after NoVideoStream_flag set to 0.
[How]
Add function edp_add_delay_for_T9 to add T9 delay. Move the sink status polling after blank.
--- .../gpu/drm/amd/display/dc/core/dc_link_hwss.c | 13 ++++++++----- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 16 ++++++++-------- drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 1 + 3 files changed, 17 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +8 -5
@@ -156,6 +156,13 @@ void dp_enable_link_phy(dp_receiver_power_ctrl (link, true); } +void edp_add_delay_for_T9 (struct dc_link *link) +{ +if (link->local_sink && + link->local_sink->edid_caps.panel_patch.extra_delay_backlight_off >0 ) +udelay (link->local_sink->edid_caps.panel_patch.extra_delay_backlight_off *1000 ); +} +bool edp_receiver_ready_T9 (struct dc_link *link) {unsigned int tries =0 ;
@@ -165,7 +172,7 @@ bool edp_receiver_ready_T9(struct dc_link *link) result =core_link_read_dpcd (link,DP_EDP_DPCD_REV , &edpRev,sizeof (edpRev)); -/* start from eDP version 1.2, SINK_STAUS indicate the sink is ready.*/ +/* start from eDP version 1.2, SINK_STAUS indicate the sink is ready.*/ if (result ==DC_OK && edpRev >=DP_EDP_12 ) { do { sinkstatus = 1;
@@ -178,10 +185,6 @@ bool edp_receiver_ready_T9(struct dc_link *link) }while (++tries <50 ); } -if (link->local_sink && - link->local_sink->edid_caps.panel_patch.extra_delay_backlight_off >0 ) -udelay (link->local_sink->edid_caps.panel_patch.extra_delay_backlight_off *1000 ); -return result; }bool edp_receiver_ready_T7 (struct dc_link *link)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +8 -8
@@ -992,8 +992,6 @@ void dce110_edp_backlight_control(link_transmitter_control (ctx->dc_bios, &cntl); - -if (enable && link->dpcd_sink_ext_caps.bits.oled)msleep (OLED_POST_T7_DELAY );
@@ -1004,7 +1002,7 @@ void dce110_edp_backlight_control(/*edp 1.2*/ if (cntl.action ==TRANSMITTER_CONTROL_BACKLIGHT_OFF ) -edp_receiver_ready_T9 (link); +edp_add_delay_for_T9 (link);if (!enable && link->dpcd_sink_ext_caps.bits.oled)msleep (OLED_PRE_T11_DELAY );
@@ -1145,12 +1143,14 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)if (dc_is_dp_signal (pipe_ctx->stream->signal)) { pipe_ctx->stream_res.stream_enc->funcs->dp_blank (pipe_ctx->stream_res.stream_enc); -/* -* After output is idle pattern some sinks need time to recognize the stream -* has changed or they enter protection state and hang. -*/ -if (!dc_is_embedded_signal (pipe_ctx->stream->signal)) +if (!dc_is_embedded_signal (pipe_ctx->stream->signal)) { +/* +* After output is idle pattern some sinks need time to recognize the stream +* has changed or they enter protection state and hang. +*/ msleep (60 ); + }else if (pipe_ctx->stream->signal ==SIGNAL_TYPE_EDP ) +edp_receiver_ready_T9 (link); } }
drivers/gpu/drm/amd/display/dc/inc/link_hwss.h +1 -0
@@ -51,6 +51,7 @@ void dp_enable_link_phy( const struct dc_link_settings *link_settings);void dp_receiver_power_ctrl (struct dc_link *link,bool on); +void edp_add_delay_for_T9 (struct dc_link *link);bool edp_receiver_ready_T9 (struct dc_link *link);bool edp_receiver_ready_T7 (struct dc_link *link);
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/25 drm/amd/display: Update connector on DSC property change
In reply to Qingqing ZhuoFrom: Eryk Brol <[email protected]>
[Why]
We want to trigger atomic check on connector when
DSC debugfs properties are changed. The previous
method was reverted because it accessed connector
properties unsafely and would also heavily
impact performance.
[How]
Add a flag for forcing DSC update in CRTC state and add connector to the state if the flag is set.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 124 ++++++++++++++++++ 3 files changed, 130 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -1
@@ -8773,6 +8773,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,enum dc_status status;int ret, i;bool lock_and_validation_needed = false; +struct dm_crtc_state *dm_old_crtc_state;trace_amdgpu_dm_atomic_check_begin (state);
@@ -8815,9 +8816,12 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, }#endif for_each_oldnew_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { + dm_old_crtc_state =to_dm_crtc_state (old_crtc_state); +if (!drm_atomic_crtc_needs_modeset (new_crtc_state) && !new_crtc_state->color_mgmt_changed && - old_crtc_state->vrr_enabled == new_crtc_state->vrr_enabled) + old_crtc_state->vrr_enabled == new_crtc_state->vrr_enabled && + dm_old_crtc_state->dsc_force_changed == false)continue ;if (!new_crtc_state->enable)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +1 -0
@@ -440,6 +440,7 @@ struct dm_crtc_state {bool freesync_timing_changed;bool freesync_vrr_info_changed; +bool dsc_force_changed;bool vrr_supported;struct mod_freesync_config freesync_config;struct dc_info_packet vrr_infopacket;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +124 -0
192 lines not on this page · raw message
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/25 drm/amd/display: Reset flip_immediate to topmost plane
In reply to Qingqing ZhuoFrom: Alvin Lee <[email protected]>
[Why]
When checking if we want to disable GSL or not, we should reset flip_immediate to be the flip type of the topmost plane before looping through the other planes.
[How]
Set flip_immediate to be the flip type of the topmost plane before looping through the other planes.
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +3 -0
@@ -1204,6 +1204,9 @@ void dcn20_pipe_control_lock( (!flip_immediate && pipe->stream_res.gsl_group > 0))dcn20_setup_gsl_group_as_lock (dc, pipe, flip_immediate); +if (pipe->plane_state !=NULL ) + flip_immediate = pipe->plane_state->flip_immediate; + temp_pipe = pipe->bottom_pipe;while (flip_immediate && temp_pipe) {if (temp_pipe->plane_state !=NULL )
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/25 drm/amd/display: Blank HUBP during pixel data blank for DCN30 v2
In reply to Qingqing ZhuoFrom: Joshua Aberback <[email protected]>
[Why]
Prior commit "Blank HUBP during pixel data blank for DCN30" missed the call to set_disp_pattern_generator from set_crtc_test_pattern, which re-exposed the issue for which we initially blocked active-only p-state switching.
[How]
- remove dcn30_blank_pixel_data, set dcn30 back to dcn20 version
- new hwss funciton set_disp_pattern_generator
- dcn20 version just calls opp_set_disp_pattern_generator
- dcn30 version implements the HUBP blank
--- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 62 ++++++------ .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 20 +++- .../drm/amd/display/dc/dcn20/dcn20_hwseq.h | 9 ++ .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 96 +++++-------------- .../drm/amd/display/dc/dcn30/dcn30_hwseq.h | 8 +- .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 3 +- .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 8 ++ 9 files changed, 100 insertions(+), 108 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +32 -30
@@ -3848,7 +3848,7 @@ static void set_crtc_test_pattern(struct dc_link *link,if (pipe_ctx->stream_res.tg->funcs->set_test_pattern) pipe_ctx->stream_res.tg->funcs->set_test_pattern (pipe_ctx->stream_res.tg, controller_test_pattern, color_depth); -else if (opp->funcs->opp_set_disp_pattern_generator) { +else if (link->dc->hwss.set_disp_pattern_generator) {struct pipe_ctx *odm_pipe;enum controller_dp_color_space controller_color_space;int opp_cnt =1 ;
@@ -3878,26 +3878,29 @@ static void set_crtc_test_pattern(struct dc_link *link, dpg_width = width / opp_cnt; offset = dpg_width; - opp->funcs->opp_set_disp_pattern_generator (opp, - controller_test_pattern, - controller_color_space, - color_depth, -NULL , - dpg_width, - height, -0 ); - -for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) { -struct output_pixel_processor *odm_opp = odm_pipe->stream_res.opp; - odm_opp->funcs->opp_program_bit_depth_reduction (odm_opp, ¶ms); - odm_opp->funcs->opp_set_disp_pattern_generator (odm_opp, + link->dc->hwss.set_disp_pattern_generator (link->dc, + pipe_ctx, controller_test_pattern, controller_color_space, color_depth,NULL , dpg_width, height, - offset); +0 ); + +for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) { +struct output_pixel_processor *odm_opp = odm_pipe->stream_res.opp; + + odm_opp->funcs->opp_program_bit_depth_reduction (odm_opp, ¶ms); + link->dc->hwss.set_disp_pattern_generator (link->dc, + odm_pipe, + controller_test_pattern, + controller_color_space, + color_depth, +NULL , + dpg_width, + height, + offset); offset += offset; } }
@@ -3913,7 +3916,7 @@ static void set_crtc_test_pattern(struct dc_link *link, pipe_ctx->stream_res.tg->funcs->set_test_pattern (pipe_ctx->stream_res.tg,CONTROLLER_DP_TEST_PATTERN_VIDEOMODE , color_depth); - else if (opp->funcs->opp_set_disp_pattern_generator) { + else if (link->dc->hwss.set_disp_pattern_generator) {struct pipe_ctx *odm_pipe;int opp_cnt =1 ;int dpg_width = width;
@@ -3926,7 +3929,18 @@ static void set_crtc_test_pattern(struct dc_link *link,struct output_pixel_processor *odm_opp = odm_pipe->stream_res.opp; odm_opp->funcs->opp_program_bit_depth_reduction (odm_opp, ¶ms); - odm_opp->funcs->opp_set_disp_pattern_generator(odm_opp, + link->dc->hwss.set_disp_pattern_generator (link->dc, + odm_pipe, +CONTROLLER_DP_TEST_PATTERN_VIDEOMODE , +CONTROLLER_DP_COLOR_SPACE_UDEFINED , + color_depth, +NULL , + dpg_width, + height, +0 ); + } + link->dc->hwss.set_disp_pattern_generator(link->dc, + pipe_ctx, CONTROLLER_DP_TEST_PATTERN_VIDEOMODE, CONTROLLER_DP_COLOR_SPACE_UDEFINED, color_depth,
@@ -3934,15 +3948,6 @@ static void set_crtc_test_pattern(struct dc_link *link, dpg_width, height, 0); - } - opp->funcs->opp_set_disp_pattern_generator (opp, -CONTROLLER_DP_TEST_PATTERN_VIDEOMODE , -CONTROLLER_DP_COLOR_SPACE_UDEFINED , - color_depth, -NULL , - dpg_width, - height, -0 ); } }break ;
@@ -3977,10 +3982,7 @@ bool dc_link_dp_set_test_pattern( } } -/* Reset CRTC Test Pattern if it is currently running and request -* is VideoMode Reset DP Phy Test Pattern if it is currently running -* and request is VideoMode -*/ +/* Reset CRTC Test Pattern if it is currently running and request is VideoMode */ if (link->test_pattern_enabled && test_pattern ==DP_TEST_PATTERN_VIDEO_MODE ) {/* Set CRTC Test Pattern */
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +16 -4
@@ -1030,8 +1030,8 @@ void dcn20_blank_pixel_data( test_pattern =CONTROLLER_DP_TEST_PATTERN_VIDEOMODE ; } - stream_res->opp->funcs->opp_set_disp_pattern_generator( - stream_res->opp, + dc->hwss.set_disp_pattern_generator(dc, + pipe_ctx, test_pattern, test_pattern_color_space, stream->timing.display_color_depth,
@@ -1041,8 +1041,8 @@ void dcn20_blank_pixel_data( 0);for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) { - odm_pipe->stream_res.opp->funcs->opp_set_disp_pattern_generator( - odm_pipe->stream_res.opp, + dc->hwss.set_disp_pattern_generator(dc, + odm_pipe, dc->debug.visual_confirm != VISUAL_CONFIRM_DISABLE && blank ? CONTROLLER_DP_TEST_PATTERN_COLORRAMP : test_pattern, test_pattern_color_space,
@@ -2569,3 +2569,15 @@ bool dcn20_optimize_timing_for_fsft(struct dc *dc, return true; }#endif + +void dcn20_set_disp_pattern_generator (const struct dc *dc, +struct pipe_ctx *pipe_ctx, +enum controller_dp_test_pattern test_pattern, +enum controller_dp_color_space color_space, +enum dc_color_depth color_depth, +const struct tg_color *solid_color, +int width,int height,int offset) +{ + pipe_ctx->stream_res.opp->funcs->opp_set_disp_pattern_generator (pipe_ctx->stream_res.opp, test_pattern, + color_space, color_depth, solid_color, width, height, offset); +}
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h +9 -0
@@ -137,5 +137,14 @@ bool dcn20_optimize_timing_for_fsft(struct dc *dc,struct dc_crtc_timing *timing, unsigned int max_input_rate_in_khz);#endif + +void dcn20_set_disp_pattern_generator (const struct dc *dc, +struct pipe_ctx *pipe_ctx, +enum controller_dp_test_pattern test_pattern, +enum controller_dp_color_space color_space, +enum dc_color_depth color_depth, +const struct tg_color *solid_color, +int width,int height,int offset); +#endif /* __DC_HWSS_DCN20_H__ */
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c +1 -0
@@ -93,6 +93,7 @@ static const struct hw_sequencer_funcs dcn20_funcs = { #ifndef TRIM_FSFT .optimize_timing_for_fsft = dcn20_optimize_timing_for_fsft, #endif + .set_disp_pattern_generator = dcn20_set_disp_pattern_generator, }; static const struct hwseq_private_funcs dcn20_private_funcs = {
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c +1 -0
@@ -98,6 +98,7 @@ static const struct hw_sequencer_funcs dcn21_funcs = { .optimize_timing_for_fsft = dcn20_optimize_timing_for_fsft, #endif .is_abm_supported = dcn21_is_abm_supported, + .set_disp_pattern_generator = dcn20_set_disp_pattern_generator, }; static const struct hwseq_private_funcs dcn21_private_funcs = {
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +24 -72
109 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.h +7 -1
@@ -69,6 +69,12 @@ bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable);void dcn30_hardware_release (struct dc *dc); -void dcn30_blank_pixel_data (struct dc *dc,struct pipe_ctx *pipe_ctx,bool blank); +void dcn30_set_disp_pattern_generator (const struct dc *dc, +struct pipe_ctx *pipe_ctx, +enum controller_dp_test_pattern test_pattern, +enum controller_dp_color_space color_space, +enum dc_color_depth color_depth, +const struct tg_color *solid_color, +int width,int height,int offset);#endif /* __DC_HWSS_DCN30_H__ */
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c +2 -1
@@ -95,6 +95,7 @@ static const struct hw_sequencer_funcs dcn30_funcs = { .set_abm_immediate_disable = dcn21_set_abm_immediate_disable, .hardware_release = dcn30_hardware_release, .set_pipe = dcn21_set_pipe, + .set_disp_pattern_generator = dcn30_set_disp_pattern_generator, };static const struct hwseq_private_funcs dcn30_private_funcs = {
@@ -106,7 +107,7 @@ static const struct hwseq_private_funcs dcn30_private_funcs = { .set_output_transfer_func = dcn30_set_output_transfer_func, .power_down = dce110_power_down, .enable_display_power_gating = dcn10_dummy_display_power_gating, - .blank_pixel_data = dcn30_blank_pixel_data, + .blank_pixel_data = dcn20_blank_pixel_data, .reset_hw_ctx_wrap = dcn20_reset_hw_ctx_wrap, .enable_stream_timing = dcn20_enable_stream_timing, .edp_backlight_control = dce110_edp_backlight_control,
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +8 -0
@@ -223,6 +223,14 @@ struct hw_sequencer_funcs {bool (*is_abm_supported)(struct dc *dc,struct dc_state *context,struct dc_stream_state *stream); + +void (*set_disp_pattern_generator)(const struct dc *dc, +struct pipe_ctx *pipe_ctx, +enum controller_dp_test_pattern test_pattern, +enum controller_dp_color_space color_space, +enum dc_color_depth color_depth, +const struct tg_color *solid_color, +int width,int height,int offset); }; void color_space_to_black_color(
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/25 drm/amd/display: Do not warn NULL dc_sink if forcing connector
In reply to Qingqing ZhuoFrom: Victor Lu <[email protected]>
[why]
There is a DRM_ERROR when the dc_sink is NULL and there should not be this warning when the connector is forced.
[how]
Do not warn if dc_sink is NULL if the connector
is forced.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -1
@@ -5485,7 +5485,8 @@ enum drm_mode_status amdgpu_dm_connector_mode_valid(struct drm_connector *connec dc_sink =to_amdgpu_dm_connector (connector)->dc_sink; -if (dc_sink ==NULL ) { +if (dc_sink ==NULL && aconnector->base.force !=DRM_FORCE_ON_DIGITAL && + aconnector->base.force !=DRM_FORCE_ON ) {DRM_ERROR ("dc_sink is NULL!\n" ); goto fail; }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 18/25 drm/amd/display: Calculate CRC on specific frame region
In reply to Qingqing ZhuoFrom: Wayne Lin <[email protected]>
[why]
Currently, we only support calculating CRC on whole frame. We want to extend the capability to calculate CRC on specific frame area.
[how]
Calculate CRC on specific area once it's specified from the input parameter.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 15 +++++++++++++-- drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +1 -1
@@ -115,7 +115,7 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc,/* Enable CRTC CRC generation if necessary. */ if (dm_is_crc_source_crtc (source)) {if (!dc_stream_configure_crc (stream_state->ctx->dc, - stream_state, enable, enable)) { + stream_state,NULL , enable, enable)) { ret = -EINVAL ; goto unlock; }
drivers/gpu/drm/amd/display/dc/core/dc.c +13 -2
@@ -346,7 +346,7 @@ bool dc_stream_get_crtc_position(struct dc *dc,* calculate the crc. */ bool dc_stream_configure_crc (struct dc *dc,struct dc_stream_state *stream, -bool enable,bool continuous) +struct crc_params *crc_window,bool enable,bool continuous) {int i;struct pipe_ctx *pipe;
@@ -362,7 +362,7 @@ bool dc_stream_configure_crc(struct dc *dc, struct dc_stream_state *stream,if (i ==MAX_PIPES )return false; -/* Always capture the full frame */ +/* By default, capture the full frame */ param.windowa_x_start =0 ; param.windowa_y_start =0 ; param.windowa_x_end = pipe->stream->timing.h_addressable;
@@ -372,6 +372,17 @@ bool dc_stream_configure_crc(struct dc *dc, struct dc_stream_state *stream, param.windowb_x_end = pipe->stream->timing.h_addressable; param.windowb_y_end = pipe->stream->timing.v_addressable; +if (crc_window) { + param.windowa_x_start = crc_window->windowa_x_start; + param.windowa_y_start = crc_window->windowa_y_start; + param.windowa_x_end = crc_window->windowa_x_end; + param.windowa_y_end = crc_window->windowa_y_end; + param.windowb_x_start = crc_window->windowb_x_start; + param.windowb_y_start = crc_window->windowb_y_start; + param.windowb_x_end = crc_window->windowb_x_end; + param.windowb_y_end = crc_window->windowb_y_end; + } + param.dsc_mode = pipe->stream->timing.flags.DSC ?1 :0 ; param.odm_mode = pipe->next_odm_pipe ?1 :0 ;
drivers/gpu/drm/amd/display/dc/dc_stream.h +1 -0
@@ -457,6 +457,7 @@ bool dc_stream_get_crtc_position(struct dc *dc,bool dc_stream_configure_crc (struct dc *dc,struct dc_stream_state *stream, +struct crc_params *crc_window,bool enable,bool continuous);
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 19/25 drm/amd/display: WA to ensure MUX chip gets SUPPORTED_LINK_RATES of eDP
In reply to Qingqing ZhuoFrom: Dale Zhao <[email protected]>
[Why]
Customer make a request to add this WA by driver.
Some MUX chips will power down with eDP 1.4 panel and lose previous supported link rates(DPCD 0x010) in customer's hybrid-GPU designs. As a result, during sleep resuming and screen turns on from idle, link training will be performed incorrectly and eDP will flicker or black screen. These MUX chips need source to read DPCD 0x010 again during LKT so that it can restore supported link rates of panel.
For driver side, supported link rate set is fetched when link detection, no need to update but just read again as WA.
[How]
Read DPCD 0x010 again during link training for eDP 1.4.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +10 -0
@@ -183,6 +183,16 @@ static void dpcd_set_link_settings(if (link->dpcd_caps.dpcd_rev.raw >=DPCD_REV_14 && lt_settings->link_settings.use_link_rate_set == true) { rate =0 ; +/* WA for some MUX chips that will power down with eDP and lose supported +* link rate set for eDP 1.4. Source reads DPCD 0x010 again to ensure +* MUX chip gets link rate set back before link training. +*/ +if (link->connector_signal ==SIGNAL_TYPE_EDP ) { +uint8_t supported_link_rates[16 ]; + +core_link_read_dpcd (link,DP_SUPPORTED_LINK_RATES , + supported_link_rates,sizeof (supported_link_rates)); + }core_link_write_dpcd (link,DP_LINK_BW_SET , &rate,1 );core_link_write_dpcd (link,DP_LINK_RATE_SET , <_settings->link_settings.link_rate_set,1 );
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 20/25 drm/amd/display: Revert HUBP blank behaviour for now
In reply to Qingqing ZhuoFrom: Joshua Aberback <[email protected]>
[Why]
Commit "Blank HUBP during pixel data blank for DCN30 v2" modifies HW behaviour during blank, which might have OS dependencies. We need to assess the impact on amdgpu_dm and only re-enable HUBP blanking when all necessary changes are understood.
[How]
- revert functional changes
- leave architectural changes intact
--- .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 27 ++----------------- .../dc/dml/dcn30/display_mode_vba_30.c | 2 +- 2 files changed, 3 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +2 -25
@@ -809,29 +809,6 @@ void dcn30_set_disp_pattern_generator(const struct dc *dc,const struct tg_color *solid_color, int width, int height, int offset) { - struct stream_resource *stream_res = &pipe_ctx->stream_res; -struct pipe_ctx *mpcc_pipe; - -if (test_pattern !=CONTROLLER_DP_TEST_PATTERN_VIDEOMODE ) { -/* turning on DPG */ - stream_res->opp->funcs->opp_set_disp_pattern_generator (stream_res->opp, test_pattern, color_space, - color_depth, solid_color, width, height,0 ); - -/* wait for the next frame when enabling DPG */ -if (stream_res->tg->funcs->is_tg_enabled (stream_res->tg)) - dc->hwseq->funcs.wait_for_blank_complete (stream_res->opp); - -/* Blank HUBP to allow p-state during blank on all timings */ - pipe_ctx->plane_res.hubp->funcs->set_blank (pipe_ctx->plane_res.hubp, true); -for (mpcc_pipe = pipe_ctx->bottom_pipe; mpcc_pipe; mpcc_pipe = mpcc_pipe->bottom_pipe) - mpcc_pipe->plane_res.hubp->funcs->set_blank (mpcc_pipe->plane_res.hubp, true); - }else { -/* turning off DPG */ - pipe_ctx->plane_res.hubp->funcs->set_blank (pipe_ctx->plane_res.hubp, false); -for (mpcc_pipe = pipe_ctx->bottom_pipe; mpcc_pipe; mpcc_pipe = mpcc_pipe->bottom_pipe) - mpcc_pipe->plane_res.hubp->funcs->set_blank (mpcc_pipe->plane_res.hubp, false); - - stream_res->opp->funcs->opp_set_disp_pattern_generator (stream_res->opp, test_pattern, color_space, - color_depth, solid_color, width, height,0 ); - } + pipe_ctx->stream_res.opp->funcs->opp_set_disp_pattern_generator(pipe_ctx->stream_res.opp, test_pattern, + color_space, color_depth, solid_color, width, height, 0); }
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +1 -1
@@ -5558,7 +5558,7 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport( } } -if (mode_lib->vba.MinActiveDRAMClockChangeMargin >0 ) { +if (mode_lib->vba.MinActiveDRAMClockChangeMargin >0 && PrefetchMode ==0 ) { *DRAMClockChangeSupport = dm_dram_clock_change_vactive; }else if (((mode_lib->vba.SynchronizedVBlank == true || mode_lib->vba.TotalNumberOfActiveOTG ==1 || SecondMinActiveDRAMClockChangeMarginOneDisplayInVBLank >0 ) && PrefetchMode ==0 )) { *DRAMClockChangeSupport = dm_dram_clock_change_vblank;
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 21/25 drm/amd/display: set hdcp1 wa re-auth delay to 200ms
In reply to Qingqing ZhuoFrom: Jake Wang <[email protected]>
[Why]
Fail and restart timing for HDCP1 retry occurs too quickly. This would cause some MST monitors to show black screen.
[How]
Adjusted timing of fail and restart to 200ms.
--- drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_transition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_transition.c +1 -1
@@ -231,7 +231,7 @@ enum mod_hdcp_status mod_hdcp_hdcp1_dp_transition(struct mod_hdcp *hdcp,fail_and_restart_in_ms (0 , &status, output);break ; }else if (conn->hdcp1_retry_count < conn->link.adjust.hdcp1.min_auth_retries_wa) { -fail_and_restart_in_ms (0 , &status, output); +fail_and_restart_in_ms (200 , &status, output);break ; }if (conn->is_repeater) {
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 22/25 drm/amd/display: Add missing pflip irq
In reply to Qingqing ZhuoFrom: Bhawanpreet Lakha <[email protected]>
If we have more than 4 displays we will run
into dummy irq calls or flip timout issues.
--- drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c +2 -2
@@ -306,8 +306,8 @@ irq_source_info_dcn30[DAL_IRQ_SOURCES_NUMBER] = {pflip_int_entry (1 ),pflip_int_entry (2 ),pflip_int_entry (3 ), - [DC_IRQ_SOURCE_PFLIP5] = dummy_irq_entry(), - [DC_IRQ_SOURCE_PFLIP6] = dummy_irq_entry(), +pflip_int_entry (4 ), + pflip_int_entry(5), [DC_IRQ_SOURCE_PFLIP_UNDERLAY0 ] =dummy_irq_entry (),gpio_pad_int_entry (0 ), gpio_pad_int_entry(1),
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 23/25 drm/amd/display: [FW Promotion] Release 0.0.40
In reply to Qingqing ZhuoFrom: Anthony Koo <[email protected]>
[Header Changes]
- Add command for retrieving PSR residency
- Add command for forcing PSR static
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +9 -2
@@ -36,10 +36,10 @@/* Firmware versioning. */ #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0x26ad601d9 +#define DMUB_FW_VERSION_GIT_HASH 0x9f0af34af#define DMUB_FW_VERSION_MAJOR 0#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 39 +#define DMUB_FW_VERSION_REVISION 40#define DMUB_FW_VERSION_TEST 0#define DMUB_FW_VERSION_VBIOS 0#define DMUB_FW_VERSION_HOTFIX 0
@@ -274,6 +274,7 @@ enum dmub_gpint_command {* ARGS: Stream mask, 1 bit per active stream index. */ DMUB_GPINT__IDLE_OPT_NOTIFY_STREAM_MASK =8 , + DMUB_GPINT__PSR_RESIDENCY = 9, };//==============================================================================
@@ -583,6 +584,7 @@ enum dmub_cmd_psr_type {DMUB_CMD__PSR_ENABLE =2 ,DMUB_CMD__PSR_DISABLE =3 ,DMUB_CMD__PSR_SET_LEVEL =4 , + DMUB_CMD__PSR_FORCE_STATIC = 5, }; enum psr_version {
@@ -643,6 +645,10 @@ struct dmub_rb_cmd_psr_set_version {struct dmub_cmd_psr_set_version_data psr_set_version_data; }; +struct dmub_rb_cmd_psr_force_static { +struct dmub_cmd_header header; +}; + union dmub_hw_lock_flags { struct { uint8_t lock_pipe : 1;
@@ -800,6 +806,7 @@ union dmub_rb_cmd {struct dmub_rb_cmd_psr_copy_settings psr_copy_settings;struct dmub_rb_cmd_psr_enable psr_enable;struct dmub_rb_cmd_psr_set_level psr_set_level; +struct dmub_rb_cmd_psr_force_static psr_force_static;struct dmub_rb_cmd_PLAT_54186_wa PLAT_54186_wa;struct dmub_rb_cmd_mall mall;struct dmub_rb_cmd_abm_set_pipe abm_set_pipe;
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 24/25 drm/amd/display: 3.2.110
In reply to Qingqing ZhuoFrom: 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
@@ -42,7 +42,7 @@#include "inc/hw/dmcu.h" #include "dml/display_mode_lib.h" -#define DC_VER "3.2.109" +#define DC_VER "3.2.110"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 25/25 drm/amd/display: fix recout calculation for left side clip
In reply to Qingqing ZhuoFrom: Dmytro Laktyushkin <[email protected]>
Recout calculation does not corrrectly handle plane clip rect that extends beyond the left most border of stream source rect. This change adds handling by truncating the invisible clip rect.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +4 -0
@@ -825,6 +825,8 @@ static void calculate_recout(struct pipe_ctx *pipe_ctx) }else data->recout.x =0 ; +if (stream->src.x > surf_clip.x) + surf_clip.width -= stream->src.x - surf_clip.x; data->recout.width = surf_clip.width * stream->dst.width / stream->src.width;if (data->recout.width + data->recout.x > stream->dst.x + stream->dst.width) data->recout.width = stream->dst.x + stream->dst.width - data->recout.x;
@@ -833,6 +835,8 @@ static void calculate_recout(struct pipe_ctx *pipe_ctx)if (stream->src.y < surf_clip.y) data->recout.y += (surf_clip.y - stream->src.y) * stream->dst.height / stream->src.height; +else if (stream->src.y > surf_clip.y) + surf_clip.height -= stream->src.y - surf_clip.y; data->recout.height = surf_clip.height * stream->dst.height / stream->src.height;if (data->recout.height + data->recout.y > stream->dst.y + stream->dst.height)
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx