]> Git Repo - linux.git/log
linux.git
4 months agodrm/amd/pm: always pick the pptable from IFWI
Kenneth Feng [Fri, 1 Nov 2024 03:55:25 +0000 (11:55 +0800)]
drm/amd/pm: always pick the pptable from IFWI

always pick the pptable from IFWI on smu v14.0.2/3

Signed-off-by: Kenneth Feng <[email protected]>
Reviewed-by: Yang Wang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
Antonio Quartulli [Thu, 31 Oct 2024 15:28:48 +0000 (16:28 +0100)]
drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported

acpi_evaluate_object() may return AE_NOT_FOUND (failure), which
would result in dereferencing buffer.pointer (obj) while being NULL.

Although this case may be unrealistic for the current code, it is
still better to protect against possible bugs.

Bail out also when status is AE_NOT_FOUND.

This fixes 1 FORWARD_NULL issue reported by Coverity
Report: CID 1600951:  Null pointer dereferences  (FORWARD_NULL)

Signed-off-by: Antonio Quartulli <[email protected]>
Fixes: c9b7c809b89f ("drm/amd: Guard against bad data for ATIF ACPI method")
Reviewed-by: Mario Limonciello <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mario Limonciello <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: 3.2.308
Aric Cyr [Mon, 28 Oct 2024 02:37:01 +0000 (22:37 -0400)]
drm/amd/display: 3.2.308

This version brings along following fixes:
- Prune Invalid Modes for HDMI Output
- SPL Cleanup
- Fix brightness level not retained over reboot
- Remove inaccessible registers from DMU diagnostics

Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Aric Cyr <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Prune Invalid Modes For HDMI Output
Fangzhi Zuo [Thu, 17 Oct 2024 22:15:10 +0000 (18:15 -0400)]
drm/amd/display: Prune Invalid Modes For HDMI Output

[Why]
1. HDMI does not have 6 bpc support. Having 6 bpc pass validation
does not comply with spec.
2. Validate 420 only for native HDMI, but not apply to pcon use
case.
3. Current mode validation log is not readable.

[how]
1. Cap 8 bpc for dp-hdmi converter.
2. Validate yuv420 for pcon use case as well,
   if rgb/yuv444 8bpc cannot fit into pcon bw limitation of
   the link from the converter to HDMI sink.
3. Add readable pixel_format and color_depth into debug log.

Reviewed-by: Wayne Lin <[email protected]>
Signed-off-by: Fangzhi Zuo <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Implement new backlight_level_params structure
Kaitlyn Tse [Thu, 3 Oct 2024 22:13:27 +0000 (18:13 -0400)]
drm/amd/display: Implement new backlight_level_params structure

[Why]
Implement the new backlight_level_params structure as part of the VBAC
framework, the information in this structure is needed to be passed down
to the DMCUB to identify the backlight control type, to adjust the
backlight of the panel and to perform any required conversions from PWM
to nits or vice versa.

[How]
Modified existing functions to include the new backlight_level_params
structure.

Reviewed-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Kaitlyn Tse <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: [FW Promotion] Release 0.0.241.0
Taimur Hassan [Mon, 28 Oct 2024 00:12:59 +0000 (20:12 -0400)]
drm/amd/display: [FW Promotion] Release 0.0.241.0

- Add DPCS health check
- Update USB4 PHY SSC
- Fix FAMS2 SubVP Close to VBlank changes
- Create VESA Aux-based backlight control path
- Fix PSR1 CRC error during CTS test

Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Taimur Hassan <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Add a missing DCN401 reg definition
Aurabindo Pillai [Fri, 1 Nov 2024 16:16:18 +0000 (16:16 +0000)]
drm/amd/display: Add a missing DCN401 reg definition

Add a mising reg field to the autogenerated header for future use

Signed-off-by: Aurabindo Pillai <[email protected]>
Reviewed-by: Dillon Varone <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/pm: add inst to dpm_set_vcn_enable
Boyuan Zhang [Thu, 3 Oct 2024 00:51:53 +0000 (20:51 -0400)]
drm/amd/pm: add inst to dpm_set_vcn_enable

Add an instance parameter to the existing function dpm_set_vcn_enable()
for future implementation. Re-write all pptable functions accordingly.

v2: Remove duplicated dpm_set_vcn_enable() functions in v1. Instead,
adding instance parameter to existing functions.

Signed-off-by: Boyuan Zhang <[email protected]>
Suggested-by: Christian König <[email protected]>
Suggested-by: Alex Deucher <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Don't write DP_MSTM_CTRL after LT
Wayne Lin [Fri, 25 Oct 2024 04:27:26 +0000 (12:27 +0800)]
drm/amd/display: Don't write DP_MSTM_CTRL after LT

[Why]
Observe after suspend/resme, we can't light up mst monitors under specific
mst hub. The reason is that driver still writes DPCD DP_MSTM_CTRL after LT.
It's forbidden even we write the same value for that dpcd register.

[How]
We already resume the mst branch device dpcd settings during
resume_mst_branch_status(). Leverage drm_dp_mst_topology_queue_probe() to
only probe the topology, not calling drm_dp_mst_topology_mgr_resume() which
will set DP_MSTM_CTRL as well.

Reviewed-by: Jerry Zuo <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Minimize wait for pending updates
Ilya Bakoulin [Wed, 9 Oct 2024 19:26:48 +0000 (15:26 -0400)]
drm/amd/display: Minimize wait for pending updates

[Why/How]
Move the wait for pending updates past prepare_bandwidth if the previous
update was not a full update to reduce the average time it takes to
complete a full update.

Reviewed-by: Dillon Varone <[email protected]>
Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Ilya Bakoulin <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: parse umc_info or vram_info based on ASIC
Aurabindo Pillai [Fri, 18 Oct 2024 14:52:16 +0000 (10:52 -0400)]
drm/amd/display: parse umc_info or vram_info based on ASIC

An upstream bug report suggests that there are production dGPUs that are
older than DCN401 but still have a umc_info in VBIOS tables with the
same version as expected for a DCN401 product. Hence, reading this
tables should be guarded with a version check.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3678
Reviewed-by: Dillon Varone <[email protected]>
Signed-off-by: Aurabindo Pillai <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Remove otg w/a toggling on HPO interfaces
Ausef Yousof [Thu, 24 Oct 2024 19:17:20 +0000 (15:17 -0400)]
drm/amd/display: Remove otg w/a toggling on HPO interfaces

[why&how]
Adjust otg w/a disable condition to include HPO explicitly rather than
assuming it is implicitly used through DP2.

Reviewed-by: Charlene Liu <[email protected]>
Signed-off-by: Ausef Yousof <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Remove hw w/a toggle if on DP2/HPO
Ausef Yousof [Thu, 24 Oct 2024 18:06:39 +0000 (14:06 -0400)]
drm/amd/display: Remove hw w/a toggle if on DP2/HPO

[why&how]
Applying a hw w/a only relevant to DIG FIFO causing corruption
using HPO, do not apply the w/a if on DP2/HPO

Reviewed-by: Charlene Liu <[email protected]>
Signed-off-by: Ausef Yousof <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: SPL cleanup
Samson Tam [Fri, 25 Oct 2024 15:28:33 +0000 (11:28 -0400)]
drm/amd/display: SPL cleanup

[Why & How]
Move from pointer to callback to reference callback directly
Missed renaming fixpt functions with spl prefix

Reviewed-by: Navid Assadian <[email protected]>
Signed-off-by: Samson Tam <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Fix brightness level not retained over reboot
Tom Chung [Wed, 9 Oct 2024 09:09:38 +0000 (17:09 +0800)]
drm/amd/display: Fix brightness level not retained over reboot

[Why]
During boot up and resume the DC layer will reset the panel
brightness to fix a flicker issue.

It will cause the dm->actual_brightness is not the current panel
brightness level. (the dm->brightness is the correct panel level)

[How]
Set the backlight level after do the set mode.

Cc: Mario Limonciello <[email protected]>
Cc: Alex Deucher <[email protected]>
Fixes: d9e865826c20 ("drm/amd/display: Simplify brightness initialization")
Reported-by: Mark Herbert <[email protected]>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3655
Reviewed-by: Sun peng Li <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: fix asserts in SPL during bootup
Samson Tam [Sun, 20 Oct 2024 02:07:31 +0000 (22:07 -0400)]
drm/amd/display: fix asserts in SPL during bootup

[Why]
During mode validation, there maybe modes that fail
 max_downscale_src_width check and scaling_quality
 taps are 0.  This will cause an assert to trigger
 in spl_set_filters_data() because taps are 0.

[How]
Move taps calculation for non-adaptive scaling mode
 to separate function and call it
 if max_downscale_src_width fails.  This will
 populate taps if scaling_quality taps are 0.

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Samson Tam <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Remove inaccessible registers from DMU diagnostics
Nicholas Kazlauskas [Wed, 23 Oct 2024 16:53:37 +0000 (12:53 -0400)]
drm/amd/display: Remove inaccessible registers from DMU diagnostics

[Why]
SEC_CNTL isn't readable by x86 and can block Z8 entry if read.

[How]
Remove the read.

Reviewed-by: Ovidiu Bunea <[email protected]>
Reviewed-by: Charlene Liu <[email protected]>
Signed-off-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: fix rxstatus_msg_sz type narrowing
Dominik Kaszewski [Thu, 24 Oct 2024 06:01:23 +0000 (08:01 +0200)]
drm/amd/display: fix rxstatus_msg_sz type narrowing

[Why]
Code reading rxstatus message size was incorrectly assigning it to
uint8_t, despite the value being 10 bits long (lower byte plus lowest
2 bits from upper byte). This caused the highest 2 bits to be ignored,
potentially missing invalid values.

[How]
Change all local variables holding rxstatus message size from uint8_t
to uint16_t, as in mod_hdcp_message_hdcp2::rx_id_list_size.
Replaced untyped HDCP_2_2_HMID_RXSTATUS_MSG_SZ_HI macro with function
hdcp_2_2_hmid_rxstatus_msg_sz(const uint8_t[2]) to encapsulate entire
calculation and return a typed result.
Removed spaces mixed with tabs to fix indentation on modified lines.

Reviewed-by: Wenjing Liu <[email protected]>
Signed-off-by: Dominik Kaszewski <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agoRevert "drm/amd/display: Block UHBR Based On USB-C PD Cable ID"
Ausef Yousof [Wed, 23 Oct 2024 17:24:11 +0000 (13:24 -0400)]
Revert "drm/amd/display: Block UHBR Based On USB-C PD Cable ID"

This reverts commit 4f01a68751194d05280d659a65758c09e4af04d6.

[why & how]
The offending commit caused a lighting issue for Samsung Odyssey G9
monitors when connecting via USB-C. The commit was intended to block certain UHBR rates.

Reviewed-by: Charlene Liu <[email protected]>
Signed-off-by: Ausef Yousof <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: avoid divided by zero
Charlene Liu [Tue, 22 Oct 2024 22:42:56 +0000 (18:42 -0400)]
drm/amd/display: avoid divided by zero

[why]
insert divided by zero protection

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Charlene Liu <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Do Not Fallback To SW Cursor If HW Cursor Required
Austin Zheng [Fri, 18 Oct 2024 18:55:21 +0000 (14:55 -0400)]
drm/amd/display: Do Not Fallback To SW Cursor If HW Cursor Required

[Why/How]
Tearing can occur if there is a flip immediate plane and SW cursor.
check_subvp_sw_cursor_fallback_req falls back to SW cursor if the
stream has the potential to use subVP.
Check for fallback not needed if HW cursor is required.
e.g. Fullscreen gaming

Reviewed-by: Dillon Varone <[email protected]>
Signed-off-by: Austin Zheng <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: use string choice helpers
R Sundar [Sun, 27 Oct 2024 14:05:37 +0000 (19:35 +0530)]
drm/amdgpu: use string choice helpers

Use string choice helpers for better readability.

Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Signed-off-by: R Sundar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: fix comment about amdgpu.abmlevel defaults
[email protected] [Thu, 24 Oct 2024 13:07:18 +0000 (21:07 +0800)]
drm/amdgpu: fix comment about amdgpu.abmlevel defaults

Since 040fdcde288a ("drm/amdgpu: respect the abmlevel module parameter value
if it is set"), the default value for amdgpu.abmlevel was set to -1, or auto.
However, the comment explaining the default value was not updated to reflect
the change (-1, or auto; not -1, or disabled).

Clarify that the default value (-1) means auto.

Fixes: 040fdcde288a ("drm/amdgpu: respect the abmlevel module parameter value if it is set")
Reported-by: Ruikai Liu <[email protected]>
Signed-off-by: Mingcong Bai <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: Expose special on chip memory pools in fdinfo
Tvrtko Ursulin [Thu, 24 Oct 2024 09:23:41 +0000 (10:23 +0100)]
drm/amdgpu: Expose special on chip memory pools in fdinfo

In the past these specialized on chip memory pools were reported as system
memory (aka 'cpu') which was not correct and misleading. That has since
been removed so lets make them visible as their own respective memory
regions.

Reviewed-by: Christian König <[email protected]>
Signed-off-by: Tvrtko Ursulin <[email protected]>
Cc: Christian König <[email protected]>
Cc: Yunxiang Li <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: Stop reporting special chip memory pools as CPU memory in fdinfo
Tvrtko Ursulin [Thu, 24 Oct 2024 09:23:40 +0000 (10:23 +0100)]
drm/amdgpu: Stop reporting special chip memory pools as CPU memory in fdinfo

So far these specialized on chip memory pools were reported as system
memory (aka 'cpu') which is not correct and misleading. Lets remove that
and consider later making them visible as their own thing.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Suggested-by: Christian König <[email protected]>
Cc: Yunxiang Li <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: stop tracking visible memory stats
Yunxiang Li [Thu, 24 Oct 2024 09:23:39 +0000 (10:23 +0100)]
drm/amdgpu: stop tracking visible memory stats

Since on modern systems all of vram can be made visible anyways, to
simplify the new implementation, drops tracking how much memory is
visible for now. If this is really needed we can add it back on top of
the new implementation, or just report all the BOs as visible.

Signed-off-by: Yunxiang Li <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Tvrtko Ursulin <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: make drm-memory-* report resident memory
Yunxiang Li [Thu, 24 Oct 2024 09:23:38 +0000 (10:23 +0100)]
drm/amdgpu: make drm-memory-* report resident memory

The old behavior reports the resident memory usage for this key and the
documentation say so as well. However this was accidentally changed to
include buffers that was evicted.

Fixes: 04bdba46542c ("drm/amdgpu: Use drm_print_memory_stats helper from fdinfo")
Signed-off-by: Yunxiang Li <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Acked-by: Christian König <[email protected]>
Signed-off-by: Tvrtko Ursulin <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()
Li Huafei [Tue, 29 Oct 2024 20:27:58 +0000 (04:27 +0800)]
drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()

Fix two issues with memory allocation in amdgpu_discovery_get_nps_info()
for mem_ranges:

 - Add a check for allocation failure to avoid dereferencing a null
   pointer.

 - As suggested by Christophe, use kvcalloc() for memory allocation,
   which checks for multiplication overflow.

Additionally, assign the output parameters nps_type and range_cnt after
the kvcalloc() call to prevent modifying the output parameters in case
of an error return.

Fixes: b194d21b9bcc ("drm/amdgpu: Use NPS ranges from discovery table")
Suggested-by: Christophe JAILLET <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Li Huafei <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: add ring reset messages
Alex Deucher [Tue, 15 Oct 2024 18:13:58 +0000 (14:13 -0400)]
drm/amdgpu: add ring reset messages

Add messages to make it clear when a per ring reset
happens.  This is helpful for debugging and aligns with
other reset methods.

v2: add ring name in success/fail messages (Lijo)

Reviewed-by: Lijo Lazar <[email protected]>
Reviewed-by: Kent Russell <[email protected]> (v1)
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: fix fairness in enforce isolation handling
Alex Deucher [Mon, 14 Oct 2024 15:58:34 +0000 (11:58 -0400)]
drm/amdgpu: fix fairness in enforce isolation handling

Make sure KFD gets a turn when serializing access to
the GC IP.  Currently non-KFD jobs can starve KFD if they
submit often enough.  This patch prevents that by stalling
non-KFD if its time period has elapsed.

v2: fix units
v3: check enablement properly

Acked-by: Srinivasan Shanmugam <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Remove last parts of timing_trace
Dr. David Alan Gilbert [Thu, 10 Oct 2024 20:51:54 +0000 (21:51 +0100)]
drm/amd/display: Remove last parts of timing_trace

Commit c2c2ce1e9623 ("drm/amd/display: Optimize passive update planes.")
removed the last caller of context_timing_trace.
Remove it.

With that gone, no one is now looking at the 'timing_trace' flag, remove
it and all the places that set it.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Remove unused cm3_helper_translate_curve_to_degamma_hw_format
Dr. David Alan Gilbert [Wed, 9 Oct 2024 00:33:34 +0000 (01:33 +0100)]
drm/amd/display: Remove unused cm3_helper_translate_curve_to_degamma_hw_format

cm3_helper_translate_curve_to_degamma_hw_format() since it was added in
2020's commit
03f54d7d3448 ("drm/amd/display: Add DCN3 DPP")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Remove unused regamma functions
Dr. David Alan Gilbert [Fri, 4 Oct 2024 22:56:42 +0000 (23:56 +0100)]
drm/amd/display: Remove unused regamma functions

calculate_user_regamma_coeff() and calculate_user_regamma_ramp() were
added in 2018 in commit
55a01d4023ce ("drm/amd/display: Add user_regamma to color module")

but never used.

Remove them and their helpers.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdkfd: add an interface to query whether is KFD is active
Alex Deucher [Mon, 14 Oct 2024 14:51:10 +0000 (10:51 -0400)]
drm/amdkfd: add an interface to query whether is KFD is active

Add an interface to query whether KFD has any active queues.

v2: fix build issues

Acked-by: Srinivasan Shanmugam <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu/smu13: fix profile reporting
Alex Deucher [Wed, 23 Oct 2024 13:13:21 +0000 (09:13 -0400)]
drm/amdgpu/smu13: fix profile reporting

The following 3 commits landed in parallel:
commit d7d2688bf4ea ("drm/amd/pm: update workload mask after the setting")
commit 7a1613e47e65 ("drm/amdgpu/smu13: always apply the powersave optimization")
commit 7c210ca5a2d7 ("drm/amdgpu: handle default profile on on devices without fullscreen 3D")
While everything is set correctly, this caused the profile to be
reported incorrectly because both the powersave and fullscreen3d bits
were set in the mask and when the driver prints the profile, it looks
for the first bit set.

Fixes: d7d2688bf4ea ("drm/amd/pm: update workload mask after the setting")
Reviewed-by: Kenneth Feng <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdkfd: flag per-queue reset support for gfx9
Jonathan Kim [Tue, 22 Oct 2024 16:30:50 +0000 (12:30 -0400)]
drm/amdkfd: flag per-queue reset support for gfx9

Flag KFD support for per-queue reset on GFX9 devices.

Signed-off-by: Jonathan Kim <[email protected]>
Reviewed-by: Harish Kasiviswanathan <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: optimize ACA log print
Yang Wang [Fri, 25 Oct 2024 05:56:03 +0000 (13:56 +0800)]
drm/amdgpu: optimize ACA log print

- skip to print CE ACA log.
- optimize ACA log print for MCA.

Signed-off-by: Yang Wang <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: add generic func to check if ta fw is applicable
Le Ma [Fri, 25 Oct 2024 09:43:57 +0000 (17:43 +0800)]
drm/amdgpu: add generic func to check if ta fw is applicable

Separated xgmi ta is required for specific APU, and driver needs
parse the ta binary properly with aux xgmi ta packed.

v2: make the check function more generic (Lijo)

Signed-off-by: Le Ma <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: clean up the suspend_complete
Prike Liang [Mon, 14 Oct 2024 07:25:35 +0000 (15:25 +0800)]
drm/amdgpu: clean up the suspend_complete

To check the status of S3 suspend completion,
use the PM core pm_suspend_global_flags bit(1)
to detect S3 abort events. Therefore, clean up
the AMDGPU driver's private flag suspend_complete.

Signed-off-by: Prike Liang <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: correct the S3 abort check condition
Prike Liang [Fri, 27 Sep 2024 08:05:21 +0000 (16:05 +0800)]
drm/amdgpu: correct the S3 abort check condition

In the normal S3 entry, the TOS cycle counter is not
reset during BIOS execution the _S3 method, so it doesn't
determine whether the _S3 method is executed exactly.
Howerver, the PM core performs the S3 suspend will set the
PM_SUSPEND_FLAG_FW_RESUME bit if all the devices suspend
successfully. Therefore, drivers can check the
pm_suspend_global_flags bit(1) to detect the S3 suspend
abort event.

Fixes: 6704dbf71928 ("drm/amdgpu: update suspend status for aborting from deeper suspend")
Signed-off-by: Prike Liang <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/pm: Vangogh: Fix kernel memory out of bounds write
Tvrtko Ursulin [Fri, 25 Oct 2024 14:56:39 +0000 (15:56 +0100)]
drm/amd/pm: Vangogh: Fix kernel memory out of bounds write

KASAN reports that the GPU metrics table allocated in
vangogh_tables_init() is not large enough for the memset done in
smu_cmn_init_soft_gpu_metrics(). Condensed report follows:

[   33.861314] BUG: KASAN: slab-out-of-bounds in smu_cmn_init_soft_gpu_metrics+0x73/0x200 [amdgpu]
[   33.861799] Write of size 168 at addr ffff888129f59500 by task mangoapp/1067
...
[   33.861808] CPU: 6 UID: 1000 PID: 1067 Comm: mangoapp Tainted: G        W          6.12.0-rc4 #356 1a56f59a8b5182eeaf67eb7cb8b13594dd23b544
[   33.861816] Tainted: [W]=WARN
[   33.861818] Hardware name: Valve Galileo/Galileo, BIOS F7G0107 12/01/2023
[   33.861822] Call Trace:
[   33.861826]  <TASK>
[   33.861829]  dump_stack_lvl+0x66/0x90
[   33.861838]  print_report+0xce/0x620
[   33.861853]  kasan_report+0xda/0x110
[   33.862794]  kasan_check_range+0xfd/0x1a0
[   33.862799]  __asan_memset+0x23/0x40
[   33.862803]  smu_cmn_init_soft_gpu_metrics+0x73/0x200 [amdgpu 13b1bc364ec578808f676eba412c20eaab792779]
[   33.863306]  vangogh_get_gpu_metrics_v2_4+0x123/0xad0 [amdgpu 13b1bc364ec578808f676eba412c20eaab792779]
[   33.864257]  vangogh_common_get_gpu_metrics+0xb0c/0xbc0 [amdgpu 13b1bc364ec578808f676eba412c20eaab792779]
[   33.865682]  amdgpu_dpm_get_gpu_metrics+0xcc/0x110 [amdgpu 13b1bc364ec578808f676eba412c20eaab792779]
[   33.866160]  amdgpu_get_gpu_metrics+0x154/0x2d0 [amdgpu 13b1bc364ec578808f676eba412c20eaab792779]
[   33.867135]  dev_attr_show+0x43/0xc0
[   33.867147]  sysfs_kf_seq_show+0x1f1/0x3b0
[   33.867155]  seq_read_iter+0x3f8/0x1140
[   33.867173]  vfs_read+0x76c/0xc50
[   33.867198]  ksys_read+0xfb/0x1d0
[   33.867214]  do_syscall_64+0x90/0x160
...
[   33.867353] Allocated by task 378 on cpu 7 at 22.794876s:
[   33.867358]  kasan_save_stack+0x33/0x50
[   33.867364]  kasan_save_track+0x17/0x60
[   33.867367]  __kasan_kmalloc+0x87/0x90
[   33.867371]  vangogh_init_smc_tables+0x3f9/0x840 [amdgpu]
[   33.867835]  smu_sw_init+0xa32/0x1850 [amdgpu]
[   33.868299]  amdgpu_device_init+0x467b/0x8d90 [amdgpu]
[   33.868733]  amdgpu_driver_load_kms+0x19/0xf0 [amdgpu]
[   33.869167]  amdgpu_pci_probe+0x2d6/0xcd0 [amdgpu]
[   33.869608]  local_pci_probe+0xda/0x180
[   33.869614]  pci_device_probe+0x43f/0x6b0

Empirically we can confirm that the former allocates 152 bytes for the
table, while the latter memsets the 168 large block.

Root cause appears that when GPU metrics tables for v2_4 parts were added
it was not considered to enlarge the table to fit.

The fix in this patch is rather "brute force" and perhaps later should be
done in a smarter way, by extracting and consolidating the part version to
size logic to a common helper, instead of brute forcing the largest
possible allocation. Nevertheless, for now this works and fixes the out of
bounds write.

v2:
 * Drop impossible v3_0 case. (Mario)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Fixes: 41cec40bc9ba ("drm/amd/pm: Vangogh: Add new gpu_metrics_v2_4 to acquire gpu_metrics")
Cc: Mario Limonciello <[email protected]>
Cc: Evan Quan <[email protected]>
Cc: Wenyou Yang <[email protected]>
Cc: Alex Deucher <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mario Limonciello <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: 3.2.307
Aric Cyr [Mon, 21 Oct 2024 01:41:45 +0000 (21:41 -0400)]
drm/amd/display: 3.2.307

This version brings along following fixes:
- Fix polling DSC registers during S0i3
- Fix idle optimizations entry log
- Change MPC Tree visual confirm colours
- Fix underflow when playing 8K video in full screen mode
- Optimize power up sequence for specific OLED

Acked-by: Wayne Lin <[email protected]>
Signed-off-by: Aric Cyr <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: [FW Promotion] Release 0.0.240.0
Taimur Hassan [Sun, 20 Oct 2024 07:35:34 +0000 (03:35 -0400)]
drm/amd/display: [FW Promotion] Release 0.0.240.0

Add some scruct for secure display.

Acked-by: Wayne Lin <[email protected]>
Signed-off-by: Taimur Hassan <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: store sharpness 1dlut table in dscl_prog_data
Samson Tam [Fri, 18 Oct 2024 04:26:41 +0000 (00:26 -0400)]
drm/amd/display: store sharpness 1dlut table in dscl_prog_data

[Why]
Previously dscl_prog_data stored pointer to sharpness 1dlut table.
SPL had four pre-generated tables, one for each setup. This allowed
us to minimize number of times we had to recalculate table when
switching between setups.
However, with dual display, this becomes an issue because for a given
setup, we could have a different per app sharpness value than the
global sharpness value. So the pre-generated table will change
but both displays may point to the same table and one of them
will have the wrong sharpness setting.

[How]
Store the sharpness 1dlut table in dscl_prog_data. This ensures
that each display can have its own sharpness setting.

Reviewed-by: Ilya Bakoulin <[email protected]>
Signed-off-by: Samson Tam <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Do not read DSC state if not in use
Ovidiu Bunea [Tue, 15 Oct 2024 22:20:54 +0000 (18:20 -0400)]
drm/amd/display: Do not read DSC state if not in use

[why & how]
DSC may be power gated when coming out of S0i3, so avoid polling
DSC registers since it will fail anyways. Only read if it is known
that DSC is in use.

Reviewed-by: Charlene Liu <[email protected]>
Signed-off-by: Ovidiu Bunea <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Fix idle optimizations entry log
Aurabindo Pillai [Wed, 16 Oct 2024 17:08:02 +0000 (13:08 -0400)]
drm/amd/display: Fix idle optimizations entry log

[Why & How]
Whether we really enter idle optimizations are decided within DC.
Printing into dmesg before calling the DC API gives an incorrect
indication that we are entering idle optimization in cases where its
disabled manually.

To fix this, remove the print in DM and add them in DC

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Aurabindo Pillai <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Change MPC Tree visual confirm colours
Joshua Aberback [Thu, 17 Oct 2024 19:56:30 +0000 (15:56 -0400)]
drm/amd/display: Change MPC Tree visual confirm colours

[Why]
MPC background colours that use fractional components look different if
MPC OGAM is in use vs in bypass mode. The current red and orange colours
look very similar when OGAM is in bypass, so the colours need to change
to be consistently very easy to tell apart.

[How]
Use colours that only have 0 or MAX values in each component

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Joshua Aberback <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Simplify dcn35_is_ips_supported()
Alex Hung [Wed, 16 Oct 2024 18:23:58 +0000 (12:23 -0600)]
drm/amd/display: Simplify dcn35_is_ips_supported()

[WHAT & HOW]
The variable "ips_supported" is redundant and we can return from
dcn35_smu_get_ips_supported directly.

This fixes 1 UNUSED_VALUE issue reported by Coverity.

Reviewed-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Hung <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Remove useless assignments and variables
Alex Hung [Wed, 16 Oct 2024 18:18:39 +0000 (12:18 -0600)]
drm/amd/display: Remove useless assignments and variables

[WHAT & HOW]
misc0, temp and split_pipe are assigned but immediately re-assigned
to other values. The early assignments are useless and are removed.
Unused variables are removed as well.

This fixes 5 UNUSED_VALUE issues reported by Coverity.

Reviewed-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Hung <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: fix handling of max_downscale_src_width fail check in SPL
Samson Tam [Wed, 16 Oct 2024 18:11:35 +0000 (14:11 -0400)]
drm/amd/display: fix handling of max_downscale_src_width fail check in SPL

[Why]
If max_downscale_src_width check fails, we exit early from
spl_calculate_scaler_params but dscl_prog_data is not fully
populated. If viewport is left at 0, it can cause crash in dml.

[How]
Call spl_set_dscl_prog_data before we exit early from
spl_calculate_scaler_params to populate dscl_prog_data
Populate taps in spl_get_optimal_number_of_taps

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Samson Tam <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Fix underflow when playing 8K video in full screen mode
Leo Ma [Fri, 11 Oct 2024 18:08:34 +0000 (14:08 -0400)]
drm/amd/display: Fix underflow when playing 8K video in full screen mode

[Why&How]
Flickering observed while playing 8k HEVC-10 bit video in full screen
mode with black border. We didn't support this case for subvp.
Make change to the existing check to disable subvp for this corner case.

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Leo Ma <[email protected]>
Signed-off-by: Dillon Varone <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Refactoring if and endif statements to enable DC_LOGGER
Lohita Mudimela [Wed, 28 Aug 2024 11:34:04 +0000 (17:04 +0530)]
drm/amd/display: Refactoring if and endif statements to enable DC_LOGGER

[Why]
For Header related changes for core

[How]
Refactoring if and endif statements to enable DC_LOGGER

Reviewed-by: Mounika Adhuri <[email protected]>
Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Lohita Mudimela <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Reduce HPD Detection Interval for IPS
Fangzhi Zuo [Tue, 15 Oct 2024 18:22:32 +0000 (14:22 -0400)]
drm/amd/display: Reduce HPD Detection Interval for IPS

Fix DP Compliance test 4.2.1.3, 4.2.2.8, 4.3.1.12, 4.3.1.13
when IPS enabled.

Original HPD detection interval is set to 5s which violates DP
compliance.
Reduce the interval parameter, such that link training can be
finished within 5 seconds.

Fixes: afca033f10d3 ("drm/amd/display: Add periodic detection for IPS")
Reviewed-by: Roman Li <[email protected]>
Signed-off-by: Fangzhi Zuo <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agoRevert "drm/amd/display: update DML2 policy EnhancedPrefetchScheduleAccelerationFinal...
Ovidiu Bunea [Fri, 11 Oct 2024 15:12:19 +0000 (11:12 -0400)]
Revert "drm/amd/display: update DML2 policy EnhancedPrefetchScheduleAccelerationFinal DCN35"

This reverts
commit 9dad21f910fc ("drm/amd/display: update DML2 policy EnhancedPrefetchScheduleAccelerationFinal DCN35")

[why & how]
The offending commit exposes a hang with lid close/open behavior.
Both issues seem to be related to ODM 2:1 mode switching, so there
is another issue generic to that sequence that needs to be
investigated.

Cc: Mario Limonciello <[email protected]>
Cc: Alex Deucher <[email protected]>
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Ovidiu Bunea <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Add P-State Stall Timeout Recovery Support for dcn401
Dillon Varone [Fri, 11 Oct 2024 17:51:11 +0000 (13:51 -0400)]
drm/amd/display: Add P-State Stall Timeout Recovery Support for dcn401

[WHY&HOW]
Adds support for P-State stall timeout detection in DCHUBBUB.

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Dillon Varone <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Add a boot option to reduce phy ssc for HBR3
Hansen Dsouza [Tue, 15 Oct 2024 21:33:15 +0000 (17:33 -0400)]
drm/amd/display: Add a boot option to reduce phy ssc for HBR3

[Why]
Spread on DPREFCLK by 0.3 percent can have a negative effect on sink
when PHY SSC is also spread by 0.3 percent
[How]
Add boot option for DMU to lower PHY SSC

Reviewed-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Hansen Dsouza <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Optimize power up sequence for specific OLED
Ovidiu Bunea [Fri, 11 Oct 2024 18:55:52 +0000 (14:55 -0400)]
drm/amd/display: Optimize power up sequence for specific OLED

[why & how]
OLED power up sequence takes an extra 150ms via hardcoded delay,
but there is a strict requirement on DisplayOn resume time.
For customer panel, remove these delays to meet target until a
cleaner solution is can be put in place.

Reviewed-by: Charlene Liu <[email protected]>
Signed-off-by: Ovidiu Bunea <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: drop volatile from ring buffer
Christian König [Tue, 8 Oct 2024 15:23:22 +0000 (17:23 +0200)]
drm/amdgpu: drop volatile from ring buffer

Volatile only prevents the compiler from re-ordering reads and writes.
Since we always only modify the ring buffer from one CPU thread and have
an explicit barrier before signaling the HW this should have no effect at
all and just prevents compiler optimisations.

While at it drop the local variables as well.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Sunil Khatri <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: Fix amdgpu_ip_block_hw_fini()
Dan Carpenter [Thu, 24 Oct 2024 08:17:16 +0000 (11:17 +0300)]
drm/amdgpu: Fix amdgpu_ip_block_hw_fini()

This NULL check is reversed so the function doesn't work.

Fixes: dad01f93f432 ("drm/amdgpu: validate hw_fini before function call")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mario Limonciello <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agoDocumentation/gpu/amdgpu: Add programming model for DCN
Rodrigo Siqueira [Thu, 17 Oct 2024 03:34:27 +0000 (21:34 -0600)]
Documentation/gpu/amdgpu: Add programming model for DCN

One of the challenges to contributing to the display code is the
complexity of the DC component. This commit adds a documentation page
that discusses the programming model used by DCN and an overview of how
the display code is organized.

Cc: Leo Li <[email protected]>
Cc: Aurabindo Pillai <[email protected]>
Cc: Hamza Mahfooz <[email protected]>
Cc: Harry Wentland <[email protected]>
Cc: Mario Limonciello <[email protected]>
Cc: Christian Konig <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Reviewed-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agoDocumentation/gpu: Document how to narrow down display issues
Rodrigo Siqueira [Thu, 17 Oct 2024 03:34:26 +0000 (21:34 -0600)]
Documentation/gpu: Document how to narrow down display issues

The amdgpu driver is composed of multiple components, each of which can
be a source of some specific problem that the user/developer can see.
This commit introduces steps to narrow down and collect display
information.

Cc: Leo Li <[email protected]>
Cc: Aurabindo Pillai <[email protected]>
Cc: Hamza Mahfooz <[email protected]>
Cc: Harry Wentland <[email protected]>
Cc: Mario Limonciello <[email protected]>
Cc: Christian Konig <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agoamdgpu: Don't print L2 status if there's nothing to print
Kent Russell [Wed, 16 Oct 2024 18:26:33 +0000 (14:26 -0400)]
amdgpu: Don't print L2 status if there's nothing to print

If a 2nd fault comes in before the 1st is handled, the 1st fault will
clear out the FAULT STATUS registers before the 2nd fault is handled.
Thus we get a lot of zeroes. If status=0, just skip the L2 fault status
information, to avoid confusion of why some VM fault status prints in
dmesg are all zeroes.

Signed-off-by: Kent Russell <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: add missing tracepoint event in DM atomic_commit_tail
Melissa Wen [Wed, 23 Oct 2024 13:53:17 +0000 (10:53 -0300)]
drm/amd/display: add missing tracepoint event in DM atomic_commit_tail

There are two events to trace the beginning and the end of
amdgpu_dm_atomic_commit_tail, but only the one ate the beginning was
placed. Place amdgpu_dm_atomic_commit_tail_finish tracepoint at the end
than.

Signed-off-by: Melissa Wen <[email protected]>
Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdkfd: sever xgmi io link if host driver has disable sharing
Jonathan Kim [Fri, 20 Sep 2024 15:46:05 +0000 (11:46 -0400)]
drm/amdkfd: sever xgmi io link if host driver has disable sharing

Host drivers can create partial hives per guest by disabling xgmi sharing
between certain peers in the main hive.
Typically, these partial hives are fully connected per guest session.
In the event that the host makes a mistake by adding a non-shared node
to a guest session, have the KFD reflect sharing disabled by severing
the IO link.

Signed-off-by: Jonathan Kim <[email protected]>
Tested-by: James Yao <[email protected]>
Reviewed-by: Harish Kasiviswanathan <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: refine error handling in amdgpu_ttm_tt_pin_userptr
Lang Yu [Fri, 18 Oct 2024 09:21:09 +0000 (17:21 +0800)]
drm/amdgpu: refine error handling in amdgpu_ttm_tt_pin_userptr

Free sg table when dma_map_sgtable() failed to avoid memory leak.

Signed-off-by: Lang Yu <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: Fix the logic for NPS request failure
Lijo Lazar [Thu, 17 Oct 2024 09:02:12 +0000 (14:32 +0530)]
drm/amdgpu: Fix the logic for NPS request failure

On a hive, NPS request is placed by the first one for all devices in the
hive. If the request fails, mark the mode as UNKNOWN so that subsequent
devices on unload don't request it. Also, fix the mutex double lock
issue in error condition, should have been mutex_unlock.

Fixes: ee52489d1210 ("drm/amdgpu: Place NPS mode request on unload")
Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Rajneesh Bhardwaj <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdkfd: remove extra use of volatile
Victor Zhao [Tue, 22 Oct 2024 13:48:13 +0000 (21:48 +0800)]
drm/amdkfd: remove extra use of volatile

as the adding of mb() should be sufficient in function unmap_queues_cpsch,
remove the add of volatile type as recommended

Signed-off-by: Victor Zhao <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: Reduce redundant gpu resets on nbio v7.4
YiPeng Chai [Tue, 22 Oct 2024 05:42:38 +0000 (13:42 +0800)]
drm/amdgpu: Reduce redundant gpu resets on nbio v7.4

On nbio v7.4, ras controller interrupt and athub
interrupt are generated after injecting UE to PCIE,
but gpu reset only needs to be triggered once.

Signed-off-by: YiPeng Chai <[email protected]>
Reviewed-by: Tao Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: handle default profile on on devices without fullscreen 3D
Alex Deucher [Fri, 18 Oct 2024 16:35:51 +0000 (12:35 -0400)]
drm/amdgpu: handle default profile on on devices without fullscreen 3D

Some devices do not support fullscreen 3D.

v2: Make the check generic.

Fixes: 336568de918e ("drm/amdgpu/swsmu: default to fullscreen 3D profile for dGPUs")
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: Kenneth Feng <[email protected]>
Cc: Lijo Lazar <[email protected]>
4 months agoRevert "drm/amdkfd: SMI report dropped event count"
Alex Deucher [Mon, 21 Oct 2024 17:41:13 +0000 (13:41 -0400)]
Revert "drm/amdkfd: SMI report dropped event count"

This reverts commit a3ab2d45b9887ee609cd3bea39f668236935774c.

The userspace side for this code is not ready yet so revert
for now.

Reviewed-by: Philip Yang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: Philip Yang <[email protected]>
4 months agodrm/amdgpu: Dereference the ATCS ACPI buffer
Prike Liang [Thu, 17 Oct 2024 06:54:31 +0000 (14:54 +0800)]
drm/amdgpu: Dereference the ATCS ACPI buffer

Need to dereference the atcs acpi buffer after
the method is executed, otherwise it will result in
a memory leak.

Signed-off-by: Prike Liang <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: Save VCN shared memory with init reset
Lijo Lazar [Tue, 15 Oct 2024 03:13:45 +0000 (08:43 +0530)]
drm/amdgpu: Save VCN shared memory with init reset

VCN shared memory is in framebuffer and there are some flags initialized
during sw_init. Ideally, such programming should be during hw_init.

Make sure the flags are saved during reset on initialization since that
reset will affect frame buffer region. For clarity, separate it out to
another function.

Fixes: 1e4acf4d93cd ("drm/amdgpu: Add reset on init handler for XGMI")
Signed-off-by: Lijo Lazar <[email protected]>
Reported-by: Hao Zhou <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: clean unused functions of uvd/vcn/vce
Sunil Khatri [Thu, 17 Oct 2024 16:11:34 +0000 (21:41 +0530)]
drm/amdgpu: clean unused functions of uvd/vcn/vce

Some of the functions pointers of amdgpu_ip_funcs
are not used and are left commented out. Hence this
cleans those up which arent used.

Cc: Leo Liu <[email protected]>
Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Disable PSR-SU on Parade 08-01 TCON too
Mario Limonciello [Mon, 5 Feb 2024 21:12:33 +0000 (15:12 -0600)]
drm/amd/display: Disable PSR-SU on Parade 08-01 TCON too

Stuart Hayhurst has found that both at bootup and fullscreen VA-API video
is leading to black screens for around 1 second and kernel WARNING [1] traces
when calling dmub_psr_enable() with Parade 08-01 TCON.

These symptoms all go away with PSR-SU disabled for this TCON, so disable
it for now while DMUB traces [2] from the failure can be analyzed and the failure
state properly root caused.

Cc: Marc Rossi <[email protected]>
Cc: Hamza Mahfooz <[email protected]>
Link: https://gitlab.freedesktop.org/drm/amd/uploads/a832dd515b571ee171b3e3b566e99a13/dmesg.log
Link: https://gitlab.freedesktop.org/drm/amd/uploads/8f13ff3b00963c833e23e68aa8116959/output.log
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2645
Reviewed-by: Leo Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mario Limonciello <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts for vega20_ih
Victor Lu [Thu, 18 Jul 2024 22:01:23 +0000 (18:01 -0400)]
drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts for vega20_ih

Port this change to vega20_ih.c:
commit afbf7955ff01 ("drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts")

Original commit message:
"Why:
Setting IH_RB_WPTR register to 0 will not clear the RB_OVERFLOW bit
if RB_ENABLE is not set.

How to fix:
Set WPTR_OVERFLOW_CLEAR bit after RB_ENABLE bit is set.
The RB_ENABLE bit is required to be set, together with
WPTR_OVERFLOW_ENABLE bit so that setting WPTR_OVERFLOW_CLEAR bit
would clear the RB_OVERFLOW."

Signed-off-by: Victor Lu <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: Clean the functions pointer set as NULL
Sunil Khatri [Thu, 17 Oct 2024 15:36:00 +0000 (21:06 +0530)]
drm/amdgpu: Clean the functions pointer set as NULL

We dont need to set the functions to NULL which arent
needed as global structure members are by default
set to zero or NULL for pointers.

Cc: Leo Liu <[email protected]>
Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: clean the dummy soft_reset functions
Sunil Khatri [Thu, 17 Oct 2024 14:29:34 +0000 (19:59 +0530)]
drm/amdgpu: clean the dummy soft_reset functions

Remove the dummy soft_reset functions for all
ip blocks.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: clean the dummy wait_for_idle functions
Sunil Khatri [Thu, 17 Oct 2024 14:26:34 +0000 (19:56 +0530)]
drm/amdgpu: clean the dummy wait_for_idle functions

Remove the dummy wait_for_idle functions for all
ip blocks.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: clean the dummy suspend functions
Sunil Khatri [Wed, 9 Oct 2024 13:26:36 +0000 (18:56 +0530)]
drm/amdgpu: clean the dummy suspend functions

Remove the dummy suspend functions for all
ip blocks.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: clean the dummy resume functions
Sunil Khatri [Wed, 9 Oct 2024 13:22:23 +0000 (18:52 +0530)]
drm/amdgpu: clean the dummy resume functions

Remove the dummy resume functions for all
ip blocks.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: validate wait_for_idle before function call
Sunil Khatri [Wed, 9 Oct 2024 13:14:52 +0000 (18:44 +0530)]
drm/amdgpu: validate wait_for_idle before function call

Before making a function call to wait_for_idle,
validate the function pointer like we do in sw_init.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: validate resume before function call
Sunil Khatri [Thu, 17 Oct 2024 14:04:27 +0000 (19:34 +0530)]
drm/amdgpu: validate resume before function call

Before making a function call to resume, validate
the function pointer like we do in sw_init.

Use the helper function amdgpu_ip_block_resume where
same checks and calls are repeated.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: validate suspend before function call
Sunil Khatri [Thu, 17 Oct 2024 13:47:22 +0000 (19:17 +0530)]
drm/amdgpu: validate suspend before function call

Before making a function call to suspend, validate
the function pointer like we do in sw_init.

Use the helper function amdgpu_ip_block_suspend where
same checks and calls are repeated.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: validate hw_fini before function call
Sunil Khatri [Wed, 9 Oct 2024 12:36:57 +0000 (18:06 +0530)]
drm/amdgpu: validate hw_fini before function call

Before making a function call to hw_fini, validate
the function pointer like we do in sw_init.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdkfd: fix the hang caused by the write reorder to fence_addr
Victor Zhao [Thu, 17 Oct 2024 08:20:40 +0000 (16:20 +0800)]
drm/amdkfd: fix the hang caused by the write reorder to fence_addr

make sure KFD_FENCE_INIT write to fence_addr before pm_send_query_status
called, to avoid qcm fence timeout caused by incorrect ordering.

Signed-off-by: Victor Zhao <[email protected]>
Reviewed-by: Philip Yang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu/gfx9: Add cleaner shader for GFX9.4.2
Srinivasan Shanmugam [Fri, 18 Oct 2024 01:56:19 +0000 (07:26 +0530)]
drm/amdgpu/gfx9: Add cleaner shader for GFX9.4.2

This commit adds the cleaner shader microcode for GFX9.4.2 GPUs. The
cleaner shader is a piece of GPU code that is used to clear or
initialize certain GPU resources, such as Local Data Share (LDS), Vector
General Purpose Registers (VGPRs), and Scalar General Purpose Registers
(SGPRs).

Clearing these resources is important for ensuring data isolation
between different workloads running on the GPU. Without the cleaner
shader, residual data from a previous workload could potentially be
accessed by a subsequent workload, leading to data leaks and incorrect
computation results.

The cleaner shader microcode is represented as an array of 32-bit words
(`gfx_9_4_2_cleaner_shader_hex`). This array is the binary
representation of the cleaner shader code, which is written in a
low-level GPU instruction set.

Also, this patch updates the `gfx_v9_0_sw_init` function to initialize
the cleaner shader if the MEC firmware version is 88 or higher. It sets
the `cleaner_shader_ptr` and `cleaner_shader_size` to the appropriate
values and attempts to initialize the cleaner shader.

When the cleaner shader feature is enabled, the AMDGPU driver loads this
array into a specific location in the GPU memory. The GPU then reads
this memory location to fetch and execute the cleaner shader
instructions.

The cleaner shader is executed automatically by the GPU at the end of
each workload, before the next workload starts. This ensures that all
GPU resources are in a clean state before the start of each workload.

This change ensures that the GPU memory is properly cleared between
different processes, preventing data leakage and enhancing security. It
also aligns with the serialization mechanism between KGD and KFD,
ensuring that the GPU state is consistent across different workloads.

Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
Suggested-by: Alex Deucher <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: fix typo for sdma6 constant fill packet
Frank Min [Wed, 16 Oct 2024 06:06:01 +0000 (14:06 +0800)]
drm/amdgpu: fix typo for sdma6 constant fill packet

Fix typo for sdma6 constant fill packet

Signed-off-by: Frank Min <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: fix random data corruption for sdma 7
Frank Min [Thu, 10 Oct 2024 08:41:32 +0000 (16:41 +0800)]
drm/amdgpu: fix random data corruption for sdma 7

There is random data corruption caused by const fill, this is caused by
write compression mode not correctly configured.

So correct compression mode for const fill.

Signed-off-by: Frank Min <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: 3.2.306
Aric Cyr [Mon, 14 Oct 2024 00:21:39 +0000 (20:21 -0400)]
drm/amd/display: 3.2.306

This version brings along following fixes:
- Fix dcn401 idle optimization problem
- Fix cursor corruption on dcn35
- Fix DP LL compliance failures
- Fix SubVP Phantom VBlank End calculation

Acked-by: Tom Chung <[email protected]>
Signed-off-by: Aric Cyr <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: To change dcn301_init.h guard.
Bhuvanachandra Pinninti [Fri, 11 Oct 2024 20:12:25 +0000 (01:42 +0530)]
drm/amd/display: To change dcn301_init.h guard.

[why & How]
The original guard is wrongly to be set as for dcn30.
Changed it from 30 to 301.

Reviewed-by: Dillon Varone <[email protected]>
Signed-off-by: Bhuvanachandra Pinninti <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: update fullscreen status to SPL
Samson Tam [Wed, 9 Oct 2024 14:00:04 +0000 (10:00 -0400)]
drm/amd/display: update fullscreen status to SPL

[Why]
Current fullscreen check in SPL using dm_helpers is out-of-sync
with dc state. This causes an issue during minimal transition
where we pick an invalid intermediate state because the pre and
post fullscreen status are different.

[How]
Add sharpening_required flag to dc_stream_state. Use this flag to
indicate if we are in fullscreen or not. Propagate flag to SPL for
fullscreen status. Remove workaround in DML

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Samson Tam <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Add a Precise Delay Routine
Fangzhi Zuo [Wed, 2 Oct 2024 19:47:10 +0000 (15:47 -0400)]
drm/amd/display: Add a Precise Delay Routine

Fix DP compliance failures 4.2.2.12, 4.3.1.21, 4.9.1.19
caused by imprecise delay on fsleep().

Reviewed-by: Aric Cyr <[email protected]>
Signed-off-by: Fangzhi Zuo <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Recalculate SubVP Phantom VBlank End in dml21
Dillon Varone [Tue, 8 Oct 2024 19:25:45 +0000 (15:25 -0400)]
drm/amd/display: Recalculate SubVP Phantom VBlank End in dml21

[WHY]
The phantom stream timing is copied from the main stream as most
parameters are identical, however some need to be recalculated.
Currently VBlank End is not recalculated and copied from the main
incorrectly.

[HOW]
Recalculate VBlank End for phantom stream timing.

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Dillon Varone <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: temp w/a for DP Link Layer compliance
Aurabindo Pillai [Mon, 7 Oct 2024 18:19:32 +0000 (14:19 -0400)]
drm/amd/display: temp w/a for DP Link Layer compliance

[Why&How]
Disabling P-State support on full updates for DCN401 results in
introducing additional communication with SMU. A UCLK hard min message
to SMU takes 4 seconds to go through, which was due to DCN not allowing
pstate switch, which was caused by incorrect value for TTU watermark
before blanking the HUBP prior to DPG on for servicing the test request.

Fix the issue temporarily by disallowing pstate changes for compliance
test while test request handler is reworked for a proper fix.

Fixes: 67ea53a4bd9d ("drm/amd/display: Disable DCN401 UCLK P-State support on full updates")
Cc: Mario Limonciello <[email protected]>
Cc: Alex Deucher <[email protected]>
Reviewed-by: Dillon Varone <[email protected]>
Signed-off-by: Aurabindo Pillai <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Adding array index check to prevent memory corruption
Leo Chen [Mon, 7 Oct 2024 19:50:35 +0000 (15:50 -0400)]
drm/amd/display: Adding array index check to prevent memory corruption

[Why & How]
Array indices out of bound caused memory corruption. Adding checks to
ensure that array index stays in bound.

Reviewed-by: Charlene Liu <[email protected]>
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Leo Chen <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Reuse subvp enable check for DCN401
Aurabindo Pillai [Mon, 7 Oct 2024 19:50:27 +0000 (15:50 -0400)]
drm/amd/display: Reuse subvp enable check for DCN401

Reuse subvp enable check from DCN32 for IGT testing of Sub-Viewport
feature on DCN401

Reviewed-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Aurabindo Pillai <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: w/a to program DISPCLK_R_GATE_DISABLE DCN35
Yihan Zhu [Mon, 7 Oct 2024 18:32:59 +0000 (14:32 -0400)]
drm/amd/display: w/a to program DISPCLK_R_GATE_DISABLE DCN35

[WHY & HOW]
Cursor corruption observed on USBC display with specific system setup with a
reboot. Cursor memory might still in the lightsleep state due to voltage
issue, we need program DISPCLK_R_GATE_DISABLE to avoid this issue only on
DCN35.

Reviewed-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Yihan Zhu <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: temp w/a for dGPU to enter idle optimizations
Aurabindo Pillai [Tue, 1 Oct 2024 22:03:02 +0000 (18:03 -0400)]
drm/amd/display: temp w/a for dGPU to enter idle optimizations

[Why&How]
vblank immediate disable currently does not work for all asics. On
DCN401, the vblank interrupts never stop coming, and hence we never
get a chance to trigger idle optimizations.

Add a workaround to enable immediate disable only on APUs for now. This
adds a 2-frame delay for triggering idle optimization, which is a
negligible overhead.

Fixes: 58a261bfc967 ("drm/amd/display: use a more lax vblank enable policy for older ASICs")
Fixes: e45b6716de4b ("drm/amd/display: use a more lax vblank enable policy for DCN35+")
Cc: Mario Limonciello <[email protected]>
Cc: Alex Deucher <[email protected]>
Reviewed-by: Harry Wentland <[email protected]>
Reviewed-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Aurabindo Pillai <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amdgpu: clean the dummy sw_fini functions
Sunil Khatri [Wed, 9 Oct 2024 12:22:41 +0000 (17:52 +0530)]
drm/amdgpu: clean the dummy sw_fini functions

Remove the dummy sw_fini functions for all
ip blocks.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
4 months agodrm/amd/display: Add hpd_source index check for dcn401 link encoder setup
Srinivasan Shanmugam [Thu, 17 Oct 2024 02:06:46 +0000 (07:36 +0530)]
drm/amd/display: Add hpd_source index check for dcn401 link encoder setup

This patch adds a boundary check for the hpd_source index during the
link encoder creation process for all dcn401 ip. The check ensures that the
index is within the valid range of the link_enc_hpd_regs array to
prevent out-of-bounds access.

Cc: Tom Chung <[email protected]>
Cc: Rodrigo Siqueira <[email protected]>
Cc: Roman Li <[email protected]>
Cc: Alex Hung <[email protected]>
Cc: Aurabindo Pillai <[email protected]>
Cc: Harry Wentland <[email protected]>
Cc: Hamza Mahfooz <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
Reviewed-by: Roman Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
This page took 0.113733 seconds and 4 git commands to generate.