Re: [PATCH] drm/amdgpu: Fix the iounmap error of rmmio

2024-03-15 Thread Christian König
Am 15.03.24 um 06:17 schrieb Ma Jun: Setting the rmmio pointer to NULL to fix the following iounmap error and calltrace. iounmap: bad address d0b3631f Fixes: 923f7a82d2e1 ("drm/amd/amdgpu: Fix potential ioremap() memory leaks in amdgpu_device_init()") Signed-off-by: Ma Jun --- driver

[PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2024-03-15 Thread Asad Kamal
Update PMFW interface headers for updated metrics table with pcie link speed and pcie link width Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmf

[PATCH v2 2/2] drm/amd/pm: Use metric table for pcie speed/width

2024-03-15 Thread Asad Kamal
Report pcie link speed/width using metric table in case of one vf & if pmfw support is available, else report directly from registers in case of pf. Skip reporting it for other cases. v2: Skip multi-vf check(Lijo) Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.

Re: [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-03-15 Thread Alison Schofield
On Fri, Feb 23, 2024 at 12:56:34PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > [ >This is a treewide change. I will likely re-create this patch again in >the second week of the merge window of v6.9 and submit it then. Hoping >to keep the conflicts that it will c

Re: [RFC PATCH v4 25/42] drm/vkms: Add tests for CTM handling

2024-03-15 Thread Pekka Paalanen
On Mon, 26 Feb 2024 16:10:39 -0500 Harry Wentland wrote: > A whole slew of tests for CTM handling that greatly helped in > debugging the CTM code. The extent of tests might seem a bit > silly but they're fast and might someday help save someone > else's day when debugging this. > > v4: > - Comm

Re: [RFC PATCH v4 23/42] drm/vkms: add 3x4 matrix in color pipeline

2024-03-15 Thread Pekka Paalanen
On Mon, 26 Feb 2024 16:10:37 -0500 Harry Wentland wrote: > We add two 3x4 matrices into the VKMS color pipeline. The reason > we're adding matrices is so that we can test that application > of a matrix and its inverse yields an output equal to the input > image. You will test also cases where th

Re: [RFC PATCH v4 24/42] drm/tests: Add a few tests around drm_fixed.h

2024-03-15 Thread Pekka Paalanen
On Mon, 26 Feb 2024 16:10:38 -0500 Harry Wentland wrote: > While working on the CTM implementation of VKMS I had to ascertain > myself of a few assumptions. One of those is whether drm_fixed.h > treats its numbers using signed-magnitude or twos-complement. It is > twos-complement. > > In order t

Re: [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-03-15 Thread Steven Rostedt
On Thu, 14 Mar 2024 09:57:57 -0700 Alison Schofield wrote: > On Fri, Feb 23, 2024 at 12:56:34PM -0500, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" > > > > [ > >This is a treewide change. I will likely re-create this patch again in > >the second week of the merge window of

Re: [PATCH] drm/amdgpu: fix deadlock while reading mqd from debugfs

2024-03-15 Thread Johannes Weiner
Hello, On Fri, Mar 08, 2024 at 12:32:33PM +0100, Christian König wrote: > Am 07.03.24 um 23:07 schrieb Johannes Weiner: > > Lastly I went with an open loop instead of a memcpy() as I wasn't > > sure if that memory is safe to address a byte at at time. Shashank pointed out to me in private that by

Re: [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2024-03-15 Thread Lazar, Lijo
On 3/15/2024 1:13 PM, Asad Kamal wrote: > Update PMFW interface headers for updated metrics table > with pcie link speed and pcie link width > > Signed-off-by: Asad Kamal Series is - Reviewed-by: Lijo Lazar Thanks, Lijo > --- > drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6

[PATCH 1/1] drm/amdgpu: drop setting buffer funcs in sdma442

2024-03-15 Thread Le Ma
To fix the entity rq NULL issue. This setting has been moved to upper level. Fixes b70438004a14 ("drm/amdgpu: move buffer funcs setting up a level") Signed-off-by: Le Ma --- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff

RE: [PATCH 1/1] drm/amdgpu: drop setting buffer funcs in sdma442

2024-03-15 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Ma, Le Sent: Friday, March 15, 2024 17:16 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Song, Asher ; Deucher, Alexander ; Ma, Le Subject: [PATCH 1/1] drm/amdgpu: drop setti

Re: [PATCH 1/1] drm/amdgpu: drop setting buffer funcs in sdma442

2024-03-15 Thread Lazar, Lijo
On 3/15/2024 2:46 PM, Le Ma wrote: > To fix the entity rq NULL issue. This setting has been moved to upper level. > Need to call amdgpu_ttm_set_buffer_funcs_status(adev, true/false) in mode-2 reset handlers as well. Thanks, Lijo > Fixes b70438004a14 ("drm/amdgpu: move buffer funcs setting up

Re: [PATCH 1/1] drm/amdgpu: drop setting buffer funcs in sdma442

2024-03-15 Thread Lazar, Lijo
On 3/15/2024 3:43 PM, Lazar, Lijo wrote: > > > On 3/15/2024 2:46 PM, Le Ma wrote: >> To fix the entity rq NULL issue. This setting has been moved to upper level. >> > > Need to call amdgpu_ttm_set_buffer_funcs_status(adev, true/false) in > mode-2 reset handlers as well. > Please also check

Re: [PATCH] drm/amdgpu: trigger flr_work if reading pf2vf data failed

2024-03-15 Thread Lazar, Lijo
On 3/14/2024 10:24 PM, Zhigang Luo wrote: > if reading pf2vf data failed 5 times continuously, it means something is > wrong. Need to trigger flr_work to recover the issue. > > also use dev_err to print the error message to get which device has > issue and add warning message if waiting IDH_FLR

[PATCH] drm/amdgpu: add the hw_ip version of all IP's

2024-03-15 Thread Sunil Khatri
Add all the IP's version information on a SOC to the devcoredump. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_

RE: [PATCH 1/1] drm/amdgpu: drop setting buffer funcs in sdma442

2024-03-15 Thread Ma, Le
[AMD Official Use Only - General] > -Original Message- > From: Lazar, Lijo mailto:lijo.la...@amd.com>> > Sent: Friday, March 15, 2024 6:14 PM > To: Ma, Le mailto:le...@amd.com>>; > amd-gfx@lists.freedesktop.org > Cc: Zhang, Hawking mailto:hawking.zh.

RE: [PATCH] drm/amdgpu: add the hw_ip version of all IP's

2024-03-15 Thread Khatri, Sunil
[AMD Official Use Only - General] Hello Alex Added the information directly from the ip_version and also added names for each ip so the version information makes more sense to the user. Below is the output in devcoredump now: IP Information SOC Family: 143 SOC Revision id: 0 SOC External Revisi

Re: [PATCH 1/1] drm/amdgpu: drop setting buffer funcs in sdma442

2024-03-15 Thread Lazar, Lijo
On 3/15/2024 5:45 PM, Ma, Le wrote: > [AMD Official Use Only - General] > >   >   >> -Original Message- >> From: Lazar, Lijo <_Lijo.Lazar@amd.com_ > >> Sent: Friday, March 15, 2024 6:14 PM >> To: Ma, Le <_Le.Ma@amd.com_ >; >> _amd-gfx@li

[PATCH 05/10] drivers: use new capable_any functionality

2024-03-15 Thread Christian Göttsche
Use the new added capable_any function in appropriate cases, where a task is required to have any of two capabilities. Reorder CAP_SYS_ADMIN last. Signed-off-by: Christian Göttsche Acked-by: Alexander Gordeev (s390 portion) --- v4: Additional usage in kfd_ioctl() v3: rename to capable_any

Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init

2024-03-15 Thread Alex Deucher
On Thu, Mar 14, 2024 at 9:40 PM Lee, Peyton wrote: > > [AMD Official Use Only - General] > > Hi Alex > > > I think it will continue to be powered up until a VPE job comes in and > > completes and the idle handler gets scheduled. If a VPE job doesn't come > > in, it will stay powered up I think.

Re: [PATCH] drm/amdgpu: add the hw_ip version of all IP's

2024-03-15 Thread Alex Deucher
On Fri, Mar 15, 2024 at 8:13 AM Sunil Khatri wrote: > > Add all the IP's version information on a SOC to the > devcoredump. > > Signed-off-by: Sunil Khatri This looks great. Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 62 +++ > 1 file cha

Re: [PATCH] drm/amdgpu: add the hw_ip version of all IP's

2024-03-15 Thread Khatri, Sunil
On 3/15/2024 6:45 PM, Alex Deucher wrote: On Fri, Mar 15, 2024 at 8:13 AM Sunil Khatri wrote: Add all the IP's version information on a SOC to the devcoredump. Signed-off-by: Sunil Khatri This looks great. Reviewed-by: Alex Deucher Thanks Alex --- drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH v6 1/2] drm/amdgpu: implement TLB flush fence

2024-03-15 Thread Shashank Sharma
From: Christian Koenig The problem is that when (for example) 4k pages are replaced with a single 2M page we need to wait for change to be flushed out by invalidating the TLB before the PT can be freed. Solve this by moving the TLB flush into a DMA-fence object which can be used to delay the fre

[PATCH v6 2/2] drm/amdgpu: sync page table freeing with tlb flush

2024-03-15 Thread Shashank Sharma
The idea behind this patch is to delay the freeing of PT entry objects until the TLB flush is done. This patch: - Adds a tlb_flush_waitlist in amdgpu_vm_update_params which will keep the objects that need to be freed after tlb_flush. - Adds PT entries in this list in amdgpu_vm_ptes_update after

Re: [PATCH v6 1/2] drm/amdgpu: implement TLB flush fence

2024-03-15 Thread Christian König
Am 15.03.24 um 14:25 schrieb Shashank Sharma: From: Christian Koenig The problem is that when (for example) 4k pages are replaced with a single 2M page we need to wait for change to be flushed out by invalidating the TLB before the PT can be freed. Solve this by moving the TLB flush into a DMA

Re: [PATCH] drm/sched: fix null-ptr-deref in init entity

2024-03-15 Thread Christian König
Am 15.03.24 um 03:39 schrieb vitaly.pros...@amd.com: From: Vitaly Prosyak The bug can be triggered by sending an amdgpu_cs_wait_ioctl to the AMDGPU DRM driver on any ASICs with valid context. The bug was reported by Joonkyo Jung . For example the following code: static void Syzkaller2(int

Re: [PATCH] drm/sched: fix null-ptr-deref in init entity

2024-03-15 Thread Alex Deucher
On Fri, Mar 15, 2024 at 10:12 AM Christian König wrote: > > Am 15.03.24 um 03:39 schrieb vitaly.pros...@amd.com: > > From: Vitaly Prosyak > > > > The bug can be triggered by sending an amdgpu_cs_wait_ioctl > > to the AMDGPU DRM driver on any ASICs with valid context. > > The bug was reported by J

Re: [PATCH] drm/sched: fix null-ptr-deref in init entity

2024-03-15 Thread Christian König
Am 15.03.24 um 15:12 schrieb Alex Deucher: On Fri, Mar 15, 2024 at 10:12 AM Christian König wrote: Am 15.03.24 um 03:39 schrieb vitaly.pros...@amd.com: From: Vitaly Prosyak The bug can be triggered by sending an amdgpu_cs_wait_ioctl to the AMDGPU DRM driver on any ASICs with valid context. T

Re: [PATCH 05/10] drivers: use new capable_any functionality

2024-03-15 Thread Felix Kuehling
On 2024-03-15 7:37, Christian Göttsche wrote: Use the new added capable_any function in appropriate cases, where a task is required to have any of two capabilities. Reorder CAP_SYS_ADMIN last. Signed-off-by: Christian Göttsche Acked-by: Alexander Gordeev (s390 portion) Acked-by: Felix Kuehl

[linux-next:master] BUILD REGRESSION a1e7655b77e3391b58ac28256789ea45b1685abb

2024-03-15 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: a1e7655b77e3391b58ac28256789ea45b1685abb Add linux-next specific files for 20240315 Error/Warning ids grouped by kconfigs: gcc_recent_errors |-- alpha-allyesconfig | |-- drivers-gpu-drm-amd

[PATCH] Documentation: add a page on amdgpu debugging

2024-03-15 Thread Alex Deucher
Covers GPU page fault debugging and adds a reference to umr. v2: update client ids to include SQC/G Signed-off-by: Alex Deucher --- Documentation/gpu/amdgpu/debugging.rst | 79 ++ Documentation/gpu/amdgpu/index.rst | 1 + 2 files changed, 80 insertions(+) create mo

[bug report] drm/amd/display: Add debug counters to IPS exit prints

2024-03-15 Thread Dan Carpenter
Hello Nicholas Kazlauskas, Commit 2dfaea1d715a ("drm/amd/display: Add debug counters to IPS exit prints") from Feb 21, 2024 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:1398 dc_dmub_srv_exit_low_power_state() error: un

[bug report] drm/amdgpu: add ring buffer information in devcoredump

2024-03-15 Thread Dan Carpenter
Hello Sunil Khatri, Commit 42742cc541bb ("drm/amdgpu: add ring buffer information in devcoredump") from Mar 11, 2024 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c:219 amdgpu_devcoredump_read() error: we previously ass

Re: [PATCH] Documentation: add a page on amdgpu debugging

2024-03-15 Thread Alex Deucher
On Fri, Mar 15, 2024 at 12:07 PM Alex Deucher wrote: > > Covers GPU page fault debugging and adds a reference > to umr. > > v2: update client ids to include SQC/G > > Signed-off-by: Alex Deucher > --- > Documentation/gpu/amdgpu/debugging.rst | 79 ++ > Documentation/gpu/a

[PATCH 0/2] drm/amdgpu/display: Make multi-plane configurations more flexible

2024-03-15 Thread sunpeng.li
From: Leo Li These patches aim to make the amdgpgu KMS driver play nicer with compositors when building multi-plane scanout configurations. They do so by: 1. Making cursor behavior more sensible. 2. Allowing placement of DRM OVERLAY planes underneath the PRIMARY plane for 'underlay' configura

[PATCH 1/2] drm/amd/display: Introduce overlay cursor mode

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

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

2024-03-15 Thread sunpeng.li
From: Leo Li [Why] Compositors have different ways of assigning surfaces to DRM planes for render offloading. It may decide between various strategies: overlay, underlay, or a mix of both One way for compositors to implement the underlay strategy is to assign a higher zpos to the DRM_PRIMARY pl

[PATCH] drm/amdkfd: Check cgroup when returning DMABuf info

2024-03-15 Thread Mukul Joshi
Check cgroup permissions when returning DMA-buf info and based on cgroup check return the id of the GPU that has access to the BO. Signed-off-by: Mukul Joshi --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/a

Re: Proposal to add CRIU support to DRM render nodes

2024-03-15 Thread Tvrtko Ursulin
On 15/03/2024 02:33, Felix Kuehling wrote: On 2024-03-12 5:45, Tvrtko Ursulin wrote: On 11/03/2024 14:48, Tvrtko Ursulin wrote: Hi Felix, On 06/12/2023 21:23, Felix Kuehling wrote: Executive Summary: We need to add CRIU support to DRM render nodes in order to maintain CRIU support for RO

Re: [bug report] drm/amdgpu: add ring buffer information in devcoredump

2024-03-15 Thread Khatri, Sunil
Thanks for pointing these. I do have some doubt and i raised inline. On 3/15/2024 8:46 PM, Dan Carpenter wrote: Hello Sunil Khatri, Commit 42742cc541bb ("drm/amdgpu: add ring buffer information in devcoredump") from Mar 11, 2024 (linux-next), leads to the following Smatch static checker warning

[PATCH v2 1/3] drm/amdgpu: function to read physical xcc_id

2024-03-15 Thread Samir Dhume
For SRIOV CPX mode, the assignments of jpeg doorbells depends on whether the VF is even/odd numbered. Physical xcc_id provides info whether the VF is even/odd. regCP_PSP_XCP_CTL is RO for VF through rlcg. Signed-off-by: Samir Dhume --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + drivers/gpu/

[PATCH v2 3/3] drm/amdgpu/jpeg: support for sriov cpx mode

2024-03-15 Thread Samir Dhume
In SRIOV CPX mode, each VF has 4 jpeg engines. The even- numbered VFs point to JPEG0 block of the AID and the odd- numbered VFs point to the JPEG1 block. Even-numbered VFs Odd numbered VFs VCN doorbell 0 VCN Decode ring VCN Decode ring VCN doorbell 1-3Re

[PATCH v2 2/3] drm/amdgpu: sdma support for sriov cpx mode

2024-03-15 Thread Samir Dhume
sdma has 2 instances in SRIOV cpx mode. Odd numbered VFs have sdma0/sdma1 instances. Even numbered vfs have sdma2/sdma3. Changes involve 1. identifying odd/even numbered VF 2. registering correct number of instances with irq handler 3. mapping instance number with IH client-id depending upon whethe

[PATCH] drm/amdgpu: add support for atom fw version v3_5

2024-03-15 Thread Alex Deucher
From: Likun Gao Support for atom_firmware_info_v3_5. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c

[PATCH] drm/amd/swsmu: add smu 14.0.1 vcn and jpeg msg

2024-03-15 Thread Alex Deucher
From: lima1002 add new vcn and jpeg msg v2: squash in updates (Alex) v3: rework code for better compat with other smu14.x variants (Alex) Signed-off-by: lima1002 Signed-off-by: Alex Deucher --- .../pm/swsmu/inc/pmfw_if/smu_v14_0_0_ppsmc.h | 28 +-- drivers/gpu/drm/amd/pm/swsmu/inc/s