[PATCH] drm/amd/pm: fulfill the support for SMU13 `pp_dpm_dcefclk` interface

2023-08-21 Thread Evan Quan
Fulfill the incomplete SMU13 `pp_dpm_dcefclk` implementation. Reported-by: Guan Yu Signed-off-by: Evan Quan --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 27 +++ .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 27 +++ 2 files changed, 54 insertions(+)

[PATCH] drm/amd/pm: Fixes incorrect type in 'amdgpu_hwmon_show_power_avg() & _input()'

2023-08-21 Thread Srinivasan Shanmugam
The val is defined as unsigned int type, if(val<0) is invalid, hence modified its type to ssize_t Fixes the below: drivers/gpu/drm/amd/pm/amdgpu_pm.c:2800:5-8: WARNING: Unsigned expression compared with zero: val < 0 drivers/gpu/drm/amd/pm/amdgpu_pm.c:2813:5-8: WARNING: Unsigned expression

RE: [PATCH 0/8] A new set of Linux OD interfaces

2023-08-21 Thread Quan, Evan
[AMD Official Use Only - General] Ping.. > -Original Message- > From: Quan, Evan > Sent: Tuesday, August 15, 2023 4:42 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Quan, Evan > > Subject: [PATCH 0/8] A new set of Linux OD interfaces > > The existing OD interface

[PATCH v2 0/7] GPU workload hints for better performance

2023-08-21 Thread Arvind Yadav
AMDGPU SOCs supports dynamic workload based power profiles, which can provide fine-tuned performance for a particular type of workload. This patch series adds an interface to set/reset these power profiles based on the submitted job. The driver can dynamically switch the power profiles based on

[PATCH v2 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-21 Thread Arvind Yadav
The'struct amdgpu_smu_workload' initialization/cleanup functions is added by this patch. v2: - Splitting big patch into separate patches. - Added new fini function. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/Makefile

[PATCH v2 3/7] drm/amdgpu: Add new function to put GPU power profile

2023-08-21 Thread Arvind Yadav
This patch adds a function which will clear the GPU power profile after job finished. This is how it works: - schedular will set the GPU power profile based on ring_type. - Schedular will clear the GPU Power profile once job finished. - Here, the *_workload_profile_set function will set the GPU

[PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Arvind Yadav
This patch adds a function which will change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. v2: - Splitting workload_profile_set and workload_profile_put into two separate patches. - Addressed review comment. Cc: Shashank Sharma

[PATCH v2 1/4] drm/amdgpu: Add separate mode for syncing DMA_RESV_USAGE_BOOKKEEP.

2023-08-21 Thread Tatsuyuki Ishi
From: Bas Nieuwenhuizen To prep for allowing different sync modes in a follow-up patch. Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-

[PATCH v2 2/4] drm/amdgpu: Allow explicit sync for VM ops.

2023-08-21 Thread Tatsuyuki Ishi
From: Bas Nieuwenhuizen This should be okay because moves themselves use KERNEL usage and hence still sync with BOOKKEEP usage. Then any later submits still wait on any pending VM operations. (i.e. we only made VM ops not wait on BOOKKEEP submits, not the other way around) Signed-off-by: Bas

[PATCH v2 3/4] drm/amdgpu: Add option to disable implicit sync for a context.

2023-08-21 Thread Tatsuyuki Ishi
From: Bas Nieuwenhuizen This changes all BO usages in a submit to BOOKKEEP instead of READ, which effectively disables implicit sync for these submits. This is configured at a context level using the existing IOCTL. Signed-off-by: Bas Nieuwenhuizen Co-developed-by: Tatsuyuki Ishi

[PATCH v2 4/4] drm/amdgpu: Bump amdgpu driver version.

2023-08-21 Thread Tatsuyuki Ishi
From: Bas Nieuwenhuizen For detection of the new explicit sync functionality without having to try the ioctl. Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Tatsuyuki Ishi --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v2 0/4] amdgpu: Allow explicitly synchronized submissions.

2023-08-21 Thread Tatsuyuki Ishi
This adds a context option to use DMA_RESV_USAGE_BOOKKEEP for userspace submissions. This is a respin of [1] but rebased on top of the newly introduced drm_exec helpers. Disabling implicit sync is something we've wanted in RADV for a while for resolving some corner cases. A more immediate thing

[PATCH] drm/amd/pm: correct SMU13 gfx voltage related OD settings

2023-08-21 Thread Evan Quan
The voltage offset setting will be applied to the whole v/f curve line instead of per anchor point base. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 +++ .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 31 ++---

RE: [PATCH] drm/amd/pm: Fixes incorrect type in 'amdgpu_hwmon_show_power_avg() & _input()'

2023-08-21 Thread Kamal, Asad
[AMD Official Use Only - General] -Original Message- From: amd-gfx On Behalf Of Srinivasan Shanmugam Sent: Monday, August 21, 2023 11:36 AM To: Koenig, Christian ; Deucher, Alexander ; Chen, Guchun Cc: Pan, Xinhui ; SHANMUGAM, SRINIVASAN ; amd-gfx@lists.freedesktop.org Subject:

[PATCH v2 4/7] drm/amdgpu: Add suspend function to clear the GPU power profile.

2023-08-21 Thread Arvind Yadav
This patch adds a suspend function that will clear the GPU power profile before going into suspend state. v2: - Add the new suspend function based on review comment. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav ---

[PATCH v2 5/7] drm/amdgpu: Switch on/off GPU workload profile

2023-08-21 Thread Arvind Yadav
This patch is to switch the GPU workload profile based on the submitted job. The workload profile is reset to default when the job is done. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 + 1 file

[PATCH v2 6/7] drm/amdgpu: switch workload context to/from compute

2023-08-21 Thread Arvind Yadav
This patch switches the GPU workload mode to/from compute mode, while submitting compute workload. Cc: Christian Koenig Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 +--- 1 file changed, 5

[PATCH v2 7/7] Revert "drm/amd/amdgpu: switch on/off vcn power profile mode"

2023-08-21 Thread Arvind Yadav
This reverts commit 5ce71f59bb9bd3d8a09b96afdbc92975cb6dc303. Reason for revert: New amdgpu_workload_profile* api is added to switch on/off profile mode. These new api will allow to change the GPU power profile based on a submitted job. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex

Re: [PATCH] drm/amd/pm: Fixes incorrect type in 'amdgpu_hwmon_show_power_avg() & _input()'

2023-08-21 Thread SHANMUGAM, SRINIVASAN
On 8/21/2023 11:59 AM, Kamal, Asad wrote: [AMD Official Use Only - General] -Original Message- From: amd-gfx On Behalf Of Srinivasan Shanmugam Sent: Monday, August 21, 2023 11:36 AM To: Koenig, Christian ; Deucher, Alexander ; Chen, Guchun Cc: Pan, Xinhui ; SHANMUGAM, SRINIVASAN

Re: [PATCH 0/4] drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list' and simplify amdgpu_bo_list_create()

2023-08-21 Thread Christian König
Am 20.08.23 um 11:51 schrieb Christophe JAILLET: This serie simplifies amdgpu_bo_list_create() and usage of the 'struct amdgpu_bo_list'. Oh, yes please. That's something I always wanted to cleanup as well. It is compile tested only. That bothers me a bit. Arun, Vitaly, Shashank can anybody

Re: [PATCH 1/3] drm/buddy: Fix contiguous memory allocation issues

2023-08-21 Thread Christian König
Am 21.08.23 um 12:14 schrieb Arunpravin Paneer Selvam: The way now contiguous requests are implemented such that the size rounded up to power of 2 and the corresponding order block picked from the freelist. In addition to the older method, the new method will rounddown the size to power of 2

Re: [PATCH] drm/amdgpu: Use READ_ONCE() when reading the values in 'sdma_v4_4_2_ring_get_rptr'

2023-08-21 Thread Christian König
Am 04.08.23 um 07:46 schrieb Srinivasan Shanmugam: Instead of declaring pointers use READ_ONCE(), when accessing those values to make sure that the compiler doesn't voilate any cache coherences That commit message is a bit confusing and not 100% technically correct. The compiler is not

RE: [PATCH] drm/amd/pm: Fixes incorrect type in 'amdgpu_hwmon_show_power_avg() & _input()'

2023-08-21 Thread Kamal, Asad
[AMD Official Use Only - General] With the following patch in place https://patchwork.freedesktop.org/patch/553433/?series=122640=1 Reviewed-by: Asad Kamal Thanks & Regards Asad -Original Message- From: SHANMUGAM, SRINIVASAN Sent: Monday, August 21, 2023 12:06 PM To: Kamal, Asad ;

Re: [PATCH libdrm v2] amdgpu: Use PRI?64 to format uint64_t

2023-08-21 Thread Christian König
Am 21.08.23 um 11:14 schrieb Geert Uytterhoeven: Hi Christian, On Fri, Jul 7, 2023 at 9:36 PM Geert Uytterhoeven wrote: On Fri, Jul 7, 2023 at 2:06 PM Christian König wrote: Am 06.07.23 um 10:36 schrieb Geert Uytterhoeven: On 32-bit: ../tests/amdgpu/amdgpu_stress.c: In function

[PATCH 3/3] drm/i915: Remove the contiguous computation and trim

2023-08-21 Thread Arunpravin Paneer Selvam
As we have implemented a new method for contiguous allocation which requires actual size and actual min_block_size, hence we have moved the roundup and alignment size computation to buddy allocator. This way gpu drivers pass the required size and alignment to buddy allocator and rest of the

[PATCH 2/3] drm/amdgpu: Remove the contiguous computation and trim

2023-08-21 Thread Arunpravin Paneer Selvam
As we have implemented a new method for contiguous allocation which requires actual size and actual min_block_size, hence we have moved the roundup and alignment size computation to buddy allocator. This way gpu drivers pass the required size and alignment to buddy allocator and rest of the

[PATCH 1/3] drm/buddy: Fix contiguous memory allocation issues

2023-08-21 Thread Arunpravin Paneer Selvam
The way now contiguous requests are implemented such that the size rounded up to power of 2 and the corresponding order block picked from the freelist. In addition to the older method, the new method will rounddown the size to power of 2 and the corresponding order block picked from the freelist.

Re: [V9 1/9] drivers core: Add support for Wifi band RF mitigations

2023-08-21 Thread Greg KH
On Fri, Aug 18, 2023 at 11:26:11AM +0800, Evan Quan wrote: > drivers/base/Makefile | 1 + > drivers/base/wbrf.c | 280 ++ Why is a wifi-specific thing going into drivers/base/? confused, greg k-h

[PATCH 1/4] drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list'

2023-08-21 Thread Christophe JAILLET
'struct amdgpu_bo_list' is really used as if it was ended by a flex array. So make it more explicit and add a 'struct amdgpu_bo_list_entry entries[]' field at the end of the structure. This way, struct_size() can be used when it is allocated. It is less verbose. Signed-off-by: Christophe JAILLET

[BUG]: amdgpu: soft lockup - CPU#1 stuck for 26s! [systemd-udevd:635]

2023-08-21 Thread Mirsad Todorovac
Hi, This soft lockup occurs on amdgpu vanilla torvalds kernel with KCSAN turned on. The platform is Ubuntu 22.04 LTS. Please find config and lshw here: https://domac.alu.unizg.hr/~mtodorov/linux/bugreports/amdgpu/6.5-rc7/ Here is the log excerpt: [ 69.050693]

Re: [PATCH] drm/amdgpu: Avoid possible buffer overflow

2023-08-21 Thread Christophe JAILLET
Le 21/08/2023 à 08:19, Su Hui a écrit : smatch error: drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1257 amdgpu_discovery_reg_base_init() error: testing array offset 'adev->vcn.num_vcn_inst' after use. change the assignment order to avoid buffer overflow. Fixes: c40bdfb2ffa4 ("drm/amdgpu: fix

[BUG]: amdgpu: soft lockup - CPU#1 stuck for 26s! [systemd-udevd:635]

2023-08-21 Thread Mirsad Todorovac
Hi, This soft lockup occurs on amdgpu vanilla torvalds kernel with KCSAN turned on. The platform is Ubuntu 22.04 LTS. [ 69.050693] == [ 69.198264] watchdog: BUG: soft lockup - CPU#1 stuck for 26s! [systemd-udevd:635] [

[PATCH 0/4] drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list' and simplify amdgpu_bo_list_create()

2023-08-21 Thread Christophe JAILLET
This serie simplifies amdgpu_bo_list_create() and usage of the 'struct amdgpu_bo_list'. It is compile tested only. Christophe JAILLET (4): drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list' drm/amdgpu: Remove a redundant sanity check drm/amdgpu: Remove

Re: [V9 1/9] drivers core: Add support for Wifi band RF mitigations

2023-08-21 Thread Greg KH
On Fri, Aug 18, 2023 at 05:49:14PM -0500, Limonciello, Mario wrote: > > > On 8/18/2023 4:24 PM, Greg KH wrote: > > On Fri, Aug 18, 2023 at 11:26:11AM +0800, Evan Quan wrote: > > > drivers/base/Makefile | 1 + > > > drivers/base/wbrf.c | 280

[PATCH 2/4] drm/amdgpu: Remove a redundant sanity check

2023-08-21 Thread Christophe JAILLET
The case where 'num_entries' is too big, is already handled by struct_size(), because kvmalloc() would fail. It will return -ENOMEM instead of -EINVAL, but it is only related to a unlikely to happen sanity check. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c

[PATCH 4/4] drm/amdgpu: Use kvzalloc() to simplify code

2023-08-21 Thread Christophe JAILLET
kvzalloc() can be used instead of kvmalloc() + memset() + explicit NULL assignments. It is less verbose and more future proof. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git

[PATCH] drm/amdgpu: Avoid possible buffer overflow

2023-08-21 Thread Su Hui
smatch error: drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1257 amdgpu_discovery_reg_base_init() error: testing array offset 'adev->vcn.num_vcn_inst' after use. change the assignment order to avoid buffer overflow. Fixes: c40bdfb2ffa4 ("drm/amdgpu: fix incorrect VCN revision in SRIOV")

[PATCH 3/4] drm/amdgpu: Remove amdgpu_bo_list_array_entry()

2023-08-21 Thread Christophe JAILLET
Now that there is an explicit flexible array at the end of 'struct amdgpu_bo_list', it can be used to remove amdgpu_bo_list_array_entry() and simplify some macro. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 +-

Re: [PATCH] drm/amdgpu: Avoid possible buffer overflow

2023-08-21 Thread Su Hui
On 2023/8/21 14:47, Christophe JAILLET wrote: Le 21/08/2023 à 08:19, Su Hui a écrit : smatch error: drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1257 amdgpu_discovery_reg_base_init() error: testing array offset 'adev->vcn.num_vcn_inst' after use. change the assignment order to avoid buffer

[PATCH v2] drm/amdgpu: Avoid possible buffer overflow

2023-08-21 Thread Su Hui
smatch error: drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1257 amdgpu_discovery_reg_base_init() error: testing array offset 'adev->vcn.num_vcn_inst' after use. change the assignment order to avoid buffer overflow. Fixes: c40bdfb2ffa4 ("drm/amdgpu: fix incorrect VCN revision in SRIOV")

Re: [PATCH v2] drm/amdgpu: Avoid possible buffer overflow

2023-08-21 Thread Christian König
Am 21.08.23 um 09:37 schrieb Su Hui: smatch error: drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1257 amdgpu_discovery_reg_base_init() error: testing array offset 'adev->vcn.num_vcn_inst' after use. change the assignment order to avoid buffer overflow. Fixes: c40bdfb2ffa4 ("drm/amdgpu: fix

Re: [PATCH v2 2/4] drm/amdgpu: Allow explicit sync for VM ops.

2023-08-21 Thread Christian König
Am 21.08.23 um 08:20 schrieb Tatsuyuki Ishi: From: Bas Nieuwenhuizen This should be okay because moves themselves use KERNEL usage and hence still sync with BOOKKEEP usage. Then any later submits still wait on any pending VM operations. (i.e. we only made VM ops not wait on BOOKKEEP submits,

Re: [PATCH libdrm v2] amdgpu: Use PRI?64 to format uint64_t

2023-08-21 Thread Christian König
Am 21.08.23 um 11:48 schrieb Geert Uytterhoeven: Hi Christian, On Mon, Aug 21, 2023 at 11:34 AM Christian König wrote: Am 21.08.23 um 11:14 schrieb Geert Uytterhoeven: On Fri, Jul 7, 2023 at 9:36 PM Geert Uytterhoeven wrote: On Fri, Jul 7, 2023 at 2:06 PM Christian König wrote: Am

[PATCH v2] drm/amdgpu : Updated TCP/UTCL1 programming

2023-08-21 Thread Mangesh Gadre
It is required for TCP/UTCL1 thrashing v2: updated rev_id check Signed-off-by: Mangesh Gadre Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

Re: [PATCH v2 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 6:36 PM, Shashank Sharma wrote: Hey Arvind, On 21/08/2023 08:47, Arvind Yadav wrote: The'struct amdgpu_smu_workload' initialization/cleanup functions is added by this patch. v2: - Splitting big patch into separate patches. - Added new fini function. Cc: Shashank Sharma Cc:

Re: [PATCH v2 7/7] Revert "drm/amd/amdgpu: switch on/off vcn power profile mode"

2023-08-21 Thread Shashank Sharma
Someone from MM should also confirm on this, but: Acked-by: Shashank Sharma On 21/08/2023 08:47, Arvind Yadav wrote: This reverts commit 5ce71f59bb9bd3d8a09b96afdbc92975cb6dc303. Reason for revert: New amdgpu_workload_profile* api is added to switch on/off profile mode. These new api will

Re: [PATCH v5 4/5] drm/amdgpu: Move coredump code to amdgpu_reset file

2023-08-21 Thread Shashank Sharma
On 17/08/2023 20:20, André Almeida wrote: Giving that we use codedump just for device resets, move it's functions and structs to a more semantic file, the amdgpu_reset.{c, h}. Signed-off-by: André Almeida --- v5: no change --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 9 ---

Re: [PATCH v2 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 7:24 PM, Shashank Sharma wrote: On 21/08/2023 15:35, Yadav, Arvind wrote: On 8/21/2023 6:36 PM, Shashank Sharma wrote: Hey Arvind, On 21/08/2023 08:47, Arvind Yadav wrote: The'struct amdgpu_smu_workload' initialization/cleanup functions is added by this patch. v2: -

Re: [PATCH v2 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-21 Thread Shashank Sharma
On 21/08/2023 16:12, Yadav, Arvind wrote: On 8/21/2023 7:24 PM, Shashank Sharma wrote: On 21/08/2023 15:35, Yadav, Arvind wrote: On 8/21/2023 6:36 PM, Shashank Sharma wrote: Hey Arvind, On 21/08/2023 08:47, Arvind Yadav wrote: The'struct amdgpu_smu_workload' initialization/cleanup

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Shashank Sharma
On 21/08/2023 08:47, Arvind Yadav wrote: This patch adds a function which will change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. v2: - Splitting workload_profile_set and workload_profile_put into two separate patches. -

RE: [PATCH 00/16] DC Patches August 18, 2023

2023-08-21 Thread Wheeler, Daniel
[Public] Hi all, This week this patchset was tested on the following systems: * Lenovo ThinkBook T13s Gen4 with AMD Ryzen 5 6600U * MSI Gaming X Trio RX 6800 * Gigabyte Gaming OC RX 7900 XTX These systems were tested on the following display/connection types: *

Re: [PATCH v2 4/7] drm/amdgpu: Add suspend function to clear the GPU power profile.

2023-08-21 Thread Shashank Sharma
On 21/08/2023 08:47, Arvind Yadav wrote: This patch adds a suspend function that will clear the GPU power profile before going into suspend state. v2: - Add the new suspend function based on review comment. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind

Re: [PATCH v2 6/7] drm/amdgpu: switch workload context to/from compute

2023-08-21 Thread Shashank Sharma
On 21/08/2023 08:47, Arvind Yadav wrote: This patch switches the GPU workload mode to/from compute mode, while submitting compute workload. Cc: Christian Koenig Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav ---

Re: [PATCH v2 5/7] drm/amdgpu: Switch on/off GPU workload profile

2023-08-21 Thread Shashank Sharma
On 21/08/2023 08:47, Arvind Yadav wrote: This patch is to switch the GPU workload profile based on the submitted job. The workload profile is reset to default when the job is done. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav ---

Re: [PATCH v2 4/7] drm/amdgpu: Add suspend function to clear the GPU power profile.

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 7:13 PM, Shashank Sharma wrote: On 21/08/2023 08:47, Arvind Yadav wrote: This patch adds a suspend function that will clear the GPU power profile before going into suspend state. v2: - Add the new suspend function based on review comment. Cc: Shashank Sharma Cc: Christian

Re: [PATCH v2 3/7] drm/amdgpu: Add new function to put GPU power profile

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 7:09 PM, Shashank Sharma wrote: On 21/08/2023 08:47, Arvind Yadav wrote: This patch adds a function which will clear the GPU power profile after job finished. This is how it works: - schedular will set the GPU power profile based on ring_type. - Schedular will clear the GPU

Re: [V9 4/9] wifi: mac80211: Add support for WBRF features

2023-08-21 Thread Johannes Berg
On Fri, 2023-08-18 at 11:26 +0800, Evan Quan wrote: > To support the WBRF mechanism, Wifi adapters utilized in the system must > register the frequencies in use(or unregister those frequencies no longer > used) via the dedicated calls. So that, other drivers responding to the > frequencies can

Re: [PATCH 0/4] drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list' and simplify amdgpu_bo_list_create()

2023-08-21 Thread Shashank Sharma
+ Amar should be able to help. Amar, Can you please check this patch (series if required) with a few IGTs and probably with Xonotic as well ? Regards Shashank On 21/08/2023 13:03, Christian König wrote: Am 20.08.23 um 11:51 schrieb Christophe JAILLET: This serie simplifies

RE: [PATCH v5 06/11] drm/radeon: Use RMW accessors for changing LNKCTL

2023-08-21 Thread Ilpo Järvinen
On Fri, 18 Aug 2023, Deucher, Alexander wrote: > [Public] > > > -Original Message- > > From: Ilpo Järvinen > > Sent: Monday, July 17, 2023 8:05 AM > > To: linux-...@vger.kernel.org; Bjorn Helgaas ; Lorenzo > > Pieralisi ; Rob Herring ; > > Krzysztof Wilczyński ; Emmanuel Grumbach > > ;

Re: [PATCH libdrm v2] amdgpu: Use PRI?64 to format uint64_t

2023-08-21 Thread Geert Uytterhoeven
Hi Christian, On Mon, Aug 21, 2023 at 11:34 AM Christian König wrote: > Am 21.08.23 um 11:14 schrieb Geert Uytterhoeven: > > On Fri, Jul 7, 2023 at 9:36 PM Geert Uytterhoeven > > wrote: > >> On Fri, Jul 7, 2023 at 2:06 PM Christian König > >> wrote: > >>> Am 06.07.23 um 10:36 schrieb Geert

Re: [PATCH libdrm v2] amdgpu: Use PRI?64 to format uint64_t

2023-08-21 Thread Geert Uytterhoeven
Hi Christian, On Fri, Jul 7, 2023 at 9:36 PM Geert Uytterhoeven wrote: > On Fri, Jul 7, 2023 at 2:06 PM Christian König > wrote: > > Am 06.07.23 um 10:36 schrieb Geert Uytterhoeven: > > > On 32-bit: > > > > > > ../tests/amdgpu/amdgpu_stress.c: In function ‘alloc_bo’: > > >

Re: [PATCH v2 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-21 Thread Shashank Sharma
Hey Arvind, On 21/08/2023 08:47, Arvind Yadav wrote: The'struct amdgpu_smu_workload' initialization/cleanup functions is added by this patch. v2: - Splitting big patch into separate patches. - Added new fini function. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by:

Re: [PATCH v2 3/7] drm/amdgpu: Add new function to put GPU power profile

2023-08-21 Thread Shashank Sharma
On 21/08/2023 08:47, Arvind Yadav wrote: This patch adds a function which will clear the GPU power profile after job finished. This is how it works: - schedular will set the GPU power profile based on ring_type. - Schedular will clear the GPU Power profile once job finished. - Here, the

Re: [PATCH v2 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-21 Thread Shashank Sharma
On 21/08/2023 15:35, Yadav, Arvind wrote: On 8/21/2023 6:36 PM, Shashank Sharma wrote: Hey Arvind, On 21/08/2023 08:47, Arvind Yadav wrote: The'struct amdgpu_smu_workload' initialization/cleanup functions is added by this patch. v2: - Splitting big patch into separate patches. - Added new

Re: [PATCH v5 2/5] drm/amdgpu: Rework coredump to use memory dynamically

2023-08-21 Thread Shashank Sharma
On 17/08/2023 20:20, André Almeida wrote: Instead of storing coredump information inside amdgpu_device struct, move if to a proper separated struct and allocate it dynamically. This will make it easier to further expand the logged information. Signed-off-by: André Almeida --- v5: no change

Re: [PATCH v5 5/5] drm/amdgpu: Create version number for coredumps

2023-08-21 Thread Shashank Sharma
On 17/08/2023 20:20, André Almeida wrote: Even if there's nothing currently parsing amdgpu's coredump files, if we eventually have such tools they will be glad to find a version field to properly read the file. Create a version number to be displayed on top of coredump file, to be incremented

Re: [PATCH v2 5/7] drm/amdgpu: Switch on/off GPU workload profile

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 7:16 PM, Shashank Sharma wrote: On 21/08/2023 08:47, Arvind Yadav wrote: This patch is to switch the GPU workload profile based on the submitted job. The workload profile is reset to default when the job is done. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher

Re: [PATCH v5 3/5] drm/amdgpu: Encapsulate all device reset info

2023-08-21 Thread Shashank Sharma
On 17/08/2023 20:20, André Almeida wrote: To better organize struct amdgpu_device, keep all reset information related fields together in a separated struct. Signed-off-by: André Almeida --- v5: new patch, as requested by Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 34

[PATCH] drm/amdgpu: Rework memory limits to allow big allocations

2023-08-21 Thread Rajneesh Bhardwaj
Rework the KFD max system memory and ttm limit to allow bigger system memory allocations upto 63/64 of the available memory which is controlled by ttm module params pages_limit and page_pool_size. Also for NPS1 mode, report the max ttm limit as the available VRAM size. For max system memory limit,

[PATCH] drm/amdkfd: Share the original BO for GTT mapping

2023-08-21 Thread Philip Yang
If mGPUs is on same IOMMU group, or is ram direct mapped, then mGPUs can share the original BO for GTT mapping dma address, without creating new BO from export/import dmabuf. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 +++-- 1 file changed, 3

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Alex Deucher
On Mon, Aug 21, 2023 at 2:55 AM Arvind Yadav wrote: > > This patch adds a function which will change the GPU > power profile based on a submitted job. This can optimize > the power performance when the workload is on. > > v2: > - Splitting workload_profile_set and workload_profile_put > into

Re: [PATCH 0/4] drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list' and simplify amdgpu_bo_list_create()

2023-08-21 Thread Arunpravin Paneer Selvam
Hi Christian, I ran GLMark2, unigine heaven and Tomb Raider on steam. I didn't observe any issues. Regards, Arun. On 8/21/2023 4:33 PM, Christian König wrote: Am 20.08.23 um 11:51 schrieb Christophe JAILLET: This serie simplifies amdgpu_bo_list_create() and usage of the 'struct

Re: [PATCH v5 06/11] drm/radeon: Use RMW accessors for changing LNKCTL

2023-08-21 Thread Bjorn Helgaas
On Fri, Aug 18, 2023 at 04:12:57PM +, Deucher, Alexander wrote: > > -Original Message- > > From: Ilpo Järvinen > > Sent: Monday, July 17, 2023 8:05 AM > > To: linux-...@vger.kernel.org; Bjorn Helgaas ; Lorenzo > > Pieralisi ; Rob Herring ; > > Krzysztof Wilczyński ; Emmanuel Grumbach

Re: [PATCH v6 6/6] drm/doc: Define KMS atomic state set

2023-08-21 Thread André Almeida
Hi Michel, Em 17/08/2023 07:37, Michel Dänzer escreveu: On 8/15/23 20:57, André Almeida wrote: From: Pekka Paalanen Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: Pekka Paalanen Signed-off-by: André Almeida

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Alex Deucher
On Mon, Aug 21, 2023 at 2:55 AM Arvind Yadav wrote: > > This patch adds a function which will change the GPU > power profile based on a submitted job. This can optimize > the power performance when the workload is on. > > v2: > - Splitting workload_profile_set and workload_profile_put > into

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 9:52 PM, Alex Deucher wrote: On Mon, Aug 21, 2023 at 2:55 AM Arvind Yadav wrote: This patch adds a function which will change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. v2: - Splitting workload_profile_set

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Yadav, Arvind
On 8/21/2023 11:36 PM, Alex Deucher wrote: On Mon, Aug 21, 2023 at 2:55 AM Arvind Yadav wrote: This patch adds a function which will change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. v2: - Splitting workload_profile_set

Re: [PATCH 1/3] drm/buddy: Fix contiguous memory allocation issues

2023-08-21 Thread Matthew Auld
Hi, On 21/08/2023 11:14, Arunpravin Paneer Selvam wrote: The way now contiguous requests are implemented such that the size rounded up to power of 2 and the corresponding order block picked from the freelist. In addition to the older method, the new method will rounddown the size to power of 2

Re: [PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Alex Deucher
On Mon, Aug 21, 2023 at 1:54 PM Yadav, Arvind wrote: > > > On 8/21/2023 9:52 PM, Alex Deucher wrote: > > On Mon, Aug 21, 2023 at 2:55 AM Arvind Yadav wrote: > >> This patch adds a function which will change the GPU > >> power profile based on a submitted job. This can optimize > >> the power

Re: [PATCH] drm/amdkfd: Share the original BO for GTT mapping

2023-08-21 Thread Felix Kuehling
On 2023-08-21 15:29, Philip Yang wrote: If mGPUs is on same IOMMU group, or is ram direct mapped, then mGPUs can share the original BO for GTT mapping dma address, without creating new BO from export/import dmabuf. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling ---

Re: [PATCH 0/8] A new set of Linux OD interfaces

2023-08-21 Thread Alex Deucher
On Tue, Aug 15, 2023 at 4:50 AM Evan Quan wrote: > > The existing OD interface `pp_od_clk_voltage` is unable to meet the growing > demands for more OD functionalities. Since the buf used within it comes with > size limit as one page. With more OD functionalities added, we will hit that > limit

Re: [PATCH] drm/amdgpu: Use READ_ONCE() when reading the values in 'sdma_v4_4_2_ring_get_rptr'

2023-08-21 Thread Felix Kuehling
Would it make sense to include a link to a better explanation of the underlying issue? E.g. https://lwn.net/Articles/624126/? Regards,   Felix On 2023-08-21 07:23, Christian König wrote: Am 04.08.23 um 07:46 schrieb Srinivasan Shanmugam: Instead of declaring pointers use READ_ONCE(), when

Re: [PATCH] drm/amd/pm: fulfill the support for SMU13 `pp_dpm_dcefclk` interface

2023-08-21 Thread Alex Deucher
Acked-by: Alex Deucher On Mon, Aug 21, 2023 at 3:10 AM Evan Quan wrote: > > Fulfill the incomplete SMU13 `pp_dpm_dcefclk` implementation. > > Reported-by: Guan Yu > Signed-off-by: Evan Quan > --- > .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 27 +++ >

Re: [PATCH] drm/amdgpu: Rework memory limits to allow big allocations

2023-08-21 Thread Felix Kuehling
On 2023-08-21 15:20, Rajneesh Bhardwaj wrote: Rework the KFD max system memory and ttm limit to allow bigger system memory allocations upto 63/64 of the available memory which is controlled by ttm module params pages_limit and page_pool_size. Also for NPS1 mode, report the max ttm limit as the

Re: [PATCH] drm/amd/pm: correct SMU13 gfx voltage related OD settings

2023-08-21 Thread Alex Deucher
Acked-by: Alex Deucher On Mon, Aug 21, 2023 at 2:50 AM Evan Quan wrote: > > The voltage offset setting will be applied to the whole v/f curve line > instead of per anchor point base. > > Signed-off-by: Evan Quan > --- > drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 +++ >

Re: [V9 1/9] drivers core: Add support for Wifi band RF mitigations

2023-08-21 Thread Limonciello, Mario
On 8/19/2023 5:50 AM, Greg KH wrote: On Fri, Aug 18, 2023 at 05:49:14PM -0500, Limonciello, Mario wrote: On 8/18/2023 4:24 PM, Greg KH wrote: On Fri, Aug 18, 2023 at 11:26:11AM +0800, Evan Quan wrote: drivers/base/Makefile | 1 + drivers/base/wbrf.c

RE: [PATCH] drm/amd/pm: fix error flow in sensor fetching

2023-08-21 Thread SHANMUGAM, SRINIVASAN
[Public] -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Friday, August 18, 2023 9:55 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Jiapeng Chong Subject: [PATCH] drm/amd/pm: fix error flow in sensor fetching Sensor fetching functions should return an

Re: [PATCH v2 3/7] drm/amdgpu: Add new function to put GPU power profile

2023-08-21 Thread Lazar, Lijo
On 8/21/2023 12:17 PM, Arvind Yadav wrote: This patch adds a function which will clear the GPU power profile after job finished. This is how it works: - schedular will set the GPU power profile based on ring_type. - Schedular will clear the GPU Power profile once job finished. - Here, the

Re: [PATCH v2] drm/amdgpu : Updated TCP/UTCL1 programming

2023-08-21 Thread Lazar, Lijo
On 8/21/2023 6:17 PM, Mangesh Gadre wrote: It is required for TCP/UTCL1 thrashing Description looks a bit odd. You may rephrase as 'Update TCP/UTCL1 thrashing control settings'. Reviewed-by: Lijo Lazar Thanks, Lijo v2: updated rev_id check Signed-off-by: Mangesh Gadre Reviewed-by:

Re: [PATCH 0/4] drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list' and simplify amdgpu_bo_list_create()

2023-08-21 Thread vitaly prosyak
Hi Christian, On 2023-08-21 07:03, Christian König wrote: > Am 20.08.23 um 11:51 schrieb Christophe JAILLET: >> This serie simplifies amdgpu_bo_list_create() and usage of the 'struct >> amdgpu_bo_list'. > Oh, yes please. That's something I always wanted to cleanup as well. > >> It is compile