[PATCH] drm/amd/display: Set default brightness according to ACPI

2024-06-06 Thread Mario Limonciello
Currently, amdgpu will always set up the brightness at 100% when it loads. However this is jarring when the BIOS has it previously programmed to a much lower value. The ACPI ATIF method includes two members for "ac_level" and "dc_level". These represent the default values that should be used if t

RE: [PATCH 2/2] drm/amd/pm: update check condition for SMU mode1 reset

2024-06-06 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] Series is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Tao Zhou Sent: Thursday, June 6, 2024 18:06 To: amd-gfx@lists.freedesktop.org Cc: Zhou1, Tao Subject: [PATCH 2/2] drm/amd/pm: up

[PATCH 65/67] drm/amd/display: 3.2.288

2024-06-06 Thread Zaeem Mohamed
From: Aric Cyr * FW Release 0.0.221.0 * Fixed missing targets in FAMS2 * Populate hardware_release hook for dcn401 * Disable DMCUB timeout for DCN35 * Move PRIMARY plane zpos higher * Introduce overlay cursor mode * Change dram_clock_latency for dcn35 and dcn351 * DCN401 cursor code update Acked

[PATCH 63/67] drm/amd/display: Avoid overflow from uint32_t to uint8_t

2024-06-06 Thread Zaeem Mohamed
From: Alex Hung [WHAT & HOW] dmub_rb_cmd's ramping_boundary has size of uint8_t and it is assigned 0x. Fix it by changing it to uint8_t with value of 0xFF. This fixes 2 INTEGER_OVERFLOW issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Zaeem Mohamed Signed-off-by: Alex

[PATCH 61/67] drm/amd/display: Fix missed targets in FAMS2+HWFQ

2024-06-06 Thread Zaeem Mohamed
From: Dillon Varone [WHY&HOW] Add additional delay factor when considering a safe time to flip for HWFQ to be passed in by the driver. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c| 1 + drivers/gpu/drm/amd/di

[PATCH 66/67] drm/amd/display: [FW Promotion] Release 0.0.221.0

2024-06-06 Thread Zaeem Mohamed
From: Anthony Koo - Create a general command and fix Replay desync error with general cmd Acked-by: Zaeem Mohamed Signed-off-by: Anthony Koo --- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 61 ++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/d

[PATCH 59/67] drm/amd/display: Block SubVP if hardware rotation is used in DML2.1

2024-06-06 Thread Zaeem Mohamed
From: Dillon Varone [WHY&HOW] SubVP is not supported when hardware rotation is in use. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone --- .../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH 67/67] drm/amd/display: Disable PHYSYMCLK RCO

2024-06-06 Thread Zaeem Mohamed
From: Daniel Miess [Why] PHYSYMCLK RCO has been found to lead to crashes in some corner cases [How] Disable PHYSYMCLK RCO debug bit Reviewed-by: Nicholas Kazlauskas Acked-by: Zaeem Mohamed Signed-off-by: Daniel Miess --- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +-

[PATCH 64/67] drm/amd/display: Update idle hardmins if uclk or fclk requirement changed

2024-06-06 Thread Zaeem Mohamed
From: Dillon Varone [WHY&HOW] Update the idle hardmin with SMU if either clock changed. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH 55/67] drm/amd/display: populate hardware_release hook for dcn401

2024-06-06 Thread Zaeem Mohamed
From: Alvin Lee [Description] hardare_release() is called when driver is removed. Add the missing hook for DCN401 Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee --- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 20 +++ .../amd/display/dc/hwss/d

[PATCH 58/67] drm/amd/display: Explicitly cast v_total to signed in a subtraction

2024-06-06 Thread Zaeem Mohamed
From: Alex Hung [WHY & HOW] v_total is an uint32_t and subtracting an unsigned to a signed will result in an unsigned which is always >= 0. As a result, the ternary conditions are always true and thus has no effect. This is fixed by casting v_total to signed explicitly. This also avoids v_total

[PATCH 62/67] drm/amd/display: Do not override dml2.1 reinit

2024-06-06 Thread Zaeem Mohamed
From: Dillon Varone [WHY&HOW] Reinit should return after completing version 2.1 reinit instead of calling version 2 reinit after. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone --- drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c | 3 ++- 1 file changed, 2 inse

[PATCH 60/67] drm/amd/display: Add null check for phantom pipes in prepare mcache

2024-06-06 Thread Zaeem Mohamed
From: Dillon Varone [WHY&HOW] Sometimes this function is called with a partially deconstructed phantom stream toplolgy, and should ignore phantoms with no plane state. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone --- .../gpu/drm/amd/display/dc/dml2/dml21/dml21_

[PATCH 57/67] drm/amd/display: Remove NO_EFFECT self-assignment

2024-06-06 Thread Zaeem Mohamed
From: Alex Hung [WHAT & HOW] The self-assignments have no effects and thus are removed. Reviewed-by: Rodrigo Siqueira Acked-by: Zaeem Mohamed Signed-off-by: Alex Hung --- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c| 4 .../display/dc/dml2/dml21/src/dml2_core/dml2_core

[PATCH 56/67] drm/amd/display: Remove reduntant comparisons by Coverity

2024-06-06 Thread Zaeem Mohamed
From: Ivan Lipski [WHY] Coverity analysis of the Upstream display driver code (amd-staging-drm-next) flagged these three functions as containing 'CONSTANT_EXPRESSION_RESULT' errors, i. e. the conditionals are reduntant since their result is predetermined. fixpt31_32.c: The two flagged 'ASSERT' l

[PATCH 52/67] Revert "drm/amd/display: Handle HPD_IRQ for internal link"

2024-06-06 Thread Zaeem Mohamed
From: Sung-huai Wang [How&Why] This reverts commit a410234a0e13. Due to the it effects Replay resync. Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: Sung-huai Wang --- .../dc/link/protocols/link_dp_irq_handler.c | 24 +++ 1 file changed, 9 insertions(+), 15

[PATCH 54/67] drm/amd/display: make ODM segment width of YCbCr422 two pixel aligned

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] In YCbCr422 format hardware shares 1 set of chromas CbCr with 2 sets of lumas Y. Therefore each ODM segment needs to be two pixel aligned. The commit adds this missing hardwware requirement into ODM segment width decision logic. Reviewed-by: Dillon Varone Acked-by: Zaeem

[PATCH 53/67] drm/amd/display: Disable IPS when it is not allowed.

2024-06-06 Thread Zaeem Mohamed
From: "JinZe.Xu" [Why&How] Add flag to disable IPS when it is not allowed. Reviewed-by: Nicholas Kazlauskas Acked-by: Zaeem Mohamed Signed-off-by: JinZe.Xu --- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 ++ 2 files changed, 3 insertio

[PATCH 51/67] drm/amd/display: Remove useless comparison of unsigned int vs. 0

2024-06-06 Thread Zaeem Mohamed
From: Alex Hung [WHY & HOW] The comparisons of unsigned int with 0 can have no meanings, i.e. unsigned int >= 0 (always true) or unsigned int < 0 (always false), and therefore they are removed. This fixes 12 NO_EFFECT issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Zaeem Moh

[PATCH 50/67] drm/amd/display: Fix uninitialized variables in dcn401

2024-06-06 Thread Zaeem Mohamed
From: Alex Hung This fixes an UNINIT issue reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Zaeem Mohamed Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/

[PATCH 49/67] drm/amd/display: Fix incorrect size calculation for loop in dcn401

2024-06-06 Thread Zaeem Mohamed
From: Alex Hung [WHY] fe_clk_en and be_clk_sel have size of 4 but sizeof(fe_clk_en) has byte size 16 which is lager than the array size. [HOW] Use ARRAY_SIZE for calculating size. This fixes 2 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Zaeem Mohamed Signed-off

[PATCH 48/67] drm/amd/display: Minor cleanup for DCN401 cursor related code

2024-06-06 Thread Zaeem Mohamed
From: Sridevi Arvindekar Move pipe_ctx variables to start of the function and add a helpful comment Co-authored-by: Sridevi Arvindekar Reviewed-by: Ilya Bakoulin Acked-by: Zaeem Mohamed Signed-off-by: Sridevi Arvindekar --- drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 5 +

[PATCH 46/67] drm/amd/display: Disable DMCUB timeout for DCN35

2024-06-06 Thread Zaeem Mohamed
From: Nicholas Kazlauskas [Why] DMCUB can intermittently take longer than expected to process commands. Old ASIC policy was to continue while logging a diagnostic error - which works fine for ASIC without IPS, but with IPS this could lead to a race condition where we attempt to access DCN state

[PATCH 47/67] drm/amd/display: Check otg_master pointer before use it

2024-06-06 Thread Zaeem Mohamed
From: Rodrigo Siqueira Coverity highlighted that the parameter otg_master is referenced before the if condition that validates it, which means that the code might have some attempt to access a null pointer. This commit addresses this issue by moving the pointer verification to the beginning of th

[PATCH 45/67] drm/amd/display: use preferred link settings for dp signal only

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] We set preferred link settings for virtual signal. However we don't support virtual signal for UHBR link rate. If preferred is set to UHBR link rate, we will allow virtual signal with UHBR link rate which causes system crashes. Reviewed-by: Dillon Varone Acked-by: Zaeem

[PATCH 44/67] drm/amd/display: remove ODM combine before bandwidth validation

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] DML1 validation code doesn't have the ability to remove ODM combine. It will directly translate currently used ODM combine config into ODM override. If ODM combine is used in the initial state it will only validate the timing if ODM is used. This is not correct for dynamic

[PATCH 41/67] drm/amd/display: Move PRIMARY plane zpos higher

2024-06-06 Thread Zaeem Mohamed
From: Leo Li [Why] Compositors have different ways of assigning surfaces to DRM planes for render offloading. It may decide between various strategies: overlay, underlay, or a mix of both (see here for more info: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/76) One way for compos

[PATCH 38/67] drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode()

2024-06-06 Thread Zaeem Mohamed
From: Wayne Lin [Why] dm_dp_mst_is_port_support_mode() is a bit not following the original design rule and cause light up issue with multiple 4k monitors after mst dsc hub. [How] Refactor function dm_dp_mst_is_port_support_mode() a bit to solve the light up issue. Reviewed-by: Jerry Zuo Acke

[PATCH 43/67] drm/amd/display: remove dpp pipes on failure to update pipe params

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] There are cases where update pipe params could fail but dpp pipes are already added to the state. In this case, we should remove dpp pipes so dc state is restored back. If it is not restored, dc state is corrupted after calling this function, so if we call the same interfa

[PATCH 39/67] drm/amd/display: define abm debug interface

2024-06-06 Thread Zaeem Mohamed
From: Josip Pavic [Why & How] Define debug interface to dmub for reading back abm data. Reviewed-by: Anthony Koo Acked-by: Zaeem Mohamed Signed-off-by: Josip Pavic --- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 60 +++ 1 file changed, 60 insertions(+) diff --git a/drive

[PATCH 31/67] drm/amd/display: Avoid programming DTO if Refclk is 0

2024-06-06 Thread Zaeem Mohamed
From: Chris Park [Why] Reference clock, either DPREFCLK or DTBCLK can be a value of 0 which then will encounter division by 0. [How] Avoid further calculation and programming if refclk is not populated. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Chris Park --- drivers

[PATCH 40/67] drm/amd/display: Introduce overlay cursor mode

2024-06-06 Thread Zaeem Mohamed
From: Leo Li [Why] DCN is the display hardware for amdgpu. DRM planes are backed by DCN hardware pipes, which carry pixel data from one end (memory), to the other (output encoder). Each DCN pipe has the ability to blend in a cursor early on in the pipeline. In other words, there are no dedicate

[PATCH 42/67] drm/amd/display: Remove register from DCN35 DMCUB diagnostic collection

2024-06-06 Thread Zaeem Mohamed
From: Nicholas Kazlauskas [Why] These registers should not be read from driver and triggering the security violation when DMCUB work times out and diagnostics are collected blocks Z8 entry. [How] Remove the register read from DCN35. Reviewed-by: Duncan Ma Acked-by: Zaeem Mohamed Signed-off-by

[PATCH 36/67] drm/amd/display: change dram_clock_latency to 34us for dcn35

2024-06-06 Thread Zaeem Mohamed
From: Paul Hsieh [Why & How] Current DRAM setting would cause underflow on customer platform. Modify dram_clock_change_latency_us from 11.72 to 34.0 us as per recommendation from HW team Reviewed-by: Nicholas Kazlauskas Acked-by: Zaeem Mohamed Signed-off-by: Paul Hsieh --- drivers/gpu/drm/a

[PATCH 37/67] drm/amd/display: Don't refer to dc_sink in is_dsc_need_re_compute

2024-06-06 Thread Zaeem Mohamed
From: Wayne Lin [Why] When unplug one of monitors connected after mst hub, encounter null pointer dereference. It's due to dc_sink get released immediately in early_unregister() or detect_ctx(). When commit new state which directly referring to info stored in dc_sink will cause null pointer d

[PATCH 30/67] drm/amd/display: Update efficiency bandwidth for dcn351

2024-06-06 Thread Zaeem Mohamed
From: Fangzhi Zuo Fixing 4k240 underflow on dcn351 Reviewed-by: Harry Wentland Acked-by: Zaeem Mohamed Signed-off-by: Fangzhi Zuo --- drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_tra

[PATCH 35/67] drm/amd/display: Change dram_clock_latency to 34us for dcn351

2024-06-06 Thread Zaeem Mohamed
From: Daniel Miess [Why] Intermittent underflow observed when using 4k144 display on dcn351 [How] Update dram_clock_change_latency_us from 11.72us to 34us Reviewed-by: Nicholas Kazlauskas Acked-by: Zaeem Mohamed Signed-off-by: Daniel Miess --- drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn35

[PATCH 32/67] drm/amd/display: Adjust debug msg for usb4/tbt

2024-06-06 Thread Zaeem Mohamed
From: Wayne Lin [Why & How] Debug msg for usb4/tbt now is a bit confusing. Adjust it for better reading. Reviewed-by: Jerry Zuo Acked-by: Zaeem Mohamed Signed-off-by: Wayne Lin --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 57 +++ 1 file changed, 34 insertions(+), 23 de

[PATCH 34/67] drm/amd/display: Correct the defined value for AMDGPU_DMUB_NOTIFICATION_MAX

2024-06-06 Thread Zaeem Mohamed
From: Wayne Lin [Why & How] It actually exposes '6' types in enum dmub_notification_type. Not 5. Using smaller number to create array dmub_callback & dmub_thread_offload has potential to access item out of array bound. Fix it. Reviewed-by: Jerry Zuo Acked-by: Zaeem Mohamed Signed-off-by: Way

[PATCH 29/67] drm/amd/display: Disable boot optimization for DCN401

2024-06-06 Thread Zaeem Mohamed
From: Joshua Aberback [Why] DCN401 currently has an issue re-enabling when pipe splitting is enabled, while the root cause is being investigated we can make sure everything is being reset as a workaround, by disabling boot optimization. [How] - use enable_accelerated_mode instead of init_pipes

[PATCH 33/67] drm/amd/display: Defer the setting of link hpd status for usb4/tbt

2024-06-06 Thread Zaeem Mohamed
From: Wayne Lin [Why & How] Link hpd status is set during link detection process via dpia_query_hpd_status(), doesn't need to explicitly set it during outbox irq. Remove it. Reviewed-by: Jerry Zuo Acked-by: Zaeem Mohamed Signed-off-by: Wayne Lin --- drivers/gpu/drm/amd/display/amdgpu_dm/amd

[PATCH 28/67] drm/amd/display: Prevent overflow on DTO calculation

2024-06-06 Thread Zaeem Mohamed
From: Chris Park [Why] uint32_t is implicitly converted to uint64_t while multiplication still happens on uint32_t side. This creates digit overflow for large pixel clock which is meant to be retained in uint64_t. [How] Calculate multiplication of units in uint64_t domain instead of uint32_t in

[PATCH 25/67] drm/amd/display: Remove duplicate 'update_idle_uclk' in dcn401 clk_mgr code

2024-06-06 Thread Zaeem Mohamed
From: Ivan Lipski [WHY] The coverity analysis flagged this if expression as it contains a 'CONSTANT_EXPRESSION_RESULT': 'update_idle_uclk' is 'ORd' with itself. [HOW] Remove the duplicate 'update_idle_uclk'. Reviewed-by: Alex Hung Acked-by: Zaeem Mohamed Signed-off-by: Ivan Lipski --- drive

[PATCH 27/67] drm/amd/display: DCN401 cusor code update

2024-06-06 Thread Zaeem Mohamed
From: Sridevi Arvindekar Scaling androtation changes for cursor. Reviewed-by: Ariel Bernstein Reviewed-by: Nevenko Stupar Acked-by: Zaeem Mohamed Signed-off-by: Sridevi Arvindekar --- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 22 +-- 1 file changed, 5 insertions(+), 17

[PATCH 24/67] drm/amd/display: Ignore UHBR13.5 cable ID cap for passive cable max link rate

2024-06-06 Thread Zaeem Mohamed
From: George Shen [Why] Passive DP40 cables were updated in the latest DP spec to support UHBR13.5 link rate. Current max link rate logic checks against the cable ID DPCD even for passive cables. [How] Ignore UHBR13.5 cable ID DPCD cap in get_max_link_rate logic. Reviewed-by: Wenjing Liu Acked

Re: [PATCH 1/2][RFC] amdgpu: fix a race in kfd_mem_export_dmabuf()

2024-06-06 Thread Felix Kuehling
On 2024-06-05 05:14, Christian König wrote: Am 04.06.24 um 20:08 schrieb Felix Kuehling: On 2024-06-03 22:13, Al Viro wrote: Using drm_gem_prime_handle_to_fd() to set dmabuf up and insert it into descriptor table, only to have it looked up by file descriptor and remove it from descriptor tab

[PATCH 23/67] drm/amd/display: Add config support entry to replay caps debugfs

2024-06-06 Thread Zaeem Mohamed
From: Roman Li [Why] replay_capability debugfs tells whether sink and driver support replay feature. However replay enablement also depends on whether it is enabled/disabled via amdgpu module params. [How] Add 'Config support' entry to output current replay config. Reviewed-by: ChiaHsuan Chung

[PATCH 26/67] drm/amd/display: Use the SPDX license identifier for dmub_replay files

2024-06-06 Thread Zaeem Mohamed
From: Rodrigo Siqueira Use the SPDX format for dmub_replay.c|.h files. Reviewed-by: Aurabindo Pillai Acked-by: Zaeem Mohamed Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/dce/dmub_replay.c | 27 ++--- .../gpu/drm/amd/display/dc/dce/dmub_replay.h | 29 +++---

[PATCH 22/67] drm/amd/display: added NULL check at start of dc_validate_stream

2024-06-06 Thread Zaeem Mohamed
From: winstang [Why] prevent invalid memory access [How] check if dc and stream are NULL Co-authored-by: winstang Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: winstang --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ 1 file changed, 3 insertions(+) diff --gi

[PATCH 19/67] drm/amd/display: Ignore phantom DTBCLK requirement

2024-06-06 Thread Zaeem Mohamed
From: Alvin Lee [Description] Phantom DTBCLK can be calculated different from main because phantom has no DSC and thus will have a different output BPP. Ignore phantom DTBCLK requirement and only consider non-phantom DTBCLK requirements. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signe

[PATCH 20/67] drm/amd/display: Add sequential ONO sequencing for DCN35

2024-06-06 Thread Zaeem Mohamed
From: Nicholas Kazlauskas [Why] Adds support for performing the sequential ONO changes from DCN351 into DCN35 ASIC based on revision. [How] Check the revision and run the DCN351 sequences on applicable revisions. Reviewed-by: Sung joon Kim Acked-by: Zaeem Mohamed Signed-off-by: Nicholas Kazla

[PATCH 21/67] drm/amd/display: [FW Promotion] Release 0.0.220.0

2024-06-06 Thread Zaeem Mohamed
From: Anthony Koo - Change ordering of structs to put enums together - Add new define DMUB_TRACE_ENTRY_DEFINED to guard the trace code enum Acked-by: Zaeem Mohamed Signed-off-by: Anthony Koo --- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 26 ++- 1 file changed, 14 in

[PATCH 18/67] drm/amd/display: Add fallback defaults for invalid LTTPR DPCD caps

2024-06-06 Thread Zaeem Mohamed
From: Michael Strauss [WHY] Some sinks are observed to return invalid LTTPR revision and/or invalid LTTPR link rate capabilities. [HOW] Assume any LTTPR which reports invalid max link rate supports HBR3. Don't validate LTTPR DPCD revision in dp_is_lttpr_present check. Reviewed-by: George Shen

[PATCH 15/67] drm/amd/display: Fix multiple cursors when using 4 displays on a contiguous large surface

2024-06-06 Thread Zaeem Mohamed
From: Nevenko Stupar [Why & How] Remove some cursor offset calculations for rotated cursor for fixing a bug where multiple cursors are seen. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Nevenko Stupar --- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 25 --

[PATCH 17/67] drm/amd/display: Update FIXED_VS retimer training pattern delay

2024-06-06 Thread Zaeem Mohamed
From: Michael Strauss [WHY] Needed for PHY patterns as well to perform electrical compliance. Also need to increase wait time from 30ms to 50ms to resolve very intermittent UHBR20 link training failures. Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: Michael Strauss --- .../

[PATCH 16/67] drm/amd/display: reduce ODM slice count to initial new dc state only when needed

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] We need to decrease ODM slice when adding or removing planes because MPO support takes precedence over dynamic ODM combine. However there is a case where we remove ODM combine even for ODM combine required timing in the initial new dc state. This is normally okay because O

[PATCH 13/67] drm/amd/display: Change AVI Info Frame version to 4 for OVT

2024-06-06 Thread Zaeem Mohamed
From: Chris Park [Why] Official Release CTA specification reverted the change and no longer uses version 5 to indicate OVT timing. [How] Change the version used for AVI info Frame for OVT to 4. Reviewed-by: Leo Ma Acked-by: Zaeem Mohamed Signed-off-by: Chris Park --- drivers/gpu/drm/amd/dis

[PATCH 14/67] drm/amd/display: Return after Init

2024-06-06 Thread Zaeem Mohamed
From: Daniel Sa why: DML21 being overwritten after init. how: After initializing, early return. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Daniel Sa --- drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/

[PATCH 01/67] drm/amd/display: Use TPS3 for ALPM on Specific Panel

2024-06-06 Thread Zaeem Mohamed
From: pochchan For some specific panel, it need to use TPS3 rather than use TP2 in ALPM when DSC is enabled. Reviewed-by: Rodrigo Siqueira Signed-off-by: pochchan --- drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH 11/67] drm/amd/display: Remove dcn32_smu13 duplicate header

2024-06-06 Thread Zaeem Mohamed
[WHY] Duplicate headers requiring unecessary maintenance of both headers [HOW] Removal of smu13_driver_if header and all referneces to it changed to dcn32_smu13_driver Signed-off-by: Zaeem Mohamed --- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn32/dcn32_clk_mgr_sm

[PATCH 06/67] drm/amd/display: use even ODM slice width for two pixels per container

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] When optc uses two pixel per container, each ODM slice width must be an even number. [how] If ODM slice width is odd number increase it by 1. Reviewed-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu --- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 3 +++ driver

[PATCH 12/67] drm/amd/display: Remove NULL assignment for stream_status

2024-06-06 Thread Zaeem Mohamed
From: Alvin Lee [Description] No need to assign stream_status NULL because it is always re-assigned before usage. This change is to fix coverity errors. Reviewed-by: Nicholas Choi Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 -- 1 file

[PATCH 08/67] drm/amd/display: Remove redundant if conditions

2024-06-06 Thread Zaeem Mohamed
From: Ivan Lipski [WHY] Coverity analysis flagged the two if conditions in dcn30_dpp.c and dcn401_dpp.c as DEADCODE since they are never true, since the variable 'program_prealpha_dealpha' is initialized at 0 and never chagnes. [HOW] Removed the variable 'program_prealpha_dealpha' and the if con

[PATCH 10/67] drm/amd/display: Remove redundant ternary operation

2024-06-06 Thread Zaeem Mohamed
From: Ivan Lipski [WHY] Coverity analysis flagged this ternary operation as DEADCODE. Since 'total_y_free_entry' is initialized as 0x200 and 'total_c_free_entry' is initialized as 0x140, and they never change values before the ternary operator, so 'total_y_free_entry' is always greater 'total_c_

[PATCH 05/67] drm/amd/display: Fix Replay Desync Error Test

2024-06-06 Thread Zaeem Mohamed
From: Dennis Chan When PHY power off, the DP_SEC_CNTL cannot be configured and cause disable Adaptive sync SDP failed. Regarding the issue, the driver will disabled AS-SDP in replay state machine. Reviewed-by: Rodrigo Siqueira Signed-off-by: Dennis Chan --- drivers/gpu/drm/amd/display/dc/dce/

[PATCH 09/67] drm/amd/display: Remove unreachable check

2024-06-06 Thread Zaeem Mohamed
From: Ivan Lipski [WHY] Coverity analysis flagged this code as DEADCODE since the condition and return in the outer loop are never reached. All operations with the 'dwb_pipe' variable happen in the inner loop, that already contains the same check with the 'MAX_DWB_PIPES'. The later check conditi

[PATCH 00/67] DC Patches June 3, 2024

2024-06-06 Thread Zaeem Mohamed
This DC patchset brings improvements in multiple areas. In summary, we have: * FW Release 0.0.221.0 * Fixed missing targets in FAMS2 * Populate hardware_release hook for dcn401 * Disable DMCUB timeout for DCN35 * Move PRIMARY plane zpos higher * Introduce overlay cursor mode * Change dram_clock_la

[PATCH 07/67] drm/amd/display: add odm_slice_rect parameter in spl_in

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] OPP input rect aka odm slice rect is a hardware dependent parameter that can't be determined by SPL software logic. Therefore we need to explicitly pass odm slice rect in. So ODM slice rect calculation is moved out of SPL. [how] add odm_slice_rect parameter in spl_in Rev

[PATCH 04/67] drm/amd/display: Replay + IPS + ABM in Full Screen VPB

2024-06-06 Thread Zaeem Mohamed
From: ChunTao Tso [Why] Because ABM will wait VStart to start getting histogram data, it will cause we can't enter IPS while full screnn video playing. [How] Modify the panel refresh rate to the maximun multiple of current refresh rate Reviewed-by: Rodrigo Siqueira Signed-off-by: ChunTao Tso

[PATCH 02/67] drm/amd/display: Replay low hz

2024-06-06 Thread Zaeem Mohamed
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. Reviewed-by: Rodrigo Siqueira Signed-off-by: ChunTao Tso --- .../gpu/drm/amd/display/dc/dce/dmub_replay.c | 34

[PATCH 03/67] drm/amd/display: Expand supported Replay residency mode

2024-06-06 Thread Zaeem Mohamed
From: Leon Huang [Why] Dmub provides several Replay residency calculation methods, but current interface only supports either ALPM or PHY mode [How] Modify the interface for supporting different types of Replay residency calculation. Reviewed-by: Rodrigo Siqueira Signed-off-by: Leon Huang ---

RE: [PATCH 00/67] DC Patches June 3, 2024

2024-06-06 Thread Mohamed, Zaeem
[AMD Official Use Only - AMD Internal Distribution Only] IGNORE -Original Message- From: Mohamed, Zaeem Sent: Thursday, June 6, 2024 4:58 PM To: amd-gfx@lists.freedesktop.org Cc: Wentland, Harry ; Li, Sun peng (Leo) ; Siqueira, Rodrigo ; Pillai, Aurabindo ; Li, Roman ; Lin, Wayne ; Gu

Re: [PATCH 3/3] drm/amdgpu: nuke the VM PD/PT shadow handling

2024-06-06 Thread Felix Kuehling
On 2024-06-06 04:47, Christian König wrote: This was only used as workaround for recovering the page tables after VRAM was lost and is no longer necessary after the function amdgpu_vm_bo_reset_state_machine() started to do the same. Compute never used shadows either, so the only proplematic case

[PATCH 22/67] drm/amd/display: added NULL check at start of dc_validate_stream

2024-06-06 Thread Zaeem Mohamed
From: winstang [Why] prevent invalid memory access [How] check if dc and stream are NULL Co-authored-by: winstang Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: winstang --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ 1 file changed, 3 insertions(+) diff --gi

[PATCH 20/67] drm/amd/display: Add sequential ONO sequencing for DCN35

2024-06-06 Thread Zaeem Mohamed
From: Nicholas Kazlauskas [Why] Adds support for performing the sequential ONO changes from DCN351 into DCN35 ASIC based on revision. [How] Check the revision and run the DCN351 sequences on applicable revisions. Reviewed-by: Sung joon Kim Acked-by: Zaeem Mohamed Signed-off-by: Nicholas Kazla

[PATCH 21/67] drm/amd/display: [FW Promotion] Release 0.0.220.0

2024-06-06 Thread Zaeem Mohamed
From: Anthony Koo - Change ordering of structs to put enums together - Add new define DMUB_TRACE_ENTRY_DEFINED to guard the trace code enum Acked-by: Zaeem Mohamed Signed-off-by: Anthony Koo --- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 26 ++- 1 file changed, 14 in

[PATCH 18/67] drm/amd/display: Add fallback defaults for invalid LTTPR DPCD caps

2024-06-06 Thread Zaeem Mohamed
From: Michael Strauss [WHY] Some sinks are observed to return invalid LTTPR revision and/or invalid LTTPR link rate capabilities. [HOW] Assume any LTTPR which reports invalid max link rate supports HBR3. Don't validate LTTPR DPCD revision in dp_is_lttpr_present check. Reviewed-by: George Shen

[PATCH 19/67] drm/amd/display: Ignore phantom DTBCLK requirement

2024-06-06 Thread Zaeem Mohamed
From: Alvin Lee [Description] Phantom DTBCLK can be calculated different from main because phantom has no DSC and thus will have a different output BPP. Ignore phantom DTBCLK requirement and only consider non-phantom DTBCLK requirements. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signe

[PATCH 17/67] drm/amd/display: Update FIXED_VS retimer training pattern delay

2024-06-06 Thread Zaeem Mohamed
From: Michael Strauss [WHY] Needed for PHY patterns as well to perform electrical compliance. Also need to increase wait time from 30ms to 50ms to resolve very intermittent UHBR20 link training failures. Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: Michael Strauss --- .../

[PATCH 16/67] drm/amd/display: reduce ODM slice count to initial new dc state only when needed

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] We need to decrease ODM slice when adding or removing planes because MPO support takes precedence over dynamic ODM combine. However there is a case where we remove ODM combine even for ODM combine required timing in the initial new dc state. This is normally okay because O

[PATCH 14/67] drm/amd/display: Return after Init

2024-06-06 Thread Zaeem Mohamed
From: Daniel Sa why: DML21 being overwritten after init. how: After initializing, early return. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Daniel Sa --- drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/

[PATCH 15/67] drm/amd/display: Fix multiple cursors when using 4 displays on a contiguous large surface

2024-06-06 Thread Zaeem Mohamed
From: Nevenko Stupar [Why & How] Remove some cursor offset calculations for rotated cursor for fixing a bug where multiple cursors are seen. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Nevenko Stupar --- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 25 --

[PATCH 11/67] drm/amd/display: Remove dcn32_smu13 duplicate header

2024-06-06 Thread Zaeem Mohamed
[WHY] Duplicate headers requiring unecessary maintenance of both headers [HOW] Removal of smu13_driver_if header and all referneces to it changed to dcn32_smu13_driver Signed-off-by: Zaeem Mohamed --- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn32/dcn32_clk_mgr_sm

[PATCH 13/67] drm/amd/display: Change AVI Info Frame version to 4 for OVT

2024-06-06 Thread Zaeem Mohamed
From: Chris Park [Why] Official Release CTA specification reverted the change and no longer uses version 5 to indicate OVT timing. [How] Change the version used for AVI info Frame for OVT to 4. Reviewed-by: Leo Ma Acked-by: Zaeem Mohamed Signed-off-by: Chris Park --- drivers/gpu/drm/amd/dis

[PATCH 09/67] drm/amd/display: Remove unreachable check

2024-06-06 Thread Zaeem Mohamed
From: Ivan Lipski [WHY] Coverity analysis flagged this code as DEADCODE since the condition and return in the outer loop are never reached. All operations with the 'dwb_pipe' variable happen in the inner loop, that already contains the same check with the 'MAX_DWB_PIPES'. The later check conditi

[PATCH 12/67] drm/amd/display: Remove NULL assignment for stream_status

2024-06-06 Thread Zaeem Mohamed
From: Alvin Lee [Description] No need to assign stream_status NULL because it is always re-assigned before usage. This change is to fix coverity errors. Reviewed-by: Nicholas Choi Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 -- 1 file

[PATCH 07/67] drm/amd/display: add odm_slice_rect parameter in spl_in

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] OPP input rect aka odm slice rect is a hardware dependent parameter that can't be determined by SPL software logic. Therefore we need to explicitly pass odm slice rect in. So ODM slice rect calculation is moved out of SPL. [how] add odm_slice_rect parameter in spl_in Rev

[PATCH 10/67] drm/amd/display: Remove redundant ternary operation

2024-06-06 Thread Zaeem Mohamed
From: Ivan Lipski [WHY] Coverity analysis flagged this ternary operation as DEADCODE. Since 'total_y_free_entry' is initialized as 0x200 and 'total_c_free_entry' is initialized as 0x140, and they never change values before the ternary operator, so 'total_y_free_entry' is always greater 'total_c_

[PATCH 05/67] drm/amd/display: Fix Replay Desync Error Test

2024-06-06 Thread Zaeem Mohamed
From: Dennis Chan When PHY power off, the DP_SEC_CNTL cannot be configured and cause disable Adaptive sync SDP failed. Regarding the issue, the driver will disabled AS-SDP in replay state machine. Reviewed-by: Rodrigo Siqueira Signed-off-by: Dennis Chan --- drivers/gpu/drm/amd/display/dc/dce/

[PATCH 08/67] drm/amd/display: Remove redundant if conditions

2024-06-06 Thread Zaeem Mohamed
From: Ivan Lipski [WHY] Coverity analysis flagged the two if conditions in dcn30_dpp.c and dcn401_dpp.c as DEADCODE since they are never true, since the variable 'program_prealpha_dealpha' is initialized at 0 and never chagnes. [HOW] Removed the variable 'program_prealpha_dealpha' and the if con

[PATCH 02/67] drm/amd/display: Replay low hz

2024-06-06 Thread Zaeem Mohamed
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. Reviewed-by: Rodrigo Siqueira Signed-off-by: ChunTao Tso --- .../gpu/drm/amd/display/dc/dce/dmub_replay.c | 34

[PATCH 06/67] drm/amd/display: use even ODM slice width for two pixels per container

2024-06-06 Thread Zaeem Mohamed
From: Wenjing Liu [why] When optc uses two pixel per container, each ODM slice width must be an even number. [how] If ODM slice width is odd number increase it by 1. Reviewed-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu --- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 3 +++ driver

[PATCH 04/67] drm/amd/display: Replay + IPS + ABM in Full Screen VPB

2024-06-06 Thread Zaeem Mohamed
From: ChunTao Tso [Why] Because ABM will wait VStart to start getting histogram data, it will cause we can't enter IPS while full screnn video playing. [How] Modify the panel refresh rate to the maximun multiple of current refresh rate Reviewed-by: Rodrigo Siqueira Signed-off-by: ChunTao Tso

[PATCH 00/67] DC Patches June 3, 2024

2024-06-06 Thread Zaeem Mohamed
This DC ptchset brings improvements in multiple areas. In summary, we have: * FW Release 0.0.221.0 * Fixed missing targets in FAMS2 * Populate hardware_release hook for dcn401 * Disable DMCUB timeout for DCN35 * Move PRIMARY plane zpos higher * Introduce overlay cursor mode * Change dram_clock_lat

[PATCH 03/67] drm/amd/display: Expand supported Replay residency mode

2024-06-06 Thread Zaeem Mohamed
From: Leon Huang [Why] Dmub provides several Replay residency calculation methods, but current interface only supports either ALPM or PHY mode [How] Modify the interface for supporting different types of Replay residency calculation. Reviewed-by: Rodrigo Siqueira Signed-off-by: Leon Huang ---

[PATCH 01/67] drm/amd/display: Use TPS3 for ALPM on Specific Panel

2024-06-06 Thread Zaeem Mohamed
From: pochchan For some specific panel, it need to use TPS3 rather than use TP2 in ALPM when DSC is enabled. Reviewed-by: Rodrigo Siqueira Signed-off-by: pochchan --- drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dr

Re: [PATCH v2] drm/amdgpu: Fix the BO release clear memory warning

2024-06-06 Thread Gong, Richard
Tested-by: Richard Gong On 6/6/2024 3:04 PM, Arunpravin Paneer Selvam wrote: This happens when the amdgpu_bo_release_notify running before amdgpu_ttm_set_buffer_funcs_status set the buffer funcs to enabled. check the buffer funcs enablement before calling the fill buffer memory. v2:(Christi

RE: [syzbot] [mm?] general protection fault in dequeue_hugetlb_folio_nodemask

2024-06-06 Thread Deucher, Alexander
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: Limonciello, Mario > Sent: Thursday, June 6, 2024 10:56 AM > To: Deucher, Alexander > Cc: syzbot ; > Huang, Tim ; Pan, Xinhui ; > airl...@gmail.com; a...@linux-foundation.org; Deucher, Alexander > ; amd

Re: [PATCH v2] drm/amdgpu: Fix the BO release clear memory warning

2024-06-06 Thread Mario Limonciello
On 6/6/2024 15:04, Arunpravin Paneer Selvam wrote: This happens when the amdgpu_bo_release_notify running before amdgpu_ttm_set_buffer_funcs_status set the buffer funcs to enabled. check the buffer funcs enablement before calling the fill buffer memory. v2:(Christian) - Apply it only for GEM

[PATCH v2] drm/amdgpu: Fix the BO release clear memory warning

2024-06-06 Thread Arunpravin Paneer Selvam
This happens when the amdgpu_bo_release_notify running before amdgpu_ttm_set_buffer_funcs_status set the buffer funcs to enabled. check the buffer funcs enablement before calling the fill buffer memory. v2:(Christian) - Apply it only for GEM buffers and since GEM buffers are only allocated/

  1   2   >