drm/amd/display: MPC basic allocation logic and TMZ[WHY & HOW]Adding basic logic to allocate unused RMCM block and TMZ support.Reviewed-by: Krunoslav Kovac <krunoslav.kovac@amd.com>Signed-off-b
drm/amd/display: MPC basic allocation logic and TMZ[WHY & HOW]Adding basic logic to allocate unused RMCM block and TMZ support.Reviewed-by: Krunoslav Kovac <krunoslav.kovac@amd.com>Signed-off-by: Yihan Zhu <Yihan.Zhu@amd.com>Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
drm/amd/display: Add RMCM debug logging[WHY & HOW]Add new FL feature debug logging into the existing DTN logging.Reviewed-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>Reviewed-by: Charlen
drm/amd/display: Add RMCM debug logging[WHY & HOW]Add new FL feature debug logging into the existing DTN logging.Reviewed-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>Reviewed-by: Charlene Liu <charlene.liu@amd.com>Signed-off-by: Yihan Zhu <Yihan.Zhu@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: Fix the typo in dcn401 Hubp block[Why & How]Fix the typo for hubp_clear_tiling, currently calls hubp2_clear_tilingfor dcn401 instead of intended hubp401_clear_tiling.Reviewed-b
drm/amd/display: Fix the typo in dcn401 Hubp block[Why & How]Fix the typo for hubp_clear_tiling, currently calls hubp2_clear_tilingfor dcn401 instead of intended hubp401_clear_tiling.Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>Signed-off-by: Nevenko Stupar <Nevenko.Stupar@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: Allow reuse of of DCN4x codeRemove the static qualifier to make it available for code sharingwith other components.Reviewed-by: Charlene Liu <charlene.liu@amd.com>Signed-off-by
drm/amd/display: Allow reuse of of DCN4x codeRemove the static qualifier to make it available for code sharingwith other components.Reviewed-by: Charlene Liu <charlene.liu@amd.com>Signed-off-by: Dmytro <dmytro.laktyushkin@amd.com>Signed-off-by: Charlene Liu <Charlene.Liu@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: Update Cursor request mode to the beginning prefetch always[Why]The double buffer cursor registers is updated by the cursorvupdate event. There is a gap between vupdate and curso
drm/amd/display: Update Cursor request mode to the beginning prefetch always[Why]The double buffer cursor registers is updated by the cursorvupdate event. There is a gap between vupdate and cursor datafetch if cursor fetch data reletive to cursor position.Cursor corruption will happen if we update the cursor surfacein this gap.[How]Modify the cursor request mode to the beginning prefetch alwaysand avoid wraparound calculation issues.Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>Signed-off-by: Zhikai Zhai <zhikai.zhai@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: Fix seamless boot sequence[WHY]When the system powers up eDP with external monitors in seamless bootsequence, stutter get enabled before TTU and HUBP registers beingprogrammed,
drm/amd/display: Fix seamless boot sequence[WHY]When the system powers up eDP with external monitors in seamless bootsequence, stutter get enabled before TTU and HUBP registers beingprogrammed, which resulting in underflow.[HOW]Enable TTU in hubp_init.Change the sequence that do not perpare_bandwidth and optimize_bandwidthwhile having seamless boot streams.Cc: Mario Limonciello <mario.limonciello@amd.com>Cc: Alex Deucher <alexander.deucher@amd.com>Cc: stable@vger.kernel.orgReviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>Signed-off-by: Lo-an Chen <lo-an.chen@amd.com>Signed-off-by: Paul Hsieh <paul.hsieh@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: Optimize cursor position updates[why]Updating the cursor enablement register can be a slow operation and accumulateswhen high polling rate cursors cause frequent updates asynchro
drm/amd/display: Optimize cursor position updates[why]Updating the cursor enablement register can be a slow operation and accumulateswhen high polling rate cursors cause frequent updates asynchronously to thecursor position.[how]Since the cursor enable bit is cached there is no need to update theenablement register if there is no change to it. This removes theread-modify-write from the cursor position programming path in HUBP andDPP, leaving only the register writes.Cc: Mario Limonciello <mario.limonciello@amd.com>Cc: Alex Deucher <alexander.deucher@amd.com>Cc: stable@vger.kernel.orgReviewed-by: Sung Lee <sung.lee@amd.com>Signed-off-by: Aric Cyr <Aric.Cyr@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>
drm/amd/display: Add hubp cache reset when powergating[Why]When HUBP is power gated, the SW state can get out of sync with thehardware state causing cursor to not be programmed correctly.[How]
drm/amd/display: Add hubp cache reset when powergating[Why]When HUBP is power gated, the SW state can get out of sync with thehardware state causing cursor to not be programmed correctly.[How]Similar to DPP, add a HUBP reset function which is called whereverHUBP is initialized or powergated. This function will clear the cursorposition and attribute cache allowing for proper programming when theHUBP is brought back up.Cc: Mario Limonciello <mario.limonciello@amd.com>Cc: Alex Deucher <alexander.deucher@amd.com>Cc: stable@vger.kernel.orgReviewed-by: Sung Lee <sung.lee@amd.com>Signed-off-by: Aric Cyr <Aric.Cyr@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>
drm/amd/display: DML2.1 Post-Si Cleanup[Why]There are a few cleanup and refactoring tasks that need to be donewith the DML2.1 wrapper and DC interface to remove dependencies onlegacy structures
drm/amd/display: DML2.1 Post-Si Cleanup[Why]There are a few cleanup and refactoring tasks that need to be donewith the DML2.1 wrapper and DC interface to remove dependencies onlegacy structures and N-1 prototypes.[How]Implemented pipe_ctx->global_sync.Implemented new functions to use pipe_ctx->hubp_regs andpipe_ctx->global_sync:- hubp_setup2- hubp_setup_interdependent2- Several other new functions for DCN 4.01 to support newer structuresRemoved dml21_update_pipe_ctx_dchub_regsRemoved dml21_extract_legacy_watermark_setRemoved dml21_populate_pipe_ctx_dlg_paramRemoved outdated dcn references in DML2.1 wrapper.Reviewed-by: Austin Zheng <austin.zheng@amd.com>Reviewed-by: Dillon Varone <dillon.varone@amd.com>Signed-off-by: Rafal Ostrowski <rostrows@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>
Revert "drm/amd/display: Optimize cursor position updates"This reverts commit 88c7c56d07c108ed4de319c8dba44aa4b8a38dd1.SW and HW state are not always matching in some cases causing cursor tobe d
Revert "drm/amd/display: Optimize cursor position updates"This reverts commit 88c7c56d07c108ed4de319c8dba44aa4b8a38dd1.SW and HW state are not always matching in some cases causing cursor tobe disabled.Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>Reviewed-by: Leo Li <sunpeng.li@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Optimize cursor position updates[why]Updating the cursor enablement register can be a slow operation and accumulateswhen high polling rate cursors cause frequent updates asynchronously to thecursor position.[how]Since the cursor enable bit is cached there is no need to update theenablement register if there is no change to it. This removes theread-modify-write from the cursor position programming path in HUBP andDPP, leaving only the register writes.Reviewed-by: Josip Pavic <josip.pavic@amd.com>Signed-off-by: Aric Cyr <Aric.Cyr@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: Update dc_tiling_info union to structure[WHY]The `dc_tiling_info` union previously did not have a field tospecify the active GFX format, assuming only one format wouldbe used pe
drm/amd/display: Update dc_tiling_info union to structure[WHY]The `dc_tiling_info` union previously did not have a field tospecify the active GFX format, assuming only one format wouldbe used per DCN version. from DCN4+, support for switchingbetween different GFX formats is introduced, requiring a wayto track which format is currently in use.[HOW]Updated the `dc_tiling_info` union to include a new field thatexplicitly indicates the currently used GFX format.This allows the system to determine the active GFX formatand take the correct programming path accordingly.[Description]The union `dc_tiling_info` has been updated to support multipleGFX formats by adding a new field for identifying the active format.This update ensures that the correct programming path is followedbased on the selected format. All references to `dc_tiling_info`in the codebase have been updated to reflect the new structure.Reviewed-by: Alvin Lee <alvin.lee2@amd.com>Signed-off-by: Karthi Kandasamy <karthi.kandasamy@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: add clear_tiling hubp callbacksThis adds clear_tiling callbacks to the hubp structure thatwill be used for drm panic support to clear the tiling ona display. hubp3 support from
drm/amd/display: add clear_tiling hubp callbacksThis adds clear_tiling callbacks to the hubp structure thatwill be used for drm panic support to clear the tiling ona display. hubp3 support from Jocelyn's original patchand the rest from me.Reviewed-by: Harry Wentland <harry.wentland@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>Cc: Lu Yao <yaolu@kylinos.cn>Cc: Jocelyn Falempe <jfalempe@redhat.com>Cc: Harry Wentland <harry.wentland@amd.com>
drm/amd/display: expose DCN401 HUBP functions[Why]Expose DCN401 HUBP functions for use across other platforms.[Description]This change aims to make the DCN401 HUBP functions accessible forenab
drm/amd/display: expose DCN401 HUBP functions[Why]Expose DCN401 HUBP functions for use across other platforms.[Description]This change aims to make the DCN401 HUBP functions accessible forenabling their use in future platform developments.Reviewed-by: Alvin Lee <alvin.lee2@amd.com>Signed-off-by: Karthi Kandasamy <karthi.kandasamy@amd.com>Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Make dcn35_hubp_funcs staticThe sparse tool complains as follows:drivers/gpu/drm/amd/amdgpu/../display/dc/hubp/dcn35/dcn35_hubp.c:191:19: warning: symbol 'dcn35_hubp_funcs' was
drm/amd/display: Make dcn35_hubp_funcs staticThe sparse tool complains as follows:drivers/gpu/drm/amd/amdgpu/../display/dc/hubp/dcn35/dcn35_hubp.c:191:19: warning: symbol 'dcn35_hubp_funcs' was not declared. Should it be static?This symbol is not used outside of dcn35_hubp.c, so marks it static.Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: For FAMS2 don't program P-State force from driverP-State force programming is handled entirely by FW in FAMS2. Removeany programming from driver side to prevent incorrect program
drm/amd/display: For FAMS2 don't program P-State force from driverP-State force programming is handled entirely by FW in FAMS2. Removeany programming from driver side to prevent incorrect programming fromdriver side (which may override FW programming)Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Fix Cursor Offset in Scaled Scenarios[WHY]Cursor position code had improper offsets in scaled modes.[HOW]Adjust cursor scaling to account for cursor offsets properly.Reviewed
drm/amd/display: Fix Cursor Offset in Scaled Scenarios[WHY]Cursor position code had improper offsets in scaled modes.[HOW]Adjust cursor scaling to account for cursor offsets properly.Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Signed-off-by: Sung Lee <sunglee@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Check null pointers before used[WHAT & HOW]Poniters, such as dc->clk_mgr, are null checked previously in the samefunction, so Coverity warns "implies that "dc->clk_mgr" might be
drm/amd/display: Check null pointers before used[WHAT & HOW]Poniters, such as dc->clk_mgr, are null checked previously in the samefunction, so Coverity warns "implies that "dc->clk_mgr" might be null".As a result, these pointers need to be checked when used again.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: Fix divide by zero in CURSOR_DST_X_OFFSET calculation[Why]Certain situations cause pipes to have a recout of 0, such as when thedst_rect lies completely outside of a given ODM sl
drm/amd/display: Fix divide by zero in CURSOR_DST_X_OFFSET calculation[Why]Certain situations cause pipes to have a recout of 0, such as when thedst_rect lies completely outside of a given ODM slice.[How]Skip calculation that transforms cursor coordinates to viewport space.Reviewed-by: Alvin Lee <alvin.lee2@amd.com>Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>Signed-off-by: George Shen <george.shen@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Enable DCC on DCN401[WHAT]Add registers and entry points to enable DCC on DCN4xReviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>Signed-off-by: Alex Hung <alex.hung@amd.c
drm/amd/display: Enable DCC on DCN401[WHAT]Add registers and entry points to enable DCC on DCN4xReviewed-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>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Program CURSOR_DST_X_OFFSET in viewport space[WHAT & HOW]According to register specifications, the CURSOR_DST_X_OFFSETis relative to the start of the data viewport, not RECOUT sp
drm/amd/display: Program CURSOR_DST_X_OFFSET in viewport space[WHAT & HOW]According to register specifications, the CURSOR_DST_X_OFFSETis relative to the start of the data viewport, not RECOUT space.In this case we must transform the cursor coordinates passed tohubp401_cursor_set_position into viewport space to program thisregister. This fixes an underflow issue that occurs in scaledmode with low refresh rate.Reviewed-by: Nevenko Stupar <nevenko.stupar@amd.com>Cc: Mario Limonciello <mario.limonciello@amd.com>Cc: Alex Deucher <alexander.deucher@amd.com>Cc: stable@vger.kernel.orgSigned-off-by: Alex Hung <alex.hung@amd.com>Signed-off-by: Alvin Lee <alvin.lee2@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Fix cursor issues with ODMs and HW rotations[WHY & HOW]Current code for cursor positions does not work properlywith different ODM options and HW rotations like ODM2to1, 3to1 and
drm/amd/display: Fix cursor issues with ODMs and HW rotations[WHY & HOW]Current code for cursor positions does not work properlywith different ODM options and HW rotations like ODM2to1, 3to1 and 4to1, and has different issues depending onangle of HW rotations.[HOW]Fixed these issues so to work properly when ODM is used with HW rotations.Reviewed-by: Sridevi Arvindekar <sridevi.arvindekar@amd.com>Signed-off-by: Alex Hung <alex.hung@amd.com>Signed-off-by: Nevenko Stupar <nevenko.stupar@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Refactor HUBP into component folder.[why]cleaning up the code refactor requires hubp to be in its own component.[how]move all files under newly created hubp folder and fixing t
drm/amd/display: Refactor HUBP into component folder.[why]cleaning up the code refactor requires hubp to be in its own component.[how]move all files under newly created hubp folder and fixing the makefiles.Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Signed-off-by: Pinninti <bpinnint@amd.com>Acked-by: Harry Wentland <harry.wentland@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Refactor HUBP into component folder.[why]cleaning up the code refactor requires hubp to be in its own component.[how]move all files under newly created hubp folder and fixing the makefiles.Reviewed-by: Martin Leung <martin.leung@amd.com>Acked-by: Tom Chung <chiahsuan.chung@amd.com>Signed-off-by: Bhuvana Chandra Pinninti <bhuvanachandra.pinninti@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>