Re: [PATCH v2] drm/amdkfd: Initialize kfd_gpu_cache_info for KFD topology

2024-02-06 Thread Felix Kuehling
On 2024-02-07 0:32, Joseph Greathouse wrote: The current kfd_gpu_cache_info structure is only partially filled in for some architectures. This means that for devices where we do not fill in some fields, we can returned uninitialized values through the KFD topology. Zero out the

[PATCH v2] drm/amdkfd: Initialize kfd_gpu_cache_info for KFD topology

2024-02-06 Thread Joseph Greathouse
The current kfd_gpu_cache_info structure is only partially filled in for some architectures. This means that for devices where we do not fill in some fields, we can returned uninitialized values through the KFD topology. Zero out the kfd_gpu_cache_info before asking the remaining fields to be

[PATCH] drm/amd/display: Fix possible use of uninitialized 'max_chunks_fbc_mode' in 'calculate_bandwidth()'

2024-02-06 Thread Srinivasan Shanmugam
'max_chunks_fbc_mode' is only declared and assigned a value under a specific condition in the following lines: if (data->fbc_en[i] == 1) { max_chunks_fbc_mode = 128 - dmif_chunk_buff_margin; } If 'data->fbc_en[i]' is not equal to 1 for any i, max_chunks_fbc_mode will not be initialized

[PATCH] drm/amd/display: Fix possible buffer overflow in 'find_dcfclk_for_voltage()'

2024-02-06 Thread Srinivasan Shanmugam
when 'find_dcfclk_for_voltage()' function is looping over VG_NUM_SOC_VOLTAGE_LEVELS (which is 8), but the size of the DcfClocks array is VG_NUM_DCFCLK_DPM_LEVELS (which is 7). When the loop variable i reaches 7, the function tries to access clock_table->DcfClocks[7]. However, since the size of

[PATCH] drm/amd/display: Fix possible NULL dereference on device remove/driver unload

2024-02-06 Thread Srinivasan Shanmugam
As part of a cleanup amdgpu_dm_fini() function, which is typically called when a device is being shut down or a driver is being unloaded The below error message suggests that there is a potential null pointer dereference issue with adev->dm.dc. In the below, line of code where adev->dm.dc is

[PATCH] drm/amd/display: Initialize 'wait_time_microsec' variable in link_dp_training_dpia.c

2024-02-06 Thread Srinivasan Shanmugam
wait_time_microsec = max(wait_time_microsec, (uint32_t) DPIA_CLK_SYNC_DELAY); Above line is trying to assign the maximum value between 'wait_time_microsec' and 'DPIA_CLK_SYNC_DELAY' to wait_time_microsec. However, 'wait_time_microsec' has not been assigned a value before this line, initialize

RE: [PATCH] drm/amdgpu/soc21: update VCN 4 max HEVC encoding resolution

2024-02-06 Thread Deucher, Alexander
[AMD Official Use Only - General] > -Original Message- > From: amd-gfx On Behalf Of Thong > Sent: Tuesday, February 6, 2024 6:28 PM > To: amd-gfx@lists.freedesktop.org > Cc: Thai, Thong > Subject: [PATCH] drm/amdgpu/soc21: update VCN 4 max HEVC encoding > resolution > > Update the

RE: [PATCH] drm/amdgpu: Fix HDP flush for VFs on nbio v7.9

2024-02-06 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Lazar, Lijo Sent: Wednesday, February 7, 2024 10:22 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander ; Ming, Davis ; Kamal, Asad ; Ma, Le Subject: [PATCH]

[PATCH] drm/amdgpu: Fix HDP flush for VFs on nbio v7.9

2024-02-06 Thread Lijo Lazar
HDP flush remapping is not done for VFs. Keep the original offsets in VF environment. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c

[PATCH] drm/amdgpu/soc21: update VCN 4 max HEVC encoding resolution

2024-02-06 Thread Thong
Update the maximum resolution reported for HEVC encoding on VCN 4 devices to reflect its 8K encoding capability. Signed-off-by: Thong --- drivers/gpu/drm/amd/amdgpu/soc21.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c

Re: [PATCH] drm/amd: Set s0i3/s3 in prepare() callback instead of suspend() callback

2024-02-06 Thread Mario Limonciello
On 2/6/2024 16:00, Deucher, Alexander wrote: [AMD Official Use Only - General] -Original Message- From: amd-gfx On Behalf Of Mario Limonciello Sent: Tuesday, February 6, 2024 4:32 PM To: amd-gfx@lists.freedesktop.org Cc: Limonciello, Mario ; Jürg Billeter Subject: [PATCH] drm/amd:

RE: [PATCH] drm/amd: Set s0i3/s3 in prepare() callback instead of suspend() callback

2024-02-06 Thread Deucher, Alexander
[AMD Official Use Only - General] > -Original Message- > From: amd-gfx On Behalf Of Mario > Limonciello > Sent: Tuesday, February 6, 2024 4:32 PM > To: amd-gfx@lists.freedesktop.org > Cc: Limonciello, Mario ; Jürg Billeter > > Subject: [PATCH] drm/amd: Set s0i3/s3 in prepare() callback

[PATCH] drm/amd: Set s0i3/s3 in prepare() callback instead of suspend() callback

2024-02-06 Thread Mario Limonciello
commit 5095d5418193 ("drm/amd: Evict resources during PM ops prepare() callback") intentionally moved the eviction of resources to earlier in the suspend process, but this introduced a subtle change that it occurs before adev->in_s0ix or adev->in_s3 are set. This meant that APUs actually started

RE: [PATCH] drm/amdkfd: Initialize kfd_gpu_cache_info for KFD topology

2024-02-06 Thread Deucher, Alexander
[AMD Official Use Only - General] > -Original Message- > From: Kuehling, Felix > Sent: Tuesday, February 6, 2024 4:15 PM > To: Greathouse, Joseph ; amd- > g...@lists.freedesktop.org; Deucher, Alexander > > Subject: Re: [PATCH] drm/amdkfd: Initialize kfd_gpu_cache_info for KFD > topology

RE: [PATCH v2] drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3

2024-02-06 Thread Errabolu, Ramesh
[AMD Official Use Only - General] Looks fine by me Regards, Ramesh -Original Message- From: amd-gfx On Behalf Of Kent Russell Sent: Wednesday, February 7, 2024 3:02 AM To: amd-gfx@lists.freedesktop.org Cc: Joshi, Mukul ; Russell, Kent Subject: [PATCH v2] drm/amdkfd: Fix L2 cache size

[PATCH v2] drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3

2024-02-06 Thread Kent Russell
Its currently incorrectly multiplied by number of XCCs in the partition Fixes: 6b537864925e ("drm/amdkfd: Update cache info for GFX 9.4.3") Signed-off-by: Kent Russell --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

Re: drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole (v2)

2024-02-06 Thread Deucher, Alexander
[AMD Official Use Only - General] The firmware has not been released yet, It's still undergoing regression testing. Alex From: Shengyu Qu Sent: Tuesday, February 6, 2024 5:08 AM To: Deucher, Alexander; Kuehling, Felix; amd-gfx@lists.freedesktop.org Cc:

RE: [PATCH] drm/amdkfd: Don't divide L2 cache by partition mode

2024-02-06 Thread Russell, Kent
[AMD Official Use Only - General] Oh excellent, it didn't get merged in yet. Time to squash! Kent > -Original Message- > From: Kuehling, Felix > Sent: Tuesday, February 6, 2024 4:29 PM > To: Russell, Kent ; amd-gfx@lists.freedesktop.org > Cc: Joshi, Mukul > Subject: Re: [PATCH]

Re: [PATCH] drm/amdkfd: Don't divide L2 cache by partition mode

2024-02-06 Thread Felix Kuehling
On 2024-02-06 16:24, Kent Russell wrote: Partition mode only affects L3 cache size. After removing the L2 check in the previous patch, make sure we aren't dividing all cache sizes by partition mode, just L3. Fixes: a75bfb3c4045 ("drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3") The fixes

[PATCH] drm/amdkfd: Don't divide L2 cache by partition mode

2024-02-06 Thread Kent Russell
Partition mode only affects L3 cache size. After removing the L2 check in the previous patch, make sure we aren't dividing all cache sizes by partition mode, just L3. Fixes: a75bfb3c4045 ("drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3") Signed-off-by: Kent Russell ---

Re: [PATCH] drm/amdkfd: Initialize kfd_gpu_cache_info for KFD topology

2024-02-06 Thread Felix Kuehling
On 2024-02-06 15:55, Joseph Greathouse wrote: The current kfd_gpu_cache_info structure is only partially filled in for some architectures. This means that for devices where we do not fill in some fields, we can returned uninitialized values through the KFD topology. Zero out the

RE: [PATCH] drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3

2024-02-06 Thread Errabolu, Ramesh
[AMD Official Use Only - General] Comments inline. Regards, Ramesh -Original Message- From: amd-gfx On Behalf Of Joshi, Mukul Sent: Wednesday, February 7, 2024 1:36 AM To: Russell, Kent ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdkfd: Fix L2 cache size reporting in

[PATCH] drm/amdkfd: Initialize kfd_gpu_cache_info for KFD topology

2024-02-06 Thread Joseph Greathouse
The current kfd_gpu_cache_info structure is only partially filled in for some architectures. This means that for devices where we do not fill in some fields, we can returned uninitialized values through the KFD topology. Zero out the kfd_gpu_cache_info before asking the remaining fields to be

[PATCH 2/3] drm/amdgpu: Add hdp v7_0 ip block support

2024-02-06 Thread Alex Deucher
From: Likun Gao Add hdp v7_0 ip block support. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c | 142 ++ drivers/gpu/drm/amd/amdgpu/hdp_v7_0.h |

[PATCH 3/3] drm/amdgpu/discovery: Add hdp v7_0 ip block

2024-02-06 Thread Alex Deucher
From: Likun Gao Add hdp v7_0 ip block Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 0/3] HDP 7.0 Support

2024-02-06 Thread Alex Deucher
This series adds support for HDP 7.0. HDP (Host Data Path), provides CPU access to device memory via the PCI BAR. Patch 1 adds the register headers and is very large, so I've omitted it. Hawking Zhang (1): drm/amdgpu: Add hdp v7_0_0 ip headers (v3) Likun Gao (2): drm/amdgpu: Add hdp v7_0

[PATCH 3/3] drm/amdgpu/discovery: Add ih v7_0 ip block

2024-02-06 Thread Alex Deucher
From: Likun Gao Add ih v7_0 ip block. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 2/3] drm/amdgpu: Add ih v7_0 ip block support

2024-02-06 Thread Alex Deucher
From: Likun Gao Add ih v7_0 ip block support. Signed-off-by: Likun Gao Signed-off-by: Hawking Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 766 +++

[PATCH 0/3] IH 7.0 support

2024-02-06 Thread Alex Deucher
This series adds support for IH 7.0.x. IH is the interrupt handler on the GPU. Interrupts are written to a ring buffer and the driver walks the ring buffer handling the interrupt packets. Patch 1 adds the new register headers and is very large, so I've omitted it. Hawking Zhang (1):

[PATCH 2/3] drm/amdgpu: Add lsdma v7_0 ip block support

2024-02-06 Thread Alex Deucher
From: Likun Gao Add lsdma v7_0 ip block support. Signed-off-by: Likun Gao Signed-off-by: Hawking Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.c | 121

[PATCH 3/3] drm/amdgpu/discovery: Add lsdma v7_0 ip block

2024-02-06 Thread Alex Deucher
From: Likun Gao Add lsdma v7_0 ip block. v2: squash in updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 0/3] LSDMA 7.0 support

2024-02-06 Thread Alex Deucher
LSDMA (Light SDMA) is a general purpose SDMA engine on the GPU. The driver uses it for MMIO-controlled DMA access to GPU accessible memory. This adds support for ASICs containing LSDMA version 7.0.x. The first patch adds the register headers and is very large, so I've omitted it. Hawking Zhang

[PATCH 2/2] drm/amdgpu: Add athub v4_1_0 ip block support

2024-02-06 Thread Alex Deucher
From: Hawking Zhang Add athub v4_1_0 ip block support. Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/athub_v4_1_0.c | 121 ++

[PATCH 0/2] Add ATHUB 4.1 support

2024-02-06 Thread Alex Deucher
This adds support for ATHUB 4.1.x. The driver's interaction with this hardware is largely limited to enabling clockgating features. The first just adds the register headers and is large, so I've omitted it. Hawking Zhang (2): drm/amdgpu: Add athub v4_1_0 ip headers (v5) drm/amdgpu: Add

[PATCH] drm/amdgpu: skip ucode bo reserve for RLC AUTOLOAD

2024-02-06 Thread Alex Deucher
From: Likun Gao Skip ucode BO reservation for backdoor RLC autoload. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/amdkfd: fill in data for control stack header for gfx10

2024-02-06 Thread Alex Deucher
From: Jonathan Kim The debugger requires the control stack header to be filled in to update_waves. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Jonathan Kim Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h | 25 1

[PATCH] drm/amd/swsmu: add judgement for vcn jpeg dpm set

2024-02-06 Thread Alex Deucher
From: Likun Gao Only enable VCN/JPEG dpm when VCN/JPEG PG flag was set when smu set dpm table. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 30 +++ 1 file changed, 20 insertions(+), 10

[PATCH] drm/amdgpu: support rlc auotload type set

2024-02-06 Thread Alex Deucher
From: Likun Gao Support to set fw_load_type=3 to use backdoor rlc autoload. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

RE: [PATCH] drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3

2024-02-06 Thread Joshi, Mukul
[AMD Official Use Only - General] The commit description needs a Fixes tag of the offending commit. With that fixed, this patch is: Reviewed-by: Mukul Joshi > -Original Message- > From: Russell, Kent > Sent: Tuesday, February 6, 2024 1:06 PM > To: amd-gfx@lists.freedesktop.org > Cc:

Re: [PATCH v2] amdkfd: pass debug exceptions to second-level trap handler

2024-02-06 Thread Deucher, Alexander
[AMD Official Use Only - General] Acked-by: Alex Deucher From: amd-gfx on behalf of Laurent Morichetti Sent: Thursday, February 1, 2024 4:33 PM To: amd-gfx@lists.freedesktop.org Cc: jay.cornwall@amd.com ; Morichetti, Laurent ; Six, Lancelot ; Cornwall,

Re: [PATCH v3 1/5] ACPI: video: Handle fetching EDID that is longer than 256 bytes

2024-02-06 Thread Rafael J. Wysocki
On Fri, Feb 2, 2024 at 5:09 PM Mario Limonciello wrote: > > On 2/2/2024 10:07, Rafael J. Wysocki wrote: > > On Thu, Feb 1, 2024 at 11:11 PM Mario Limonciello > > wrote: > >> > >> The ACPI specification allows for an EDID to be up to 512 bytes but > >> the _DDC EDID fetching code will only try up

Re: [PATCH 3/3] drm/amdgpu: wire up the can_remove() callback

2024-02-06 Thread Christian König
Am 06.02.24 um 15:29 schrieb Daniel Vetter: On Fri, Feb 02, 2024 at 03:40:03PM -0800, Greg Kroah-Hartman wrote: On Fri, Feb 02, 2024 at 05:25:56PM -0500, Hamza Mahfooz wrote: Removing an amdgpu device that still has user space references allocated to it causes undefined behaviour. Then fix

RE: [PATCH v2] drm/amd/display: Implement bounds check for stream encoder creation in DCN301

2024-02-06 Thread Li, Roman
[Public] Inline. > -Original Message- > From: SHANMUGAM, SRINIVASAN > Sent: Monday, February 5, 2024 10:47 PM > To: Li, Roman ; Siqueira, Rodrigo > ; Pillai, Aurabindo > Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM, SRINIVASAN > > Subject: [PATCH v2] drm/amd/display: Implement bounds

[PATCH] drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3

2024-02-06 Thread Kent Russell
Its currently incorrectly multiplied by number of XCCs in the partition Signed-off-by: Kent Russell --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c

Re: [PATCH] drm/amd/display: Clear phantom stream count and plane count

2024-02-06 Thread Harry Wentland
On 2024-02-05 08:54, Deucher, Alexander wrote: > [Public] > > > [Public] > > > Acked-by: Alex Deucher > Reviewed-by: Harry Wentland Harry

[PATCH v4 12/24] drm/amdgpu: use trapID 4 for host trap

2024-02-06 Thread James Zhu
Since TRAPSTS.HOST_TRAP won't work pre-gfx943, so use TTMP1 (bit 24: HT) and (bit 16-23: trapID) to identify the host trap. Signed-off-by: James Zhu --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c |2 + .../gpu/drm/amd/amdkfd/cwsr_trap_handler.h| 2117 +

[PATCH v4 21/24] drm/amdkfd: add pc sampling thread to trigger trap

2024-02-06 Thread James Zhu
Add a kthread to trigger pc sampling trap. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c | 91 +++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 1 + 2 files changed, 89 insertions(+), 3 deletions(-) diff --git

[PATCH v4 22/24] drm/amdkfd: add pc sampling release when process release

2024-02-06 Thread James Zhu
Add pc sampling release when process release, it will force to stop all activate sessions with this process. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c | 25 drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.h | 1 +

[PATCH v4 23/24] drm/amdkfd: Set debug trap bit when enabling PC Sampling

2024-02-06 Thread James Zhu
From: David Yat Sin We need the SPI_GDBG_PER_VMID_CNTL.TRAP_EN bit to be set during PC Sampling so that the TTMP registers are valid inside the sampling data. runtime_info.ttmp_setup will be cleared when the user application does the AMDKFD_IOC_RUNTIME_ENABLE ioctl without

[PATCH v4 24/24] drm/amdkfd: bump kfd ioctl minor version for pc sampling availability

2024-02-06 Thread James Zhu
Bump the minor version to declare pc sampling feature is now available. Signed-off-by: James Zhu --- include/uapi/linux/kfd_ioctl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index

[PATCH v4 15/24] drm/amdkfd: trigger pc sampling trap for aldebaran

2024-02-06 Thread James Zhu
Implement trigger pc sampling trap for aldebaran. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c

[PATCH v4 18/24] drm/amdkfd: enable pc sampling stop

2024-02-06 Thread James Zhu
Enable pc sampling stop. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c | 29 ++-- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 4 +++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c

[PATCH v4 19/24] drm/amdkfd: add queue remapping

2024-02-06 Thread James Zhu
Add queue remapping to ensure that any waves executing the PC sampling part of the trap handler are done before kfd_pc_sample_stop returns, and that no new waves enter that part of the trap handler afterwards. This avoids race conditions that could lead to use-after-free. Unmapping and remapping

[PATCH v4 09/24] drm/amdkfd: add interface to trigger pc sampling trap

2024-02-06 Thread James Zhu
Add interface to trigger pc sampling trap. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h index

[PATCH v4 17/24] drm/amdkfd: add setting trap pc sampling flag

2024-02-06 Thread James Zhu
Add setting trap pc sampling flag. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 13 + 2 files changed, 15 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h

[PATCH v4 05/24] drm/amdkfd: enable pc sampling create

2024-02-06 Thread James Zhu
From: David Yat Sin Enable pc sampling create. Co-developed-by: James Zhu Signed-off-by: James Zhu Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c | 59 +++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 10 2 files changed, 68

[PATCH v4 11/24] drm/amdkfd/gfx9: enable host trap

2024-02-06 Thread James Zhu
Enable host trap. Signed-off-by: James Zhu --- .../gpu/drm/amd/amdkfd/cwsr_trap_handler.h| 63 +++ .../drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 24 --- 2 files changed, 52 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h

[PATCH v4 06/24] drm/amdkfd: add trace_id return

2024-02-06 Thread James Zhu
Add trace_id return for new pc sampling creation per device, Use IDR to quickly locate pc_sampling_entry for reference. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c | 20 +++-

[PATCH v4 16/24] drm/amdkfd: use bit operation set debug trap

2024-02-06 Thread James Zhu
1st level TMA's 2nd byte which used for trap type setting, to use bit operation to change selected bit only. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCH v4 20/24] drm/amdkfd: enable pc sampling start

2024-02-06 Thread James Zhu
Enable pc sampling start. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c | 27 +--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c b/drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c index

[PATCH v4 14/24] drm/amdkfd: trigger pc sampling trap for arcturus

2024-02-06 Thread James Zhu
Implement trigger pc sampling trap for arcturus. Signed-off-by: James Zhu --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c| 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c

[PATCH v4 01/24] drm/amdkfd/kfd_ioctl: add pc sampling support

2024-02-06 Thread James Zhu
From: David Yat Sin Add pc sampling support in kfd_ioctl. The user mode code which uses this new kfd_ioctl is linked to https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface with master branch. Co-developed-by: James Zhu Signed-off-by: James Zhu Signed-off-by: David Yat Sin ---

[PATCH v4 08/24] drm/amdkfd: enable pc sampling destroy

2024-02-06 Thread James Zhu
Enable pc sampling destroy. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c b/drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c index

[PATCH v4 10/24] drm/amdkfd: trigger pc sampling trap for gfx v9

2024-02-06 Thread James Zhu
Implement trigger pc sampling trap for gfx v9. Signed-off-by: James Zhu --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 36 +++ .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h | 7 2 files changed, 43 insertions(+) diff --git

[PATCH v4 13/24] drm/amdgpu: add sq host trap status check

2024-02-06 Thread James Zhu
Before fire a new host trap, check the host trap status. Signed-off-by: James Zhu --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 35 +++ .../amd/include/asic_reg/gc/gc_9_0_offset.h | 2 ++ .../amd/include/asic_reg/gc/gc_9_0_sh_mask.h | 5 +++ 3 files changed, 42

[PATCH v4 07/24] drm/amdkfd: check pcs_entry valid

2024-02-06 Thread James Zhu
Check pcs_entry valid for pc sampling ioctl. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c | 33 ++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c

[PATCH v4 04/24] drm/amdkfd: add pc sampling mutex

2024-02-06 Thread James Zhu
Add pc sampling mutex per node, and do init/destroy in node init. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 12 drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 7 +++ 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c

[PATCH v4 03/24] drm/amdkfd: enable pc sampling query

2024-02-06 Thread James Zhu
From: David Yat Sin Enable pc sampling to query system capability. Co-developed-by: James Zhu Signed-off-by: James Zhu Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/kfd_pc_sampling.c | 65 +++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git

[PATCH v4 02/24] drm/amdkfd: add pc sampling support

2024-02-06 Thread James Zhu
From: David Yat Sin Add pc sampling functions in amdkfd. Co-developed-by: James Zhu Signed-off-by: James Zhu Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdkfd/Makefile | 3 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 45 +++

[PATCH v4 00/24] Support Host Trap Sampling for gfx941/gfx942

2024-02-06 Thread James Zhu
PC sampling is a form of software profiling, where the threads of an application are periodically interrupted and the program counter that the threads are currently attempting to execute is saved out for profiling. David Yat Sin (5): drm/amdkfd/kfd_ioctl: add pc sampling support drm/amdkfd:

Re: [PATCH] drm/amd/display: Increase frame-larger-than for all display_mode_vba files

2024-02-06 Thread Alex Deucher
Applied. Thanks! On Mon, Feb 5, 2024 at 5:08 PM Nathan Chancellor wrote: > > After a recent change in LLVM, allmodconfig (which has CONFIG_KCSAN=y > and CONFIG_WERROR=y enabled) has a few new instances of > -Wframe-larger-than for the mode support and system configuration > functions: > > >

Re: [PATCH 3/3] drm/amdgpu: wire up the can_remove() callback

2024-02-06 Thread Daniel Vetter
On Fri, Feb 02, 2024 at 03:40:03PM -0800, Greg Kroah-Hartman wrote: > On Fri, Feb 02, 2024 at 05:25:56PM -0500, Hamza Mahfooz wrote: > > Removing an amdgpu device that still has user space references allocated > > to it causes undefined behaviour. > > Then fix that please. There should not be

Re: [PATCH v2 3/3] drm/amdgpu: sync page table freeing with tlb flush

2024-02-06 Thread Sharma, Shashank
Hey Christian, On 01/02/2024 14:48, Christian König wrote: Am 31.01.24 um 18:14 schrieb Shashank Sharma: This patch: - Attaches the TLB flush fence to the PT objects being freed - Adds a new ptr in VM to save this last TLB flush fence - Adds a new lock in VM to prevent out-of-context update

Re: linux-next: Tree for Feb 6 (gpu/drm/amd/display/ kernel-doc warnings)

2024-02-06 Thread Randy Dunlap
On 2/5/24 20:43, Stephen Rothwell wrote: > Hi all, > > Changes since 20240205: > Hi Rodrigo, Are you aware of these kernel-doc warnings? I think they are due to commit b8c1c3a82e75 Author: Rodrigo Siqueira Date: Mon Jan 22 14:24:57 2024 -0700 Documentation/gpu: Add kernel doc entry

[lvc-project] [PATCH v2] drm/amd/pm: check return value of amdgpu_irq_add_id()

2024-02-06 Thread Igor Artemiev
amdgpu_irq_ad_id() may fail and the irq handlers will not be registered. This patch adds error code check. Found by Linux Verification Center (linuxtesting.org). Signed-off-by: Igor Artemiev --- v2: Free the source as Alexey Khoroshilov suggested. .../drm/amd/pm/powerplay/hwmgr/smu_helper.c