DC Patches July 29, 2020
Subsystems (5)
cover DC Patches July 29, 2020
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Fixes in DP Compliance, ABM, and others;
* Enhancements in DSC;
* Improvements in FSFT, DCN, and others.
Alvin Lee (1):
drm/amd/display: Don't compare dppclk before updating DTO
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.26
Aric Cyr (2):
drm/amd/display: 3.2.96
drm/amd/display: Fix DP Compliance tests 4.3.2.1 and 4.3.2.2
Dmytro Laktyushkin (1):
drm/amd/display: Clean up global sync param retrieval
Eryk Brol (4):
drm/amd/display: Rename bytes_pp to the correct bits_pp drm/amd/display: Fix naming of DSC Debugfs entry drm/amd/display: DSC Clock enable debugfs write entry drm/amd/display: DSC Slice width debugfs write entry
Jun Lei (1):
drm/amd/display: Disable idle optimizations before programming DCN
Martin Tsai (1):
drm/amd/display: Check lane status again after link training done
Reza Amini (1):
drm/amd/display: Allow asic specific FSFT timing optimization
Stylon Wang (1):
drm/amd/display: Fix dmesg warning from setting abm level
Wyatt Wood (1):
drm/amd/display: Use hw lock mgr
hersen wu (1):
drm/amd/display: dchubbub p-state warning during surface planes switch
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32 ++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 6 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 193 +++++++++++++++++- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 17 +- .../display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 69 ++++++- .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 7 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 18 +- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 49 +++++ .../gpu/drm/amd/display/dc/core/dc_stream.c | 18 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 +- drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 2 +- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +- .../gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 2 +- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 27 +++ .../drm/amd/display/dc/dcn20/dcn20_hwseq.h | 5 + .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 3 + .../drm/amd/display/dc/dcn20/dcn20_resource.c | 49 +---- .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 3 + .../drm/amd/display/dc/dml/display_mode_vba.c | 14 +- .../drm/amd/display/dc/dml/display_mode_vba.h | 7 +- drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h | 2 +- .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 +- .../amd/display/include/link_service_types.h | 2 + .../amd/display/modules/freesync/freesync.c | 5 +- 26 files changed, 451 insertions(+), 98 deletions(-)
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/15 drm/amd/display: Clean up global sync param retrieval
From: Dmytro Laktyushkin <[email protected]>
[Why]
This change replaces older looping code in favor of these functions.
[How]
There are built in functions for extracting global sync params during mode validation now.
--- .../drm/amd/display/dc/dcn20/dcn20_resource.c | 49 ++----------------- .../drm/amd/display/dc/dml/display_mode_vba.c | 14 +----- .../drm/amd/display/dc/dml/display_mode_vba.h | 7 +-- 3 files changed, 7 insertions(+), 63 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +5 -44
@@ -3069,8 +3069,7 @@ void dcn20_calculate_dlg_params(int pipe_cnt, int vlevel) { - int i, j, pipe_idx, pipe_idx_unsplit; -bool visited[MAX_PIPES ] = {0 }; + int i, pipe_idx;/* Writeback MCIF_WB arbitration parameters */ dc->res_pool->funcs->set_mcif_arb_params (dc, context, pipes, pipe_cnt);
@@ -3089,55 +3088,17 @@ void dcn20_calculate_dlg_params(if (context->bw_ctx.bw.dcn.clk.dispclk_khz < dc->debug.min_disp_clk_khz) context->bw_ctx.bw.dcn.clk.dispclk_khz = dc->debug.min_disp_clk_khz; -/* -* An artifact of dml pipe split/odm is that pipes get merged back together for -* calculation. Therefore we need to only extract for first pipe in ascending index order -* and copy into the other split half. -*/ -for (i =0 , pipe_idx =0 , pipe_idx_unsplit =0 ; i < dc->res_pool->pipe_count; i++) { -if (!context->res_ctx.pipe_ctx[i].stream) -continue ; - -if (!visited[pipe_idx]) { -display_pipe_source_params_st *src = &pipes[pipe_idx].pipe.src; -display_pipe_dest_params_st *dst = &pipes[pipe_idx].pipe.dest; - - dst->vstartup_start = context->bw_ctx.dml.vba.VStartup[pipe_idx_unsplit]; - dst->vupdate_offset = context->bw_ctx.dml.vba.VUpdateOffsetPix[pipe_idx_unsplit]; - dst->vupdate_width = context->bw_ctx.dml.vba.VUpdateWidthPix[pipe_idx_unsplit]; - dst->vready_offset = context->bw_ctx.dml.vba.VReadyOffsetPix[pipe_idx_unsplit]; -/* -* j iterates inside pipes array, unlike i which iterates inside -* pipe_ctx array -*/ -if (src->is_hsplit) -for (j = pipe_idx +1 ; j < pipe_cnt; j++) { -display_pipe_source_params_st *src_j = &pipes[j].pipe.src; -display_pipe_dest_params_st *dst_j = &pipes[j].pipe.dest; - -if (src_j->is_hsplit && !visited[j] - && src->hsplit_grp == src_j->hsplit_grp) { - dst_j->vstartup_start = context->bw_ctx.dml.vba.VStartup[pipe_idx_unsplit]; - dst_j->vupdate_offset = context->bw_ctx.dml.vba.VUpdateOffsetPix[pipe_idx_unsplit]; - dst_j->vupdate_width = context->bw_ctx.dml.vba.VUpdateWidthPix[pipe_idx_unsplit]; - dst_j->vready_offset = context->bw_ctx.dml.vba.VReadyOffsetPix[pipe_idx_unsplit]; - visited[j] = true; - } - } - visited[pipe_idx] = true; - pipe_idx_unsplit++; - } - pipe_idx++; - } -for (i =0 , pipe_idx =0 ; i < dc->res_pool->pipe_count; i++) {if (!context->res_ctx.pipe_ctx[i].stream)continue ; + pipes[pipe_idx].pipe.dest.vstartup_start =get_vstartup (&context->bw_ctx.dml, pipes, pipe_cnt, pipe_idx); + pipes[pipe_idx].pipe.dest.vupdate_offset =get_vupdate_offset (&context->bw_ctx.dml, pipes, pipe_cnt, pipe_idx); + pipes[pipe_idx].pipe.dest.vupdate_width =get_vupdate_width (&context->bw_ctx.dml, pipes, pipe_cnt, pipe_idx); + pipes[pipe_idx].pipe.dest.vready_offset =get_vready_offset (&context->bw_ctx.dml, pipes, pipe_cnt, pipe_idx);if (context->bw_ctx.bw.dcn.clk.dppclk_khz < pipes[pipe_idx].clks_cfg.dppclk_mhz *1000 ) context->bw_ctx.bw.dcn.clk.dppclk_khz = pipes[pipe_idx].clks_cfg.dppclk_mhz *1000 ; context->res_ctx.pipe_ctx[i].plane_res.bw.dppclk_khz = pipes[pipe_idx].clks_cfg.dppclk_mhz *1000 ; -ASSERT (visited[pipe_idx]); context->res_ctx.pipe_ctx[i].pipe_dlg_param = pipes[pipe_idx].pipe.dest; pipe_idx++; }
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c +1 -13
@@ -154,23 +154,11 @@ dml_get_pipe_attr_func(refcyc_per_meta_chunk_vblank_c_in_us, mode_lib->vba.TimePdml_get_pipe_attr_func (refcyc_per_meta_chunk_flip_l_in_us, mode_lib->vba.TimePerMetaChunkFlip);dml_get_pipe_attr_func (refcyc_per_meta_chunk_flip_c_in_us, mode_lib->vba.TimePerChromaMetaChunkFlip); +dml_get_pipe_attr_func (vstartup, mode_lib->vba.VStartup);dml_get_pipe_attr_func (vupdate_offset, mode_lib->vba.VUpdateOffsetPix);dml_get_pipe_attr_func (vupdate_width, mode_lib->vba.VUpdateWidthPix);dml_get_pipe_attr_func (vready_offset, mode_lib->vba.VReadyOffsetPix); -unsigned int get_vstartup_calculated ( -struct display_mode_lib *mode_lib, -const display_e2e_pipe_params_st *pipes, -unsigned int num_pipes, -unsigned int which_pipe) -{ -unsigned int which_plane; - -recalculate_params (mode_lib, pipes, num_pipes); - which_plane = mode_lib->vba.pipe_plane[which_pipe]; -return mode_lib->vba.VStartup[which_plane]; -} - double get_total_immediate_flip_bytes( struct display_mode_lib *mode_lib, const display_e2e_pipe_params_st *pipes,
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h +1 -6
@@ -98,16 +98,11 @@ dml_get_pipe_attr_decl(refcyc_per_meta_chunk_vblank_c_in_us);dml_get_pipe_attr_decl (refcyc_per_meta_chunk_flip_l_in_us);dml_get_pipe_attr_decl (refcyc_per_meta_chunk_flip_c_in_us); +dml_get_pipe_attr_decl (vstartup);dml_get_pipe_attr_decl (vupdate_offset);dml_get_pipe_attr_decl (vupdate_width);dml_get_pipe_attr_decl (vready_offset); -unsigned int get_vstartup_calculated ( -struct display_mode_lib *mode_lib, -const display_e2e_pipe_params_st *pipes, -unsigned int num_pipes, -unsigned int which_pipe); - double get_total_immediate_flip_bytes( struct display_mode_lib *mode_lib, const display_e2e_pipe_params_st *pipes,
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/15 drm/amd/display: Rename bytes_pp to the correct bits_pp
In reply to Eryk Brol[Why]
Struct dcn_dsc_state is used for reading current state and parameters of DSC on a pipe, the target rate parameter uses bytes per pixel even though its reading BITS_PER_PIXEL register.
[How]
Changing it to Bits Per Pixel for consistency.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +++- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +1 -1
@@ -1204,7 +1204,7 @@ static ssize_t dp_dsc_bytes_per_pixel_read(struct file *f, char __user *buf,snprintf (rd_buf_ptr, str_len,"%d\n" , - dsc_state.dsc_bytes_per_pixel); + dsc_state.dsc_bits_per_pixel); rd_buf_ptr += str_len;while (size) {
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +3 -1
@@ -390,6 +390,8 @@ void dcn10_log_hw_state(struct dc *dc, }DTN_INFO ("\n" ); +// dcn_dsc_state struct field bytes_per_pixel was renamed to bits_per_pixel +// TODO: Update golden log header to reflect this name change DTN_INFO ("DSC: CLOCK_EN SLICE_WIDTH Bytes_pp\n" );for (i =0 ; i < pool->res_cap->num_dsc; i++) {struct display_stream_compressor *dsc = pool->dscs[i];
@@ -400,7 +402,7 @@ void dcn10_log_hw_state(struct dc *dc, dsc->inst, s.dsc_clock_en, s.dsc_slice_width, - s.dsc_bytes_per_pixel); + s.dsc_bits_per_pixel);DTN_INFO ("\n" ); }DTN_INFO ("\n" );
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c +1 -1
@@ -156,7 +156,7 @@ static void dsc2_read_state(struct display_stream_compressor *dsc, struct dcn_dsREG_GET (DSC_TOP_CONTROL ,DSC_CLOCK_EN , &s->dsc_clock_en);REG_GET (DSCC_PPS_CONFIG3 ,SLICE_WIDTH , &s->dsc_slice_width); -REG_GET (DSCC_PPS_CONFIG1 ,BITS_PER_PIXEL , &s->dsc_bytes_per_pixel); +REG_GET (DSCC_PPS_CONFIG1 ,BITS_PER_PIXEL , &s->dsc_bits_per_pixel);REG_GET (DSCC_PPS_CONFIG3 ,SLICE_HEIGHT , &s->dsc_slice_height);REG_GET (DSCC_PPS_CONFIG1 ,CHUNK_SIZE , &s->dsc_chunk_size);REG_GET (DSCC_PPS_CONFIG2 ,PIC_WIDTH , &s->dsc_pic_width);
drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h +1 -1
@@ -55,7 +55,7 @@ struct dsc_optc_config {struct dcn_dsc_state {uint32_t dsc_clock_en;uint32_t dsc_slice_width; -uint32_t dsc_bytes_per_pixel; +uint32_t dsc_bits_per_pixel;uint32_t dsc_slice_height;uint32_t dsc_pic_width;uint32_t dsc_pic_height;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/15 drm/amd/display: Fix naming of DSC Debugfs entry
In reply to Eryk Brol[why]
Fix naming and return bits rather than bytes per pixel for naming consistency. Because registers return Bytes per pixel, but DSC Config structure is expecting bits per pixel as input. So when returning the value convert from bytes into bits.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +5 -4
@@ -35,6 +35,7 @@#include "dmub/dmub_srv.h" #include "resource.h" #include "dsc.h" +#include "dc_link_dp.h" struct dmub_debugfs_trace_header {uint32_t entry_count;
@@ -1168,7 +1169,7 @@ static ssize_t dp_dsc_slice_height_read(struct file *f, char __user *buf,return result; } -static ssize_t dp_dsc_bytes_per_pixel_read (struct file *f,char __user *buf, +static ssize_t dp_dsc_bits_per_pixel_read (struct file *f,char __user *buf,size_t size,loff_t *pos) {char *rd_buf =NULL ;
@@ -1479,9 +1480,9 @@ static const struct file_operations dp_dsc_slice_height_debugfs_fops = { .llseek = default_llseek }; -static const struct file_operations dp_dsc_bytes_per_pixel_debugfs_fops = { +static const struct file_operations dp_dsc_bits_per_pixel_debugfs_fops = { .owner =THIS_MODULE , - .read = dp_dsc_bytes_per_pixel_read, + .read = dp_dsc_bits_per_pixel_read, .llseek = default_llseek };
@@ -1572,7 +1573,7 @@ static const struct { {"dsc_clock_en", &dp_dsc_clock_en_debugfs_fops}, {"dsc_slice_width", &dp_dsc_slice_width_debugfs_fops}, {"dsc_slice_height", &dp_dsc_slice_height_debugfs_fops}, - {"dsc_bytes_per_pixel", &dp_dsc_bytes_per_pixel_debugfs_fops}, + {"dsc_bits_per_pixel", &dp_dsc_bits_per_pixel_debugfs_fops}, {"dsc_pic_width", &dp_dsc_pic_width_debugfs_fops}, {"dsc_pic_height", &dp_dsc_pic_height_debugfs_fops}, {"dsc_chunk_size", &dp_dsc_chunk_size_debugfs_fops},
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/15 drm/amd/display: Don't compare dppclk before updating DTO
In reply to Eryk BrolFrom: Alvin Lee <[email protected]>
[Why]
In dcn3_update_clocks there are situations where dppclk is not lowered (i.e. stays the same), but DTO still needs to be increased before we program pipe frontend (i.e. in prepare_bandwidth). If we don't program the new DTO value before we program the pipe, we will underflow as soon as the pipe lock is released until the next call to dcn3_update_clocks where the DTO is updated.
[How]
Remove dppclk check before programming new DTO value.
--- .../gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +4 -3
@@ -323,9 +323,10 @@ static void dcn3_update_clocks(struct clk_mgr *clk_mgr_base,/* if clock is being raised, increase refclk before lowering DTO */ if (update_dppclk || update_dispclk)dcn20_update_clocks_update_dentist (clk_mgr); -/* always update dtos unless clock is lowered and not safe to lower */ -if (new_clocks->dppclk_khz >= dc->current_state->bw_ctx.bw.dcn.clk.dppclk_khz) -dcn20_update_clocks_update_dpp_dto (clk_mgr, context, safe_to_lower); +/* There is a check inside dcn20_update_clocks_update_dpp_dto which ensures +* that we do not lower dto when it is not safe to lower. We do not need to +* compare the current and new dppclk before calling this function.*/ +dcn20_update_clocks_update_dpp_dto (clk_mgr, context, safe_to_lower); } }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/15 drm/amd/display: Check lane status again after link training done
In reply to Eryk BrolFrom: Martin Tsai <[email protected]>
[Why]
Some monitors could suffer symbol unlock but cannot send HPD IRQ to notic source device to handle link loss. This makes monitor stuck in abnormal status and causes black screen.
[How]
According to the suggestion from scalar vendor, to check lane status again after link training done. That can improve the comaptibility from current production monitors.
--- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 50 +++++++++++++++++++ .../amd/display/include/link_service_types.h | 2 + 2 files changed, 52 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +50 -0
@@ -1133,6 +1133,45 @@ static inline enum link_training_result perform_link_training_int(return status; } +static enum link_training_result check_link_loss_status ( +struct dc_link *link, +const struct link_training_settings *link_training_setting) +{ +enum link_training_result status =LINK_TRAINING_SUCCESS ; +unsigned int lane01_status_address =DP_LANE0_1_STATUS ; +union lane_status lane_status; +uint8_t dpcd_buf[4 ] = {0 }; +uint32_t lane; + +core_link_read_dpcd ( + link, + lane01_status_address, + (uint8_t *)(dpcd_buf), +sizeof (dpcd_buf)); + +/*parse lane status*/ +for (lane =0 ; lane < link->cur_link_settings.lane_count; lane++) { +/* +* check lanes status +*/ + lane_status.raw =get_nibble_at_index (&dpcd_buf[0 ], lane); + +if (!lane_status.bits.CHANNEL_EQ_DONE_0 || + !lane_status.bits.CR_DONE_0 || + !lane_status.bits.SYMBOL_LOCKED_0) { +/* if one of the channel equalization, clock +* recovery or symbol lock is dropped +* consider it as (link has been +* dropped) dp sink status has changed +*/ + status =LINK_TRAINING_LINK_LOSS ; +break ; + } + } + +return status; +} + static void initialize_training_settings( struct dc_link *link, const struct dc_link_settings *link_setting,
@@ -1372,6 +1411,9 @@ static void print_status_message(case LINK_TRAINING_LQA_FAIL : lt_result ="LQA failed" ;break ; +case LINK_TRAINING_LINK_LOSS : + lt_result ="Link loss" ; +break ;default :break ; }
@@ -1531,6 +1573,14 @@ enum link_training_result dc_link_dp_perform_link_training( status); } +/* delay 5ms after Main Link output idle pattern and then check +* DPCD 0202h. +*/ +if (link->connector_signal !=SIGNAL_TYPE_EDP && status ==LINK_TRAINING_SUCCESS ) { +msleep (5 ); + status =check_link_loss_status (link, <_settings); + } +/* 6. print status message*/ print_status_message (link, <_settings, status);
drivers/gpu/drm/amd/display/include/link_service_types.h +2 -0
@@ -66,6 +66,8 @@ enum link_training_result {/* other failure during EQ step */ LINK_TRAINING_EQ_FAIL_EQ ,LINK_TRAINING_LQA_FAIL , +/* one of the CR,EQ or symbol lock is dropped */ + LINK_TRAINING_LINK_LOSS, }; struct link_training_settings {
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/15 drm/amd/display: Fix dmesg warning from setting abm level
In reply to Eryk BrolFrom: Stylon Wang <[email protected]>
[Why]
Setting abm level does not correctly update CRTC state. As a result no surface update is added to dc stream state and triggers warning.
[How]
Correctly update CRTC state when setting abm level property.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +23 -0
@@ -8625,6 +8625,29 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,if (ret) goto fail; +/* Check connector changes */ +for_each_oldnew_connector_in_state (state, connector, old_con_state, new_con_state, i) { +struct dm_connector_state *dm_old_con_state =to_dm_connector_state (old_con_state); +struct dm_connector_state *dm_new_con_state =to_dm_connector_state (new_con_state); + +/* Skip connectors that are disabled or part of modeset already. */ +if (!old_con_state->crtc && !new_con_state->crtc) +continue ; + +if (!new_con_state->crtc) +continue ; + + new_crtc_state =drm_atomic_get_crtc_state (state, new_con_state->crtc); +if (IS_ERR (new_crtc_state)) { + ret =PTR_ERR (new_crtc_state); + goto fail; + } + +if (dm_old_con_state->abm_level != + dm_new_con_state->abm_level) + new_crtc_state->connectors_changed = true; + } +#if defined(CONFIG_DRM_AMD_DC_DCN )if (adev->asic_type >=CHIP_NAVI10 ) {for_each_oldnew_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) {
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/15 drm/amd/display: Disable idle optimizations before programming DCN
In reply to Eryk BrolFrom: Jun Lei <[email protected]>
[Why]
Programming DCN is explicitly forbidden during idle optimzations allowed state. Existing implemenation relies on OS/DM, which is not robust. Instead DC should sequence this.
Note that DC will not re-enter idle optimized state on its own, it is only responsible for catching out of sequence calls. It is still DM responsibility to sequence appropriate for optimized power, but this change removes the requirement for DM to cover the .1% case.
[How]
- elevate updates during idle optimized state to full updates
- disable idle power optimizations prior to programming
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +16 -2
@@ -1250,6 +1250,9 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *cint i, k, l;struct dc_stream_state *dc_streams[MAX_STREAMS ] = {0 }; +#if defined(CONFIG_DRM_AMD_DC_DCN3_0 ) +dc_allow_idle_optimizations (dc, false); +#endif for (i =0 ; i < context->stream_count; i++) dc_streams[i] = context->streams[i];
@@ -1838,6 +1841,11 @@ static enum surface_update_type check_update_surfaces_for_stream(int i;enum surface_update_type overall_type =UPDATE_TYPE_FAST ; +#if defined(CONFIG_DRM_AMD_DC_DCN3_0 ) +if (dc->idle_optimizations_allowed) + overall_type =UPDATE_TYPE_FULL ; + +#endif if (stream_status ==NULL || stream_status->plane_count != surface_count) overall_type =UPDATE_TYPE_FULL ;
@@ -2306,8 +2314,14 @@ static void commit_planes_for_stream(struct dc *dc, } } -if (update_type ==UPDATE_TYPE_FULL && dc->optimize_seamless_boot_streams ==0 ) { - dc->hwss.prepare_bandwidth (dc, context); +if (update_type ==UPDATE_TYPE_FULL ) { +#if defined(CONFIG_DRM_AMD_DC_DCN3_0 ) +dc_allow_idle_optimizations (dc, false); + +#endif +if (dc->optimize_seamless_boot_streams ==0 ) + dc->hwss.prepare_bandwidth (dc, context); +context_clock_trace (dc, context); }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/15 drm/amd/display: Allow asic specific FSFT timing optimization
In reply to Eryk BrolFrom: Reza Amini <[email protected]>
[Why]
Each asic can optimize best based on its capabilities
[How]
Optimizing timing for a new pixel clock
--- .../gpu/drm/amd/display/dc/core/dc_stream.c | 18 ++++++------- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 +-- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 27 +++++++++++++++++++ .../drm/amd/display/dc/dcn20/dcn20_hwseq.h | 5 ++++ .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 3 +++ .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 3 +++ .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 ++++ .../amd/display/modules/freesync/freesync.c | 5 +++- 8 files changed, 57 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +8 -10
@@ -246,20 +246,18 @@ struct dc_stream_status *dc_stream_get_status(#ifndef TRIM_FSFT /** -* dc_optimize_timing() - dc to optimize timing +* dc_optimize_timing_for_fsft() - dc to optimize timing */ -bool dc_optimize_timing ( -struct dc_crtc_timing *timing, +bool dc_optimize_timing_for_fsft ( +struct dc_stream_state *pStream,unsigned int max_input_rate_in_khz) { -//optimization is expected to assing a value to these: -//timing->pix_clk_100hz -//timing->v_front_porch -//timing->v_total -//timing->fast_transport_output_rate_100hz; - timing->fast_transport_output_rate_100hz = timing->pix_clk_100hz; +struct dc *dc; -return true; + dc = pStream->ctx->dc; + +return (dc->hwss.optimize_timing_for_fsft && + dc->hwss.optimize_timing_for_fsft (dc, &pStream->timing, max_input_rate_in_khz)); }#endif
drivers/gpu/drm/amd/display/dc/dc_stream.h +2 -2
@@ -424,8 +424,8 @@ struct dc_stream_status *dc_stream_get_status( struct dc_stream_state *dc_stream);#ifndef TRIM_FSFT -bool dc_optimize_timing ( -struct dc_crtc_timing *timing, +bool dc_optimize_timing_for_fsft ( +struct dc_stream_state *pStream,unsigned int max_input_rate_in_khz);#endif
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +27 -0
@@ -2498,3 +2498,30 @@ void dcn20_fpga_init_hw(struct dc *dc) tg->funcs->tg_init (tg); } } +#ifndef TRIM_FSFT +bool dcn20_optimize_timing_for_fsft (struct dc *dc, +struct dc_crtc_timing *timing, +unsigned int max_input_rate_in_khz) +{ +unsigned int old_v_front_porch; +unsigned int old_v_total; +unsigned int max_input_rate_in_100hz; +unsigned long long new_v_total; + + max_input_rate_in_100hz = max_input_rate_in_khz *10 ; +if (max_input_rate_in_100hz < timing->pix_clk_100hz) +return false; + + old_v_total = timing->v_total; + old_v_front_porch = timing->v_front_porch; + + timing->fast_transport_output_rate_100hz = timing->pix_clk_100hz; + timing->pix_clk_100hz = max_input_rate_in_100hz; + + new_v_total =div_u64 ((unsigned long long )old_v_total * max_input_rate_in_100hz, timing->pix_clk_100hz); + + timing->v_total = new_v_total; + timing->v_front_porch = old_v_front_porch + (timing->v_total - old_v_total); +return true; +} +#endif
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h +5 -0
@@ -132,5 +132,10 @@ int dcn20_init_sys_ctx(struct dce_hwseq *hws,struct dc *dc, struct dc_phy_addr_space_config *pa_config); +#ifndef TRIM_FSFT +bool dcn20_optimize_timing_for_fsft (struct dc *dc, +struct dc_crtc_timing *timing, +unsigned int max_input_rate_in_khz); +#endif #endif /* __DC_HWSS_DCN20_H__ */
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c +3 -0
@@ -88,6 +88,9 @@ static const struct hw_sequencer_funcs dcn20_funcs = { .set_backlight_level = dce110_set_backlight_level, .set_abm_immediate_disable = dce110_set_abm_immediate_disable, .set_pipe = dce110_set_pipe, +#ifndef TRIM_FSFT + .optimize_timing_for_fsft = dcn20_optimize_timing_for_fsft, +#endif };static const struct hwseq_private_funcs dcn20_private_funcs = {
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c +3 -0
@@ -92,6 +92,9 @@ static const struct hw_sequencer_funcs dcn21_funcs = { .set_backlight_level = dcn21_set_backlight_level, .set_abm_immediate_disable = dcn21_set_abm_immediate_disable, .set_pipe = dcn21_set_pipe, +#ifndef TRIM_FSFT + .optimize_timing_for_fsft = dcn20_optimize_timing_for_fsft, +#endif };static const struct hwseq_private_funcs dcn21_private_funcs = {
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +5 -0
@@ -116,6 +116,11 @@ struct hw_sequencer_funcs {void (*set_static_screen_control)(struct pipe_ctx **pipe_ctx,int num_pipes,const struct dc_static_screen_params *events); +#ifndef TRIM_FSFT +bool (*optimize_timing_for_fsft)(struct dc *dc, +struct dc_crtc_timing *timing, +unsigned int max_input_rate_in_khz); +#endif /* Stream Related */ void (*enable_stream)(struct pipe_ctx *pipe_ctx);
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +4 -1
@@ -829,10 +829,13 @@ void mod_freesync_build_vrr_infopacket(struct mod_freesync *mod_freesync,switch (packet_type) {case PACKET_TYPE_FS_V3 :#ifndef TRIM_FSFT +// always populate with pixel rate. build_vrr_infopacket_v3 ( stream->signal, vrr, stream->timing.flags.FAST_TRANSPORT, - stream->timing.fast_transport_output_rate_100hz, + (stream->timing.flags.FAST_TRANSPORT) ? + stream->timing.fast_transport_output_rate_100hz : + stream->timing.pix_clk_100hz, app_tf, infopacket);#else build_vrr_infopacket_v3 (stream->signal, vrr, app_tf, infopacket);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/15 drm/amd/display: DSC Clock enable debugfs write entry
In reply to Eryk Brol[Why]
Need a mechanism to force enable DSC on any connector
[How]
Debugfs entry overwrites newly added connector's dsc preffered settings structure and sets dsc_clock_en flag on it. During the attomic commit, depending if connector is SST or MST, we will enable DSC manually by overwriting stream's DSC flag.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 5 ++ .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 89 +++++++++++++++++++ .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 11 ++- 4 files changed, 107 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -1
@@ -4613,7 +4613,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, dc_link_get_link_cap(aconnector->dc_link));#if defined(CONFIG_DRM_AMD_DC_DCN ) -if (dsc_caps.is_dsc_supported) +if (dsc_caps.is_dsc_supported) { if (dc_dsc_compute_config(aconnector->dc_link->ctx->dc->res_pool->dscs[0], &dsc_caps, aconnector->dc_link->ctx->dc->debug.dsc_min_slice_height_override,
@@ -4621,6 +4621,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, &stream->timing, &stream->timing.dsc_cfg)) stream->timing.flags.DSC =1 ; +if (aconnector->dsc_settings.dsc_clock_en) + stream->timing.flags.DSC = 1; + }#endif }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +5 -0
@@ -342,6 +342,10 @@ struct amdgpu_display_manager {struct amdgpu_encoder mst_encoders[AMDGPU_DM_MAX_CRTC ]; }; +struct dsc_preferred_settings { +bool dsc_clock_en; +}; +struct amdgpu_dm_connector {struct drm_connector base;
@@ -389,6 +393,7 @@ struct amdgpu_dm_connector {uint32_t debugfs_dpcd_size;#endif bool force_yuv420_output; +struct dsc_preferred_settings dsc_settings; };#define to_amdgpu_dm_connector (x) container_of(x, struct amdgpu_dm_connector, base)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +89 -0
107 lines not on this page · raw message
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +9 -2
@@ -471,6 +471,7 @@ struct dsc_mst_fairness_params {struct dc_dsc_bw_range bw_range;bool compression_possible;struct drm_dp_mst_port *port; +bool clock_overwrite; };struct dsc_mst_fairness_vars {
@@ -636,7 +637,9 @@ static void try_disable_dsc(struct drm_atomic_state *state,int remaining_to_try =0 ;for (i =0 ; i < count; i++) { -if (vars[i].dsc_enabled && vars[i].bpp_x16 == params[i].bw_range.max_target_bpp_x16) { +if (vars[i].dsc_enabled + && vars[i].bpp_x16 == params[i].bw_range.max_target_bpp_x16 + && !params[i].clock_overwrite) { kbps_increase[i] = params[i].bw_range.stream_kbps - params[i].bw_range.max_kbps; tried[i] = false; remaining_to_try +=1 ;
@@ -697,6 +700,7 @@ static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,struct dsc_mst_fairness_vars vars[MAX_PIPES ];struct amdgpu_dm_connector *aconnector;int count =0 ; +bool debugfs_overwrite = false;memset (params,0 ,sizeof (params));
@@ -715,6 +719,9 @@ static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state, params[count].sink = stream->sink; aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context; params[count].port = aconnector->port; + params[count].clock_overwrite = aconnector->dsc_settings.dsc_clock_en; +if (params[count].clock_overwrite) + debugfs_overwrite = true; params[count].compression_possible = stream->sink->dsc_caps.dsc_dec_caps.is_dsc_supported;dc_dsc_get_policy_for_timing (params[count].timing, &dsc_policy); if (!dc_dsc_compute_bandwidth_range(
@@ -740,7 +747,7 @@ static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state, dm_mst_get_pbn_divider(dc_link)) < 0)return false; } -if (!drm_dp_mst_atomic_check (state)) { +if (!drm_dp_mst_atomic_check (state) && !debugfs_overwrite) {set_dsc_configs_from_fairness_vars (params, vars, count);return true; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/15 drm/amd/display: [FW Promotion] Release 0.0.26
In reply to Eryk BrolFrom: 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 0xe6d590b09 +#define DMUB_FW_VERSION_GIT_HASH 0x636e7b294#define DMUB_FW_VERSION_MAJOR 0#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 25 +#define DMUB_FW_VERSION_REVISION 26#define DMUB_FW_VERSION_UCODE ((DMUB_FW_VERSION_MAJOR << 24) | (DMUB_FW_VERSION_MINOR << 16) | DMUB_FW_VERSION_REVISION)#endif
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/15 drm/amd/display: dchubbub p-state warning during surface planes switch
In reply to Eryk BrolFrom: hersen wu <[email protected]>
[Why]ramp_up_dispclk_with_dpp is to change dispclk, dppclk and dprefclk according to bandwidth requirement. call stack: rv1_update_clocks --> update_clocks --> dcn10_prepare_bandwidth / dcn10_optimize_bandwidth --> prepare_bandwidth / optimize_bandwidth. before change dcn hw, prepare_bandwidth will be called first to allow enough clock, watermark for change, after end of dcn hw change, optimize_bandwidth is executed to lower clock to save power for new dcn hw settings.
below is sequence of commit_planes_for_stream:
step 1: prepare_bandwidth - raise clock to have enough bandwidth step 2: lock_doublebuffer_enable
step 3: pipe_control_lock(true) - make dchubp register change will not take effect right way
step 4: apply_ctx_for_surface - program dchubp
step 5: pipe_control_lock(false) - dchubp register change take effect step 6: optimize_bandwidth --> dc_post_update_surfaces_to_stream for full_date, optimize clock to save power
at end of step 1, dcn clocks (dprefclk, dispclk, dppclk) may be changed for new dchubp configuration. but real dcn hub dchubps are still running with old configuration until end of step 5. this need clocks settings at step 1 should not less than that before step 1. this is checked by two conditions: 1. if (should_set_clock(safe_to_lower , new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) || new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz)
2. request_dpp_div = new_clocks->dispclk_khz > new_clocks->dppclk_khz
the second condition is based on new dchubp configuration. dppclk for new dchubp may be different from dppclk before step 1. for example, before step 1, dchubps are as below:
pipe 0: recout=(0,40,1920,980) viewport=(0,0,1920,979) pipe 1: recout=(0,0,1920,1080) viewport=(0,0,1920,1080) for dppclk for pipe0 need dppclk = dispclk
new dchubp pipe split configuration:
pipe 0: recout=(0,0,960,1080) viewport=(0,0,960,1080) pipe 1: recout=(960,0,960,1080) viewport=(960,0,960,1080) dppclk only needs dppclk = dispclk /2.
dispclk, dppclk are not lock by otg master lock. they take effect after step 1. during this transition, dispclk are the same, but dppclk is changed to half of previous clock for old dchubp configuration between step 1 and step 6. This may cause p-state warning intermittently.
[How]
for new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz, we need make sure dppclk are not changed to less between step 1 and 6. for new_clocks->dispclk_khz > clk_mgr_base->clks.dispclk_khz, new display clock is raised, but we do not know ratio of new_clocks->dispclk_khz and clk_mgr_base->clks.dispclk_khz, new_clocks->dispclk_khz /2 does not guarantee equal or higher than old dppclk. we could ignore power saving different between dppclk = displck and dppclk = dispclk / 2 between step 1 and step 6. as long as safe_to_lower = false, set dpclk = dispclk to simplify condition check.
--- .../display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 69 ++++++++++++++++++- 1 file changed, 67 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c +67 -2
@@ -85,12 +85,77 @@ static int rv1_determine_dppclk_threshold(struct clk_mgr_internal *clk_mgr, strureturn disp_clk_threshold; } -static void ramp_up_dispclk_with_dpp (struct clk_mgr_internal *clk_mgr,struct dc *dc,struct dc_clocks *new_clocks) +static void ramp_up_dispclk_with_dpp ( +struct clk_mgr_internal *clk_mgr, +struct dc *dc, +struct dc_clocks *new_clocks, +bool safe_to_lower) {int i;int dispclk_to_dpp_threshold =rv1_determine_dppclk_threshold (clk_mgr, new_clocks);bool request_dpp_div = new_clocks->dispclk_khz > new_clocks->dppclk_khz; +/* this function is to change dispclk, dppclk and dprefclk according to +* bandwidth requirement. Its call stack is rv1_update_clocks --> +* update_clocks --> dcn10_prepare_bandwidth / dcn10_optimize_bandwidth +* --> prepare_bandwidth / optimize_bandwidth. before change dcn hw, +* prepare_bandwidth will be called first to allow enough clock, +* watermark for change, after end of dcn hw change, optimize_bandwidth +* is executed to lower clock to save power for new dcn hw settings. +* +* below is sequence of commit_planes_for_stream: +* +* step 1: prepare_bandwidth - raise clock to have enough bandwidth +* step 2: lock_doublebuffer_enable +* step 3: pipe_control_lock(true) - make dchubp register change will +* not take effect right way +* step 4: apply_ctx_for_surface - program dchubp +* step 5: pipe_control_lock(false) - dchubp register change take effect +* step 6: optimize_bandwidth --> dc_post_update_surfaces_to_stream +* for full_date, optimize clock to save power +* +* at end of step 1, dcn clocks (dprefclk, dispclk, dppclk) may be +* changed for new dchubp configuration. but real dcn hub dchubps are +* still running with old configuration until end of step 5. this need +* clocks settings at step 1 should not less than that before step 1. +* this is checked by two conditions: 1. if (should_set_clock(safe_to_lower +* , new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) || +* new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz) +* 2. request_dpp_div = new_clocks->dispclk_khz > new_clocks->dppclk_khz +* +* the second condition is based on new dchubp configuration. dppclk +* for new dchubp may be different from dppclk before step 1. +* for example, before step 1, dchubps are as below: +* pipe 0: recout=(0,40,1920,980) viewport=(0,0,1920,979) +* pipe 1: recout=(0,0,1920,1080) viewport=(0,0,1920,1080) +* for dppclk for pipe0 need dppclk = dispclk +* +* new dchubp pipe split configuration: +* pipe 0: recout=(0,0,960,1080) viewport=(0,0,960,1080) +* pipe 1: recout=(960,0,960,1080) viewport=(960,0,960,1080) +* dppclk only needs dppclk = dispclk /2. +* +* dispclk, dppclk are not lock by otg master lock. they take effect +* after step 1. during this transition, dispclk are the same, but +* dppclk is changed to half of previous clock for old dchubp +* configuration between step 1 and step 6. This may cause p-state +* warning intermittently. +* +* for new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz, we +* need make sure dppclk are not changed to less between step 1 and 6. +* for new_clocks->dispclk_khz > clk_mgr_base->clks.dispclk_khz, +* new display clock is raised, but we do not know ratio of +* new_clocks->dispclk_khz and clk_mgr_base->clks.dispclk_khz, +* new_clocks->dispclk_khz /2 does not guarantee equal or higher than +* old dppclk. we could ignore power saving different between +* dppclk = displck and dppclk = dispclk / 2 between step 1 and step 6. +* as long as safe_to_lower = false, set dpclk = dispclk to simplify +* condition check. +* todo: review this change for other asic. +**/ +if (!safe_to_lower) + request_dpp_div = false; +/* set disp clk to dpp clk threshold */ clk_mgr->funcs->set_dispclk (clk_mgr, dispclk_to_dpp_threshold);
@@ -209,7 +274,7 @@ static void rv1_update_clocks(struct clk_mgr *clk_mgr_base,/* program dispclk on = as a w/a for sleep resume clock ramping issues */ if (should_set_clock (safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) || new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz) { -ramp_up_dispclk_with_dpp (clk_mgr, dc, new_clocks); +ramp_up_dispclk_with_dpp (clk_mgr, dc, new_clocks, safe_to_lower); clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz; send_request_to_lower = true; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Sasha Levin
maintainerRe: [PATCH 11/15] drm/amd/display: dchubbub p-state warning during surface planes switch
Hi
[This is an automated email]
This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all
The bot has tested the following trees: v5.7.10, v5.4.53, v4.19.134, v4.14.189, v4.9.231, v4.4.231.
v5.7.10: Build OK!
v5.4.53: Build OK!
v4.19.134: Failed to apply! Possible dependencies:
1e7e86c43f38 ("drm/amd/display: decouple front and backend pgm using dpms_off as backend enable flag") 24f7dd7ea98d ("drm/amd/display: move pplib/smu notification to dccg block") 4c5e8b541527 ("drm/amd/display: split dccg clock manager into asic folders") 8c3db1284a01 ("drm/amdgpu: fill in amdgpu_dm_remove_sink_from_freesync_module") 98e6436d3af5 ("drm/amd/display: Refactor FreeSync module")
ad908423ef86 ("drm/amd/display: support 48 MHZ refclk off")
c85e6e546edd ("drm/amd/display: Create new i2c resource")
v4.14.189: Failed to apply! Possible dependencies:
1b0c0f9dc5ca ("drm/amdgpu: move userptr BOs to CPU domain during CS v2") 1ed3d2567c80 ("drm/amdgpu: keep the MMU lock until the update ends v4") 3fe89771cb0a ("drm/amdgpu: stop reserving the BO in the MMU callback v3") 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)")
4c5e8b541527 ("drm/amd/display: split dccg clock manager into asic folders") 60de1c1740f3 ("drm/amdgpu: use a rw_semaphore for MMU notifiers") 9a18999640fa ("drm/amdgpu: move MMU notifier related defines to amdgpu_mn.h") 9cca0b8e5df0 ("drm/amdgpu: move amdgpu_cs_sysvm_access_required into find_mapping") a216ab09955d ("drm/amdgpu: fix userptr put_page handling") b72cf4fca2bb ("drm/amdgpu: move taking mmap_sem into get_user_pages v2") ca666a3c298f ("drm/amdgpu: stop using BO status for user pages")
v4.9.231: Failed to apply! Possible dependencies:
1cec20f0ea0e ("dma-buf: Restart reservation_object_wait_timeout_rcu() after writes") 248a1d6f1ac4 ("drm/amd: fix include notation and remove -Iinclude/drm flag") 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)")
4c5e8b541527 ("drm/amd/display: split dccg clock manager into asic folders") 78010cd9736e ("dma-buf/fence: add an lockdep_assert_held()") f54d1867005c ("dma-buf: Rename struct fence to dma_fence") fedf54132d24 ("dma-buf: Restart reservation_object_get_fences_rcu() after writes")
v4.4.231: Failed to apply! Possible dependencies:
0f477c6dea70 ("staging/android/sync: add sync_fence_create_dma") 1f7371b2a5fa ("drm/amd/powerplay: add basic powerplay framework") 248a1d6f1ac4 ("drm/amd: fix include notation and remove -Iinclude/drm flag") 288912cb95d1 ("drm/amdgpu: use $(src) in Makefile (v2)") 375fb53ec1be ("staging: android: replace explicit NULL comparison") 395dec6f6bc5 ("Documentation: add doc for sync_file_get_fence()") 4325198180e5 ("drm/amdgpu: remove GART page addr array") 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") 4c5e8b541527 ("drm/amd/display: split dccg clock manager into asic folders") 62304fb1fc08 ("dma-buf/sync_file: de-stage sync_file") a1d29476d666 ("drm/amdgpu: optionally enable GART debugfs file") a8fe58cec351 ("drm/amd: add ACP driver support")
b70f014d58b9 ("drm/amdgpu: change default sched jobs to 32") c784c82a3fd6 ("Documentation: add Sync File doc")
d4cab38e153d ("staging/android: prepare sync_file for de-staging") d7fdb0ae9d11 ("staging/android: rename sync_fence to sync_file") f54d1867005c ("dma-buf: Rename struct fence to dma_fence") fac8434dab96 ("Documentation: Fix some grammar mistakes in sync_file.txt") fdba11f4079e ("drm/amdgpu: move all Kconfig options to amdgpu/Kconfig")
NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
Signature · 6 lines
Thanks Sasha _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/15 drm/amd/display: Use hw lock mgr
In reply to Eryk BrolFrom: Wyatt Wood <[email protected]>
[Why]
Feature requires synchronization of dig, pipe, and cursor locking between driver and fw.
[How]
Set flag to force psr to use hw lock mgr.
--- drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c +1 -1
@@ -233,8 +233,8 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub, copy_settings_data->frame_cap_ind = psr_context->psrFrameCaptureIndicationReq; copy_settings_data->debug.bitfields.visual_confirm = dc->dc->debug.visual_confirm ==VISUAL_CONFIRM_PSR ? true : false; + copy_settings_data->debug.bitfields.use_hw_lock_mgr =1 ; copy_settings_data->init_sdp_deadline = psr_context->sdpTransmitLineNumDeadline; - copy_settings_data->debug.bitfields.use_hw_lock_mgr =0 ;dc_dmub_srv_cmd_queue (dc->dmub_srv, &cmd);dc_dmub_srv_cmd_execute (dc->dmub_srv);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/15 drm/amd/display: DSC Slice width debugfs write entry
In reply to Eryk Brol[Why]
We need to be able to specify slice width for DSC on aconnector
[How]
Getting slice width parameter from debugfs entry, if it is a valid the value is set in connector's dsc preffered settings structure. Which then overwrites dsc_cfg structure's parameters if DSC is decided to be enabled. Works for both SST and MST.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 93 +++++++++++++++++++ .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 ++ 4 files changed, 104 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
@@ -4621,8 +4621,12 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, &stream->timing, &stream->timing.dsc_cfg)) stream->timing.flags.DSC =1 ; +/* Overwrite the stream flag if DSC is enabled through debugfs */ if (aconnector->dsc_settings.dsc_clock_en) stream->timing.flags.DSC =1 ; +if (stream->timing.flags.DSC && aconnector->dsc_settings.dsc_slice_width) + stream->timing.dsc_cfg.num_slices_h =DIV_ROUND_UP (stream->timing.h_addressable, + aconnector->dsc_settings.dsc_slice_width); }#endif }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +1 -0
@@ -344,6 +344,7 @@ struct amdgpu_display_manager {struct dsc_preferred_settings {bool dsc_clock_en; +uint32_t dsc_slice_width; };struct amdgpu_dm_connector {
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +93 -0
111 lines not on this page · raw message
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +6 -0
@@ -472,6 +472,7 @@ struct dsc_mst_fairness_params {bool compression_possible;struct drm_dp_mst_port *port;bool clock_overwrite; +uint32_t slice_width_overwrite; };struct dsc_mst_fairness_vars {
@@ -506,6 +507,10 @@ static void set_dsc_configs_from_fairness_vars(struct dsc_mst_fairness_params *p ¶ms[i].timing->dsc_cfg)) { params[i].timing->flags.DSC =1 ; params[i].timing->dsc_cfg.bits_per_pixel = vars[i].bpp_x16; +if (params[i].slice_width_overwrite) + params[i].timing->dsc_cfg.num_slices_h =DIV_ROUND_UP ( + params[i].timing->h_addressable, + params[i].slice_width_overwrite); } else { params[i].timing->flags.DSC =0 ; }
@@ -722,6 +727,7 @@ static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state, params[count].clock_overwrite = aconnector->dsc_settings.dsc_clock_en;if (params[count].clock_overwrite) debugfs_overwrite = true; + params[count].slice_width_overwrite = aconnector->dsc_settings.dsc_slice_width; params[count].compression_possible = stream->sink->dsc_caps.dsc_dec_caps.is_dsc_supported;dc_dsc_get_policy_for_timing (params[count].timing, &dsc_policy); if (!dc_dsc_compute_bandwidth_range(
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/15 drm/amd/display: 3.2.96
In reply to Eryk BrolFrom: 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.95" +#define DC_VER "3.2.96"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/15 drm/amd/display: Fix DP Compliance tests 4.3.2.1 and 4.3.2.2
In reply to Eryk BrolFrom: Aric Cyr <[email protected]>
[Why]
Test expects that we also read HPD_IRQ_VECTOR when checking for symbol loss as well lane status.
[How]
Read bytes 0x200-0x205 instead of just 0x202-0x205
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +6 -7
@@ -1138,23 +1138,22 @@ static enum link_training_result check_link_loss_status( const struct link_training_settings *link_training_setting) {enum link_training_result status =LINK_TRAINING_SUCCESS ; -unsigned int lane01_status_address =DP_LANE0_1_STATUS ;union lane_status lane_status; -uint8_t dpcd_buf[4 ] = {0 }; +uint8_t dpcd_buf[6 ] = {0 };uint32_t lane;core_link_read_dpcd ( - link, - lane01_status_address, - (uint8_t *)(dpcd_buf), -sizeof (dpcd_buf)); + link, +DP_SINK_COUNT , + (uint8_t *)(dpcd_buf), +sizeof (dpcd_buf));/*parse lane status*/ for (lane =0 ; lane < link->cur_link_settings.lane_count; lane++) {/* * check lanes status */ - lane_status.raw =get_nibble_at_index (&dpcd_buf[0 ], lane); + lane_status.raw =get_nibble_at_index (&dpcd_buf[2 ], lane); if (!lane_status.bits.CHANNEL_EQ_DONE_0 || !lane_status.bits.CR_DONE_0 ||
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx