linux-block.git
13 months agodrm/amdgpu: Add amdgpu_bo_is_vm_bo helper
Tvrtko Ursulin [Mon, 6 May 2024 16:59:55 +0000 (17:59 +0100)]
drm/amdgpu: Add amdgpu_bo_is_vm_bo helper

Help code readability by replacing a bunch of:

bo->tbo.base.resv == vm->root.bo->tbo.base.resv

With:

amdgpu_vm_is_bo_always_valid(vm, bo)

No functional changes.

v2:
 * Rename helper and move to amdgpu_vm. (Christian)

v3:
 * Use Christian's kerneldoc.

v4:
 * Fixed logic inversion in amdgpu_vm_bo_get_memory.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Remove duplicate check for *is_queue_unmap in sdma_v7_0_ring_set_wptr
Srinivasan Shanmugam [Fri, 17 May 2024 03:20:16 +0000 (08:50 +0530)]
drm/amdgpu: Remove duplicate check for *is_queue_unmap in sdma_v7_0_ring_set_wptr

This commit removes a duplicate check for *is_queue_unmap in the
sdma_v7_0_ring_set_wptr function. The check at line 171 was considered
dead code because at this point in the code, we already know that
*is_queue_unmap is false due to the check at line 161.

By removing this unnecessary check, improves the readability of the
code

Fixes the below:
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c:171 sdma_v7_0_ring_set_wptr()
warn: duplicate check '*is_queue_unmap' (previous on line 161)

drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
    140 static void sdma_v7_0_ring_set_wptr(struct amdgpu_ring *ring)
    141 {
    142         struct amdgpu_device *adev = ring->adev;
    143         uint32_t *wptr_saved;
    144         uint32_t *is_queue_unmap;
    145         uint64_t aggregated_db_index;
    146         uint32_t mqd_size = adev->mqds[AMDGPU_HW_IP_DMA].mqd_size;
    147
    148         DRM_DEBUG("Setting write pointer\n");
    149
    150         if (ring->is_mes_queue) {
    151                 wptr_saved = (uint32_t *)(ring->mqd_ptr + mqd_size);
    152                 is_queue_unmap = (uint32_t *)(ring->mqd_ptr + mqd_size +
                        ^^^^^^^^^^^^^^^^ Set here

    153                                               sizeof(uint32_t));
    154                 aggregated_db_index =
    155                         amdgpu_mes_get_aggregated_doorbell_index(adev,
    156                                                          ring->hw_prio);
    157
    158                 atomic64_set((atomic64_t *)ring->wptr_cpu_addr,
    159                              ring->wptr << 2);
    160                 *wptr_saved = ring->wptr << 2;
    161                 if (*is_queue_unmap) {
                            ^^^^^^^^^^^^^^^ Checked here

    162                         WDOORBELL64(aggregated_db_index, ring->wptr << 2);
    163                         DRM_DEBUG("calling WDOORBELL64(0x%08x, 0x%016llx)\n",
    164                                         ring->doorbell_index, ring->wptr << 2);
    165                         WDOORBELL64(ring->doorbell_index, ring->wptr << 2);
    166                 } else {
    167                         DRM_DEBUG("calling WDOORBELL64(0x%08x, 0x%016llx)\n",
    168                                         ring->doorbell_index, ring->wptr << 2);
    169                         WDOORBELL64(ring->doorbell_index, ring->wptr << 2);
    170
--> 171                         if (*is_queue_unmap)
                                    ^^^^^^^^^^^^^^^ This is dead code.  We know it's false.

    172                                 WDOORBELL64(aggregated_db_index,
    173                                             ring->wptr << 2);
    174                 }
    175         } else {
    176                 if (ring->use_doorbell) {
    177                         DRM_DEBUG("Using doorbell -- "
    178                                   "wptr_offs == 0x%08x "

Fixes: b412351e91bd ("drm/amdgpu: Add sdma v7_0 ip block support (v7)")
Cc: Likun Gao <Likun.Gao@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Remove GC HW IP 9.3.0 from noretry=1
Tim Van Patten [Thu, 16 May 2024 17:57:25 +0000 (11:57 -0600)]
drm/amdgpu: Remove GC HW IP 9.3.0 from noretry=1

The following commit updated gmc->noretry from 0 to 1 for GC HW IP
9.3.0:

    commit 5f3854f1f4e2 ("drm/amdgpu: add more cases to noretry=1")

This causes the device to hang when a page fault occurs, until the
device is rebooted. Instead, revert back to gmc->noretry=0 so the device
is still responsive.

Fixes: 5f3854f1f4e2 ("drm/amdgpu: add more cases to noretry=1")
Signed-off-by: Tim Van Patten <timvp@google.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/vcn: update vcn5 enc/dec capabilities
Ruijing Dong [Wed, 15 May 2024 19:13:56 +0000 (15:13 -0400)]
drm/amdgpu/vcn: update vcn5 enc/dec capabilities

Update the capabilities for supporting 8k encoding.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: support mode1 reset on smu v14.0.3
Kenneth Feng [Wed, 10 Apr 2024 00:49:58 +0000 (08:49 +0800)]
drm/amd/pm: support mode1 reset on smu v14.0.3

Align with new port same as smu 13.x.

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Jack Gui <Jack.Gui@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Remove duplicate amdgpu_umsch_mm.h header
Jiapeng Chong [Thu, 16 May 2024 08:22:00 +0000 (16:22 +0800)]
drm/amdgpu: Remove duplicate amdgpu_umsch_mm.h header

./drivers/gpu/drm/amd/amdgpu/amdgpu.h: amdgpu_umsch_mm.h is included more than once.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9063
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/display: Update kdoc for 'optc35_set_odm_combine'
Srinivasan Shanmugam [Wed, 15 May 2024 15:19:47 +0000 (20:49 +0530)]
drm/amdgpu/display: Update kdoc for 'optc35_set_odm_combine'

The parameters segment_width and last_segment_width are used to control
the configuration of the Output Plane Processor (OPP), specifically the
width of each segment that the display is divided into and the width of
the last segment

Fixes the below with gcc W=1:
drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn35/dcn35_optc.c:59: warning: Function parameter or struct member 'segment_width' not described in 'optc35_set_odm_combine'
drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn35/dcn35_optc.c:59: warning: Function parameter or struct member 'last_segment_width' not described in 'optc35_set_odm_combine'
drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn35/dcn35_optc.c:59: warning: Excess function parameter 'timing' description in 'optc35_set_odm_combine'

Cc: Tom Chung <chiahsuan.chung@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Roman Li <roman.li@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/radeon: initialize backlight for iMac12,2 with Radeon 6750M
Kendall Smith [Wed, 15 May 2024 19:20:09 +0000 (15:20 -0400)]
drm/radeon: initialize backlight for iMac12,2 with Radeon 6750M

If a Radeon 6750M GPU from an iMac12,1 is installed into an
iMac 12,2, there is no backlight device initialized during
boot. Everything else is functional, but the display brightness
cannot be controlled. There are no directories present in
/sys/class/backlight after booting. A simple one line
modification to an if statement fixes this issue by initializing
the radeon backlight device for an iMac12,2 as well if it has a
6750M. After the patch, brightness can be controlled and
radeon_bl0 is present in /sys/class/backlight. This was tested
by compiling the latest kernel with and without the patch.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3378
Signed-off-by: Kendall Smith <kendallsm2@icloud.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: support pp_dpm_pcie on smu v14.0.2/3
Kenneth Feng [Sat, 11 May 2024 07:35:23 +0000 (15:35 +0800)]
drm/amd/pm: support pp_dpm_pcie on smu v14.0.2/3

support pp_dpm_pcie on smu v14.0.2/3

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Jack Gui <Jack.Gui@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/amdgpu: add module parameter for jpeg
Kenneth Feng [Fri, 26 Apr 2024 01:28:24 +0000 (09:28 +0800)]
drm/amd/amdgpu: add module parameter for jpeg

add module parameter for jpeg. this is a temporary workaround for jpeg unit test fail
on vcn 5.0 now. will be removed later.

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Sonny Jiang <sonny.jiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: Add GFX1201 to svm_range_get_pte_flags function
Sreekant Somasekharan [Fri, 10 May 2024 14:07:58 +0000 (10:07 -0400)]
drm/amdkfd: Add GFX1201 to svm_range_get_pte_flags function

GFX1201 was missed in the commit below. Adding it in.

Fixes: 628e1ace2379 ("drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC")
Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix documentation errors in gmc v12.0
Alex Deucher [Tue, 14 May 2024 16:43:30 +0000 (12:43 -0400)]
drm/amdgpu: fix documentation errors in gmc v12.0

Fix up parameter descriptions.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: Check correct memory types for is_system variable
Sreekant Somasekharan [Fri, 10 May 2024 04:09:32 +0000 (00:09 -0400)]
drm/amdkfd: Check correct memory types for is_system variable

To catch GPU mapping of system memory, TTM_PL_TT and AMDGPU_PL_PREEMPT
must be checked.

Fixes: 628e1ace2379 ("drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC")
Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix documentation errors in sdma v7.0
Alex Deucher [Tue, 14 May 2024 16:38:33 +0000 (12:38 -0400)]
drm/amdgpu: fix documentation errors in sdma v7.0

Fix up parameter descriptions.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: Ensure gpu_id is unique
Harish Kasiviswanathan [Wed, 1 May 2024 21:07:59 +0000 (17:07 -0400)]
drm/amdkfd: Ensure gpu_id is unique

gpu_id needs to be unique for user space to identify GPUs via KFD
interface. In the current implementation there is a very small
probability of having non unique gpu_ids.

v2: Add check to confirm if gpu_id is unique. If not unique, find one
    Changed commit header to reflect the above
v3: Use crc16 as suggested-by: Lijo Lazar <lijo.lazar@amd.com>
    Ensure that gpu_id != 0

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix compiler 'side-effect' check issue for RAS_EVENT_LOG()
Yang Wang [Mon, 13 May 2024 23:48:19 +0000 (07:48 +0800)]
drm/amdgpu: fix compiler 'side-effect' check issue for RAS_EVENT_LOG()

create a new helper function to avoid compiler 'side-effect'
check about RAS_EVENT_LOG() macro.

Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: disable gpo temporarily
Kenneth Feng [Mon, 11 Mar 2024 06:14:16 +0000 (14:14 +0800)]
drm/amd/pm: disable gpo temporarily

disable gpo temprarily since it is not ready in fw

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Jack Gui <Jack.Gui@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix getting vram info for gfx12
Frank Min [Fri, 10 May 2024 07:51:41 +0000 (15:51 +0800)]
drm/amdgpu: fix getting vram info for gfx12

gfx12 query video mem channel/type/width from umc_info of atom list, so
fix it accordingly.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/mes: use mc address for wptr in add queue packet
Frank Min [Tue, 14 May 2024 07:47:13 +0000 (15:47 +0800)]
drm/amdgpu/mes: use mc address for wptr in add queue packet

use mc address for wptr in add queue packet

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: add pp_dpm_dcefclk for smu 14.0.2/3
Kenneth Feng [Tue, 7 May 2024 09:53:18 +0000 (17:53 +0800)]
drm/amd/pm: add pp_dpm_dcefclk for smu 14.0.2/3

add pp_dpm_dcefclk for smu 14.0.2/3

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Jack Gui <Jack.Gui@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: enable gfxoff for gc v12.0.0
Likun Gao [Wed, 24 Apr 2024 09:20:39 +0000 (17:20 +0800)]
drm/amdgpu: enable gfxoff for gc v12.0.0

Enable GFXOFF for GC v12.0.0.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/amdgpu: enable mmhub and athub cg on gc 12.0.0
Likun Gao [Sun, 7 Apr 2024 20:32:25 +0000 (04:32 +0800)]
drm/amd/amdgpu: enable mmhub and athub cg on gc 12.0.0

Enable mmhub and athub cg on gc 12.0.0

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: switch default mes to uni mes
Likun Gao [Tue, 14 May 2024 08:19:38 +0000 (16:19 +0800)]
drm/amdgpu: switch default mes to uni mes

Switch the default mes to uni mes for gfx v12.
V2: remove uni_mes set for gfx v11.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/pm: Fix the null pointer dereference in apply_state_adjust_rules
Ma Jun [Thu, 9 May 2024 07:51:35 +0000 (15:51 +0800)]
drm/amdgpu/pm: Fix the null pointer dereference in apply_state_adjust_rules

Check the pointer value to fix potential null pointer
dereference

Acked-by: Yang Wang<kevinyang.wang@amd.com>
Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add debug flag to enable RAS ACA
Yang Wang [Tue, 14 May 2024 07:56:34 +0000 (15:56 +0800)]
drm/amdgpu: add debug flag to enable RAS ACA

Use debug_mask=0x10 (BIT.4) param to help enable RAS ACA.
(RAS ACA is disabled by default.)

Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: enable some cg feature for gc 12.0.0
Likun Gao [Sun, 7 Apr 2024 19:38:10 +0000 (03:38 +0800)]
drm/amdgpu: enable some cg feature for gc 12.0.0

Enable 3D cgcg, 3D cgls, sram fgcg, perfcounter mgcg,
repeater fgcg for gc v12.0.0.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Fix the null pointer dereference to ras_manager
Ma Jun [Sat, 11 May 2024 07:48:02 +0000 (15:48 +0800)]
drm/amdgpu: Fix the null pointer dereference to ras_manager

Check ras_manager before using it

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/pm: Drop hard-code value of usTMax
Ma Jun [Mon, 13 May 2024 08:22:55 +0000 (16:22 +0800)]
drm/amdgpu/pm: Drop hard-code value of usTMax

Drop hard-code value of nsTmax because we read this
value from pptable.

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/kfd: Correct pinned buffer handling at kfd restore and validate process
Xiaogang Chen [Tue, 14 May 2024 04:54:25 +0000 (23:54 -0500)]
drm/kfd: Correct pinned buffer handling at kfd restore and validate process

This reverts commit 8a774fe912ff ("drm/amdgpu: avoid restore process run into dead loop")
since buffer got pinned is not related whether it needs mapping
And skip buffer validation at kfd driver if the buffer has been pinned.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Use NPS ranges from discovery table
Lijo Lazar [Thu, 9 May 2024 11:32:33 +0000 (17:02 +0530)]
drm/amdgpu: Use NPS ranges from discovery table

Add GMC API to fetch NPS range information from discovery table. Use NPS
range information in GMC 9.4.3 SOCs when available, otherwise fallback
to software method.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Add nps info table to IP discovery
Lijo Lazar [Mon, 11 Mar 2024 05:02:01 +0000 (10:32 +0530)]
drm/amdgpu: Add nps info table to IP discovery

Add support to fetch NPS info table in IP discovery table.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit
Friedrich Vock [Tue, 14 May 2024 07:06:38 +0000 (09:06 +0200)]
drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit

The special case for VM passthrough doesn't check adev->nbio.funcs
before dereferencing it. If GPUs that don't have an NBIO block are
passed through, this leads to a NULL pointer dereference on startup.

Signed-off-by: Friedrich Vock <friedrich.vock@gmx.de>
Fixes: 1bece222eabe ("drm/amdgpu: Clear doorbell interrupt status for Sienna Cichlid")
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Fix memory range calculation
Lijo Lazar [Fri, 10 May 2024 08:00:34 +0000 (13:30 +0530)]
drm/amdgpu: Fix memory range calculation

Consider the 16M reserved region also before range calculation for GMC
9.4.3 SOCs.

Fixes: a433f1f59484 ("drm/amdgpu: Initialize memory ranges for GC 9.4.3")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: Fix aldebaran pcie speed reporting
Lijo Lazar [Thu, 9 May 2024 08:44:10 +0000 (14:14 +0530)]
drm/amd/pm: Fix aldebaran pcie speed reporting

Fix the field definitions for LC_CURRENT_DATA_RATE.

Fixes: c05d1c401572 ("drm/amd/swsmu: add aldebaran smu13 ip support (v3)")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: enable gfx cgcg&cgls for gfx v12_0_0
Likun Gao [Sat, 6 Apr 2024 22:08:25 +0000 (06:08 +0800)]
drm/amdgpu: enable gfx cgcg&cgls for gfx v12_0_0

Enable GFX CGCG and CGLS for gfx version 12.0.0.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/jpeg5: enable power gating
Sonny Jiang [Mon, 16 Oct 2023 20:49:53 +0000 (16:49 -0400)]
drm/amdgpu/jpeg5: enable power gating

Enable PG on JPEG5

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Drop pixel_clock_mhz
Mario Limonciello [Thu, 9 May 2024 01:55:27 +0000 (20:55 -0500)]
drm/amd/display: Drop pixel_clock_mhz

The pixel_clock_mhz property is populated in amdgpu_dm when Freesync is setup,
but it is not used anywhere in amdgpu_dm. Remove the dead code.

Cc: chiahsuan.chung@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: support imu for gc 12_0_0
Likun Gao [Mon, 1 Apr 2024 08:57:33 +0000 (16:57 +0800)]
drm/amdgpu: support imu for gc 12_0_0

Support IMU for ASIC with GC 12.0.0

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: Use gpu_metrics_v1_6 for SMUv13.0.6
Asad Kamal [Mon, 13 May 2024 11:37:21 +0000 (19:37 +0800)]
drm/amd/pm: Use gpu_metrics_v1_6 for SMUv13.0.6

Use gpu_metrics_v1_6 for SMUv13.0.6 to fill gpu metric info

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: Add gpu_metrics_v1_6
Asad Kamal [Mon, 13 May 2024 11:18:00 +0000 (19:18 +0800)]
drm/amd/pm: Add gpu_metrics_v1_6

Add new gpu_metrics_v1_6 to acquire accumulated
throttler residencies

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/pm: Fix the null pointer dereference for smu7
Ma Jun [Fri, 10 May 2024 07:01:59 +0000 (15:01 +0800)]
drm/amdgpu/pm: Fix the null pointer dereference for smu7

optimize the code to avoid pass a null pointer (hwmgr->backend)
to function smu7_update_edc_leakage_table.

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Remove dead code in amdgpu_ras_add_mca_err_addr
Ma Jun [Mon, 13 May 2024 05:42:20 +0000 (13:42 +0800)]
drm/amdgpu: Remove dead code in amdgpu_ras_add_mca_err_addr

Remove dead code in amdgpu_ras_add_mca_err_addr

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Fix null pointer dereference to bo
Ma Jun [Sat, 11 May 2024 08:08:06 +0000 (16:08 +0800)]
drm/amdgpu: Fix null pointer dereference to bo

Check bo before using it

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: fix documentation warnings for mpc.h
Marcelo Mendes Spessoto Junior [Sat, 11 May 2024 00:02:02 +0000 (21:02 -0300)]
drm/amd/display: fix documentation warnings for mpc.h

Fix most of the display documentation compile warnings by
documenting struct mpc_funcs functions in dc/inc/hw/mpc.h file.

Remove the following warnings:
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'read_mpcc_state' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'mpc_init_single_inst' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'get_mpcc_for_dpp_from_secondary' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'get_mpcc_for_dpp' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'wait_for_idle' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'assert_mpcc_idle_before_connect' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'init_mpcc_list_from_hw' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_denorm' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_denorm_clamp' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_output_csc' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_ocsc_default' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_output_gamma' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'power_on_mpc_mem_pwr' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_dwb_mux' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'disable_dwb_mux' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'is_dwb_idle' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_out_rate_control' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_gamut_remap' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_1dlut' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_shaper' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'acquire_rmu' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_3dlut' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'release_rmu' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'get_mpc_out_mux' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_bg_color' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_mpc_mem_lp_mode' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_movable_cm_location' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'update_3dlut_fast_load_select' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'get_3dlut_fast_load_status' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'populate_lut' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_lut_read_write_control' not described in 'mpc_funcs'
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_lut_mode' not described in 'mpc_funcs'

Fixes: b8c1c3a82e75 ("Documentation/gpu: Add kernel doc entry for MPC")
Closes: https://lore.kernel.org/linux-next/20240130134954.04fcf763@canb.auug.org.au/
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Marcelo Mendes Spessoto Junior <marcelomspessoto@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: enable unmapped doorbell handling basic mode on mes 12
shaoyunl [Thu, 9 May 2024 01:32:58 +0000 (21:32 -0400)]
drm/amdgpu: enable unmapped doorbell handling  basic mode on mes 12

This reverts commit fcc5df722dbc47c3a84386a1c70647cfe153e65d.

Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: Use dev_error intead of pr_error
Harish Kasiviswanathan [Wed, 1 May 2024 18:09:04 +0000 (14:09 -0400)]
drm/amdkfd: Use dev_error intead of pr_error

No functional change. This will help in moving gpu_id creation to next
step while still being able to identify the correct GPU

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix mqd corruption for gfx12
Frank Min [Tue, 30 Apr 2024 13:37:45 +0000 (21:37 +0800)]
drm/amdgpu: fix mqd corruption for gfx12

1. restore mqd from backup while resuming
2. use copy_toio and copy_fromio while mqd in vram

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: add initial value for gfx12 AGP aperture
Frank Min [Mon, 13 May 2024 08:36:14 +0000 (16:36 +0800)]
drm/amdgpu: add initial value for gfx12 AGP aperture

add initial value for gfx12 AGP aperture

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: check negtive return for table entries
Jesse Zhang [Mon, 13 May 2024 08:01:23 +0000 (16:01 +0800)]
drm/amd/pm: check negtive return for table entries

Function hwmgr->hwmgr_func->get_num_of_pp_table_entries(hwmgr) returns a negative number

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Don't register panel_power_savings on OLED panels
Mario Limonciello [Thu, 9 May 2024 17:05:24 +0000 (12:05 -0500)]
drm/amd/display: Don't register panel_power_savings on OLED panels

OLED panels don't support the ABM, they shouldn't offer the
panel_power_savings attribute to the user. Check whether aux BL
control support was enabled to decide whether to offer it.

Reported-by: Gergo Koteles <soyer@irl.hu>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3359
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Tested-by: Gergo Koteles <soyer@irl.hu>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix the warning bad bit shift operation for aca_error_type type
Jesse Zhang [Thu, 9 May 2024 05:17:47 +0000 (13:17 +0800)]
drm/amdgpu: fix the warning bad bit shift operation for aca_error_type type

Filter invalid aca error types before performing a shift operation.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: the warning dereferencing obj for nbio_v7_4
Jesse Zhang [Mon, 13 May 2024 07:22:42 +0000 (15:22 +0800)]
drm/amdgpu: the warning dereferencing obj for nbio_v7_4

if ras_manager obj null, don't print NBIO err data

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: remove logically dead code
Jesse Zhang [Wed, 8 May 2024 10:34:59 +0000 (18:34 +0800)]
drm/amd/pm: remove logically dead code

Execution cannot reach this statement: case POWER_STATE_TYPE_BALAN.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Acked-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: remove structurally dead code
Jesse Zhang [Wed, 8 May 2024 10:14:13 +0000 (18:14 +0800)]
drm/amdgpu: remove structurally dead code

This code cannot be reached: return "UNKNOWN";.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: fix enum feature compared against 0
Jesse Zhang [Thu, 9 May 2024 03:09:37 +0000 (11:09 +0800)]
drm/amd/pm: fix enum feature compared against 0

This less-than-zero comparison of an unsigned value is never true. feature < 0U

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: fix enum type compared against 0
Jesse Zhang [Thu, 9 May 2024 03:20:57 +0000 (11:20 +0800)]
drm/amd/pm: fix enum type compared against 0

This less-than-zero comparison of an unsigned value is never true. type < 0U

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgu: remove unused code
Jesse Zhang [Wed, 8 May 2024 10:54:25 +0000 (18:54 +0800)]
drm/amdgu: remove unused code

The same code is executed when the condition err is true or false,
because the code in the if-then branch and after the if statement is identical

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: remove logically dead code for renoir
Jesse Zhang [Wed, 8 May 2024 10:49:30 +0000 (18:49 +0800)]
drm/amd/pm: remove logically dead code for renoir

The switch governing value clk_type cannot be SMU_GFXCLK and SMU_SCLK.

Fixes: ca55f459f5ad ("drm/amd/pm: add the fine grain tuning function for Renoir")
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: remove structurally dead code for amd_gmc
Jesse Zhang [Wed, 8 May 2024 10:17:43 +0000 (18:17 +0800)]
drm/amdgpu: remove structurally dead code for amd_gmc

This code cannot be reached: return sysfs_emit(buf, "UNK....)

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: check the return of send smc msg for smu_v13
Jesse Zhang [Wed, 8 May 2024 09:46:40 +0000 (17:46 +0800)]
drm/amd/pm: check the return of send smc msg for smu_v13

Set smu work laod mask may fail, so check return.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: check specific index for smu13
Jesse Zhang [Wed, 8 May 2024 09:50:21 +0000 (17:50 +0800)]
drm/amd/pm: check specific index for smu13

Check for specific indexes that may be invalid values.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: check the return of send smc msg for navi10
Jesse Zhang [Wed, 8 May 2024 09:41:17 +0000 (17:41 +0800)]
drm/amd/pm: check the return of send smc msg for navi10

Set smu work laod mask may fail, so check return.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: check the return of send smc msg for sienna_cichild
Jesse Zhang [Wed, 8 May 2024 09:32:32 +0000 (17:32 +0800)]
drm/amd/pm: check the return of send smc msg for sienna_cichild

Set smu work laod mask may fail, so check return.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: check specific index for aldebaran
Jesse Zhang [Wed, 8 May 2024 09:13:28 +0000 (17:13 +0800)]
drm/amd/pm: check specific index for aldebaran

Check for specific indexes that may be invalid values.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd: fix the warning unchecking return vaule for sdma_v7
Jesse Zhang [Wed, 8 May 2024 09:09:38 +0000 (17:09 +0800)]
drm/amd: fix the warning unchecking return vaule for sdma_v7

check ring allocate success before emit preempt ib

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: clear the warning unsigned compared against 0 for xcp_id
Jesse Zhang [Thu, 9 May 2024 09:49:54 +0000 (17:49 +0800)]
drm/amdgpu: clear the warning unsigned compared against 0 for xcp_id

This greater-than-or-equal-to-zero comparison of an unsigned value is always true. fpriv->xcp_id >= 0U

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix the waring dereferencing hive
Jesse Zhang [Wed, 8 May 2024 08:20:49 +0000 (16:20 +0800)]
drm/amdgpu: fix the waring dereferencing hive

Check the amdgpu_hive_info *hive that maybe is NULL.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: fix dereference after null check
Jesse Zhang [Wed, 8 May 2024 06:51:35 +0000 (14:51 +0800)]
drm/amdgpu: fix dereference after null check

check the pointer hive before use.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: fix get dpm level count for yello carp
Jesse Zhang [Thu, 9 May 2024 09:33:20 +0000 (17:33 +0800)]
drm/amd/pm: fix get dpm level count for yello carp

For invalid clk types, return -EINVAL to check the return.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/pm: Drop redundant setting code for pcie lanes
Ma Jun [Thu, 9 May 2024 05:50:56 +0000 (13:50 +0800)]
drm/amdgpu/pm: Drop redundant setting code for pcie lanes

Drop redundant setting code for pcie.lanes. It overwrites
the value get from pptable

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Acked-by: Yang Wang<kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/pm: Fix code alignment issue
Ma Jun [Thu, 9 May 2024 02:38:41 +0000 (10:38 +0800)]
drm/amdgpu/pm: Fix code alignment issue

Fix code alignment issue

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reported-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/pm: fix get dpm level count for smu13
Jesse Zhang [Thu, 9 May 2024 09:20:24 +0000 (17:20 +0800)]
drm/amd/pm: fix get dpm level count for smu13

For invalid clk types, return -EINVAL to check the return.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu: Fix the warning division or modulo by zero
Jesse Zhang [Fri, 10 May 2024 09:32:53 +0000 (17:32 +0800)]
drm/amdgpu: Fix the warning division or modulo by zero

Checks the partition mode and returns an error for an invalid mode.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agoRevert "drm/amd/display: Enable SYMCLK gating in DCCG"
Alex Hung [Fri, 10 May 2024 21:19:05 +0000 (15:19 -0600)]
Revert "drm/amd/display: Enable SYMCLK gating in DCCG"

This reverts commit c49e44ede5cdfe650c2f769d8bd58cbe289e87cd.

This causes regression on DP link layer test.

Reported-by: Mark Broadworth <Mark.Broadworth@amd.com>
Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdkfd: Fix CU Masking for GFX 9.4.3
Mukul Joshi [Thu, 9 May 2024 21:29:25 +0000 (17:29 -0400)]
drm/amdkfd: Fix CU Masking for GFX 9.4.3

We are incorrectly passing the first XCC's MQD when
updating CU masks for other XCCs in the partition. Fix
this by passing the MQD for the XCC currently being
updated with CU mask to update_cu_mask function.

Fixes: fc6efed2c728 ("drm/amdkfd: Update CU masking for GFX 9.4.3")
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: 3.2.285
Aric Cyr [Mon, 6 May 2024 02:28:31 +0000 (22:28 -0400)]
drm/amd/display: 3.2.285

This version brings along following fixes:
- Read default boot options
- Find max flickerless instant vtotal delta
- Refactor dcn401_update_clocks
- Reduce I2C speed to 95kHz in DCN401
- Allow higher DSC slice support for small timings on dcn401
- Don't offload flip if not only address update
- Check UHBR13.5 cap when determining max link cap
- Enable SYMCLK gating in DCCG
- Expand to higher link rates
- Add left edge pixel for YCbCr422/420 + ODM pipe split
- Add resource interfaces for get ODM slice rect
- Add COEF filter types for DCN401
- Refactor DCN401 DCCG into component directory
- Fix 3dlut size for Fastloading on DCN401
- Fix write to non-existent reg on DCN401
- Remove USBC check for DCN32
- Remove unused code for some dc files
- Disable AC/DC codepath when unnecessary
- Create dcn401_clk_mgr struct

Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Read default boot options
Duncan Ma [Mon, 22 Apr 2024 14:17:11 +0000 (10:17 -0400)]
drm/amd/display: Read default boot options

[WHY]
DPIA boot option is set by VBIOS. It gets
overwritten when driver loads DMU.

[HOW]
Read PreOS boot options and determine if
dpia is enabled.

Reviewed-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Duncan Ma <duncan.ma@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Find max flickerless instant vtotal delta
Ethan Bitnun [Mon, 1 Apr 2024 17:50:10 +0000 (13:50 -0400)]
drm/amd/display: Find max flickerless instant vtotal delta

[WHAT & HOW]
 - Populate dml 2 callback with get_max_flickerless_instant_vtotal_increase
 - Use long long when necessary to prevent overflow
 - Add asic specific default values, currently disabled by
   default for every asic
 - Use the pre-existing debug option to protect the call to
   get_max_flickerless_instant_vtotal_increase

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ethan Bitnun <etbitnun@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Refactor dcn401_update_clocks
Dillon Varone [Tue, 26 Mar 2024 22:44:34 +0000 (18:44 -0400)]
drm/amd/display: Refactor dcn401_update_clocks

[WHY & HOW]
Refactor complex code into manageable functions. This also cleans up
some updating logics.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Dillon Varone <dillon.varone@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Reduce I2C speed to 95kHz in DCN401
Chris Park [Wed, 1 May 2024 03:06:12 +0000 (23:06 -0400)]
drm/amd/display: Reduce I2C speed to 95kHz in DCN401

[WHY]
HW for DCN401 is presented with a small I2C speed fluctuation that
exceeds the hard cap limitation of 100kHz occasionally. This violates
compliance requirement and will result in failure in compliance.

[HOW]
After various measurements and traceback to previous generation HW, DCN IP,
SI and SW driver agrees that we can reduce I2C speed to 95kHz to address
the I2C spped fluctuation in DCN401.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Chris Park <chris.park@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Allow higher DSC slice support for small timings on dcn401
Wenjing Liu [Mon, 29 Apr 2024 16:11:05 +0000 (12:11 -0400)]
drm/amd/display: Allow higher DSC slice support for small timings on dcn401

[WHY]
DML2.1 has added the support to determine ODM combine based on DSC slice
count limitation. This support would allow us to support DSC slice higher
than 4 on small timings. The change will allow higher DSC slice support
independent from pixel clock in use.

[HOW]
Add a DCN401 get_enc_caps function to allow the support for DSC slice count
higher than 4.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Don't offload flip if not only address update
Alvin Lee [Mon, 29 Apr 2024 21:39:35 +0000 (17:39 -0400)]
drm/amd/display: Don't offload flip if not only address update

[WHAT & HOW]
Fast updates can consist of some stream updates as well (i.e., out_csc).
In these cases we should not offload the flip to FW as we can only
offload address only updates to FW.

Reviewed-by: Chris Park <chris.park@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Check UHBR13.5 cap when determining max link cap
George Shen [Tue, 23 Apr 2024 20:59:43 +0000 (16:59 -0400)]
drm/amd/display: Check UHBR13.5 cap when determining max link cap

[WHY]
UHBR13.5 support is optional, even if UHBR20 is supported by the device.
If source supports max UHBR13.5 while sink, cable and LTTPR support
UHBR20 but not UHBR13.5, UHBR10 should be used as the max link cap.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: George Shen <george.shen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Enable SYMCLK gating in DCCG
Daniel Miess [Tue, 23 Apr 2024 19:45:59 +0000 (15:45 -0400)]
drm/amd/display: Enable SYMCLK gating in DCCG

[WHY & HOW]
Enable root clock optimization for SYMCLK and only
disable it when it's actively used.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Daniel Miess <daniel.miess@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Expand to higher link rates
Sung Joon Kim [Fri, 26 Apr 2024 19:08:06 +0000 (15:08 -0400)]
drm/amd/display: Expand to higher link rates

[WHY & HOW]
To support higher link rates that sink allows, we need to make
sure driver is ready and perform correct link-training sequence.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Sung Joon Kim <sungjoon.kim@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Add left edge pixel for YCbCr422/420 + ODM pipe split
Wenjing Liu [Thu, 25 Apr 2024 16:13:24 +0000 (12:13 -0400)]
drm/amd/display: Add left edge pixel for YCbCr422/420 + ODM pipe split

[WHY]
Currently 3-tap chroma subsampling is used for YCbCr422/420. When ODM
pipesplit is used, pixels on the left edge of ODM slices need one extra
pixel from the right edge of the previous slice to calculate the correct
chroma value.

Without this change, the chroma value is slightly different than
expected. This is usually imperceptible visually, but it impacts test
pattern CRCs for compliance test automation.

[HOW]
Update logic to use the register for adding extra left edge pixel for
YCbCr422/420 ODM cases.

Reviewed-by: George Shen <george.shen@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Add resource interfaces for get ODM slice rect
Wenjing Liu [Thu, 25 Apr 2024 14:36:44 +0000 (10:36 -0400)]
drm/amd/display: Add resource interfaces for get ODM slice rect

[WHY]
We need an unified location to perform ODM slice rect calculation.

[HOW]
Add three interfaces for ODM slice rect/width calucaltion in resource.h

Reviewed-by: George Shen <george.shen@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Add COEF filter types for DCN401
Samson Tam [Fri, 26 Apr 2024 16:17:26 +0000 (12:17 -0400)]
drm/amd/display: Add COEF filter types for DCN401

Add VERTICAL_BLUR_SCALE & HORIZONTAL_BLUR_SCALE types.

Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Samson Tam <samson.tam@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Refactor DCN401 DCCG into component directory
Revalla Hari Krishna [Mon, 22 Apr 2024 10:04:02 +0000 (15:34 +0530)]
drm/amd/display: Refactor DCN401 DCCG into component directory

[WHY]
Clean up the code that requires dccg to be in its own component.

[HOW]
Move all files under newly created dccg dir and fix the makefiles.

Acked-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Revalla Hari Krishna <Harikrishna.Revalla@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Fix 3dlut size for Fastloading on DCN401
Adam Nelson [Tue, 9 Apr 2024 21:38:44 +0000 (17:38 -0400)]
drm/amd/display: Fix 3dlut size for Fastloading on DCN401

[WHY]
After a non-3dlut test the MPCC_MCM_3DLUT_MODE::MPCC_MCM_3DLUT_SIZE is
incorrect.

[HOW]
Add register write to make valid.

Acked-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Adam Nelson <adnelson@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Fix write to non-existent reg on DCN401
Ilya Bakoulin [Tue, 9 Apr 2024 18:04:19 +0000 (14:04 -0400)]
drm/amd/display: Fix write to non-existent reg on DCN401

DP_DSC_CNTL no longer exists on DCN401.

Acked-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Remove USBC check for DCN32
Rodrigo Siqueira [Thu, 2 May 2024 23:39:19 +0000 (17:39 -0600)]
drm/amd/display: Remove USBC check for DCN32

The CONNECTOR_ID_USBC check was removed to fix a regression, but it was
re-introduced by accident. This commit drops the USBC that causes the
regressions.

Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Remove unused code for some dc files
Rodrigo Siqueira [Thu, 2 May 2024 23:33:22 +0000 (17:33 -0600)]
drm/amd/display: Remove unused code for some dc files

Cleanup unused code in DC.

Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Disable AC/DC codepath when unnecessary
Joshua Aberback [Thu, 28 Mar 2024 17:43:36 +0000 (13:43 -0400)]
drm/amd/display: Disable AC/DC codepath when unnecessary

[WHY]
If there are no DC clock limits present, or if the DC limits are the same
as the AC limits, we can disable the AC/DC codepath as there won't be any
validation differences between the two modes.

[HOW]
When all DC power mode clock limits are the same as the max clock
values, there won't be any difference between AC mode and DC mode. Zero
out DC limits that equal max and provide a new cap to indicate the
presence of any non-zero DC mode limit. In summary:
 - zero out DC limits that are the same as max clock value
 - new dc cap to indicate the presence of DC mode limits
 - set limits present if any clock has distinct AC and DC values from SMU

Acked-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/display: Create dcn401_clk_mgr struct
Dillon Varone [Tue, 23 Apr 2024 02:08:58 +0000 (22:08 -0400)]
drm/amd/display: Create dcn401_clk_mgr struct

Create dcn401 specific structure to encapsulate version specific
variables.

Acked-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Dillon Varone <dillon.varone@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/umsch: add support to capture fw debug log
Saleemkhan Jamadar [Thu, 25 Apr 2024 12:56:43 +0000 (18:26 +0530)]
drm/amdgpu/umsch: add support to capture fw debug log

Added support to capture unsch fw debug logs in debugfs.
To enable set amdgpu_umschfw_log =1 in boot args.

v1 - rename variable to umsch_mm_fwlog (Veera)

Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Reviewed-by: Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amd/amdgpu: update jpeg 5 capability
David (Ming Qiang) Wu [Thu, 9 May 2024 20:57:56 +0000 (16:57 -0400)]
drm/amd/amdgpu: update jpeg 5 capability

Based on the documentation the maximum resolustion should
be 16384x16384.

Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/vcn: set VCN5 power gating state to GATE on suspend
David (Ming Qiang) Wu [Thu, 9 May 2024 19:44:04 +0000 (15:44 -0400)]
drm/amdgpu/vcn: set VCN5 power gating state to GATE on suspend

On suspend, we need to set power gating state to GATE when
VCN5 is busy, otherwise we will get following error on resume:

[drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring vcn_unified_0 test failed (-110)
[drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block <vcn_v5_0_0> failed -110
amdgpu: amdgpu_device_ip_resume failed (-110).
PM: dpm_run_callback(): pci_pm_resume+0x0/0x100 returns -110
PM: failed to resume async: error -110

Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/vcn: remove irq disabling in vcn 5 suspend
David (Ming Qiang) Wu [Thu, 9 May 2024 17:40:10 +0000 (13:40 -0400)]
drm/amdgpu/vcn: remove irq disabling in vcn 5 suspend

We do not directly enable/disable VCN IRQ in vcn 5.0.0.
And we do not handle the IRQ state as well. So the calls to
disable IRQ and set state are removed. This effectively gets
rid of the warining of
      "WARN_ON(!amdgpu_irq_enabled(adev, src, type))"
in amdgpu_irq_put().

Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 months agodrm/amdgpu/pm: Check input value for power profile setting on smu11, smu13 and smu14
Ma Jun [Wed, 8 May 2024 08:39:29 +0000 (16:39 +0800)]
drm/amdgpu/pm: Check input value for power profile setting on smu11, smu13 and smu14

Check the input value for CUSTOM profile mode setting on smu 11,
smu13 and smu14. Otherwise we use uninitialized value of input[]

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>