DC Patches Jun 19, 2020
cover DC Patches Jun 19, 2020
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* DCN3 improvements
* Fw updates
* A series of improvements and fixes
Anthony Koo (4):
drm/amd/display: [FW Promotion] Release 1.0.16
drm/amd/display: [FW Promotion] Release 1.0.17
drm/amd/display: [FW Promotion] Release 1.0.18
drm/amd/display: [FW Promotion] Release 1.0.19
Aric Cyr (2):
drm/amd/display: 3.2.90
drm/amd/display: 3.2.91
Aurabindo Pillai (1):
drm/amd/display: clip plane rects in DM before passing into DC
Bhawanpreet Lakha (1):
drm/amd/display: enable assr
Brandon Syu (1):
drm/amd/display: use dispclk AVFS for dppclk
Camille Cho (1):
drm/amd/display: Correctly respond in psr enablement interface
Chris Park (2):
drm/amd/display: Force ODM combine on 5K+ 420 modes drm/amd/display: Allow 4 split on 10K 420 modes
Dale Zhao (1):
drm/amd/display: fine tune logic of edid max TMDS clock check
David Galiffi (1):
drm/amd/display: Compare v_front_porch when checking if streams are
synchronizable
Derek Lai (1):
drm/amd/display: VSC SDP supported for SST
Dmytro Laktyushkin (1):
drm/amd/display: fix 4to1 odm MPC_OUT_FLOW_CONTROL_COUNT
Eric Yang (1):
drm/amd/display: add mechanism to skip DCN init
Jake Wang (1):
drm/amd/display: Added local_sink null check before access
Martin Leung (1):
drm/amd/display: enable seamless boot for dcn30
Michael Strauss (1):
drm/amd/display: implement edid max TMDS clock check in DC
Mikita Lipski (1):
drm/amd/display: Fix calculation of virtual channel payload
Nicholas Kazlauskas (2):
drm/amd/display: Fix DML failures caused by doubled stereo viewport drm/amd/display: Fill in dmub_srv fw_version from firmware metadata
Peikang Zhang (1):
drm/amd/display: Red screen observed on startup
Stylon Wang (2):
drm/amd/display: Enable output_bpc property on all outputs drm/amd/display: Fix ineffective setting of max bpc property
Wenjing Liu (2):
drm/amd/display: allow query ddc data over aux to be read only
operation
drm/amd/display: DP link layer test 4.2.1.1 fix due to specs update
Wyatt Wood (1):
drm/amd/display: Use dmub fw to lock pipe, cursor, dig
Yi-Ling Chen (1):
drm/amd/display: Fixed using wrong eDP power sequence function pointer
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 34 ++- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 +- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 37 +++ .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 19 +- .../gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 11 +- .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 18 +- .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 40 ++- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 14 +- .../gpu/drm/amd/display/dc/core/dc_link_ddc.c | 42 +-- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 121 ++++++--- .../drm/amd/display/dc/core/dc_link_hwss.c | 8 +- .../gpu/drm/amd/display/dc/core/dc_resource.c | 4 + drivers/gpu/drm/amd/display/dc/dc.h | 5 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 28 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 2 + drivers/gpu/drm/amd/display/dc/dc_link.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 + drivers/gpu/drm/amd/display/dc/dce/Makefile | 3 +- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 57 ++++ .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 39 +++ .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 25 +- .../amd/display/dc/dcn10/dcn10_link_encoder.c | 7 + .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 20 +- .../drm/amd/display/dc/dcn20/dcn20_resource.c | 13 + .../drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +- .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 245 +++++++++--------- .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 8 +- drivers/gpu/drm/amd/display/dc/dm_cp_psp.h | 1 + .../dc/dml/dcn30/display_mode_vba_30.c | 5 + .../gpu/drm/amd/display/dc/inc/dc_link_ddc.h | 2 +- .../gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 +- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 5 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 51 +++- .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c | 15 ++ .../gpu/drm/amd/display/dmub/src/dmub_dcn20.h | 4 + .../gpu/drm/amd/display/dmub/src/dmub_dcn21.c | 10 - .../gpu/drm/amd/display/dmub/src/dmub_dcn21.h | 6 - .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 50 ++-- 39 files changed, 649 insertions(+), 315 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c create mode 100644 drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/30 drm/amd/display: Use dmub fw to lock pipe, cursor, dig
From: Wyatt Wood <[email protected]>
[Why]
Hw lock manager adds the ability to lock pipe, cursor, and dig in fw.
[How]
Send hw lock command to fw to lock pipe, cursor, and dig.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 36 ++++++++++-- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 43 ++++++++++++-- drivers/gpu/drm/amd/display/dc/dce/Makefile | 3 +- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 57 +++++++++++++++++++ .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 39 +++++++++++++ .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 17 +++++- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 18 +++++- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 1 + 8 files changed, 200 insertions(+), 14 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c create mode 100644 drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h
drivers/gpu/drm/amd/display/dc/core/dc.c +32 -4
@@ -68,6 +68,8 @@#include "dmub/dmub_srv.h" +#include "dce/dmub_hw_lock_mgr.h" +#define CTX \ dc->ctx
@@ -2321,9 +2323,22 @@ static void commit_planes_for_stream(struct dc *dc, }if ((update_type !=UPDATE_TYPE_FAST ) && stream->update_flags.bits.dsc_changed) -if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) - top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable ( - top_pipe_to_program->stream_res.tg); +if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) { +if (stream &&should_use_dmub_lock (stream->link)) { +union dmub_hw_lock_flags hw_locks = {0 }; +struct dmub_hw_lock_inst_flags inst_flags = {0 }; + + hw_locks.bits.lock_dig =1 ; + inst_flags.dig_inst = top_pipe_to_program->stream_res.tg->inst; + +dmub_hw_lock_mgr_cmd (dc->ctx->dmub_srv, + true, + &hw_locks, + &inst_flags); + }else + top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable ( + top_pipe_to_program->stream_res.tg); + }if ((update_type !=UPDATE_TYPE_FAST ) && dc->hwss.interdependent_update_lock) dc->hwss.interdependent_update_lock (dc, context, true);
@@ -2493,7 +2508,20 @@ static void commit_planes_for_stream(struct dc *dc, top_pipe_to_program->stream_res.tg->funcs->wait_for_state ( top_pipe_to_program->stream_res.tg,CRTC_STATE_VACTIVE ); - top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_disable ( + +if (stream &&should_use_dmub_lock (stream->link)) { +union dmub_hw_lock_flags hw_locks = {0 }; +struct dmub_hw_lock_inst_flags inst_flags = {0 }; + + hw_locks.bits.lock_dig =1 ; + inst_flags.dig_inst = top_pipe_to_program->stream_res.tg->inst; + +dmub_hw_lock_mgr_cmd (dc->ctx->dmub_srv, + false, + &hw_locks, + &inst_flags); + }else + top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_disable ( top_pipe_to_program->stream_res.tg); }
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +37 -6
61 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce/Makefile +2 -1
@@ -29,7 +29,8 @@ DCE = dce_audio.o dce_stream_encoder.o dce_link_encoder.o dce_hwseq.o \ dce_mem_input.o dce_clock_source.o dce_scl_filters.o dce_transform.o \ dce_opp.o dce_dmcu.o dce_abm.o dce_ipp.o dce_aux.o \ -dce_i2c.o dce_i2c_hw.o dce_i2c_sw.o dmub_psr.o dmub_abm.o dce_panel_cntl.o +dce_i2c.o dce_i2c_hw.o dce_i2c_sw.o dmub_psr.o dmub_abm.o dce_panel_cntl.o \ +dmub_hw_lock_mgr.o AMD_DAL_DCE = $(addprefix $(AMDDALPATH)/dc/dce/,$(DCE))
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c new file +57 -0
57 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright 2012-16 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef _DMUB_HW_LOCK_MGR_H_ +#define _DMUB_HW_LOCK_MGR_H_ + +#include "dc_dmub_srv.h" +#include "core_types.h" + +void dmub_hw_lock_mgr_cmd (struct dc_dmub_srv *dmub_srv, +bool lock, +union dmub_hw_lock_flags *hw_locks, +struct dmub_hw_lock_inst_flags *inst_flags); + +bool should_use_dmub_lock (struct dc_link *link); + +#endif /*_DMUB_HW_LOCK_MGR_H_ */
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +15 -2
@@ -51,6 +51,7 @@#include "link_hwss.h" #include "dpcd_defs.h" #include "dsc.h" +#include "dce/dmub_hw_lock_mgr.h" #define DC_LOGGER_INIT (logger)
@@ -1763,8 +1764,20 @@ void dcn10_cursor_lock(struct dc *dc, struct pipe_ctx *pipe, bool lock)if (lock)delay_cursor_until_vupdate (dc, pipe); - dc->res_pool->mpc->funcs->cursor_lock (dc->res_pool->mpc, - pipe->stream_res.opp->inst, lock); +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 }; + + hw_locks.bits.lock_cursor =1 ; + inst_flags.opp_inst = pipe->stream_res.opp->inst; + +dmub_hw_lock_mgr_cmd (dc->ctx->dmub_srv, + lock, + &hw_locks, + &inst_flags); + }else + dc->res_pool->mpc->funcs->cursor_lock (dc->res_pool->mpc, + pipe->stream_res.opp->inst, lock); } static bool wait_for_reset_trigger_to_occur(
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +17 -1
@@ -49,6 +49,8 @@#include "dc_link_dp.h" #include "vm_helper.h" #include "dccg.h" +#include "dc_dmub_srv.h" +#include "dce/dmub_hw_lock_mgr.h" #define DC_LOGGER_INIT (logger)
@@ -1194,7 +1196,21 @@ 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 && pipe->plane_state->triplebuffer_flips) { +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 }; + + hw_locks.bits.lock_pipe =1 ; + inst_flags.otg_inst = pipe->stream_res.tg->inst; + +if (pipe->plane_state !=NULL ) + hw_locks.bits.triple_buffer_lock = pipe->plane_state->triplebuffer_flips; + +dmub_hw_lock_mgr_cmd (dc->ctx->dmub_srv, + lock, + &hw_locks, + &inst_flags); + }else if (pipe->plane_state !=NULL && pipe->plane_state->triplebuffer_flips) {if (lock) pipe->stream_res.tg->funcs->triplebuffer_lock (pipe->stream_res.tg);else
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +1 -0
@@ -619,6 +619,7 @@ struct dmub_rb_cmd_abm_init_config { };union dmub_rb_cmd { +struct dmub_rb_cmd_lock_hw lock_hw;struct dmub_rb_cmd_read_modify_write read_modify_write;struct dmub_rb_cmd_reg_field_update_sequence reg_field_update_seq;struct dmub_rb_cmd_burst_write burst_write;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/30 drm/amd/display: [FW Promotion] Release 1.0.16
In reply to Rodrigo SiqueiraFrom: 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 0xee850bb2f +#define DMUB_FW_VERSION_GIT_HASH 0x703682cd7#define DMUB_FW_VERSION_MAJOR 1#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 15 +#define DMUB_FW_VERSION_REVISION 16#define DMUB_FW_VERSION_UCODE ((DMUB_FW_VERSION_MAJOR << 24) | (DMUB_FW_VERSION_MINOR << 16) | DMUB_FW_VERSION_REVISION)#endif
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/30 drm/amd/display: Fix calculation of virtual channel payload
In reply to Rodrigo SiqueiraFrom: Mikita Lipski <[email protected]>
[why]
The calculation of virtual channel payload would not take link settings in account. As we calculate VCPI slots needed both PBN for stream and also PBN per time slot. Before we would use generic PBN per time slot, which would not change with link settings causing wrong Payload allocation.
[how]
Provide PBN per time slot for each Virtual channel payload calculation.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -5538,7 +5538,7 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder, mst_mgr, mst_port, dm_new_connector_state->pbn, - 0); + dm_mst_get_pbn_divider(aconnector->dc_link));if (dm_new_connector_state->vcpi_slots <0 ) {DRM_DEBUG_ATOMIC ("failed finding vcpi slots: %d\n" , (int )dm_new_connector_state->vcpi_slots);return dm_new_connector_state->vcpi_slots;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +9 -10
@@ -543,6 +543,8 @@ static void increase_dsc_bpp(struct drm_atomic_state *state,int link_timeslots_used;int fair_pbn_alloc; + pbn_per_timeslot =dm_mst_get_pbn_divider (dc_link); +for (i =0 ; i < count; i++) {if (vars[i].dsc_enabled) { initial_slack[i] =kbps_to_peak_pbn (params[i].bw_range.max_kbps) - vars[i].pbn;
@@ -554,9 +556,6 @@ static void increase_dsc_bpp(struct drm_atomic_state *state, } } - pbn_per_timeslot =dc_link_bandwidth_kbps (dc_link, -dc_link_get_link_cap (dc_link)) / (8 *1000 *54 ); -while (remaining_to_increase) { next_index =-1 ; min_initial_slack =-1 ;
@@ -585,7 +584,7 @@ static void increase_dsc_bpp(struct drm_atomic_state *state, params[next_index].port->mgr, params[next_index].port, vars[next_index].pbn, - dm_mst_get_pbn_divider(dc_link)) < 0) + pbn_per_timeslot) < 0) return;if (!drm_dp_mst_atomic_check (state)) { vars[next_index].bpp_x16 =bpp_x16_from_pbn (params[next_index], vars[next_index].pbn);
@@ -595,7 +594,7 @@ static void increase_dsc_bpp(struct drm_atomic_state *state, params[next_index].port->mgr, params[next_index].port, vars[next_index].pbn, - dm_mst_get_pbn_divider(dc_link)) < 0) + pbn_per_timeslot) < 0) return; } }else {
@@ -604,7 +603,7 @@ static void increase_dsc_bpp(struct drm_atomic_state *state, params[next_index].port->mgr, params[next_index].port, vars[next_index].pbn, - dm_mst_get_pbn_divider(dc_link)) < 0) + pbn_per_timeslot) < 0) return;if (!drm_dp_mst_atomic_check (state)) { vars[next_index].bpp_x16 = params[next_index].bw_range.max_target_bpp_x16;
@@ -614,7 +613,7 @@ static void increase_dsc_bpp(struct drm_atomic_state *state, params[next_index].port->mgr, params[next_index].port, vars[next_index].pbn, - dm_mst_get_pbn_divider(dc_link)) < 0) + pbn_per_timeslot) < 0) return; } }
@@ -668,7 +667,7 @@ static void try_disable_dsc(struct drm_atomic_state *state, params[next_index].port->mgr, params[next_index].port, vars[next_index].pbn, - 0) < 0) + dm_mst_get_pbn_divider(dc_link)) < 0) return;if (!drm_dp_mst_atomic_check (state)) {
@@ -739,7 +738,7 @@ static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state, params[i].port->mgr, params[i].port, vars[i].pbn, - 0) < 0) + dm_mst_get_pbn_divider(dc_link)) < 0) return false; }if (!drm_dp_mst_atomic_check (state)) {
@@ -767,7 +766,7 @@ static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state, params[i].port->mgr, params[i].port, vars[i].pbn, - 0) < 0) + dm_mst_get_pbn_divider(dc_link)) < 0) return false; } }
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/30 drm/amd/display: Fixed using wrong eDP power sequence function pointer
In reply to Rodrigo SiqueiraFrom: Yi-Ling Chen <[email protected]>
[why]dc->hwss->edp_backlight_control is null, it would casue it only be off main-link of eDP. It is not worng behavior for eDP power sequence off.
[how]
Must use hwseq->funcs.edp_backlight_control finction pointer for edp backlight.
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +2 -2
@@ -1394,10 +1394,10 @@ void dcn10_init_hw(struct dc *dc)if (edp_link && edp_link->link_enc->funcs->is_dig_enabled && edp_link->link_enc->funcs->is_dig_enabled (edp_link->link_enc) && - dc->hwss.edp_backlight_control && + dc->hwseq->funcs.edp_backlight_control && dc->hwss.power_down && dc->hwss.edp_power_control) { - dc->hwss.edp_backlight_control (edp_link, false); + dc->hwseq->funcs.edp_backlight_control (edp_link, false); dc->hwss.power_down (dc); dc->hwss.edp_power_control (edp_link, false); }else {
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/30 drm/amd/display: [FW Promotion] Release 1.0.17
In reply to Rodrigo SiqueiraFrom: 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 0x703682cd7 +#define DMUB_FW_VERSION_GIT_HASH 0x6d5deb31c#define DMUB_FW_VERSION_MAJOR 1#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 16 +#define DMUB_FW_VERSION_REVISION 17#define DMUB_FW_VERSION_UCODE ((DMUB_FW_VERSION_MAJOR << 24) | (DMUB_FW_VERSION_MINOR << 16) | DMUB_FW_VERSION_REVISION)#endif
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/30 drm/amd/display: implement edid max TMDS clock check in DC
In reply to Rodrigo SiqueiraFrom: Michael Strauss <[email protected]>
[WHY]
Currently DC doesn't check requested pixel clock against an EDID specified TMDS max clock if it exists, passing modes that should fail
[HOW]
Add max TMDS clk to edid caps and perform check during validation
--- drivers/gpu/drm/amd/display/dc/dc_types.h | 3 +++ .../gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 10 ++++++++++ 2 files changed, 13 insertions(+)
drivers/gpu/drm/amd/display/dc/dc_types.h +3 -0
@@ -261,6 +261,9 @@ struct dc_edid_caps {bool edid_hdmi;bool hdr_supported; +uint32_t max_tmds_clk_mhz; +uint32_t max_forum_tmds_clk_mhz; +struct dc_panel_patch panel_patch; };
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c +10 -0
@@ -619,11 +619,20 @@ bool dcn10_link_encoder_validate_dvi_output(static bool dcn10_link_encoder_validate_hdmi_output (const struct dcn10_link_encoder *enc10,const struct dc_crtc_timing *crtc_timing, +const struct dc_edid_caps *edid_caps,int adjusted_pix_clk_100hz) {enum dc_color_depth max_deep_color = enc10->base.features.max_hdmi_deep_color; +// check pixel clock against edid specified max TMDS clk +if (edid_caps->max_tmds_clk_mhz !=0 && + adjusted_pix_clk_100hz > edid_caps->max_tmds_clk_mhz *10000 ) +return false; +if (edid_caps->max_forum_tmds_clk_mhz !=0 && + adjusted_pix_clk_100hz > edid_caps->max_forum_tmds_clk_mhz *10000 ) +return false; +if (max_deep_color < crtc_timing->display_color_depth)return false;
@@ -801,6 +810,7 @@ bool dcn10_link_encoder_validate_output_with_stream( is_valid =dcn10_link_encoder_validate_hdmi_output ( enc10, &stream->timing, + &stream->sink->edid_caps, stream->phy_pix_clk *10 );break ;case SIGNAL_TYPE_DISPLAY_PORT :
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/30 drm/amd/display: enable assr
In reply to Rodrigo SiqueiraFrom: Bhawanpreet Lakha <[email protected]>
[Why]
assr is content protection for eDP, in order to use it we need to call psp ta (dtm)
[How]
We have a enable_assr callback, hook into this and call the correct psp cmd id to enable assr.
--- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 37 +++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dm_cp_psp.h | 1 + 2 files changed, 38 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +37 -0
@@ -390,6 +390,42 @@ void hdcp_destroy(struct hdcp_workqueue *hdcp_work)kfree (hdcp_work); } + +static bool enable_assr (void *handle,struct dc_link *link) +{ + +struct hdcp_workqueue *hdcp_work = handle; +struct mod_hdcp hdcp = hdcp_work->hdcp; +struct psp_context *psp = hdcp.config.psp.handle; +struct ta_dtm_shared_memory *dtm_cmd; +bool res = true; + +if (!psp->dtm_context.dtm_initialized) { +DRM_INFO ("Failed to enable ASSR, DTM TA is not initialized." ); +return false; + } + + dtm_cmd = (struct ta_dtm_shared_memory *)psp->dtm_context.dtm_shared_buf; + +mutex_lock (&psp->dtm_context.mutex); +memset (dtm_cmd,0 ,sizeof (struct ta_dtm_shared_memory )); + + dtm_cmd->cmd_id =TA_DTM_COMMAND__TOPOLOGY_ASSR_ENABLE ; + dtm_cmd->dtm_in_message.topology_assr_enable.display_topology_dig_be_index = link->link_enc_hw_inst; + dtm_cmd->dtm_status =TA_DTM_STATUS__GENERIC_FAILURE ; + +psp_dtm_invoke (psp, dtm_cmd->cmd_id); + +if (dtm_cmd->dtm_status !=TA_DTM_STATUS__SUCCESS ) { +DRM_INFO ("Failed to enable ASSR" ); + res = false; + } + +mutex_unlock (&psp->dtm_context.mutex); + +return res; +} +static void update_config (void *handle,struct cp_psp_stream_config *config) {struct hdcp_workqueue *hdcp_work = handle;
@@ -599,6 +635,7 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct } cp_psp->funcs.update_stream_config = update_config; + cp_psp->funcs.enable_assr = enable_assr; cp_psp->handle = hdcp_work;/* File created at /sys/class/drm/card0/device/hdcp_srm*/
drivers/gpu/drm/amd/display/dc/dm_cp_psp.h +1 -0
@@ -38,6 +38,7 @@ struct cp_psp_stream_config { };struct cp_psp_funcs { +bool (*enable_assr)(void *handle,struct dc_link *link);void (*update_stream_config)(void *handle,struct cp_psp_stream_config *config); };
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/30 drm/amd/display: Fix DML failures caused by doubled stereo viewport
In reply to Rodrigo SiqueiraFrom: Nicholas Kazlauskas <[email protected]>
[Why]
Side-by-side and Top-and-bottom stereo configurations fail DML mode validation due to Viewport exceeded.
This is because we consider the planes as being pipe split in pipe population so we end up doubling the viewport width, eg. from 4k to 8k.
[How]
These pipes technically aren't hsplit, so add a check for determining whether is_hsplit should be set.
--- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 11 +++++++++-- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +9 -2
@@ -302,10 +302,17 @@ static void pipe_ctx_to_e2e_pipe_params ( struct _vcs_dpi_display_pipe_params_st *input) { input->src.is_hsplit = false; -if (pipe->top_pipe !=NULL && pipe->top_pipe->plane_state == pipe->plane_state) + +/* stereo can never be split */ +if (pipe->plane_state->stereo_format ==PLANE_STEREO_FORMAT_SIDE_BY_SIDE || + pipe->plane_state->stereo_format ==PLANE_STEREO_FORMAT_TOP_AND_BOTTOM ) { +/* reset the split group if it was already considered split. */ + input->src.hsplit_grp = pipe->pipe_idx; + }else if (pipe->top_pipe !=NULL && pipe->top_pipe->plane_state == pipe->plane_state) { input->src.is_hsplit = true; -else if (pipe->bottom_pipe !=NULL && pipe->bottom_pipe->plane_state == pipe->plane_state) + }else if (pipe->bottom_pipe !=NULL && pipe->bottom_pipe->plane_state == pipe->plane_state) { input->src.is_hsplit = true; + }if (pipe->plane_res.dpp->ctx->dc->debug.optimized_watermark) {/*
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +8 -0
@@ -2257,6 +2257,14 @@ int dcn20_populate_dml_pipes_from_context( pipes[pipe_cnt].pipe.src.is_hsplit = (res_ctx->pipe_ctx[i].bottom_pipe && res_ctx->pipe_ctx[i].bottom_pipe->plane_state == pln) || (res_ctx->pipe_ctx[i].top_pipe && res_ctx->pipe_ctx[i].top_pipe->plane_state == pln) || pipes[pipe_cnt].pipe.dest.odm_combine != dm_odm_combine_mode_disabled; + +/* stereo is never split, nor odm combine */ +if (pln->stereo_format ==PLANE_STEREO_FORMAT_SIDE_BY_SIDE || + pln->stereo_format ==PLANE_STEREO_FORMAT_TOP_AND_BOTTOM ) { + pipes[pipe_cnt].pipe.src.is_hsplit = false; + pipes[pipe_cnt].pipe.src.hsplit_grp = res_ctx->pipe_ctx[i].pipe_idx; + } + pipes[pipe_cnt].pipe.src.source_scan = pln->rotation ==ROTATION_ANGLE_90 || pln->rotation ==ROTATION_ANGLE_270 ? dm_vert : dm_horz; pipes[pipe_cnt].pipe.src.viewport_y_y = scl->viewport_unadjusted.y;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/30 drm/amd/display: Correctly respond in psr enablement interface
In reply to Rodrigo SiqueiraFrom: Camille Cho <[email protected]>
[Why]dc_link_set_psr_allow_active() always returns true, even in the case that PSR is not supported.
[How]
Hook up the return value of dc_link_set_psr_allow_active().
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +4 -2
@@ -2557,12 +2557,14 @@ bool dc_link_set_psr_allow_active(struct dc_link *link, bool allow_active, boolstruct dmcu *dmcu = dc->res_pool->dmcu;struct dmub_psr *psr = dc->res_pool->psr; + link->psr_settings.psr_allow_active = allow_active; +if (psr !=NULL && link->psr_settings.psr_feature_enabled) psr->funcs->psr_enable (psr, allow_active);else if ((dmcu !=NULL && dmcu->funcs->is_dmcu_initialized (dmcu)) && link->psr_settings.psr_feature_enabled) dmcu->funcs->set_psr_enable (dmcu, allow_active, wait); - - link->psr_settings.psr_allow_active = allow_active; +else +return false;return true; }
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/30 drm/amd/display: [FW Promotion] Release 1.0.18
In reply to Rodrigo SiqueiraFrom: Anthony Koo <[email protected]>
[Header Changes]
- Update scratch information for boot status
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 45 ++++++++++++++++--- 1 file changed, 39 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +39 -6
@@ -36,10 +36,10 @@/* Firmware versioning. */ #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0x6d5deb31c +#define DMUB_FW_VERSION_GIT_HASH 0x67e8928df#define DMUB_FW_VERSION_MAJOR 1#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 17 +#define DMUB_FW_VERSION_REVISION 18#define DMUB_FW_VERSION_UCODE ((DMUB_FW_VERSION_MAJOR << 24) | (DMUB_FW_VERSION_MINOR << 16) | DMUB_FW_VERSION_REVISION)#endif
@@ -146,10 +146,8 @@ union dmub_fw_meta {* DMCUB scratch registers can be used to determine firmware status. * Current scratch register usage is as follows: * -* SCRATCH0: Legacy status register -* SCRATCH1: Firmware version -* SCRATCH2: Firmware status bits defined by dmub_fw_status_bit -* SCRATCH3: Reserved firmware status bits +* SCRATCH0: FW Boot Status register +* SCRATCH15: FW Boot Options register */ /**
@@ -160,6 +158,41 @@ enum dmub_fw_status_bit { DMUB_FW_STATUS_BIT_COMMAND_TABLE_READY = (1 << 1), }; + +/* Register bit definition for SCRATCH0 */ +union dmub_fw_boot_status { +struct { +uint32_t dal_fw :1 ; +uint32_t mailbox_rdy :1 ; +uint32_t optimized_init_done :1 ; +uint32_t reserved :29 ; + } bits; +uint32_t all; +}; + +enum dmub_fw_boot_status_bit { +DMUB_FW_BOOT_STATUS_BIT_DAL_FIRMWARE = (1 <<0 ), +DMUB_FW_BOOT_STATUS_BIT_MAILBOX_READY = (1 <<1 ), +DMUB_FW_BOOT_STATUS_BIT_OPTIMIZED_INIT_DONE = (1 <<2 ), +}; + +/* Register bit definition for SCRATCH15 */ +union dmub_fw_boot_options { +struct { +uint32_t pemu_env :1 ; +uint32_t fpga_env :1 ; +uint32_t optimized_init :1 ; +uint32_t reserved :29 ; + } bits; +uint32_t all; +}; + +enum dmub_fw_boot_options_bit { +DMUB_FW_BOOT_OPTION_BIT_PEMU_ENV = (1 <<0 ), +DMUB_FW_BOOT_OPTION_BIT_FPGA_ENV = (1 <<1 ), +DMUB_FW_BOOT_OPTION_BIT_OPTIMIZED_INIT_DONE = (1 <<2 ), +}; +//============================================================================== //</DMUB_STATUS>================================================================ //==============================================================================
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/30 drm/amd/display: 3.2.90
In reply to Rodrigo SiqueiraFrom: 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.89" +#define DC_VER "3.2.90"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/30 drm/amd/display: clip plane rects in DM before passing into DC
In reply to Rodrigo SiqueiraFrom: Aurabindo Pillai <[email protected]>
[Why]
DC global validation can fail when userspace requests to draw large plane without performing the clipping themselves.
This is observed in the IGT kms_plane panning tests for 4K displays where they draw an 8K plane without any clipping while expecting only the top 4K to be drawn.
[How]
DRM already has helpers to take care of the clipping necessary and to mark whether a plane is visible or not, so make use of these helpers in DM before passing the plane to DC.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +25 -0
@@ -5779,6 +5779,17 @@ static void dm_plane_helper_cleanup_fb(struct drm_plane *plane,amdgpu_bo_unref (&rbo); } +static int dm_plane_helper_check_state (struct drm_plane_state *state, +struct drm_crtc_state *new_crtc_state) +{ +int max_downscale =0 ; +int max_upscale =INT_MAX ; + +/* TODO: These should be checked against DC plane caps */ +return drm_atomic_helper_check_plane_state ( + state, new_crtc_state, max_downscale, max_upscale, true, true); +} +static int dm_plane_atomic_check (struct drm_plane *plane,struct drm_plane_state *state) {
@@ -5786,6 +5797,7 @@ static int dm_plane_atomic_check(struct drm_plane *plane,struct dc *dc = adev->dm.dc;struct dm_plane_state *dm_plane_state;struct dc_scaling_info scaling_info; +struct drm_crtc_state *new_crtc_state;int ret; dm_plane_state =to_dm_plane_state (state);
@@ -5793,6 +5805,15 @@ static int dm_plane_atomic_check(struct drm_plane *plane,if (!dm_plane_state->dc_state)return 0 ; + new_crtc_state = +drm_atomic_get_new_crtc_state (state->state, state->crtc); +if (!new_crtc_state) +return -EINVAL ; + + ret =dm_plane_helper_check_state (state, new_crtc_state); +if (ret) +return ret; + ret =fill_dc_scaling_info (state, &scaling_info);if (ret)return ret;
@@ -8312,6 +8333,10 @@ static int dm_update_plane_state(struct dc *dc,if (!needs_reset)return 0 ; + ret =dm_plane_helper_check_state (new_plane_state, new_crtc_state); +if (ret) +return ret; +WARN_ON (dm_new_plane_state->dc_state); dc_new_plane_state =dc_create_plane_state (dc);
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/30 drm/amd/display: Added local_sink null check before access
In reply to Rodrigo SiqueiraFrom: Jake Wang <[email protected]>
[Why & How]
Need to check if local_sink is NULL before accessing.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +4 -2
@@ -167,7 +167,8 @@ bool edp_receiver_ready_T9(struct dc_link *link) }while (++tries <50 ); } -if (link->local_sink->edid_caps.panel_patch.extra_delay_backlight_off >0 ) +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;
@@ -201,7 +202,8 @@ bool edp_receiver_ready_T7(struct dc_link *link) }while (time_taken_in_ns <50 *1000000 );//MAx T7 is 50ms } -if (link->local_sink->edid_caps.panel_patch.extra_t7_ms >0 ) +if (link->local_sink && + link->local_sink->edid_caps.panel_patch.extra_t7_ms >0 )udelay (link->local_sink->edid_caps.panel_patch.extra_t7_ms *1000 );return result;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/30 drm/amd/display: fine tune logic of edid max TMDS clock check
In reply to Rodrigo SiqueiraFrom: Dale Zhao <[email protected]>
[WHY]
Check max_tmds_clk_mhz firstly will restrict pixel clock under HDMI 1.4, thus HDMI2.0 port can't correctly support 4K 60Hz.
[HOW]
Fine tune the logic to check max_forum_tmds_clk_mhz firstly.
--- drivers/gpu/drm/amd/display/dc/dc_types.h | 5 ++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_types.h +2 -3
@@ -255,15 +255,14 @@ struct dc_edid_caps {uint8_t qs_bit;uint8_t qy_bit; +uint32_t max_tmds_clk_mhz; +/*HDMI 2.0 caps*/ bool lte_340mcsc_scramble;bool edid_hdmi;bool hdr_supported; -uint32_t max_tmds_clk_mhz; -uint32_t max_forum_tmds_clk_mhz; -struct dc_panel_patch panel_patch; };
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c +0 -3
@@ -629,9 +629,6 @@ static bool dcn10_link_encoder_validate_hdmi_output(if (edid_caps->max_tmds_clk_mhz !=0 && adjusted_pix_clk_100hz > edid_caps->max_tmds_clk_mhz *10000 )return false; -if (edid_caps->max_forum_tmds_clk_mhz !=0 && - adjusted_pix_clk_100hz > edid_caps->max_forum_tmds_clk_mhz *10000 ) -return false;if (max_deep_color < crtc_timing->display_color_depth)return false;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/30 drm/amd/display: add mechanism to skip DCN init
In reply to Rodrigo SiqueiraFrom: Eric Yang <[email protected]>
[Why]
If optimized init is done in FW. DCN init be skipped in driver. This need to be communicated between driver and fw and maintain backwards compatibility.
[How]
Use DMUB scratch 0 bit 2 to indicate optimized init done in fw and use DMUB scatch 4 bit 0 to indicate drive supports the optimized flow so FW will perform it.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 28 ++++--------- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 2 + .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 5 ++- .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c | 15 +++++++ .../gpu/drm/amd/display/dmub/src/dmub_dcn20.h | 4 ++ .../gpu/drm/amd/display/dmub/src/dmub_dcn21.c | 10 ----- .../gpu/drm/amd/display/dmub/src/dmub_dcn21.h | 6 --- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 40 +++++-------------- 10 files changed, 46 insertions(+), 72 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -3
@@ -2681,6 +2681,7 @@ void dc_interrupt_ack(struct dc *dc, enum dc_irq_source src)dal_irq_service_ack (dc->res_pool->irqs, src); } +void dc_set_power_state (struct dc *dc,enum dc_acpi_cm_power_state power_state)
@@ -2692,9 +2693,6 @@ void dc_set_power_state(case DC_ACPI_CM_POWER_STATE_D0 :dc_resource_state_construct (dc, dc->current_state); -if (dc->ctx->dmub_srv) -dc_dmub_srv_wait_phy_init (dc->ctx->dmub_srv); - dc->hwss.init_hw (dc); if (dc->hwss.init_sys_ctx != NULL &&
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +8 -20
@@ -106,29 +106,17 @@ void dc_dmub_srv_wait_idle(struct dc_dmub_srv *dc_dmub_srv)DC_ERROR ("Error waiting for DMUB idle: status=%d\n" , status); } -void dc_dmub_srv_wait_phy_init (struct dc_dmub_srv *dc_dmub_srv) +bool dc_dmub_srv_optimized_init_done (struct dc_dmub_srv *dc_dmub_srv) { -struct dmub_srv *dmub = dc_dmub_srv->dmub; -struct dc_context *dc_ctx = dc_dmub_srv->ctx; -enum dmub_status status; +struct dmub_srv *dmub; +union dmub_fw_boot_status status; -for (;;) { -/* Wait up to a second for PHY init. */ - status =dmub_srv_wait_for_phy_init (dmub,1000000 ); -if (status ==DMUB_STATUS_OK ) -/* Initialization OK */ -break ; +if (!dc_dmub_srv || !dc_dmub_srv->dmub) +return false; -DC_ERROR ("DMCUB PHY init failed: status=%d\n" , status); -ASSERT (0 ); + dmub = dc_dmub_srv->dmub; -if (status !=DMUB_STATUS_TIMEOUT ) -/* -* Server likely initialized or we don't have -* DMCUB HW support - this won't end. -*/ -break ; + status = dmub->hw_funcs.get_fw_status (dmub); -/* Continue spinning so we don't hang the ASIC. */ - } +return status.bits.optimized_init_done; }
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +2 -0
@@ -56,4 +56,6 @@ void dc_dmub_srv_wait_idle(struct dc_dmub_srv *dc_dmub_srv);void dc_dmub_srv_wait_phy_init (struct dc_dmub_srv *dc_dmub_srv); +bool dc_dmub_srv_optimized_init_done (struct dc_dmub_srv *dc_dmub_srv); +#endif /* _DMUB_DC_SRV_H_ */
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +3 -1
@@ -1288,7 +1288,9 @@ void dcn10_init_hw(struct dc *dc)if (!dcb->funcs->is_accelerated_mode (dcb)) hws->funcs.disable_vga (dc->hwseq); - hws->funcs.bios_golden_init (dc); +if (!dc_dmub_srv_optimized_init_done (dc->ctx->dmub_srv)) + hws->funcs.bios_golden_init (dc); +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/dmub/dmub_srv.h +3 -2
@@ -264,9 +264,10 @@ struct dmub_srv_hw_funcs {bool (*is_hw_init)(struct dmub_srv *dmub); -bool (*is_phy_init)(struct dmub_srv *dmub); +void (*enable_dmub_boot_options)(struct dmub_srv *dmub); + +union dmub_fw_boot_status (*get_fw_status)(struct dmub_srv *dmub); -bool (*is_auto_load_done)(struct dmub_srv *dmub);void (*set_gpint)(struct dmub_srv *dmub,union dmub_gpint_data_register reg);
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c +15 -0
@@ -312,3 +312,18 @@ uint32_t dmub_dcn20_get_gpint_response(struct dmub_srv *dmub) {return REG_READ (DMCUB_SCRATCH7 ); } + +union dmub_fw_boot_status dmub_dcn20_get_fw_boot_status (struct dmub_srv *dmub) +{ +union dmub_fw_boot_status status; + + status.all =REG_READ (DMCUB_SCRATCH0 ); +return status; +} + +void dmub_dcn20_enable_dmub_boot_options (struct dmub_srv *dmub) +{ +union dmub_fw_boot_options boot_options = {0 }; + +REG_WRITE (DMCUB_SCRATCH14 , boot_options.all); +}
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.h +4 -0
@@ -192,4 +192,8 @@ bool dmub_dcn20_is_gpint_acked(struct dmub_srv *dmub,uint32_t dmub_dcn20_get_gpint_response (struct dmub_srv *dmub); +void dmub_dcn20_enable_dmub_boot_options (struct dmub_srv *dmub); + +union dmub_fw_boot_status dmub_dcn20_get_fw_boot_status (struct dmub_srv *dmub); +#endif /* _DMUB_DCN20_H_ */
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn21.c +0 -10
@@ -51,14 +51,4 @@ const struct dmub_srv_common_regs dmub_srv_dcn21_regs = {#undef DMUB_SF }; -/* Shared functions. */ -bool dmub_dcn21_is_auto_load_done (struct dmub_srv *dmub) -{ -return (REG_READ (DMCUB_SCRATCH0 ) ==3 ); -} - -bool dmub_dcn21_is_phy_init (struct dmub_srv *dmub) -{ -return REG_READ (DMCUB_SCRATCH10 ) ==0 ; -}
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn21.h +0 -6
@@ -32,10 +32,4 @@extern const struct dmub_srv_common_regs dmub_srv_dcn21_regs; -/* Hardware functions. */ - -bool dmub_dcn21_is_auto_load_done (struct dmub_srv *dmub); - -bool dmub_dcn21_is_phy_init (struct dmub_srv *dmub); -#endif /* _DMUB_DCN21_H_ */
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +10 -30
@@ -153,18 +153,16 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic) funcs->set_gpint = dmub_dcn20_set_gpint; funcs->is_gpint_acked = dmub_dcn20_is_gpint_acked; funcs->get_gpint_response = dmub_dcn20_get_gpint_response; + funcs->get_fw_status = dmub_dcn20_get_fw_boot_status; + funcs->enable_dmub_boot_options = dmub_dcn20_enable_dmub_boot_options; -if (asic ==DMUB_ASIC_DCN21 ) { +if (asic ==DMUB_ASIC_DCN21 ) dmub->regs = &dmub_srv_dcn21_regs; - funcs->is_auto_load_done = dmub_dcn21_is_auto_load_done; - funcs->is_phy_init = dmub_dcn21_is_phy_init; - }#ifdef CONFIG_DRM_AMD_DC_DCN3_0 if (asic ==DMUB_ASIC_DCN30 ) { dmub->regs = &dmub_srv_dcn30_regs; - funcs->is_auto_load_done = dmub_dcn30_is_auto_load_done; funcs->backdoor_load = dmub_dcn30_backdoor_load; funcs->setup_windows = dmub_dcn30_setup_windows; }
@@ -454,6 +452,10 @@ enum dmub_status dmub_srv_hw_init(struct dmub_srv *dmub,dmub_rb_init (&dmub->inbox1_rb, &rb_params); } +/* Report to DMUB what features are supported by current driver */ +if (dmub->hw_funcs.enable_dmub_boot_options) + dmub->hw_funcs.enable_dmub_boot_options (dmub); +if (dmub->hw_funcs.reset_release) dmub->hw_funcs.reset_release (dmub);
@@ -514,35 +516,13 @@ enum dmub_status dmub_srv_wait_for_auto_load(struct dmub_srv *dmub,if (!dmub->hw_init)return DMUB_STATUS_INVALID ; -if (!dmub->hw_funcs.is_auto_load_done) -return DMUB_STATUS_OK ; -for (i =0 ; i <= timeout_us; i +=100 ) { -if (dmub->hw_funcs.is_auto_load_done (dmub)) -return DMUB_STATUS_OK ; +union dmub_fw_boot_status status = dmub->hw_funcs.get_fw_status (dmub); -udelay (100 ); - } - -return DMUB_STATUS_TIMEOUT ; -} - -enum dmub_status dmub_srv_wait_for_phy_init (struct dmub_srv *dmub, -uint32_t timeout_us) -{ -uint32_t i =0 ; - -if (!dmub->hw_init) -return DMUB_STATUS_INVALID ; - -if (!dmub->hw_funcs.is_phy_init) -return DMUB_STATUS_OK ; - -for (i =0 ; i <= timeout_us; i +=10 ) { -if (dmub->hw_funcs.is_phy_init (dmub)) +if (status.bits.dal_fw && status.bits.mailbox_rdy)return DMUB_STATUS_OK ; -udelay (10 ); +udelay (100 ); }return DMUB_STATUS_TIMEOUT ;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/30 drm/amd/display: use dispclk AVFS for dppclk
In reply to Rodrigo SiqueiraFrom: Brandon Syu <[email protected]>
[Why]
There is using pixelclk AVFS for dppclk, that would cause issue.
[How]
To use dispclk AVFS for both dispclk and dppclk. There would choose dppclk for request voltage when dispclk wouldn't be updated case. If dispclk need to be updated, then it'll choose the bigger one from dppclk and dispclk for request voltage.
--- .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 18 +++++++++++++----- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 14 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c +13 -5
@@ -234,20 +234,26 @@ void dcn2_update_clocks(struct clk_mgr *clk_mgr_base, dpp_clock_lowered = true; clk_mgr->base.clks.dppclk_khz = new_clocks->dppclk_khz; -if (pp_smu && pp_smu->set_voltage_by_freq) - pp_smu->set_voltage_by_freq (&pp_smu->pp_smu,PP_SMU_NV_PIXELCLK , clk_mgr_base->clks.dppclk_khz /1000 ); - update_dppclk = true; }if (should_set_clock (safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz)) { clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz; -if (pp_smu && pp_smu->set_voltage_by_freq) - pp_smu->set_voltage_by_freq (&pp_smu->pp_smu,PP_SMU_NV_DISPCLK , clk_mgr_base->clks.dispclk_khz /1000 ); update_dispclk = true; } +if (update_dppclk || update_dispclk) { + new_clocks->disp_dpp_voltage_level_khz = new_clocks->dppclk_khz; + +if (update_dispclk) + new_clocks->disp_dpp_voltage_level_khz = new_clocks->dispclk_khz > new_clocks->dppclk_khz ? new_clocks->dispclk_khz : new_clocks->dppclk_khz; + + clk_mgr_base->clks.disp_dpp_voltage_level_khz = new_clocks->disp_dpp_voltage_level_khz; +if (pp_smu && pp_smu->set_voltage_by_freq) + pp_smu->set_voltage_by_freq (&pp_smu->pp_smu,PP_SMU_NV_DISPCLK , clk_mgr_base->clks.disp_dpp_voltage_level_khz /1000 ); + } +if (dc->config.forced_clocks == false || (force_reset && safe_to_lower)) {if (dpp_clock_lowered) {// if clock is being lowered, increase DTO before lowering refclk
@@ -403,6 +409,8 @@ static bool dcn2_are_clock_states_equal(struct dc_clocks *a,return false; else if (a->dppclk_khz != b->dppclk_khz) return false; + else if (a->disp_dpp_voltage_level_khz != b->disp_dpp_voltage_level_khz) + return false; else if (a->dcfclk_khz != b->dcfclk_khz) return false; else if (a->socclk_khz != b->socclk_khz)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -337,6 +337,7 @@ enum dcn_pwr_state {struct dc_clocks {int dispclk_khz;int dppclk_khz; +int disp_dpp_voltage_level_khz;int dcfclk_khz;int socclk_khz;int dcfclk_deep_sleep_khz;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/30 drm/amd/display: fix 4to1 odm MPC_OUT_FLOW_CONTROL_COUNT
In reply to Rodrigo SiqueiraFrom: Dmytro Laktyushkin <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +1 -1
@@ -618,7 +618,7 @@ static int calc_mpc_flow_ctrl_cnt(const struct dc_stream_state *stream,bool hblank_halved =optc2_is_two_pixels_per_containter (&stream->timing);int flow_ctrl_cnt; -if (opp_cnt ==2 ) +if (opp_cnt >=2 ) hblank_halved = true; flow_ctrl_cnt = stream->timing.h_total - stream->timing.h_addressable -
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 18/30 drm/amd/display: Force ODM combine on 5K+ 420 modes
In reply to Rodrigo SiqueiraFrom: Chris Park <[email protected]>
[Why]
All YCbCr420 resolutions 5K and above have tiling and discoloration issues. The issue can be remedied by forcing ODM combine from 5K to 8K. 10K resolution requires ODM 4:1. The mechanism of what the real problem is, that is inherent in ODM combine programming, doesn't seem to be pointed at singular register programming (CLK, MPC, DCSURF, etc.), and needs more in-depth programming sequence review for these new use case scenarios. Until then, workaround to enable ODM combine is proposed. While it is not our policy, HW spreadsheet also recommends turning on ODM for these scenario to lower the voltage.
[How]
Make pixel encoding and resolution size specific workaround to enable ODM combine on YCbCr420 high resolution modes.
--- .../drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +10 -0
@@ -3986,9 +3986,19 @@ void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l }else if (v->PlaneRequiredDISPCLKWithoutODMCombine > v->MaxDispclkRoundedDownToDFSGranularity) { v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1; v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithODMCombine2To1; +/*420 format workaround*/ +if (v->HActive[k] >7680 && v->OutputFormat[k] == dm_420) { + v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1; + v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithODMCombine2To1; + } }else { v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_disabled; v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithoutODMCombine; +/*420 format workaround*/ +if (v->HActive[k] >4096 && v->OutputFormat[k] == dm_420) { + v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1; + v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithODMCombine2To1; + } }if (v->ODMCombineEnablePerState[i][k] == dm_odm_combine_mode_4to1) {
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 19/30 drm/amd/display: Enable output_bpc property on all outputs
In reply to Rodrigo SiqueiraFrom: Stylon Wang <[email protected]>
[Why]
Connector property output_bpc is available on DP/eDP only. New IGT tests would benifit if this property works on HDMI.
[How]
Enable this read-only property on all types of connectors.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +3 -1
@@ -1058,7 +1058,6 @@ static const struct { {"link_settings", &dp_link_settings_debugfs_fops}, {"phy_settings", &dp_phy_settings_debugfs_fop}, {"test_pattern", &dp_phy_test_pattern_fops}, - {"output_bpc", &output_bpc_fops}, {"vrr_range", &vrr_range_fops}, #ifdef CONFIG_DRM_AMD_DC_HDCP {"hdcp_sink_capability", &hdcp_sink_capability_fops},
@@ -1142,6 +1141,9 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)debugfs_create_file_unsafe ("force_yuv420_output" ,0644 , dir, connector, &force_yuv420_output_fops); +debugfs_create_file ("output_bpc" ,0644 , dir, connector, + &output_bpc_fops); + connector->debugfs_dpcd_address =0 ; connector->debugfs_dpcd_size =0 ;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 20/30 drm/amd/display: Fill in dmub_srv fw_version from firmware metadata
In reply to Rodrigo SiqueiraFrom: Nicholas Kazlauskas <[email protected]>
[Why]
DMCUB firmware version is now available from firmware metadata block.
We should be passing this into dmub_srv so we can know when to apply firmware version specific functionality like using CW4 only instead of the REGION4.
[How]
We don't have the helpers for DM to actually extract out firmware metadata block themselves.
We could add that and add helpers in DM to grab this, but not every creation sequence has firmware instruction before dmub_srv_create.
Easiest way to handle this is to fill this in automatically per DM in the place we do have it - when calculating the region parameters. But only fill it in if DM already hasn't in case we need to override with a specific version.
We aren't do anything firmware version specific in dmub_srv_create today that does require fw_version, so while it's a little unituitive to do it when calculating region parameters it works for now.
--- drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +10 -0
@@ -281,6 +281,16 @@ dmub_srv_calc_region_info(struct dmub_srv *dmub,if (fw_info) { fw_state_size = fw_info->fw_region_size; trace_buffer_size = fw_info->trace_buffer_size; + +/** +* If DM didn't fill in a version, then fill it in based on +* the firmware meta now that we have it. +* +* TODO: Make it easier for driver to extract this out to +* pass during creation. +*/ +if (dmub->fw_version ==0 ) + dmub->fw_version = fw_info->fw_version; } trace_buff->base =dmub_align (mail->top,256 );
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 21/30 drm/amd/display: VSC SDP supported for SST
In reply to Rodrigo SiqueiraFrom: Derek Lai <[email protected]>
[why]
If a typeC to HDMI dongle supports YCbCr420 pass through and VSC colorimetry and pixel encoding formats in the Extended Receiver Capability, we shall allow VSC SDP to be used.
[How]
The Extended Receiver Capability field shall check the EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENT bit in the TRAINING_AUX_RD_INTERVAL register. Removed DPCD rev checking for VSC SDP.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -3
@@ -4646,10 +4646,8 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, stream->use_vsc_sdp_for_colorimetry = aconnector->dc_sink->is_vsc_sdp_colorimetry_supported; }else { -if (stream->link->dpcd_caps.dpcd_rev.raw >=0x14 && - stream->link->dpcd_caps.dprx_feature.bits.VSC_SDP_COLORIMETRY_SUPPORTED) { +if (stream->link->dpcd_caps.dprx_feature.bits.VSC_SDP_COLORIMETRY_SUPPORTED) stream->use_vsc_sdp_for_colorimetry = true; - } }mod_build_vsc_infopacket (stream, &stream->vsc_infopacket); }
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
@@ -3376,7 +3376,7 @@ static bool retrieve_link_cap(struct dc_link *link) link->dpcd_caps.dpcd_rev.raw = dpcd_data[DP_DPCD_REV -DP_DPCD_REV ]; -if (link->dpcd_caps.dpcd_rev.raw >=0x14 ) { +if (link->dpcd_caps.ext_receiver_cap_field_present) {for (i =0 ; i < read_dpcd_retry_cnt; i++) { status = core_link_read_dpcd( link,
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 22/30 drm/amd/display: Allow 4 split on 10K 420 modes
In reply to Rodrigo SiqueiraFrom: Chris Park <[email protected]>
[Why]
10K YCbCr420 does not need ODM 4:1, but it requires MPC 4 split indicated on the flags.
[How]
Make pixel encoding and resolution size specific workaround to enable ODM combine on YCbCr420 high resolution modes.
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 5 +++++ .../gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +5 -0
@@ -2745,6 +2745,11 @@ int dcn20_validate_apply_pipe_split_flags( split[i] =4 ; v->ODMCombineEnablePerState[vlevel][pipe_plane] = dm_odm_combine_mode_4to1; } +/*420 format workaround*/ +if (pipe->stream->timing.h_addressable >7680 && + pipe->stream->timing.pixel_encoding ==PIXEL_ENCODING_YCBCR420 ) { + split[i] =4 ; + }#endif v->ODMCombineEnabled[pipe_plane] = v->ODMCombineEnablePerState[vlevel][pipe_plane];
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +0 -5
@@ -3986,11 +3986,6 @@ void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l }else if (v->PlaneRequiredDISPCLKWithoutODMCombine > v->MaxDispclkRoundedDownToDFSGranularity) { v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1; v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithODMCombine2To1; -/*420 format workaround*/ -if (v->HActive[k] >7680 && v->OutputFormat[k] == dm_420) { - v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_2to1; - v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithODMCombine2To1; - } }else { v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_disabled; v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithoutODMCombine;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 23/30 drm/amd/display: Red screen observed on startup
In reply to Rodrigo SiqueiraFrom: Peikang Zhang <[email protected]>
[Why]
We try to to change new_clocks->dppclk_khz to 100000 when new_clocks->dppclk_khz is 0
[How]
Don't change new_clocks->dppclk_khz value when new_clocks->dppclk_khz is 0
--- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c +2 -1
@@ -153,8 +153,9 @@ void rn_update_clocks(struct clk_mgr *clk_mgr_base, }// workaround: Limit dppclk to 100Mhz to avoid lower eDP panel switch to plus 4K monitor underflow. +// Do not adjust dppclk if dppclk is 0 to avoid unexpected result if (!IS_DIAG_DC (dc->ctx->dce_environment)) { -if (new_clocks->dppclk_khz <100000 ) +if (new_clocks->dppclk_khz <100000 && new_clocks->dppclk_khz >0 ) new_clocks->dppclk_khz =100000 ; }
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 24/30 drm/amd/display: enable seamless boot for dcn30
In reply to Rodrigo SiqueiraFrom: Martin Leung <[email protected]>
why:
seamless boots requires split of init_hw into hw and pipes to work. This was implemented in dcn10_init_hw but did not apply yet to dcn30.
how:
Copy over dcn10_init_hw and adapt it to dcn30 using recent changes to dcn3. Behavior will be different in init sequence.
--- .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 245 +++++++++--------- .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 8 +- 2 files changed, 126 insertions(+), 127 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +125 -120
@@ -47,6 +47,8 @@#include "mpc.h" #include "mcif_wb.h" #include "dc_dmub_srv.h" +#include "link_hwss.h" +#include "dpcd_defs.h"
@@ -427,7 +429,6 @@ void dcn30_init_hw(struct dc *dc)struct dce_hwseq *hws = dc->hwseq;struct dc_bios *dcb = dc->ctx->dc_bios;struct resource_pool *res_pool = dc->res_pool; -struct dc_state *context = dc->current_state;uint32_t backlight =MAX_BACKLIGHT_LEVEL ;if (dc->clk_mgr && dc->clk_mgr->funcs->init_clocks)
@@ -437,153 +438,155 @@ void dcn30_init_hw(struct dc *dc)if (res_pool->dccg->funcs->dccg_init) res_pool->dccg->funcs->dccg_init (res_pool->dccg); -//Enable ability to power gate / don't force power on permanently - hws->funcs.enable_power_gating_plane (dc->hwseq, true); -if (IS_FPGA_MAXIMUS_DC (dc->ctx->dce_environment)) { -REG_WRITE (RBBMIF_TIMEOUT_DIS ,0xFFFFFFFF ); -REG_WRITE (RBBMIF_TIMEOUT_DIS_2 ,0xFFFFFFFF ); - - hws->funcs.dccg_init (hws); -REG_UPDATE (DCHUBBUB_GLOBAL_TIMER_CNTL ,DCHUBBUB_GLOBAL_TIMER_REFDIV ,2 ); -REG_UPDATE (DCHUBBUB_GLOBAL_TIMER_CNTL ,DCHUBBUB_GLOBAL_TIMER_ENABLE ,1 );REG_WRITE (REFCLK_CNTL ,0 ); - }else { -if (!dcb->funcs->is_accelerated_mode (dcb)) { - hws->funcs.bios_golden_init (dc); - hws->funcs.disable_vga (dc->hwseq); - } +REG_UPDATE (DCHUBBUB_GLOBAL_TIMER_CNTL ,DCHUBBUB_GLOBAL_TIMER_ENABLE ,1 ); +REG_WRITE (DIO_MEM_PWR_CTRL ,0 ); -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; - -if (!IS_FPGA_MAXIMUS_DC (dc->ctx->dce_environment)) { -if (res_pool->dccg && res_pool->hubbub) { - - (res_pool->dccg->funcs->get_dccg_ref_freq)(res_pool->dccg, - dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency, - &res_pool->ref_clocks.dccg_ref_clock_inKhz); - - (res_pool->hubbub->funcs->get_dchub_ref_freq)(res_pool->hubbub, - res_pool->ref_clocks.dccg_ref_clock_inKhz, - &res_pool->ref_clocks.dchub_ref_clock_inKhz); - }else { -// Not all ASICs have DCCG sw component - res_pool->ref_clocks.dccg_ref_clock_inKhz = - res_pool->ref_clocks.xtalin_clock_inKhz; - res_pool->ref_clocks.dchub_ref_clock_inKhz = - res_pool->ref_clocks.xtalin_clock_inKhz; - } - } - }else -ASSERT_CRITICAL (false); +if (!dc->debug.disable_clock_gate) { +/* enable all DCN clock gating */ +REG_WRITE (DCCG_GATE_DISABLE_CNTL ,0 ); -for (i =0 ; i < dc->link_count; i++) { -/* Power up AND update implementation according to the -* required signal (which may be different from the -* default signal on connector). -*/ -struct dc_link *link = dc->links[i]; +REG_WRITE (DCCG_GATE_DISABLE_CNTL2 ,0 ); - link->link_enc->funcs->hw_init (link->link_enc); +REG_UPDATE (DCFCLK_CNTL ,DCFCLK_GATE_DIS ,0 ); } - } -/* Power gate DSCs */ -for (i =0 ; i < res_pool->res_cap->num_dsc; i++) - hws->funcs.dsc_pg_control (hws, res_pool->dscs[i]->inst, false); +//Enable ability to power gate / don't force power on permanently +if (hws->funcs.enable_power_gating_plane) + hws->funcs.enable_power_gating_plane (hws, true); -/* Blank pixel data with OPP DPG */ -for (i =0 ; i < dc->res_pool->timing_generator_count; i++) { -struct timing_generator *tg = dc->res_pool->timing_generators[i]; - -if (tg->funcs->is_tg_enabled (tg)) - hws->funcs.init_blank (dc, tg); +return ; } -for (i =0 ; i < res_pool->timing_generator_count; i++) { -struct timing_generator *tg = dc->res_pool->timing_generators[i]; - -if (tg->funcs->is_tg_enabled (tg)) - tg->funcs->lock (tg); +if (!dcb->funcs->is_accelerated_mode (dcb)) { + hws->funcs.bios_golden_init (dc); + hws->funcs.disable_vga (dc->hwseq); } -for (i =0 ; i < dc->res_pool->pipe_count; i++) { -struct dpp *dpp = res_pool->dpps[i]; - - dpp->funcs->dpp_reset (dpp); - } +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; -/* Reset all MPCC muxes */ - res_pool->mpc->funcs->mpc_init (res_pool->mpc); +if (!IS_FPGA_MAXIMUS_DC (dc->ctx->dce_environment)) { +if (res_pool->dccg && res_pool->hubbub) { -/* initialize OPP mpc_tree parameter */ -for (i =0 ; i < dc->res_pool->res_cap->num_opp; i++) { - res_pool->opps[i]->mpc_tree_params.opp_id = res_pool->opps[i]->inst; - res_pool->opps[i]->mpc_tree_params.opp_list =NULL ; -for (j =0 ; j <MAX_PIPES ; j++) - res_pool->opps[i]->mpcc_disconnect_pending[j] = false; - } + (res_pool->dccg->funcs->get_dccg_ref_freq)(res_pool->dccg, + dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency, + &res_pool->ref_clocks.dccg_ref_clock_inKhz); -for (i =0 ; i < dc->res_pool->pipe_count; i++) { -struct timing_generator *tg = dc->res_pool->timing_generators[i]; -struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i]; -struct hubp *hubp = dc->res_pool->hubps[i]; -struct dpp *dpp = dc->res_pool->dpps[i]; - - pipe_ctx->stream_res.tg = tg; - pipe_ctx->pipe_idx = i; - - pipe_ctx->plane_res.hubp = hubp; - pipe_ctx->plane_res.dpp = dpp; - pipe_ctx->plane_res.mpcc_inst = dpp->inst; - hubp->mpcc_id = dpp->inst; - hubp->opp_id =OPP_ID_INVALID ; - hubp->power_gated = false; - pipe_ctx->stream_res.opp =NULL ; - - hubp->funcs->hubp_init (hubp); - -//dc->res_pool->opps[i]->mpc_tree_params.opp_id = dc->res_pool->opps[i]->inst; -//dc->res_pool->opps[i]->mpc_tree_params.opp_list = NULL; - dc->res_pool->opps[i]->mpcc_disconnect_pending[pipe_ctx->plane_res.mpcc_inst] = true; - pipe_ctx->stream_res.opp = dc->res_pool->opps[i]; -/*to do*/ - hws->funcs.plane_atomic_disconnect (dc, pipe_ctx); - } + (res_pool->hubbub->funcs->get_dchub_ref_freq)(res_pool->hubbub, + res_pool->ref_clocks.dccg_ref_clock_inKhz, + &res_pool->ref_clocks.dchub_ref_clock_inKhz); + }else { +// Not all ASICs have DCCG sw component + res_pool->ref_clocks.dccg_ref_clock_inKhz = + res_pool->ref_clocks.xtalin_clock_inKhz; + res_pool->ref_clocks.dchub_ref_clock_inKhz = + res_pool->ref_clocks.xtalin_clock_inKhz; + } + } + }else +ASSERT_CRITICAL (false); -/* initialize DWB pointer to MCIF_WB */ -for (i =0 ; i < res_pool->res_cap->num_dwb; i++) - res_pool->dwbc[i]->mcif = res_pool->mcif_wb[i]; +for (i =0 ; i < dc->link_count; i++) { +/* Power up AND update implementation according to the +* required signal (which may be different from the +* default signal on connector). +*/ +struct dc_link *link = dc->links[i]; -for (i =0 ; i < dc->res_pool->timing_generator_count; i++) { -struct timing_generator *tg = dc->res_pool->timing_generators[i]; + link->link_enc->funcs->hw_init (link->link_enc); -if (tg->funcs->is_tg_enabled (tg)) - tg->funcs->unlock (tg); +/* Check for enabled DIG to identify enabled display */ +if (link->link_enc->funcs->is_dig_enabled && + link->link_enc->funcs->is_dig_enabled (link->link_enc)) + link->link_status.link_active = true; } -for (i =0 ; i < dc->res_pool->pipe_count; i++) { -struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i]; +/* Power gate DSCs */ +for (i =0 ; i < res_pool->res_cap->num_dsc; i++) +if (hws->funcs.dsc_pg_control !=NULL ) + hws->funcs.dsc_pg_control (hws, res_pool->dscs[i]->inst, false); - dc->hwss.disable_plane (dc, pipe_ctx); +/* we want to turn off all dp displays before doing detection */ +if (dc->config.power_down_display_on_boot) { +uint8_t dpcd_power_state ='\0' ; +enum dc_status status =DC_ERROR_UNEXPECTED ; - pipe_ctx->stream_res.tg =NULL ; - pipe_ctx->plane_res.hubp =NULL ; +for (i =0 ; i < dc->link_count; i++) { +if (dc->links[i]->connector_signal !=SIGNAL_TYPE_DISPLAY_PORT ) +continue ; + +/* if any of the displays are lit up turn them off */ + status =core_link_read_dpcd (dc->links[i],DP_SET_POWER , + &dpcd_power_state,sizeof (dpcd_power_state)); +if (status ==DC_OK && dpcd_power_state ==DP_POWER_STATE_D0 ) { +/* blank dp stream before power off receiver*/ +if (dc->links[i]->link_enc->funcs->get_dig_frontend) { +unsigned int fe; + + fe = dc->links[i]->link_enc->funcs->get_dig_frontend ( + dc->links[i]->link_enc); + +for (j =0 ; j < dc->res_pool->stream_enc_count; j++) { +if (fe == dc->res_pool->stream_enc[j]->id) { + dc->res_pool->stream_enc[j]->funcs->dp_blank ( + dc->res_pool->stream_enc[j]); +break ; + } + } + } +dp_receiver_power_ctrl (dc->links[i], false); + } + } } -for (i =0 ; i < dc->res_pool->timing_generator_count; i++) { -struct timing_generator *tg = dc->res_pool->timing_generators[i]; - - tg->funcs->tg_init (tg); +/* If taking control over from VBIOS, we may want to optimize our first +* mode set, so we need to skip powering down pipes until we know which +* pipes we want to use. +* Otherwise, if taking control is not possible, we need to power +* everything down. +*/ +if (dcb->funcs->is_accelerated_mode (dcb) || dc->config.power_down_display_on_boot) { + hws->funcs.init_pipes (dc, dc->current_state); +if (dc->res_pool->hubbub->funcs->allow_self_refresh_control) + dc->res_pool->hubbub->funcs->allow_self_refresh_control (dc->res_pool->hubbub, + !dc->res_pool->hubbub->ctx->dc->debug.disable_stutter); } -/* end of FPGA. Below if real ASIC */ -if (IS_FPGA_MAXIMUS_DC (dc->ctx->dce_environment)) -return ; +/* In headless boot cases, DIG may be turned +* on which causes HW/SW discrepancies. +* To avoid this, power down hardware on boot +* if DIG is turned on and seamless boot not enabled +*/ +if (dc->config.power_down_display_on_boot) { +struct dc_link *edp_link =get_edp_link (dc); + +if (edp_link && + edp_link->link_enc->funcs->is_dig_enabled && + edp_link->link_enc->funcs->is_dig_enabled (edp_link->link_enc) && + dc->hwss.edp_backlight_control && + dc->hwss.power_down && + dc->hwss.edp_power_control) { + dc->hwss.edp_backlight_control (edp_link, false); + dc->hwss.power_down (dc); + dc->hwss.edp_power_control (edp_link, false); + }else { +for (i =0 ; i < dc->link_count; i++) { +struct dc_link *link = dc->links[i]; + +if (link->link_enc->funcs->is_dig_enabled && + link->link_enc->funcs->is_dig_enabled (link->link_enc) && + dc->hwss.power_down) { + dc->hwss.power_down (dc); +break ; + } + } + } + }for (i =0 ; i < res_pool->audio_count; i++) {struct audio *audio = res_pool->audios[i];
@@ -614,6 +617,8 @@ void dcn30_init_hw(struct dc *dc)REG_UPDATE (DCFCLK_CNTL ,DCFCLK_GATE_DIS ,0 ); } +if (hws->funcs.enable_power_gating_plane) + hws->funcs.enable_power_gating_plane (dc->hwseq, true);if (dc->clk_mgr->funcs->notify_wm_ranges) dc->clk_mgr->funcs->notify_wm_ranges (dc->clk_mgr);
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c +1 -7
@@ -30,7 +30,7 @@static const struct hw_sequencer_funcs dcn30_funcs = { .program_gamut_remap = dcn10_program_gamut_remap, - .init_hw = dcn10_init_hw, + .init_hw = dcn30_init_hw, .apply_ctx_to_hw = dce110_apply_ctx_to_hw, .apply_ctx_for_surface =NULL , .program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
@@ -138,10 +138,4 @@ void dcn30_hw_sequencer_construct(struct dc *dc) dc->hwss.init_hw = dcn20_fpga_init_hw; dc->hwseq->funcs.init_pipes =NULL ; } - -// TODO: Use generic dcn10_init_hw and dcn10_init_pipes sequence -if (!IS_FPGA_MAXIMUS_DC (dc->ctx->dce_environment)) { - dc->hwss.init_hw = dcn30_init_hw; - dc->hwseq->funcs.init_pipes =NULL ; - } }
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 25/30 drm/amd/display: Compare v_front_porch when checking if streams are synchronizable
In reply to Rodrigo SiqueiraFrom: David Galiffi <[email protected]>
[Why]
If the front porch of the two timings differ, then there may not be enough time while both streams are in vertical blank to perform a memory clock change. This can hang the system.
[How]
Check the each streams timing.v_front_porch when determining if the two streams are synchronizable.
--- 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
@@ -399,6 +399,10 @@ bool resource_are_streams_timing_synchronizable( != stream2->timing.v_addressable)return false; +if (stream1->timing.v_front_porch + != stream2->timing.v_front_porch) +return false; +if (stream1->timing.pix_clk_100hz != stream2->timing.pix_clk_100hz)return false;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 26/30 drm/amd/display: allow query ddc data over aux to be read only operation
In reply to Rodrigo SiqueiraFrom: Wenjing Liu <[email protected]>
[why]
Two issues:
1. Add read only operation support for query ddc data over aux.
2. Fix a bug where if read size is multiple of 16, mot of the last read transaction will not be set to 0.
--- .../gpu/drm/amd/display/dc/core/dc_link_ddc.c | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c +18 -11
@@ -503,7 +503,7 @@ bool dal_ddc_service_query_ddc_data(uint8_t *read_buf, uint32_t read_size) { - bool ret = false; + bool success = true;uint32_t payload_size =dal_ddc_service_is_in_aux_transaction_mode (ddc) ?DEFAULT_AUX_MAX_DATA_SIZE :EDID_SEGMENT_SIZE ;
@@ -527,7 +527,6 @@ bool dal_ddc_service_query_ddc_data(* but we want to read 256 over i2c!!!!*/ if (dal_ddc_service_is_in_aux_transaction_mode (ddc)) {struct aux_payload payload; -bool read_available = true; payload.i2c_over_aux = true; payload.address = address;
@@ -536,21 +535,26 @@ bool dal_ddc_service_query_ddc_data(if (write_size !=0 ) { payload.write = true; - payload.mot = false; +/* should not set mot (middle of transaction) to 0 +* if there are pending read payloads +*/ + payload.mot = read_size ==0 ? false : true; payload.length = write_size; payload.data = write_buf; - ret =dal_ddc_submit_aux_command (ddc, &payload); - read_available = ret; + success =dal_ddc_submit_aux_command (ddc, &payload); } -if (read_size !=0 && read_available) { +if (read_size !=0 && success) { payload.write = false; +/* should set mot (middle of transaction) to 0 +* since it is the last payload to send +*/ payload.mot = false; payload.length = read_size; payload.data = read_buf; - ret =dal_ddc_submit_aux_command (ddc, &payload); + success =dal_ddc_submit_aux_command (ddc, &payload); } }else {struct i2c_command command = {0 };
@@ -573,7 +577,7 @@ bool dal_ddc_service_query_ddc_data( command.number_of_payloads =dal_ddc_i2c_payloads_get_count (&payloads); - ret =dm_helpers_submit_i2c ( + success =dm_helpers_submit_i2c ( ddc->ctx, ddc->link, &command);
@@ -581,7 +585,7 @@ bool dal_ddc_service_query_ddc_data(dal_ddc_i2c_payloads_destroy (&payloads); } -return ret; +return success; } bool dal_ddc_submit_aux_command(struct ddc_service *ddc,
@@ -598,7 +602,7 @@ bool dal_ddc_submit_aux_command(struct ddc_service *ddc, do { struct aux_payload current_payload; - bool is_end_of_payload = (retrieved + DEFAULT_AUX_MAX_DATA_SIZE) > + bool is_end_of_payload = (retrieved + DEFAULT_AUX_MAX_DATA_SIZE) >= payload->length; current_payload.address = payload->address;
@@ -607,7 +611,10 @@ bool dal_ddc_submit_aux_command(struct ddc_service *ddc, current_payload.i2c_over_aux = payload->i2c_over_aux; current_payload.length = is_end_of_payload ? payload->length - retrieved :DEFAULT_AUX_MAX_DATA_SIZE ; - current_payload.mot = !is_end_of_payload; +/* set mot (middle of transaction) to false +* if it is the last payload +*/ + current_payload.mot = is_end_of_payload ? payload->mot:true; current_payload.reply = payload->reply; current_payload.write = payload->write;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 27/30 drm/amd/display: DP link layer test 4.2.1.1 fix due to specs update
In reply to Rodrigo SiqueiraFrom: Wenjing Liu <[email protected]>
[why]
DP link layer CTS specs updated to change the test parameters in test 4.2.1.1.
Before it requires source to delay 400us on aux no reply. With the specs updates Errata5, it requires source to delay 3.2ms (based on LTTPR aux timeout)
This causes our test to fail after updating with the latest test equipment firmware.
[how]
the change is to allow LTTPR 3.2ms aux timeout delay by default. And set back to 400us if LTTPR feature is not enabled. We will set 3.2ms and always enable LTTPR non transparent mode if LTTPR feature is enabled and LTTPR is present.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +- .../gpu/drm/amd/display/dc/core/dc_link_ddc.c | 13 ++-- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 76 ++++++++++--------- .../drm/amd/display/dc/core/dc_link_hwss.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_link.h | 2 +- .../drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +- .../gpu/drm/amd/display/dc/inc/dc_link_ddc.h | 2 +- .../gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 +- 9 files changed, 59 insertions(+), 50 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +5 -3
@@ -690,7 +690,6 @@ static bool detect_dp(struct dc_link *link,if (sink_caps->transaction_type ==DDC_TRANSACTION_TYPE_I2C_OVER_AUX ) { sink_caps->signal =SIGNAL_TYPE_DISPLAY_PORT ; -dpcd_set_source_specific_data (link);if (!detect_dp_sink_caps (link))return false;if (is_mst_supported (link)) {
@@ -855,6 +854,7 @@ static bool dc_link_detect_helper(struct dc_link *link,bool same_dpcd = true;enum dc_connection_type new_connection_type = dc_connection_none;bool perform_dp_seamless_boot = false; +const uint32_t post_oui_delay =30 ;// 30ms DC_LOGGER_INIT (link->ctx->logger);
@@ -867,6 +867,7 @@ static bool dc_link_detect_helper(struct dc_link *link,// need to re-write OUI and brightness in resume case if (link->connector_signal ==SIGNAL_TYPE_EDP ) {dpcd_set_source_specific_data (link); +msleep (post_oui_delay);dc_link_set_default_brightness_aux (link);//TODO: use cached }
@@ -922,8 +923,6 @@ static bool dc_link_detect_helper(struct dc_link *link,case SIGNAL_TYPE_EDP : {read_current_link_settings_on_detect (link); -dpcd_set_source_specific_data (link); -detect_edp_sink_caps (link);read_current_link_settings_on_detect (link); sink_caps.transaction_type =DDC_TRANSACTION_TYPE_I2C_OVER_AUX ;
@@ -1633,6 +1632,7 @@ static enum dc_status enable_link_dp(struct dc_state *state,int i;bool apply_seamless_boot_optimization = false;uint32_t bl_oled_enable_delay =50 ;// in ms +const uint32_t post_oui_delay =30 ;// 30ms // check for seamless boot for (i =0 ; i < state->stream_count; i++) {
@@ -1659,6 +1659,8 @@ static enum dc_status enable_link_dp(struct dc_state *state,// during mode switch we do DP_SET_POWER off then on, and OUI is lost dpcd_set_source_specific_data (link); +if (link->dpcd_sink_ext_caps.raw !=0 ) +msleep (post_oui_delay); skip_video_pattern = true;
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c +7 -6
@@ -655,16 +655,17 @@ bool dc_link_aux_transfer_with_retries(struct ddc_service *ddc, } -uint32_t dc_link_aux_configure_timeout (struct ddc_service *ddc, +bool dc_link_aux_try_to_configure_timeout (struct ddc_service *ddc,uint32_t timeout) { -uint32_t prev_timeout =0 ; +bool result = false;struct ddc *ddc_pin = ddc->ddc_pin; -if (ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs->configure_timeout) - prev_timeout = - ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs->configure_timeout (ddc, timeout); -return prev_timeout; +if (ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs->configure_timeout) { + ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs->configure_timeout (ddc, timeout); + result = true; + } +return result; }/*test only function*/
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +41 -35
164 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +1 -1
@@ -283,7 +283,7 @@ void dp_set_hw_lane_settings( {struct link_encoder *encoder = link->link_enc; -if (!link->is_lttpr_mode_transparent && !is_immediate_downstream (link, offset)) +if (link->lttpr_non_transparent_mode && !is_immediate_downstream (link, offset))return ;/* call Encoder to set lane settings */
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -283,7 +283,7 @@ struct dc_config {bool edp_not_connected;bool force_enum_edp;bool forced_clocks; -bool disable_extended_timeout_support;// Used to disable extended timeout and lttpr feature as well +bool allow_lttpr_non_transparent_mode;bool multi_mon_pp_mclk_switch;bool disable_dmcu;bool enable_4to1MPC;
drivers/gpu/drm/amd/display/dc/dc_link.h +1 -1
@@ -100,7 +100,7 @@ struct dc_link {bool link_state_valid;bool aux_access_disabled;bool sync_lt_in_progress; -bool is_lttpr_mode_transparent; +bool lttpr_non_transparent_mode;/* caps is the same as reported_link_cap. link_traing use * reported_link_cap. Will clean up. TODO
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +1 -1
@@ -1806,7 +1806,7 @@ static bool dcn21_resource_construct( dc->caps.max_slave_planes =1 ; dc->caps.post_blend_color_processing = true; dc->caps.force_dp_tps4_for_cp2520 = true; - dc->caps.extended_aux_timeout_support = false; + dc->caps.extended_aux_timeout_support = true; dc->caps.dmcub_support = true; dc->caps.is_apu = true;
drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h +1 -1
@@ -105,7 +105,7 @@ int dc_link_aux_transfer_raw(struct ddc_service *ddc,bool dc_link_aux_transfer_with_retries (struct ddc_service *ddc,struct aux_payload *payload); -uint32_t dc_link_aux_configure_timeout (struct ddc_service *ddc, +bool dc_link_aux_try_to_configure_timeout (struct ddc_service *ddc,uint32_t timeout); void dal_ddc_service_write_scdc_data(
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h +1 -1
@@ -28,7 +28,7 @@#define LINK_TRAINING_ATTEMPTS 4#define LINK_TRAINING_RETRY_DELAY 50/* ms */ -#define LINK_AUX_DEFAULT_EXTENDED_TIMEOUT_PERIOD 3200/*us*/ +#define LINK_AUX_DEFAULT_LTTPR_TIMEOUT_PERIOD 3200/*us*/ #define LINK_AUX_DEFAULT_TIMEOUT_PERIOD 552/*us*/ struct dc_link ;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 28/30 drm/amd/display: [FW Promotion] Release 1.0.19
In reply to Rodrigo SiqueiraFrom: Anthony Koo <[email protected]>
[Header Changes]
- Add debug flag for psr to use hw locking mgr state machine
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +5 -4
@@ -36,10 +36,10 @@/* Firmware versioning. */ #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0x67e8928df +#define DMUB_FW_VERSION_GIT_HASH 0xf87bb940b#define DMUB_FW_VERSION_MAJOR 1#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 18 +#define DMUB_FW_VERSION_REVISION 19#define DMUB_FW_VERSION_UCODE ((DMUB_FW_VERSION_MAJOR << 24) | (DMUB_FW_VERSION_MINOR << 16) | DMUB_FW_VERSION_REVISION)#endif
@@ -86,10 +86,11 @@ union dmub_addr {union dmub_psr_debug_flags {struct { -uint8_t visual_confirm :1 ; +uint32_t visual_confirm :1 ; +uint32_t use_hw_lock_mgr :1 ; } bitfields; -unsigned int u32All; +uint32_t u32All; };#if defined(__cplusplus)
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 29/30 drm/amd/display: Fix ineffective setting of max bpc property
In reply to Rodrigo SiqueiraFrom: Stylon Wang <[email protected]>
[Why]
Regression was introduced where setting max bpc property has no effect on the atomic check and final commit. It has the same effect as max bpc being stuck at 8.
[How]
Correctly propagate max bpc with the new connector state.
--- 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
@@ -5135,7 +5135,8 @@ create_validate_stream_for_sink(struct amdgpu_dm_connector *aconnector,struct drm_connector *connector = &aconnector->base;struct amdgpu_device *adev = connector->dev->dev_private;struct dc_stream_state *stream; -int requested_bpc = connector->state ? connector->state->max_requested_bpc :8 ; +const struct drm_connector_state *drm_state = dm_state ? &dm_state->base :NULL ; +int requested_bpc = drm_state ? drm_state->max_requested_bpc :8 ;enum dc_status dc_result =DC_OK ; do {
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 30/30 drm/amd/display: 3.2.91
In reply to Rodrigo SiqueiraFrom: 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.90" +#define DC_VER "3.2.91"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx