[PATCH v3] drm/amdgpu: Move mca debug mode decision to ras

2023-11-09 Thread Lijo Lazar
Refactor code such that ras block decides the default mca debug mode, and not swsmu block. By default mca debug mode is set to false. Signed-off-by: Lijo Lazar --- v3: Default mca debug mode is set to false v2: Set mca debug mode early before ras block late init as ras query is initiated

[PATCH 2/2] drm/virtio: Modify RESOURCE_GET_LAYOUT ioctl

2023-11-09 Thread Julia Zhang
Modify RESOURCE_GET_LAYOUT ioctl to handle the use case that query correct stride for guest linear resource before it is created. Signed-off-by: Julia Zhang --- drivers/gpu/drm/virtio/virtgpu_drv.h | 26 -- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 47 --

[PATCH 1/2] drm/virtio: Implement RESOURCE_GET_LAYOUT ioctl

2023-11-09 Thread Julia Zhang
From: Daniel Stone This ioctl allows the guest to discover how the guest actually allocated the underlying buffer, which allows buffers to be used for GL<->Vulkan interop and through standard window systems. It's also a step towards properly supporting modifiers in the guest. ---

[PATCH 0/2] Add RESOURCE_GET_LAYOUT ioctl

2023-11-09 Thread Julia Zhang
This is to add a new ioctl RESOURCE_GET_LAYOUT to virtio-gpu to get the information about how the host has actually allocated the buffer. It is implemented to query the stride of linear buffer for dGPU prime on guest VM, related mesa mr:

RE: [PATCH] drm/amdgpu: correct mca ipid die/socket/addr decode

2023-11-09 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Wang, Yang(Kevin) Sent: Friday, November 10, 2023 14:33 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Wang, Yang(Kevin) Subject: [PATCH] drm/amdgpu: correct mca ipid

RE: [PATCH 2/3] drm/amdgpu: fall back to INPUT power for AVG power via INFO IOCTL

2023-11-09 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Friday, November 10, 2023 6:14 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 2/3] drm/amdgpu: fall back to INPUT

[PATCH] drm/amdgpu: correct mca ipid die/socket/addr decode

2023-11-09 Thread Yang Wang
correct mca ipid die/socket/addr decode Signed-off-by: Yang Wang --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c| 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

Re: [Patch v13 0/9] Enable Wifi RFI interference mitigation feature support

2023-11-09 Thread Ma, Jun
ping... Any other comments? Regards, Ma Jun On 10/30/2023 3:18 PM, Ma Jun wrote: > Due to electrical and mechanical constraints in certain platform designs there > may be likely interference of relatively high-powered harmonics of the (G-)DDR > memory clocks with local radio module frequency

RE: [RFC PATCH v2] drm/amdkfd: Run restore_workers on freezable WQs

2023-11-09 Thread Pan, Xinhui
[AMD Official Use Only - General] I once replaced the queue with the freezable one, but got hang in flush. Looks like Felix has fixed it. Acked-and-tested-by: xinhui pan -Original Message- From: Kuehling, Felix Sent: Wednesday, November 8, 2023 6:06 AM To:

Re: [PATCH] drm/amdgpu: move UVD and VCE sched entity init after sched init

2023-11-09 Thread Alex Deucher
On Thu, Nov 9, 2023 at 4:35 PM Luben Tuikov wrote: > > On 2023-11-09 11:13, Alex Deucher wrote: > > Ping? > > > > On Wed, Nov 8, 2023 at 1:42 PM Alex Deucher > > wrote: > >> > >> We need kernel scheduling entities to deal with handle clean up > >> if apps are not cleaned up properly. With

[PATCH 3/3] drm/amdgpu: add new INFO IOCTL query for input power

2023-11-09 Thread Alex Deucher
Some chips provide both average and input power. Previously we just exposed average power, add a new query for input power. Example userspace: https://github.com/Umio-Yasuno/libdrm-amdgpu-sys-rs/tree/input_power Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 9

[PATCH 1/3] drm/amdgpu: fix avg vs input power reporting on smu7

2023-11-09 Thread Alex Deucher
Hawaii, Bonaire, Fiji, and Tonga support average power, the others support current power. Signed-off-by: Alex Deucher --- .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git

[PATCH 2/3] drm/amdgpu: fall back to INPUT power for AVG power via INFO IOCTL

2023-11-09 Thread Alex Deucher
For backwards compatibility with userspace. Fixes: 47f1724db4fe ("drm/amd: Introduce `AMDGPU_PP_SENSOR_GPU_INPUT_POWER`") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2897 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 7 ++- 1 file changed, 6

RE: [PATCH 2/2] drm/amdgpu: add amdgpu runpm usage trace for separate funcs

2023-11-09 Thread Deucher, Alexander
[Public] > -Original Message- > From: Liang, Prike > Sent: Thursday, November 9, 2023 2:37 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Liang, Prike > > Subject: [PATCH 2/2] drm/amdgpu: add amdgpu runpm usage trace for > separate funcs > > Add trace for amdgpu runpm

RE: [PATCH 1/2] drm/amdgpu: correct the amdgpu runtime dereference usage count

2023-11-09 Thread Deucher, Alexander
[Public] > -Original Message- > From: Liang, Prike > Sent: Thursday, November 9, 2023 2:37 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Liang, Prike > > Subject: [PATCH 1/2] drm/amdgpu: correct the amdgpu runtime dereference > usage count > > Fix the amdgpu runpm

Re: [PATCH] drm/amdgpu: move UVD and VCE sched entity init after sched init

2023-11-09 Thread Luben Tuikov
On 2023-11-09 11:13, Alex Deucher wrote: > Ping? > > On Wed, Nov 8, 2023 at 1:42 PM Alex Deucher wrote: >> >> We need kernel scheduling entities to deal with handle clean up >> if apps are not cleaned up properly. With commit 56e449603f0ac5 >> ("drm/sched: Convert the GPU scheduler to variable

[PATCH 5/5] drm/amdgpu/gmc9: disable AGP aperture

2023-11-09 Thread Alex Deucher
We've had misc reports of random IOMMU page faults when this is used. It's just a rarely used optimization anyway, so let's just disable it. It can still be toggled via the module parameter for testing. v2: leave it configurable via module parameter Reviewed-by: Yang Wang (v1) Signed-off-by:

[PATCH 4/5] drm/amdgpu/gmc10: disable AGP aperture

2023-11-09 Thread Alex Deucher
We've had misc reports of random IOMMU page faults when this is used. It's just a rarely used optimization anyway, so let's just disable it. It can still be toggled via the module parameter for testing. v2: leave it configurable via module parameter Reviewed-by: Yang Wang (v1) Signed-off-by:

[PATCH 2/5] drm/amdgpu: add a module parameter to control the AGP aperture

2023-11-09 Thread Alex Deucher
Add a module parameter to control the AGP aperture. The AGP aperture is an aperture in the GPU's internal address space which provides direct non-paged access to the platform address space. This access is non-snooped so only uncached memory can be accessed. Add a knob so that we can toggle this

[PATCH 1/5] drm/amdgpu/gmc11: fix logic typo in AGP check

2023-11-09 Thread Alex Deucher
Should be && rather than ||. Fixes: b2e1cbe6281f ("drm/amdgpu/gmc11: disable AGP on GC 11.5") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c

[PATCH 3/5] drm/amdgpu/gmc11: disable AGP aperture

2023-11-09 Thread Alex Deucher
We've had misc reports of random IOMMU page faults when this is used. It's just a rarely used optimization anyway, so let's just disable it. It can still be toggled via the module parameter for testing. v2: leave it configurable via module parameter Reviewed-by: Yang Wang (v1) Signed-off-by:

Re: [PATCH] drm/amd: Explicitly check for GFXOFF to be enabled for s0ix

2023-11-09 Thread Deucher, Alexander
[Public] Reviewed-by: Alex Deucher From: amd-gfx on behalf of Mario Limonciello Sent: Thursday, November 9, 2023 11:27 AM To: amd-gfx@lists.freedesktop.org Cc: Limonciello, Mario Subject: [PATCH] drm/amd: Explicitly check for GFXOFF to be enabled for s0ix

[PATCH] drm/amd: Explicitly check for GFXOFF to be enabled for s0ix

2023-11-09 Thread Mario Limonciello
If a user has disabled GFXOFF this may cause problems for the suspend sequence. Ensure that it is enabled in amdgpu_acpi_is_s0ix_active(). The system won't reach the deepest state but it also won't hang. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +++ 1

[PATCH v3] drm/amdgpu: Change extended-scope MTYPE on GC 9.4.3

2023-11-09 Thread David Yat Sin
Change local memory type to MTYPE_UC on revision id 0 Signed-off-by: David Yat Sin --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +-- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 7 +-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

Re: [PATCH] drm/amdgpu: move UVD and VCE sched entity init after sched init

2023-11-09 Thread Alex Deucher
Ping? On Wed, Nov 8, 2023 at 1:42 PM Alex Deucher wrote: > > We need kernel scheduling entities to deal with handle clean up > if apps are not cleaned up properly. With commit 56e449603f0ac5 > ("drm/sched: Convert the GPU scheduler to variable number of run-queues") > the scheduler entities

Re: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-09 Thread Alex Deucher
On Thu, Nov 9, 2023 at 7:14 AM José Pekkarinen wrote: > > On 2023-11-09 11:06, Greg KH wrote: > > On Thu, Nov 09, 2023 at 10:43:50AM +0200, José Pekkarinen wrote: > >> On 2023-11-08 09:29, Greg KH wrote: > >> > On Wed, Nov 08, 2023 at 08:54:35AM +0200, José Pekkarinen wrote: > >> > > The

RE: [PATCH 1/3] drm/amdgpu/gmc11: disable AGP aperture

2023-11-09 Thread Wang, Yang(Kevin)
Series is Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Thursday, November 9, 2023 10:42 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 1/3] drm/amdgpu/gmc11: disable AGP aperture We've had

Re: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-09 Thread José Pekkarinen
On 2023-11-09 11:06, Greg KH wrote: On Thu, Nov 09, 2023 at 10:43:50AM +0200, José Pekkarinen wrote: On 2023-11-08 09:29, Greg KH wrote: > On Wed, Nov 08, 2023 at 08:54:35AM +0200, José Pekkarinen wrote: > > The following case seems to be safe to be replaced with a flexible > > array > > to

[PATCH] drm/amd/pm: make power values signed

2023-11-09 Thread José Pekkarinen
The following patch will convert the power values returned by amdgpu_hwmon_get_power to signed, fixing the following warnings reported by coccinelle: drivers/gpu/drm/amd/pm/amdgpu_pm.c:2801:5-8: WARNING: Unsigned expression compared with zero: val < 0 drivers/gpu/drm/amd/pm/amdgpu_pm.c:2814:5-8:

Re: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-09 Thread Greg KH
On Thu, Nov 09, 2023 at 10:43:50AM +0200, José Pekkarinen wrote: > On 2023-11-08 09:29, Greg KH wrote: > > On Wed, Nov 08, 2023 at 08:54:35AM +0200, José Pekkarinen wrote: > > > The following case seems to be safe to be replaced with a flexible > > > array > > > to clean up the added coccinelle

Re: [PATCH] drm/amd/pm: replace 1-element arrays with flexible-array members

2023-11-09 Thread José Pekkarinen
On 2023-11-08 09:29, Greg KH wrote: On Wed, Nov 08, 2023 at 08:54:35AM +0200, José Pekkarinen wrote: The following case seems to be safe to be replaced with a flexible array to clean up the added coccinelle warning. This patch will just do it.

[PATCH 2/3] drm/amdgpu/gmc10: disable AGP aperture

2023-11-09 Thread Alex Deucher
We've had misc reports of random IOMMU page faults when this is used. It's just a rarely used optimization anyway, so let's just disable it. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 1/3] drm/amdgpu/gmc11: disable AGP aperture

2023-11-09 Thread Alex Deucher
We've had misc reports of random IOMMU page faults when this is used. It's just a rarely used optimization anyway, so let's just disable it. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH 3/3] drm/amdgpu/gmc9: disable AGP aperture

2023-11-09 Thread Alex Deucher
We've had misc reports of random IOMMU page faults when this is used. It's just a rarely used optimization anyway, so let's just disable it. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 1/2] drm/amdgpu: fix error handling in amdgpu_bo_list_get()

2023-11-09 Thread Christian König
We should not leak the pointer where we couldn't grab the reference on to the caller because it can be that the error handling still tries to put the reference then. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 2/2] drm/amdgpu: lower CS errors to debug severity

2023-11-09 Thread Christian König
Otherwise userspace can spam the logs by using incorrect input values. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

Re: [PATCH] drm/amdkfd: Clear the VALU exception state in the trap handler

2023-11-09 Thread Lancelot SIX
The trap handler could be entered with pending VALU exceptions, so clear the exception state before issuing vector instructions. Signed-off-by: Laurent Morichetti Reviewed-by: Jay Cornwall Hi, FYI, I tested this and it fixes the issue. Best, Lancelot. Tested-by: Lancelot Six

Re: [PATCH 5/6] drm/amdkfd: Import DMABufs for interop through DRM

2023-11-09 Thread Christian König
Am 07.11.23 um 17:58 schrieb Felix Kuehling: Use drm_gem_prime_fd_to_handle to import DMABufs for interop. This ensures that a GEM handle is created on import and that obj->dma_buf will be set and remain set as long as the object is imported into KFD. Signed-off-by: Felix Kuehling Acked-by:

Re: [PATCH 2/6] drm/amdgpu: New VM state for evicted user BOs

2023-11-09 Thread Christian König
Am 08.11.23 um 22:23 schrieb Felix Kuehling: On 2023-11-08 07:28, Christian König wrote: Not necessary objections to this patch here, but rather how this new state is used later on. The fundamental problem is that re-validating things in amdgpu_vm_handle_moved() won't work in all cases.

[PATCH v2] drm/amdgpu: Move mca debug mode decision to ras

2023-11-09 Thread Lijo Lazar
Refactor code such that ras block decides the default mca debug mode, and not swsmu block. By default mca debug mode is set to true for now. Signed-off-by: Lijo Lazar --- v2: Set mca debug mode early before ras block late init as ras query is initiated during late init of ras blocks (KevinYang)

RE: [PATCH] drm/amdgpu: Move mca debug mode decision to ras

2023-11-09 Thread Wang, Yang(Kevin)
Hi Lijo, after our private discussion, in driver polling mode, the RAS will return 0 error count in driver probe stage (at that time the debug mode is in off state). In the case of driver polling mode, debug mode needs to be turned on in advance. Best Regards, Kevin -Original Message-