drm/amd/display: misc for dio encoder refactor[WHY]These are left required changes for dio encoder refactor.[HOW]1. original logic is separated by config option2. new link encoder dp enable/di
drm/amd/display: misc for dio encoder refactor[WHY]These are left required changes for dio encoder refactor.[HOW]1. original logic is separated by config option2. new link encoder dp enable/disable code for dcn353. process fec only for DP 8b10b encodingReviewed-by: Cruise Hung <cruise.hung@amd.com>Signed-off-by: Peichen Huang <PeiChen.Huang@amd.com>Signed-off-by: Wayne Lin <wayne.lin@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
drm/amd/display: replace dio encoder access[WHY]replace dio encoder access to work with new dio encoderassignment.[HOW}1. before validation, access dio encoder by get_temp_dio_link_enc()2. af
drm/amd/display: replace dio encoder access[WHY]replace dio encoder access to work with new dio encoderassignment.[HOW}1. before validation, access dio encoder by get_temp_dio_link_enc()2. after validation, access dio encoder through pipe_ctx->link_resReviewed-by: Wenjing Liu <wenjing.liu@amd.com>Reviewed-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>Signed-off-by: Peichen Huang <PeiChen.Huang@amd.com>Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Update chip_cap defines and usage[WHY]The defines have also been updated with prefix AMD_ and atomfirmware.hhas been temporarily updated with both sets of defines to allow thetr
drm/amd/display: Update chip_cap defines and usage[WHY]The defines have also been updated with prefix AMD_ and atomfirmware.hhas been temporarily updated with both sets of defines to allow thetransition.This update is being made to standardize workaround chip_cap flags,in order to support more workaround flags in the future.[HOW]Updated EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN define, the flag is nowan enum masked by EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK. All checks forDP_FIXED_VS_EN are now performed by masking with EXT_CHIP_MASK andchecking for an exact match rather than the previous bitwise AND check.Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>Signed-off-by: Michael Strauss <michael.strauss@amd.com>Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: have pretrain for dpia[WHY]We like to have pretrain for dpia link so that dp and dp tunnelinghave aligned behavior. The Main difficult for dpia pretrain is thatencoder can not g
drm/amd/display: have pretrain for dpia[WHY]We like to have pretrain for dpia link so that dp and dp tunnelinghave aligned behavior. The Main difficult for dpia pretrain is thatencoder can not get corresponded dpia port when link detectionin current implementation.[HOW]1. create enable/disable dpia output functions for dcn35 encoderand have dpia_id and other necessary info as inputs.2. dcn35 dpia use the new functions to enable/disable output.3. have a option to enable/disable the change.Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>Reviewed-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>Signed-off-by: Peichen Huang <PeiChen.Huang@amd.com>Signed-off-by: Roman Li <roman.li@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Restructure dpia link training[WHY]We intend to consolidate dp tunneling and conventional dp link training.[HOW]1. Use the same link training entry for both dp and dpia2. Move
drm/amd/display: Restructure dpia link training[WHY]We intend to consolidate dp tunneling and conventional dp link training.[HOW]1. Use the same link training entry for both dp and dpia2. Move SET_CONFIG of non-transparent mode to dmub side3. Add set_tps_notification dmub_cmd to notify tps request for non-transparent dpia link training4. Check dpcd request result and abort link training early if dpia aux tunneling fails5. Add option to avoid affect old product6. Separately handle wait_time_microsec for dpiaReviewed-by: Cruise Hung <cruise.hung@amd.com>Reviewed-by: George Shen <george.shen@amd.com>Reviewed-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>Signed-off-by: Peichen Huang <PeiChen.Huang@amd.com>Signed-off-by: Alex Hung <alex.hung@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Check link_res->hpo_dp_link_enc before using it[WHAT & HOW]Functions dp_enable_link_phy and dp_disable_link_phy can pass link_reswithout initializing hpo_dp_link_enc and it is ne
drm/amd/display: Check link_res->hpo_dp_link_enc before using it[WHAT & HOW]Functions dp_enable_link_phy and dp_disable_link_phy can pass link_reswithout initializing hpo_dp_link_enc and it is necessary to check fornull before dereferencing.This fixes 1 FORWARD_NULL issue reported by Coverity.Fixes: 0beca868cde8 ("drm/amd/display: Check link_res->hpo_dp_link_enc before using it")Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>Signed-off-by: Alex Hung <alex.hung@amd.com>Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Check null pointers before multiple uses[WHAT & HOW]Poniters, such as stream_enc and dc->bw_vbios, are null checked previouslyin the same function, so Coverity warns "implies tha
drm/amd/display: Check null pointers before multiple uses[WHAT & HOW]Poniters, such as stream_enc and dc->bw_vbios, are null checked previouslyin the same function, so Coverity warns "implies that stream_enc anddc->bw_vbios might be null". They are used multiple times in thesubsequent code and need to be checked.This fixes 10 FORWARD_NULL issues reported by Coverity.Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>Signed-off-by: Alex Hung <alex.hung@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Check link_res->hpo_dp_link_enc before using it[WHAT & HOW]Functions dp_enable_link_phy and dp_disable_link_phy can pass link_reswithout initializing hpo_dp_link_enc and it is necessary to check fornull before dereferencing.This fixes 2 FORWARD_NULL issues reported by Coverity.Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>Signed-off-by: Alex Hung <alex.hung@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Move DIO documentation to the right placeWhen building the kernel-doc, it complains with the below warning:./drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning:
drm/amd/display: Move DIO documentation to the right placeWhen building the kernel-doc, it complains with the below warning:./drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no structured comments found./drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no structured comments foundThis warning was caused by the wrong use of the ':export:' and the lackof function documentation in the file pointed under the ':internal:'.This commit addresses those issues by relocating the overviewdocumentation to the correct C file, removing the ':export:' options,and adding two simple kernel-doc to ensure that ':internal:' does nothave any warning.Cc: Alex Deucher <alexander.deucher@amd.com>Acked-by: Alex Deucher <alexander.deucher@amd.com>Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>Link: https://lore.kernel.org/dri-devel/20240715085918.68f5ecc9@canb.auug.org.au/Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Update FIXED_VS retimer training pattern delay[WHY]Needed for PHY patterns as well to perform electrical compliance.Also need to increase wait time from 30ms to 50ms to resolve v
drm/amd/display: Update FIXED_VS retimer training pattern delay[WHY]Needed for PHY patterns as well to perform electrical compliance.Also need to increase wait time from 30ms to 50ms to resolve veryintermittent UHBR20 link training failures.Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>Signed-off-by: Michael Strauss <michael.strauss@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: turn on symclk for dio virtual stream in dpms sequence[why]In order to support glitchless display clock ramping for virtual stream,we mustturn on symclk for stream encoder. The
drm/amd/display: turn on symclk for dio virtual stream in dpms sequence[why]In order to support glitchless display clock ramping for virtual stream,we mustturn on symclk for stream encoder. The code will power on phy and enablesymclkfor dio encoder during virtual stream dpms sequence.Reviewed-by: Dillon Varone <dillon.varone@amd.com>Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Reset input mode for DIG on encoder reset[WHY & HOW]Make enable and disable sequences symmetric.Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>Acked-by: Tom Chung <chiahsuan.chu
drm/amd/display: Reset input mode for DIG on encoder reset[WHY & HOW]Make enable and disable sequences symmetric.Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>Acked-by: Tom Chung <chiahsuan.chung@amd.com>Signed-off-by: Dillon Varone <dillon.varone@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Refactor input mode programming for DIG FIFO[WHY]Input mode for the DIG FIFO should be programmed as part of streamencoder setup.[HOW]Pre-calculate the pixels per cycle as par
drm/amd/display: Refactor input mode programming for DIG FIFO[WHY]Input mode for the DIG FIFO should be programmed as part of streamencoder setup.[HOW]Pre-calculate the pixels per cycle as part of the pixel clock params,and program as part of stream encoder setup.Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>Acked-by: Tom Chung <chiahsuan.chung@amd.com>Signed-off-by: Dillon Varone <dillon.varone@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Add delay to improve LTTPR UHBR interop[WHY]Avoid race condition which puts LTTPR into bad state during UHBR LT.[HOW]Delay 30ms between starting UHBR TPS1 PHY output and sendin
drm/amd/display: Add delay to improve LTTPR UHBR interop[WHY]Avoid race condition which puts LTTPR into bad state during UHBR LT.[HOW]Delay 30ms between starting UHBR TPS1 PHY output and sending TPS1 via DPCD.Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>Signed-off-by: Michael Strauss <michael.strauss@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Update FIXED_VS Retimer HWSS Test Pattern Sequences[WHY]Need to fix some broken logic and sequencing in initial commit[HOW]Fix logic handling override deprogramming when exitin
drm/amd/display: Update FIXED_VS Retimer HWSS Test Pattern Sequences[WHY]Need to fix some broken logic and sequencing in initial commit[HOW]Fix logic handling override deprogramming when exiting SQ128.Don't exit early from dp_set_hw_lane_settings for DP2/FIXED_VS case.Move LTTPR 128b/132b check out of requires_hwss and check duringruntime, as LTTPR caps are not populated on initial call.Add pending_test_pattern to link state to allow HWSS to set FFE overrideson retimer TX and/or skip setting APU TX FFE depending on requested pattern.Use updated clock source for SQ128 override sequence.Skip HW FFE preset programming when performing test pattern overrides.Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>Signed-off-by: Michael Strauss <michael.strauss@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Documentation/gpu: Add entry for the DIO componentCc: Mario Limonciello <mario.limonciello@amd.com>Cc: Alex Deucher <alexander.deucher@amd.com>Cc: Harry Wentland <Harry.Wentland@amd.com>Cc: Hamz
Documentation/gpu: Add entry for the DIO componentCc: Mario Limonciello <mario.limonciello@amd.com>Cc: Alex Deucher <alexander.deucher@amd.com>Cc: Harry Wentland <Harry.Wentland@amd.com>Cc: Hamza Mahfooz <hamza.mahfooz@amd.com>Cc: Christian König <christian.koenig@amd.com>Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>Acked-by: Christian König <christian.koenig@amd.com>Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: switch DC over to the new DRM logging macrosFor multi-GPU systems it is difficult to tell which GPU a particularmessage is being printed for and that is undesirable because itcom
drm/amd/display: switch DC over to the new DRM logging macrosFor multi-GPU systems it is difficult to tell which GPU a particularmessage is being printed for and that is undesirable because itcomplicates debugging efforts. Also, the new macros allow us to enablelogging for particular parts of the codebase more selectively (since weno longer need to throw everything at DRM_DEBUG_KMS()). So, for thereasons outlined above we should switch to the new macros.We can accomplish this by using the existing DC_LOGGER code to passaround the relevant `struct drm_device` which will be fed to the newmacros in logger_types.h. Also, we must get rid of all instances of theDC_LOG_.*() functions that are currently in amdgpu_dm since we don't usethe DC logger there and we can simply refer to the macros directlythere instead.Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Support Compliance Test Pattern Generation with DP2 Retimer[WHY]Certain retimer requires workarounds in order to correctly output test patterns.[HOW]Add vendor-specific aux seq
drm/amd/display: Support Compliance Test Pattern Generation with DP2 Retimer[WHY]Certain retimer requires workarounds in order to correctly output test patterns.[HOW]Add vendor-specific aux sequences to program retimer's TX and pattern generatorwhen specific compliance test patterns are requested by sink.Note: SQ128 w/a in DPMF mode only works in one flip orientation currentlyReviewed-by: Hansen Dsouza <hansen.dsouza@amd.com>Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>Acked-by: Stylon Wang <stylon.wang@amd.com>Signed-off-by: Michael Strauss <michael.strauss@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Add symclk enable/disable during stream enable/disable[Why & How]Using dig_stream_mapper, program symclk_en and symclk_fe_src_sel whenenabling or disabling the corresponding stre
drm/amd/display: Add symclk enable/disable during stream enable/disable[Why & How]Using dig_stream_mapper, program symclk_en and symclk_fe_src_sel whenenabling or disabling the corresponding stream.Reviewed-by: Charlene Liu <charlene.liu@amd.com>Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>Signed-off-by: Taimur Hassan <syed.hassan@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Fix DP2 link training failure with RCO[Why]When RCO is enabled for symclk32_le we get failures duringDP2 link traing compliance tests.[How]Break out symclk32_le RCO into a sep
drm/amd/display: Fix DP2 link training failure with RCO[Why]When RCO is enabled for symclk32_le we get failures duringDP2 link traing compliance tests.[How]Break out symclk32_le RCO into a separate function that iscalled for hpo when link is enabled/disabled.Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>Acked-by: Alan Liu <haoping.liu@amd.com>Signed-off-by: Daniel Miess <daniel.miess@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Clean FPGA code in dc[Why]Drop dead code for Linux.[How]Remove all IS_FPGA_MAXIMUS_DC and IS_DIAG_DCReviewed-by: Ariel Bernstein <eric.bernstein@amd.com>Acked-by: Tom Chung
drm/amd/display: Clean FPGA code in dc[Why]Drop dead code for Linux.[How]Remove all IS_FPGA_MAXIMUS_DC and IS_DIAG_DCReviewed-by: Ariel Bernstein <eric.bernstein@amd.com>Acked-by: Tom Chung <chiahsuan.chung@amd.com>Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: convert link.h functions to function pointer style[Why & How]All dc subcomponents should call another dc component via function pointersstored in a component structure. This is p
drm/amd/display: convert link.h functions to function pointer style[Why & How]All dc subcomponents should call another dc component via function pointersstored in a component structure. This is part of dc coding convention sincethe beginning. The reason behind this is to improve encapsulation andpolymorphism. The function contract is extracted into a single link servicestructure defined in link.h header file and implemented only in link_factory.c insteadof spreading across multiple files in link component file structure.Reviewed-by: Jun Lei <Jun.Lei@amd.com>Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: break down dc_link.c[why]dc_link contains over 30k line of code, the decision is to break itdown to files residing in link folder based on functionality. Thischange is the last
drm/amd/display: break down dc_link.c[why]dc_link contains over 30k line of code, the decision is to break itdown to files residing in link folder based on functionality. Thischange is the last break down change which will remove dc_link.cfile after everything is broken down.[how]Move remaining dc_link.c functions into link_detection, link_dpms,link_validation, link_resource, and link_fpga and remove dc_link.Reviewed-by: George Shen <George.Shen@amd.com>Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: merge dc_link_dp into dc_link[why]Temporarly merge dc_link_dp functions into dc_link for thepurpose of removing dc_link_dp files. This is a transitionalchange for later commits
drm/amd/display: merge dc_link_dp into dc_link[why]Temporarly merge dc_link_dp functions into dc_link for thepurpose of removing dc_link_dp files. This is a transitionalchange for later commits where we will further refactor dc_linkfile.Reviewed-by: George Shen <George.Shen@amd.com>Acked-by: Alan Liu <HaoPing.Liu@amd.com>Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: create accessories, hwss and protocols sub folders in link[why]link component contains three sub folders:accessories - utilities for improving testability, logging or tracing, d
drm/amd/display: create accessories, hwss and protocols sub folders in link[why]link component contains three sub folders:accessories - utilities for improving testability, logging or tracing, doesn't impactend user use cases.protocols - specs defined protocols used in end user use caseshwss - hwss owned link_hwss object, served as an abstraction layer in hwss toaccess various types of encoder/phy/dpia endpoints in a unified interface.sooner we will have files directly under link folder one for the implementation ofeach major link behavior such as link_create, link_detect, link_validateand link_set_dpms.Reviewed-by: George Shen <George.Shen@amd.com>Reviewed-by: Jun Lei <Jun.Lei@amd.com>Acked-by: Alan Liu <HaoPing.Liu@amd.com>Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>