[PATCH 00/23] DC Patches Sept 11, 2024

2024-09-11 Thread Alex Hung
This DC patchset brings improvements in multiple areas. In summary, we highlight: - Fixes on DCN35, DCN401 and IPS - Enhancements in DMUB and DSC - Misc fixes for Coverity errors Cc: Daniel Wheeler Alex Hung (2): drm/amd/display: Check null pointer before dereferencing se drm/amd/display

[PATCH 01/23] drm/amd/display: Round calculated vtotal

2024-09-11 Thread Alex Hung
From: Robin Chen [WHY] The calculated vtotal may has 1 line deviation. To get precisely vtotal number, round the vtotal result. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Anthony Koo Signed-off-by: Robin Chen Signed-off-by: Alex Hung --- drivers/gpu/drm

[PATCH 02/23] drm/amd/display: Use SDR white level to calculate matrix coefficients

2024-09-11 Thread Alex Hung
...@vger.kernel.org Reviewed-by: Jun Lei Signed-off-by: Samson Tam Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/core/dc.c| 12 drivers/gpu/drm/amd/display/dc/dc.h | 3 +++ .../gpu/drm/amd/display/dc/dc_spl_translate.c | 9 + drivers/gpu/drm/amd

[PATCH 03/23] drm/amd/display: Implement new DPCD register handling

2024-09-11 Thread Alex Hung
as normal. Reviewed-by: Wenjing Liu Signed-off-by: Ryan Seto Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 12 drivers/gpu/drm/amd/display/dc/dc_dsc.h | 1 + drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 10

[PATCH 04/23] drm/amd/display: Emulate Display Hotplug Hang

2024-09-11 Thread Alex Hung
-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c index f770828df149..0e243f4344d0 100644 --- a

[PATCH 05/23] drm/amd/display: Add dmub hpd sense callback

2024-09-11 Thread Alex Hung
-off-by: Alex Hung --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 20 +++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH 06/23] drm/amd/display: Enable DML2 override_det_buffer_size_kbytes

2024-09-11 Thread Alex Hung
...@vger.kernel.org Reviewed-by: Roman Li Reviewed-by: Nicholas Kazlauskas Signed-off-by: Yihan Zhu Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c | 1 + 2 files changed, 2 insertions(+) diff

[PATCH 07/23] drm/amd/display: Block timing sync for different output formats in pmo

2024-09-11 Thread Alex Hung
From: Dillon Varone [WHY & HOW] If the output format is different for HDMI TMDS signals, they are not synchronizable. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Alvin Lee Signed-off-by: Dillon Varone Signed-off-by: Alex Hung --- .../dc/dml2/dml21

[PATCH 08/23] drm/amd/display: Add debug options to change sharpen policies

2024-09-11 Thread Alex Hung
From: Samson Tam [WHY] Add options to change sharpen policy based on surface format and scaling ratios. [HOW] Add sharpen_policy to change policy based on surface format and scale_to_sharpness_policy based on scaling ratios. Reviewed-by: Jun Lei Signed-off-by: Samson Tam Signed-off-by: Alex

[PATCH 09/23] drm/amd/display: Block dynamic IPS2 on DCN35 for incompatible FW versions

2024-09-11 Thread Alex Hung
e Liu Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Hung --- .../gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c| 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/

[PATCH 10/23] drm/amd/display: Clean up dsc blocks in accelerated mode

2024-09-11 Thread Alex Hung
: Charlene Liu Signed-off-by: Martin Tsai Signed-off-by: Alex Hung --- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 50 +++ 1 file changed, 50 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dce110

[PATCH 11/23] drm/amd/display: Disable SYMCLK32_LE root clock gating

2024-09-11 Thread Alex Hung
-off-by: Alex Hung --- .../gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c i

[PATCH 12/23] drm/amd/display: Restructure dpia link training

2024-09-11 Thread Alex Hung
Signed-off-by: Peichen Huang Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/core/dc.c | 21 + drivers/gpu/drm/amd/display/dc/dc.h | 6 +- .../amd/display/dc/link/hwss/link_hwss_dpia.c | 31 ++- .../dc/link/protocols/link_dp_training.c | 80

[PATCH 13/23] drm/amd/display: Add fullscreen only sharpening policy

2024-09-11 Thread Alex Hung
From: Relja Vojvodic [WHAT & HOW] Disable sharpening if not in fullscreen if this policy is selected Reviewed-by: Samson Tam Signed-off-by: Relja Vojvodic Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 3 +++ drivers/gpu/drm/amd/display/dc

[PATCH 14/23] drm/amd/display: Add HDMI DSC native YCbCr422 support

2024-09-11 Thread Alex Hung
y: Chris Park Signed-off-by: Leo Ma Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 3 ++- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 5 +++-- 3 files changed, 7 ins

[PATCH 15/23] drm/amd/display: 3.2.300

2024-09-11 Thread Alex Hung
vtotal Reviewed-by: Alex Hung Signed-off-by: Aric Cyr Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 133cac4d9fc4..e659f4fed19f

[PATCH 16/23] drm/amd/display: Check null pointer before dereferencing se

2024-09-11 Thread Alex Hung
[WHAT & HOW] se is null checked previously in the same function, indicating it might be null; therefore, it must be checked when used again. This fixes 1 FORWARD_NULL issue reported by Coverity. Acked-by: Alex Hung Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung --- drivers/gpu

[PATCH 17/23] drm/amd/display: Remove always-false branches

2024-09-11 Thread Alex Hung
-by: Alex Hung Reviewed-by: Alvin Lee Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung --- .../amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c| 3 --- .../amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c | 3 --- .../drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c | 9 -

[PATCH 18/23] drm/amd/display: Fix underflow when setting underscan on DCN401

2024-09-11 Thread Alex Hung
t is supposed to catch this corner case by adding a check based on the parameters in the stream Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Dillon Varone Reviewed-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Hung --- .../drm/amd/displa

[PATCH 19/23] drm/amd/display: Skip to enable dsc if it has been off

2024-09-11 Thread Alex Hung
t DSC. [HOW] Check the DSC used on current pipe status when update stream. Skip to enable if it has been off. The operation enable DSC should happen when set power on. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Wenjing Liu Signed-off-by: Zhikai Zhai Signed-off-by:

[PATCH 20/23] drm/amd/display: Use full update for swizzle mode change

2024-09-11 Thread Alex Hung
eric transition behavior Separating the two flows to make (3) non-generic is the best immediate coarse of action. DC can discern SSAMPO3 very easily from SDE. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Chris Park Signed-off-by: Charlene Liu Signed-off-by: Alex

[PATCH 21/23] drm/amd/display: Update IPS default mode for DCN35/DCN351

2024-09-11 Thread Alex Hung
Reviewed-by: Sun peng Li Signed-off-by: Roman Li Signed-off-by: Alex Hung --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 50 --- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH 22/23] drm/amd/display: Clear cached watermark after resume

2024-09-11 Thread Alex Hung
From: Charlene Liu [WHY] Driver could skip program watermarks when resume from S0i3/S4. [HOW] Clear the cached one first to make sure new value gets applied. Reviewed-by: Alvin Lee Reviewed-by: Roman Li Signed-off-by: Charlene Liu Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display

[PATCH 23/23] drm/amd/display: 3.2.301

2024-09-11 Thread Alex Hung
dereferencing se Acked-by: Alex Hung Signed-off-by: Aric Cyr Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 78ebe636389e..3992ad73165b

[PATCH 00/34] DC Patches Feb 28, 2020

2024-02-28 Thread Alex Hung
This DC patchset brings improvements in multiple areas. In summary, we highlight: * Fixes on HDCP, eDP and FW idle check. * Enhancement in debug messages * Improvement on updates sequences * DPP refactoring to a new directory * Enhancements in DMUB Cc: Daniel Wheeler Allen Pan (1): drm/amd/d

[PATCH 01/34] drm/amd/display: Change default size for dummy plane in DML2

2024-02-28 Thread Alex Hung
;t. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Chaitanya Dhere Acked-by: Alex Hung Signed-off-by: Swapnil Patel --- .../display/dc/dml2/dml2_translation_helper.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH 02/34] drm/amd/display: Enable DML2 debug flags

2024-02-28 Thread Alex Hung
From: Aurabindo Pillai [WHY & HOW] Enable DML2 related debug config options in DM for testing purposes. Reviewed-by: Chaitanya Dhere Acked-by: Alex Hung Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+) diff -

[PATCH 03/34] drm/amd/display: Add some forward declarations

2024-02-28 Thread Alex Hung
From: Aurabindo Pillai [WHAT] Add DML2 pipe and config struct forward declaration as a preparation for DML2. Reviewed-by: Chaitanya Dhere Acked-by: Alex Hung Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.h | 2 ++ 1 file changed, 2 insertions

[PATCH 04/34] drm/amd/display: Add DML2 folder to include path

2024-02-28 Thread Alex Hung
From: Aurabindo Pillai Add DML2 compilation rule in the Makefile. Reviewed-by: Chaitanya Dhere Acked-by: Alex Hung Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/dml2

[PATCH 05/34] drm/amd/display: Set DCN351 BB and IP the same as DCN35

2024-02-28 Thread Alex Hung
From: Xi Liu [WHY & HOW] DCN351 and DCN35 should use the same bounding box and IP settings. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Jun Lei Acked-by: Alex Hung Signed-off-by: Xi Liu --- .../gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c

[PATCH 06/34] drm/amd/display: Override min required DCFCLK in dml1_validate

2024-02-28 Thread Alex Hung
: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Sohaib Nadeem --- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 6 ++ .../gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c | 1 + .../gpu/drm/amd/display/dc/resource

[PATCH 07/34] drm/amd/display: Fix function banner for amdgpu_dm_psr_disable_all()

2024-02-28 Thread Alex Hung
From: Roman Li [WHY] Incorrect function name in function banner. [HOW] Correct name and brief description. Reviewed-by: Hersen Wu Reviewed-by: Aurabindo Pillai Acked-by: Alex Hung Signed-off-by: Roman Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 2 +- 1 file changed, 1

[PATCH 08/34] drm/amd/display: Allow dirty rects to be sent to dmub when abm is active

2024-02-28 Thread Alex Hung
: sta...@vger.kernel.org Reviewed-by: Anthony Koo Acked-by: Alex Hung Signed-off-by: Josip Pavic --- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 5211c1c

[PATCH 09/34] drm/amd/display: Add debug key to allow disabling dtbclk

2024-02-28 Thread Alex Hung
From: Muhammad Ahmed [HOW] Add debug key to allow disabling dtbclk Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Muhammad Ahmed --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 3 ++- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2

[PATCH 10/34] drm/amd/display: Add debug prints for IPS testing

2024-02-28 Thread Alex Hung
From: Nicholas Kazlauskas [WHY] To log commit states and when we transition in/out of allow and idle states and the caller. [HOW] Add a new logging helper and wrap idle optimization calls to receive the caller. Reviewed-by: Duncan Ma Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas

[PATCH 11/34] drm/amd/display: Exit idle optimizations before HDCP execution

2024-02-28 Thread Alex Hung
h the link protection thread and the rest of DM operation. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c| 10 ++ drivers/gpu/dr

[PATCH 12/34] drm/amd/display: Add entry and exit counters

2024-02-28 Thread Alex Hung
From: Anthony Koo [WHY & HOW] Add new counters in the shared IPS firmware state. Acked-by: Alex Hung Signed-off-by: Anthony Koo --- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dmub

[PATCH 13/34] drm/amd/display: 3.2.274

2024-02-28 Thread Alex Hung
() - Allow dirty rects to be sent to dmub when abm is active - Add debug key to allow disabling dtbclk - Add debug prints for IPS testing - Exit idle optimizations before HDCP execution - Add entry and exit counters Acked-by: Alex Hung Signed-off-by: Aric Cyr --- drivers/gpu/drm/amd/display/dc/dc.h

[PATCH 14/34] drm/amd/display: Support long vblank feature

2024-02-28 Thread Alex Hung
6 vcount2 : 0, 1, 2, 3, 4, Reviewed-by: Jun Lei Acked-by: Alex Hung Signed-off-by: ChunTao Tso Signed-off-by: Robin Chen --- drivers/gpu/drm/amd/display/dc/core/dc.c | 33 drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 1 + .../amd/display/dc/hwss/dcn35/dcn35_hwse

[PATCH 15/34] drm/amd/display: Add monitor patch for specific eDP

2024-02-28 Thread Alex Hung
r Cc: sta...@vger.kernel.org # 6.5.x Cc: Tsung-hua Lin Cc: Chris Chi Reviewed-by: Wayne Lin Acked-by: Alex Hung Signed-off-by: Ryan Lin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display

[PATCH 16/34] drm/amd/display: Init DPPCLK from SMU on dcn32

2024-02-28 Thread Alex Hung
From: Dillon Varone [WHY & HOW] DPPCLK ranges should be obtained from the SMU when available. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Chaitanya Dhere Acked-by: Alex Hung Signed-off-by: Dillon Varone --- .../display/dc/clk_mgr/dcn32/dcn32_clk_m

[PATCH 17/34] drm/amd/display: Update odm when ODM combine is changed on an otg master pipe with no plane

2024-02-28 Thread Alex Hung
per OPP so we will need to reprogram OPP based on the new pipe topology. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Dillon Varone Acked-by: Alex Hung Signed-off-by: Wenjing Liu --- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 41

[PATCH 18/34] drm/amd/display: Fix idle check for shared firmware state

2024-02-28 Thread Alex Hung
...@vger.kernel.org Reviewed-by: Duncan Ma Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display

[PATCH 19/34] drm/amd/display: Add guards for idle on reg read/write

2024-02-28 Thread Alex Hung
s not cover accesses from external clients outside of DM/DC like firmware or the kernel mode driver. Reviewed-by: Duncan Ma Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 9 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + 2

[PATCH 20/34] drm/amd/display: Guard cursor idle reallow by DC debug option

2024-02-28 Thread Alex Hung
From: Nicholas Kazlauskas [WHY] To control whether idle optimizations reallowed after the first cursor update. [HOW] Add checks to the conditions. Reviewed-by: Duncan Ma Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 ++-- 1

[PATCH 21/34] drm/amd/display: Add debug counters to IPS exit prints

2024-02-28 Thread Alex Hung
From: Nicholas Kazlauskas [WHY] To have a log of the entry/exit counters in case the system hangs to measure stability. [HOW] Read them from firmware state and pass them to the prints. Reviewed-by: Duncan Ma Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd

[PATCH 22/34] drm/amd/display: Add left edge pixel for YCbCr422/420 + ODM pipe split

2024-02-28 Thread Alex Hung
...@vger.kernel.org Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: George Shen --- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++ .../gpu/drm/amd/display/dc/core/dc_resource.c | 37 +++ .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 10 + .../gpu/drm/amd/display/dc

[PATCH 23/34] drm/amd/display: Amend coasting vtotal for replay low hz

2024-02-28 Thread Alex Hung
From: ChunTao Tso [WHY] The original coasting vtotal is 2 bytes, and it need to be amended to 4 bytes because low hz case. [HOW] Amend coasting vtotal from 2 bytes to 4 bytes. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Alvin Lee Acked-by: Alex Hung

[PATCH 24/34] drm/amd/display: Refactor DPP into a component directory

2024-02-28 Thread Alex Hung
From: Revalla Hari Krishna [WHY & HOW] Move all dpp files to a new dpp directory. Reviewed-by: Martin Leung Acked-by: Alex Hung Signed-off-by: Revalla Hari Krishna --- drivers/gpu/drm/amd/display/Makefile | 1 + drivers/gpu/drm/amd/display/dc/Makefile | 2 +- drivers

[PATCH 25/34] drm/amd/display: Set the power_down_on_boot function pointer to null

2024-02-28 Thread Alex Hung
. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Muhammad Ahmed --- drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/dr

[PATCH 26/34] drm/amd/display: Implement update_planes_and_stream_v3 sequence

2024-02-28 Thread Alex Hung
that would use extra free pipes such as Dynamic ODM/MPC Combine, MPO or SubVp. Therefore there is no longer a need to specially handle compatibility problems with transitions among those features as they are now transparent to the new sequence. Reviewed-by: Wenjing Liu Acked-by: Alex Hung Signed-o

[PATCH 27/34] drm/amd/display: Lock all enabled otg pipes even with no planes

2024-02-28 Thread Alex Hung
ed-by: Alex Hung Signed-off-by: Wenjing Liu --- .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 23 +++ .../amd/display/dc/hwss/dcn32/dcn32_hwseq.h | 2 ++ .../amd/display/dc/hwss/dcn32/dcn32_init.c| 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH 28/34] drm/amd/display: Implement wait_for_odm_update_pending_complete

2024-02-28 Thread Alex Hung
generator. 2. no pending dpg pattern update for each active OPP. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Wenjing Liu --- drivers/gpu/drm/amd/display/dc/core/dc.c | 56 ++- .../gpu/drm/amd

[PATCH 29/34] drm/amd/display: Add a dc_state NULL check in dc_state_release

2024-02-28 Thread Alex Hung
From: Allen Pan [How] Check wheather state is NULL before releasing it. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Allen Pan --- drivers/gpu/drm/amd/display/dc/core/dc_state.c | 3 ++- 1 file changed, 2

[PATCH 31/34] drm/amd/display: Update DMUB flags and definitions

2024-02-28 Thread Alex Hung
- Add new flag to indicate if a new frame update needed for ABM to ramp up into steady state Acked-by: Alex Hung Signed-off-by: Anthony Koo --- .../gpu/drm/amd/display/dc/dce/dmub_replay.c | 2 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 40 +-- 2 files changed, 38

[PATCH 32/34] drm/amd/display: Return the correct HDCP error code

2024-02-28 Thread Alex Hung
From: Rodrigo Siqueira [WHY & HOW] If the display is null when creating an HDCP session, return a proper error code. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/modules/hdcp/hdcp_p

[PATCH 33/34] drm/amd/display: Add comments to v_total calculation and drop legacy TODO

2024-02-28 Thread Alex Hung
From: Rodrigo Siqueira [WHY & HOW] This commit just adds some simple comments to help understand the calculation of V total duration for Freesync. Also, remove a legacy TODO comment from link service type. Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/dis

[PATCH 34/34] drm/amd/display: 3.2.275

2024-02-28 Thread Alex Hung
calculation and drop legacy TODO Acked-by: Alex Hung Signed-off-by: Aric Cyr --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 9629bd9252b4..e17ddda8ec38 100644

[PATCH 30/34] drm/amd/display: Backup and restore only on full updates

2024-02-28 Thread Alex Hung
void needing to allocate large amounts of memory every time we create a new DC state. Reviewed-by: Wenjing Liu Acked-by: Alex Hung Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/core/dc.c | 10 +- .../gpu/drm/amd/display/dc/core/dc_state.c| 1 - drivers/gpu/drm/amd/displa

[PATCH 00/39] DC Patches June 20, 2024

2024-06-20 Thread Alex Hung
This DC patchset brings improvements in multiple areas. In summary, we highlight: * Enable DCC on DCN401 * Fix cursor issues * Misc Coverity fixes Cc: Daniel Wheeler Alex Hung (12): drm/amd/display: Remove redundant checks for pipe_ctx->stream drm/amd/display: Run DC_LOG_DC after check

[PATCH 01/39] drm/amd/display: Temporarily disable HPO PG on DCN35

2024-06-20 Thread Alex Hung
Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Nicholas Susanto --- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c b/drivers/gpu/drm/amd

[PATCH 02/39] drm/amd/display: Refactor dccg401_get_other_enable_symclk_fe

2024-06-20 Thread Alex Hung
connected. This caused black screens on driver disable with an MST daisy chain hooked up. [HOW] Refactored the function to correctly return the number of FEs connected to the input BE. Also renamed it for clarity. Reviewed-by: Wenjing Liu Acked-by: Alex Hung Signed-off-by: Relja Vojvodic

[PATCH 03/39] drm/amd/display: Remove redundant var from display_rq_dig_calc in dml

2024-06-20 Thread Alex Hung
ll code with it from 'display_rq_dlg_calc_' functions in dml. Reviewed-by: Alex Hung Acked-by: Alex Hung Signed-off-by: Ivan Lipski --- .../display/dc/dml/dcn20/display_rq_dlg_calc_20.c | 14 +++--- .../dc/dml/dcn20/display_rq_dlg_calc_20v2.c| 14 +++---

[PATCH 04/39] drm/amd/display: Remove unnecessary variable

2024-06-20 Thread Alex Hung
Since the variable is only used for the conditional check, but the check can never be true, the variable itself is redundant. [HOW] Removed the variable 'need_recovery'. Reviewed-by: Alex Hung Acked-by: Alex Hung Signed-off-by: Ivan Lipski --- .../drm/amd/display/dc/hwss/dcn10/dcn10_

[PATCH 05/39] drm/amd/display: Fix cursor issues with ODMs and HW rotations

2024-06-20 Thread Alex Hung
h HW rotations. Reviewed-by: Sridevi Arvindekar Acked-by: Alex Hung Signed-off-by: Nevenko Stupar --- .../amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c | 50 --- .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 38 - .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 135 +++--

[PATCH 06/39] drm/amd/display: Send DP_TOTAL_LTTPR_CNT during detection if LTTPR is present

2024-06-20 Thread Alex Hung
From: Michael Strauss [WHY] New register field added in DP2.1 SCR, needed for auxless ALPM [HOW] Echo value read from 0xF0007 back to sink Reviewed-by: Wenjing Liu Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Michael Strauss

[PATCH 07/39] drm/amd/display: Remove redundant checks for pipe_ctx->stream

2024-06-20 Thread Alex Hung
ira Acked-by: Alex Hung Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c| 7 +++ drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 4 ++-- .../gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c | 2 +- 3 files changed, 6 insertions(+), 7

[PATCH 08/39] drm/amd/display: Run DC_LOG_DC after checking link->link_enc

2024-06-20 Thread Alex Hung
[WHAT] The DC_LOG_DC should be run after link->link_enc is checked, not before. This fixes 1 REVERSE_INULL issue reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/link/link_factory.c | 6 +++--- 1 file chan

[PATCH 09/39] drm/amd/display: Fix cursor size issues

2024-06-20 Thread Alex Hung
From: Nevenko Stupar [WHY & HOW] Fix the cursor size between ODM slices. Reviewed-by: Sridevi Arvindekar Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Nevenko Stupar --- .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c

[PATCH 10/39] drm/amd/display: Fix uninitialized variables in dcn401

2024-06-20 Thread Alex Hung
[WHAT & HOW] surf_linear_128_l/c are used in CalculateBytePerPixelAndBlockSizes before they are assigned, so initializing them before passing them into the function. This fixes 2 UNINIT issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Alex

[PATCH 11/39] drm/amd/display: Remove useless function call

2024-06-20 Thread Alex Hung
[WHAT & HOW] clk_mgr_helper_get_active_display_cnt returns display count and itself alone has no use. This fixes 1 CHECKED_RETURN issue reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/clk_mgr/dc

[PATCH 12/39] drm/amd/display: Check and log for function error codes

2024-06-20 Thread Alex Hung
[WHAT & HOW] BIOS_CMD_TABLE_REVISION and link_transmitter_control can return error codes and errors should be reported. This fixes 3 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/

[PATCH 13/39] drm/amd/display: Check and log for function error codes

2024-06-20 Thread Alex Hung
[WHAT & HOW] dm_dmub_hw_init and drm_dp_mst_topology_mgr_set_mst can return error codes and errors should be reported. This fixes 2 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/amdgp

[PATCH 14/39] drm/amd/display: Check HDCP returned status

2024-06-20 Thread Alex Hung
[WHAT & HOW] Check mod_hdcp_execute_and_set() return values in authenticated_dp. This fixes 3 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Alex Hung --- .../amd/display/modules/hdcp/hdcp1_execution.c| 15 +-

[PATCH 15/39] drm/amd/display: Add Replay general cmd

2024-06-20 Thread Alex Hung
From: Joan Lee [WHY & HOW] Driver side adding replay general cmd interface. Replay general command will config at most two uint_32 parameters, with a replay general command subtype to set relative configurations. Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Joan

[PATCH 16/39] drm/amd/display: Use sw cursor for DCN401 with rotation

2024-06-20 Thread Alex Hung
re cursor. Reviewed-by: Sun peng Li Reviewed-by: Rodrigo Siqueira Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Aurabindo Pillai --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 34 --- 1 file changed, 29 insertions(+), 5

[PATCH 17/39] drm/amd/display: Always enable HPO for DCN4 dGPU

2024-06-20 Thread Alex Hung
From: "Leo (Hanghong) Ma" [WHY && HOW] Some DP EDID CTS tests fail due to HPO disable, and we should keep it enable on DCN4 dGPU. Reviewed-by: Wenjing Liu Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Leo (Hanghong) Ma

[PATCH 18/39] drm/amd/display: resync OTG after DIO FIFO resync

2024-06-20 Thread Alex Hung
From: TungYu Lu [WHY] Tiled displays showed not aligned on 8K60hz when system resumed from S3/S4. [HOW] Do dc_trigger_sync to re-sync pipes to ensure OTG become synced. Reviewed-by: Alvin Lee Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off

[PATCH 19/39] drm/amd/display: Call dpmm when checking mode support

2024-06-20 Thread Alex Hung
the display config can successfully be mapped to a DPM level. Reviewed-by: Chaitanya Dhere Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: George Shen --- .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 1 + .../dc/dml2/dml21/src

[PATCH 20/39] drm/amd/display: Add workaround to restrict max frac urgent for DPM0

2024-06-20 Thread Alex Hung
ns to specify this pe platform as required. Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Sung-huai Wang --- .../gpu/drm/amd/display/dc/dml2/dml2_wrapper.c| 15 +++ .../gpu/drm/amd/display/dc/dml2/dml2_wrapper.h| 2 ++ .../display/dc/resource/

[PATCH 21/39] drm/amd/display: Make DML2.1 P-State method force per stream

2024-06-20 Thread Alex Hung
From: Dillon Varone [WHY & HOW] Currently the force only works for a single display, make it so it can be forced per stream. Reviewed-by: Alvin Lee Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Dillon Varone --- drivers/gpu/drm

[PATCH 22/39] drm/amd/display: Fix reduced resolution and refresh rate

2024-06-20 Thread Alex Hung
rate and lane counts. Reviewed-by: Wenjing Liu Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Daniel Sa --- .../dc/link/protocols/link_dp_capability.c| 21 ++- 1 file changed, 11 insertions(+), 10 deletions(-) diff

[PATCH 23/39] drm/amd/display: Add null checks before accessing struct elements

2024-06-20 Thread Alex Hung
queira Acked-by: Alex Hung Signed-off-by: Alex Hung --- .../drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 10 ++ .../drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 10 ++ drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 2 +- drivers/gpu/drm/amd/display/d

[PATCH 24/39] drm/amd/display: Program CURSOR_DST_X_OFFSET in viewport space

2024-06-20 Thread Alex Hung
ster. This fixes an underflow issue that occurs in scaled mode with low refresh rate. Reviewed-by: Nevenko Stupar Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Alvin Lee --- .../gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c

[PATCH 25/39] drm/amd/display: Reset DSC memory status

2024-06-20 Thread Alex Hung
-by: Nicholas Kazlauskas Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Duncan Ma --- .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 24 +++- .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.h | 9 +++ .../drm/amd/display/dc/dsc/dcn35

[PATCH 26/39] drm/amd/display: Wait for double buffer update on ODM changes

2024-06-20 Thread Alex Hung
Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Alvin Lee --- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 23 +++ .../amd/display/dc/inc/hw/timing_generator.h | 1 + .../amd/display/dc/optc/dcn10/dcn10_optc.h| 3 ++- .../amd/display/dc/

[PATCH 27/39] drm/amd/display: Fix cursor issues with ODMs and magnification

2024-06-20 Thread Alex Hung
From: Nevenko Stupar [WHY & HOW] Adjust hot spot positions between ODM slices when cursor magnification is used. Reviewed-by: Sridevi Arvindekar Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Nevenko Stupar --- .../gpu/drm/amd/dis

[PATCH 28/39] drm/amd/display: Add HW cursor visual confirm

2024-06-20 Thread Alex Hung
-by: Alex Hung Signed-off-by: Ryan Seto --- .../gpu/drm/amd/display/dc/core/dc_stream.c | 29 +++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 30 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc

[PATCH 29/39] drm/amd/display: Remove a redundant check in authenticated_dp

2024-06-20 Thread Alex Hung
guaranteed to enter. Therefore we are removing the if statements due to redundancy. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Wenjing Liu --- .../display/modules/hdcp/hdcp1_execution.c| 27 +-- 1 file changed, 12 insertions(+), 15 deletions(-) diff

[PATCH 30/39] drm/amd/display: Adjust reg field for DSC wait for disconnect

2024-06-20 Thread Alex Hung
From: Ryan Seto [WHY] DSC was waiting for the wrong field to disconnect cleanly. [HOW] Changed field the DSC disconnect was waiting on. Reviewed-by: Wenjing Liu Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Ryan Seto --- drivers/gpu

[PATCH 31/39] drm/amd/display: Fix 1DLUT setting for NL SDR blending

2024-06-20 Thread Alex Hung
only modify the 1D LUT in populate_mcm if 3D LUT was enabled. Added blend_tf function update for non-main planes if the 3D LUT path was taken. Reviewed-by: Ilya Bakoulin Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Relja Vojvodic

[PATCH 32/39] drm/amd/display: Use periodic detection for ipx/headless

2024-06-20 Thread Alex Hung
Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Roman Li --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 ++ .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c| 48 +++ .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 5 +- 3 files

[PATCH 33/39] drm/amd/display: Ensure curve to hw translation succeed

2024-06-20 Thread Alex Hung
[WHAT & HOW] Check cm3_helper_translate_curve_to_hw_format runs successfully so the regamma_params is valid and can be used. Also revmoed two result assignments. This fixes 2 CHECKED_RETURN UNUSED_VALUE issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Alex Hung Signed-of

[PATCH 34/39] drm/amd/display: Validate function returns

2024-06-20 Thread Alex Hung
[WHAT & HOW] Function return values must be checked before data can be used in subsequent functions. This fixes 4 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Alex Hung Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/dc_dmub_s

[PATCH 35/39] drm/amd/display: Remove always true condition

2024-06-20 Thread Alex Hung
[WHAT & HOW] advanced_pstate_switching was initialized to false and never assigned to another value; as a result !advanced_pstate_switching is always true and should be removed. This fixes 2 DEADCODE issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-of

[PATCH 36/39] drm/amd/display: Remove duplicate null check

2024-06-20 Thread Alex Hung
[WHAT & HOW] The same display null check was a few lines above. This fixes 1 DEADCODE issue reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c | 3 --- 1 file changed, 3 deletions(-)

[PATCH 37/39] drm/amd: Add reg definitions for DCN401 DCC

2024-06-20 Thread Alex Hung
From: Aurabindo Pillai [WHAT] Add the necessary register definitions to enable DCC on DCN4x Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Aurabindo Pillai --- .../include/asic_reg/dcn/dcn_4_1_0_sh_mask.h | 110 ++ 1 file changed, 110 insertions(+) diff

[PATCH 38/39] drm/amd/display: Enable DCC on DCN401

2024-06-20 Thread Alex Hung
From: Aurabindo Pillai [WHAT] Add registers and entry points to enable DCC on DCN4x Reviewed-by: Rodrigo Siqueira Acked-by: Alex Hung Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/core/dc.c | 12 + .../drm/amd/display/dc/core/dc_hw_sequencer.c | 11 + drivers/gpu

[PATCH 39/39] drm/amd/display: 3.2.290

2024-06-20 Thread Alex Hung
factor dccg401_get_other_enable_symclk_fe Acked-by: Alex Hung Signed-off-by: Aric Cyr --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 40f183816e31..900892

[PATCH] drm/amd/display: Add doc entry for program_3dlut_size

2024-07-15 Thread Alex Hung
Fixes the warning: Function parameter or struct member 'program_3dlut_size' not described in 'mpc_funcs' Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/amd/displa

  1   2   3   4   5   6   >