[PATCH] drm/amd/pm: Check amdgpu_runtime_pm when setting maco_support flag

2023-11-07 Thread Ma Jun
Check amdgpu_runtime_pm when setting maco_support flag so that we only check maco_support flag when use it later instead of checking amdgpu_runtime_pm every time. Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c| 15 +-- .../gpu/drm/amd/pm/swsmu/smu13/smu_

Re: [PATCH] drm/amdgpu: fix AGP init order

2023-11-07 Thread Christian König
Am 07.11.23 um 20:14 schrieb Alex Deucher: The default AGP settings were overwriting the IP selected ones since the default was getting set after the IP ones were selected. Fixes: de59b69932e6 ("drm/amdgpu/gmc: set a default disable value for AGP") Link: https://lists.freedesktop.org/archives/am

Re: [PATCH] drm/amdgpu: move buffer funcs setting up a level

2023-11-07 Thread Christian König
Am 07.11.23 um 16:14 schrieb Alex Deucher: On Tue, Nov 7, 2023 at 9:52 AM Christian König wrote: This is only needed for certain UVD/VCE hardware/firmware versions. We currently enable it for all UVD and VCE versions. Leo needs to decide that, but I would rather like to keep the call to crea

RE: [PATCH v2 2/4] drm/amd/pm: Add support to fetch pm metrics sample

2023-11-07 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Series is. Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: Lazar, Lijo Sent: Wednesday, November 8, 2023 12:22 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander ; Wang, Yang(Kevin) Subject: [PATCH v2 2/4]

[PATCH v2 2/4] drm/amd/pm: Add support to fetch pm metrics sample

2023-11-07 Thread Lijo Lazar
Add API support to fetch a snapshot of power management metrics from PMFW. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- v2: Return EOPNOTSUPP if callback not implemented (KevinYang) drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/pm/amdgpu_dpm.c

[PATCH v2 4/4] drm/amd/pm: Add sysfs attribute to get pm metrics

2023-11-07 Thread Lijo Lazar
Add sysfs attribute to read power management metrics. A snapshot is captured to the buffer when the attribute is read. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 40 ++ 1 file changed, 40 insertions(+) diff --git a/

[PATCH v2 3/4] drm/amd/pm: Add pm metrics support to SMU v13.0.6

2023-11-07 Thread Lijo Lazar
Add support to fetch PM metrics sample from SMU v13.0.6 Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers

[PATCH v2 1/4] drm/amdgpu: add pm metrics structure definition

2023-11-07 Thread Lijo Lazar
From: Alex Deucher Define the pm metrics structures to be exposed via sysfs. Signed-off-by: Alex Deucher Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/dr

[PATCH 6/6] drm/amdgpu: Read aquavanjaram USR register state

2023-11-07 Thread Lijo Lazar
Add support to read state of USR links in aquavanjaram SOC. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 127 + 1 file changed, 127 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c b/drivers/gpu/

[PATCH 5/6] drm/amdgpu: Read aquavanjaram WAFL register state

2023-11-07 Thread Lijo Lazar
Add support to read state of WAFL links in aquavanjaram SOC. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 76 ++ 1 file changed, 76 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c b/drivers/gpu/

[PATCH 1/6] drm/amdgpu: add amdgpu_reg_state.h

2023-11-07 Thread Lijo Lazar
From: Alex Deucher This header defines the reg state structures exposed via sysfs for umr debugging. v2: add content type Signed-off-by: Alex Deucher Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 + .../gpu/drm/amd/include/amdgp

[PATCH 3/6] drm/amdgpu: Read aquavanjaram PCIE register state

2023-11-07 Thread Lijo Lazar
Add support to read aqua vanjaram PCIE register state Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 115 + drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.h | 4 + 3 files

[PATCH 4/6] drm/amdgpu: Read aquavanjaram XGMI register state

2023-11-07 Thread Lijo Lazar
Add support to read state of XGMI links in aquavanjaram SOC. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 96 ++ 1 file changed, 96 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c b/drivers/gpu/

[PATCH 2/6] drm/amdgpu: Add reg_state sysfs attribute

2023-11-07 Thread Lijo Lazar
Add reg_state attribute to fetch the register snapshot of different IPs like XGMI, WAFL,PCIE and USR. To get a snapshot for a particular IP 1) Open the sysfs file 2) Seek to the offset as defined in amdgpu_sysfs_reg_offset 3) Read Signed-off-by: Lijo Lazar Reviewed-by: Haw

Re: [PATCH v3] drm: amd: Resolve Sphinx unexpected indentation warning

2023-11-07 Thread Lazar, Lijo
On 11/7/2023 9:58 PM, Hunter Chasens wrote: Resolves Sphinx unexpected indentation warning when compiling documentation (e.g. `make htmldocs`). Replaces tabs with spaces and adds a literal block to keep vertical formatting of the example power state list. Signed-off-by: Hunter Chasens Revi

[PATCH] r8169: fix ASPM-related issues on a number of systems with NIC version from RTL8168h

2023-11-07 Thread Li Ma
From: Heiner Kallweit This effectively reverts 4b5f82f6aaef. On a number of systems ASPM L1 causes tx timeouts with RTL8168h, see referenced bug report. Fixes: 4b5f82f6aaef ("r8169: enable ASPM L1/L1.1 from RTL8168h") Cc: sta...@vger.kernel.org Closes: https://bugzilla.kernel.org/show_bug.cgi?id

[PATCH] drm/amdgpu: Change extended-scope MTYPE on gfx v9_4_3

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

RE: [PATCH] r8169: fix ASPM-related issues on a number of systems with NIC version from RTL8168h

2023-11-07 Thread Ma, Li
[AMD Official Use Only - General] Hi Mario, Yes, this problem is on amd-staging-drm-next and I checked the adeucher/amd-staging-drm-next, this patch is not in there. Best Regards, Ma,Li -Original Message- From: Limonciello, Mario Sent: Wednesday, November 8, 2023 2:17 AM To: Ma, Li ;

RE: [PATCH 4/6] drm/amdkfd: Export DMABufs from KFD using GEM handles

2023-11-07 Thread Errabolu, Ramesh
[AMD Official Use Only - General] Reviewed-by: Ramesh Errabolu -Original Message- From: Kuehling, Felix Sent: Wednesday, November 8, 2023 1:27 AM To: Errabolu, Ramesh ; amd-gfx@lists.freedesktop.org Cc: Koenig, Christian ; Chen, Xiaogang Subject: Re: [PATCH 4/6] drm/amdkfd: Export DMA

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

2023-11-07 Thread Errabolu, Ramesh
[AMD Official Use Only - General] Reviewed-by: Ramesh Errabolu -Original Message- From: Kuehling, Felix Sent: Tuesday, November 7, 2023 10:28 PM To: amd-gfx@lists.freedesktop.org Cc: Koenig, Christian ; Chen, Xiaogang ; Errabolu, Ramesh Subject: [PATCH 5/6] drm/amdkfd: Import DMABufs

Re: 6.7/regression/KASAN: null-ptr-deref in amdgpu_ras_reset_error_count+0x2d6

2023-11-07 Thread Mikhail Gavrilov
On Wed, Nov 8, 2023 at 12:12 AM Alex Deucher wrote: > > The attached patch should fix it. Not sure why your GPU shows up as > busy. The AGP aperture was just disabled. Tested-by: Mikhail Gavrilov Thanks, after applying the patch GPU loading meets expectations. Games are working so overall all

Re: [PATCH] drm/amdkfd: Skip locking KFD when unbinding GPU

2023-11-07 Thread Felix Kuehling
On 2023-11-07 17:03, Alex Deucher wrote: On Mon, Nov 6, 2023 at 6:17 PM Felix Kuehling wrote: On 2023-11-06 2:14, Lawrence Yiu wrote: After unbinding a GPU, KFD becomes locked and unusable, resulting in applications not being able to use ROCm for compute anymore and rocminfo outputting the f

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

2023-11-07 Thread Felix Kuehling
Hi Christian, I know you have objected to this patch before. I still think this is the best solution for what I need. I can talk you through my reasoning by email or offline. If I can't convince you, I will need your guidance for a better solution. Thanks,   Felix On 2023-11-07 11:58, Feli

Re: [PATCH] drm/ttm: Schedule delayed_delete worker closer

2023-11-07 Thread Felix Kuehling
On 2023-11-07 14:45, Rajneesh Bhardwaj wrote: When a TTM BO is getting freed, to optimize the clearing operation on the workqueue, schedule it closer to a NUMA node where the memory was allocated. This avoids the cases where the ttm_bo_delayed_delete gets scheduled on the CPU cores that are acros

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

2023-11-07 Thread Felix Kuehling
Make restore workers freezable so we don't have to explicitly flush them in suspend and GPU reset code paths, and we don't accidentally try to restore BOs while the GPU is suspended. Not having to flush restore_work also helps avoid lock/fence dependencies in the GPU reset case where we're not allo

Re: [PATCH] drm/amdkfd: Skip locking KFD when unbinding GPU

2023-11-07 Thread Alex Deucher
On Mon, Nov 6, 2023 at 6:17 PM Felix Kuehling wrote: > > On 2023-11-06 2:14, Lawrence Yiu wrote: > > After unbinding a GPU, KFD becomes locked and unusable, resulting in > > applications not being able to use ROCm for compute anymore and rocminfo > > outputting the following error message: > > > >

[PATCH v3] drm: amd: Resolve Sphinx unexpected indentation warning

2023-11-07 Thread Hunter Chasens
Resolves Sphinx unexpected indentation warning when compiling documentation (e.g. `make htmldocs`). Replaces tabs with spaces and adds a literal block to keep vertical formatting of the example power state list. Signed-off-by: Hunter Chasens --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 13 +++---

Re: [PATCH v2] drm: amd: Resolve Sphinx unexpected indentation warning

2023-11-07 Thread Hunter Chasens
On Monday, November 6, 2023 11:45:24 PM EST Lazar, Lijo wrote: > On 11/7/2023 1:47 AM, Hunter Chasens wrote: > > Resolves Sphinx unexpected indentation warning when compiling > > documentation (e.g. `make htmldocs`). Replaces tabs with spaces and > > adds > > a literal block to keep vertical format

RE: [PATCH 3/6] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2023-11-07 Thread Joshi, Mukul
[AMD Official Use Only - General] > -Original Message- > From: amd-gfx On Behalf Of Felix > Kuehling > Sent: Tuesday, November 7, 2023 11:58 AM > To: amd-gfx@lists.freedesktop.org > Cc: Chen, Xiaogang ; Errabolu, Ramesh > ; Koenig, Christian > > Subject: [PATCH 3/6] drm/amdgpu: Auto-vali

Re: [PATCH 4/6] drm/amdkfd: Export DMABufs from KFD using GEM handles

2023-11-07 Thread Felix Kuehling
On 2023-11-07 14:44, Errabolu, Ramesh wrote: [AMD Official Use Only - General] My queries inline. Regards, Ramesh -Original Message- From: Kuehling, Felix Sent: Tuesday, November 7, 2023 10:28 PM To: amd-gfx@lists.freedesktop.org Cc: Koenig, Christian ; Chen, Xiaogang ; Errabolu, R

Re: [PATCH] drm/amdgpu: move buffer funcs setting up a level

2023-11-07 Thread Alex Deucher
On Tue, Nov 7, 2023 at 2:47 PM Alex Deucher wrote: > > On Tue, Nov 7, 2023 at 10:14 AM Alex Deucher wrote: > > > > On Tue, Nov 7, 2023 at 9:52 AM Christian König > > wrote: > > > > > > This is only needed for certain UVD/VCE hardware/firmware versions. > > > > We currently enable it for all UVD

Re: [PATCH] drm/amdgpu: move buffer funcs setting up a level

2023-11-07 Thread Alex Deucher
On Tue, Nov 7, 2023 at 10:14 AM Alex Deucher wrote: > > On Tue, Nov 7, 2023 at 9:52 AM Christian König > wrote: > > > > This is only needed for certain UVD/VCE hardware/firmware versions. > > We currently enable it for all UVD and VCE versions. > > > > > Leo needs to decide that, but I would rath

[PATCH] drm/ttm: Schedule delayed_delete worker closer

2023-11-07 Thread Rajneesh Bhardwaj
When a TTM BO is getting freed, to optimize the clearing operation on the workqueue, schedule it closer to a NUMA node where the memory was allocated. This avoids the cases where the ttm_bo_delayed_delete gets scheduled on the CPU cores that are across interconnect boundaries such as xGMI, PCIe etc

RE: [PATCH 4/6] drm/amdkfd: Export DMABufs from KFD using GEM handles

2023-11-07 Thread Errabolu, Ramesh
[AMD Official Use Only - General] My queries inline. Regards, Ramesh -Original Message- From: Kuehling, Felix Sent: Tuesday, November 7, 2023 10:28 PM To: amd-gfx@lists.freedesktop.org Cc: Koenig, Christian ; Chen, Xiaogang ; Errabolu, Ramesh Subject: [PATCH 4/6] drm/amdkfd: Export DM

[PATCH] drm/amdgpu: Do not program HDP_MISC_CNTL in hdp_v4_0.c under SRIOV

2023-11-07 Thread Victor Lu
This register is blocked for VF access. Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c b/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c index 3f3a6445c006..bf3bdf67abb7 100644 --- a/drivers

[PATCH] drm/amdgpu: Skip PCTL0_MMHUB_DEEPSLEEP_IB write in jpegv4.0.3 under SRIOV

2023-11-07 Thread Victor Lu
PCTL0_MMHUB_DEEPSLEEP_IB is blocked for VF access Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c index

[PATCH] drm/amdgpu: Do not program VF copy regs in mmhub v1.8 under SRIOV

2023-11-07 Thread Victor Lu
MC_VM_AGP_* registers should not be programmed by guest driver. Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c index

Re: [PATCH] drm/amd/pm: clean up redundant comparisons with 0

2023-11-07 Thread Guenter Roeck
On 11/7/23 09:26, José Pekkarinen wrote: On 2023-11-07 16:08, Guenter Roeck wrote: On 11/7/23 00:29, José Pekkarinen wrote: There is a couple of function return checks of functions that return unsigned values, and local variables to hold them are also unsigned, so checking if they are negative

Re: [PATCH] drm/amd/pm: clean up redundant comparisons with 0

2023-11-07 Thread José Pekkarinen
On 2023-11-07 16:08, Guenter Roeck wrote: On 11/7/23 00:29, José Pekkarinen wrote: There is a couple of function return checks of functions that return unsigned values, and local variables to hold them are also unsigned, so checking if they are negative will always return false. This patch wil

[PATCH] drm/amdgpu: fix AGP init order

2023-11-07 Thread Alex Deucher
The default AGP settings were overwriting the IP selected ones since the default was getting set after the IP ones were selected. Fixes: de59b69932e6 ("drm/amdgpu/gmc: set a default disable value for AGP") Link: https://lists.freedesktop.org/archives/amd-gfx/2023-November/100966.html Signed-off-by

Re: 6.7/regression/KASAN: null-ptr-deref in amdgpu_ras_reset_error_count+0x2d6

2023-11-07 Thread Alex Deucher
On Tue, Nov 7, 2023 at 1:18 PM Mikhail Gavrilov wrote: > > On Mon, Nov 6, 2023 at 8:29 PM Alex Deucher wrote: > > > > Already fixed in this commit: > > https://gitlab.freedesktop.org/agd5f/linux/-/commit/d1d4c0b7b65b7fab2bc6f97af9e823b1c42ccdb0 > > Which is in included in last weeks PR. > > > > T

Re: 6.7/regression/KASAN: null-ptr-deref in amdgpu_ras_reset_error_count+0x2d6

2023-11-07 Thread Mikhail Gavrilov
On Mon, Nov 6, 2023 at 8:29 PM Alex Deucher wrote: > > Already fixed in this commit: > https://gitlab.freedesktop.org/agd5f/linux/-/commit/d1d4c0b7b65b7fab2bc6f97af9e823b1c42ccdb0 > Which is in included in last weeks PR. > Thanks, it fixed the issue above. But, unfortunately this is not the only

Re: [PATCH] r8169: fix ASPM-related issues on a number of systems with NIC version from RTL8168h

2023-11-07 Thread Mario Limonciello
On 11/7/2023 02:52, Li Ma wrote: From: Heiner Kallweit [Backport: commit 90ca51e8c654699b672ba61aeaa418dfb3252e5e] This backport to avoid the bug caused by r8169. This effectively reverts 4b5f82f6aaef. On a number of systems ASPM L1 causes tx timeouts with RTL8168h, see referenced bug report.

Re: [PATCH] drm/amd/display: clean up redundant conversions to bool

2023-11-07 Thread José Pekkarinen
On 2023-11-07 17:39, Alex Deucher wrote: On Tue, Nov 7, 2023 at 4:44 AM José Pekkarinen wrote: This patch will address the following couple of warnings retrieved by using coccinelle, where there is an explicit conversion to bool that are redundant. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu

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

2023-11-07 Thread 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 9 ++-

[PATCH 3/6] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2023-11-07 Thread Felix Kuehling
DMABuf imports in compute VMs are not wrapped in a kgd_mem object on the process_info->kfd_bo_list. There is no explicit KFD API call to validate them or add eviction fences to them. This patch automatically validates and fences dymanic DMABuf imports when they are added to a compute VM. Revalidat

[PATCH 6/6] drm/amdkfd: Bump KFD ioctl version

2023-11-07 Thread Felix Kuehling
This is not strictly a change in the IOCTL API. This version bump is meant to indicate to user mode the presence of a number of changes and fixes that enable the management of VA mappings in compute VMs using the GEM_VA ioctl for DMABufs exported from KFD. Signed-off-by: Felix Kuehling --- inclu

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

2023-11-07 Thread Felix Kuehling
Create a new VM state to track user BOs that are in the system domain. In the next patch this will be used do conditionally re-validate them in amdgpu_vm_handle_moved. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 + drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 4/6] drm/amdkfd: Export DMABufs from KFD using GEM handles

2023-11-07 Thread Felix Kuehling
Create GEM handles for exporting DMABufs using GEM-Prime APIs. The GEM handles are created in a drm_client_dev context to avoid exposing them in user mode contexts through a DMABuf import. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 11 +++ drivers/gpu/d

[PATCH 1/6] drm/amdgpu: Fix possible null pointer dereference

2023-11-07 Thread Felix Kuehling
mem = bo->tbo.resource may be NULL in amdgpu_vm_bo_update. Fixes: 180253782038 ("drm/ttm: stop allocating dummy resources during BO creation") Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

Re: [PATCH] drm/amdgpu: move buffer funcs setting up a level

2023-11-07 Thread Michel Dänzer
On 11/7/23 15:47, Alex Deucher wrote: > On Tue, Nov 7, 2023 at 9:19 AM Alex Deucher wrote: >> On Tue, Nov 7, 2023 at 5:52 AM Christian König >> wrote: >>> Am 03.11.23 um 23:10 schrieb Alex Deucher: On Fri, Nov 3, 2023 at 4:17 PM Alex Deucher wrote: > On Thu, Oct 26, 2023 at 4:17 PM Lube

Re: [PATCH] drm/amdgpu: don't put MQDs in VRAM on ARM | ARM64

2023-11-07 Thread Alexey Klimov
On Tue, 31 Oct 2023 at 17:55, Alex Deucher wrote: > > Issues were reported with commit 1cfb4d612127 > ("drm/amdgpu: put MQDs in VRAM") on an ADLINK Ampere > Altra Developer Platform (AVA developer platform). > > Various ARM systems seem to have problems related > to PCIe and MMIO access. In this

Re: [PATCH] drm/amd/display: clean up redundant conversions to bool

2023-11-07 Thread Alex Deucher
On Tue, Nov 7, 2023 at 4:44 AM José Pekkarinen wrote: > > This patch will address the following couple of warnings retrieved by > using coccinelle, where there is an explicit conversion to bool that > are redundant. > > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c:94:102-107: WARNING:

Re: [PATCH] drm/amdgpu: move buffer funcs setting up a level

2023-11-07 Thread Alex Deucher
On Tue, Nov 7, 2023 at 9:52 AM Christian König wrote: > > This is only needed for certain UVD/VCE hardware/firmware versions. We currently enable it for all UVD and VCE versions. > > Leo needs to decide that, but I would rather like to keep the call to > create the entity in the HW IP specific f

Re: [PATCH] drm/amdgpu: move buffer funcs setting up a level

2023-11-07 Thread Christian König
This is only needed for certain UVD/VCE hardware/firmware versions. Leo needs to decide that, but I would rather like to keep the call to create the entity in the HW IP specific files. Regards, Christian. Am 07.11.23 um 15:47 schrieb Alex Deucher: On Tue, Nov 7, 2023 at 9:19 AM Alex Deucher

Re: [PATCH] drm/amdgpu: move buffer funcs setting up a level

2023-11-07 Thread Alex Deucher
On Tue, Nov 7, 2023 at 9:19 AM Alex Deucher wrote: > > On Tue, Nov 7, 2023 at 5:52 AM Christian König > wrote: > > > > Am 03.11.23 um 23:10 schrieb Alex Deucher: > > > On Fri, Nov 3, 2023 at 4:17 PM Alex Deucher wrote: > > >> On Thu, Oct 26, 2023 at 4:17 PM Luben Tuikov wrote: > > >>> Pushed to

Re: [PATCH] drm/amdgpu: Refactor 'amdgpu_connector_dvi_detect' in amdgpu_connectors.c

2023-11-07 Thread Aurabindo Pillai
On 8/1/2023 10:19 PM, Srinivasan Shanmugam wrote: Fixes the below: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' WARNING: Missing a blank line after declarations WARNING: Too many leading tabs - consider code refactoring + if (list_con

Re: [PATCH] drm/amdgpu: move buffer funcs setting up a level

2023-11-07 Thread Alex Deucher
On Tue, Nov 7, 2023 at 5:52 AM Christian König wrote: > > Am 03.11.23 um 23:10 schrieb Alex Deucher: > > On Fri, Nov 3, 2023 at 4:17 PM Alex Deucher wrote: > >> On Thu, Oct 26, 2023 at 4:17 PM Luben Tuikov wrote: > >>> Pushed to drm-misc-next. > >> BTW, I'm seeing the following on older GPUs wit

Re: [PATCH] drm/amd/pm: clean up redundant comparisons with 0

2023-11-07 Thread Guenter Roeck
On 11/7/23 00:29, José Pekkarinen wrote: There is a couple of function return checks of functions that return unsigned values, and local variables to hold them are also unsigned, so checking if they are negative will always return false. This patch will remove them, as well as the never reached c

[PATCH] drm/amd/display: clean up redundant conversions to bool

2023-11-07 Thread José Pekkarinen
This patch will address the following couple of warnings retrieved by using coccinelle, where there is an explicit conversion to bool that are redundant. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c:94:102-107: WARNING: conversion to bool not needed here drivers/gpu/drm/amd/display/am

[PATCH] drm/amd/pm: clean up redundant comparisons with 0

2023-11-07 Thread José Pekkarinen
There is a couple of function return checks of functions that return unsigned values, and local variables to hold them are also unsigned, so checking if they are negative will always return false. This patch will remove them, as well as the never reached code. drivers/gpu/drm/amd/pm/amdgpu_pm.c:28

Re: [PATCH AUTOSEL 6.6 21/40] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430

2023-11-07 Thread Alex Deucher
On Tue, Nov 7, 2023 at 7:20 AM Sasha Levin wrote: > > From: Mario Limonciello > > [ Upstream commit c63079c61177ba1b17fa05c6875699a36924fe39 ] > > For pptable structs that use flexible array sizes, use flexible arrays. > > Suggested-by: Felix Held > Link: https://gitlab.freedesktop.org/drm/amd/-

[PATCH AUTOSEL 4.14 3/4] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 0f0e59075b5c22f1e871fbd508d6e4f495048356 ] For pptable structs that use flexible array sizes, use flexible arrays. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by

[PATCH AUTOSEL 4.14 2/4] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit c63079c61177ba1b17fa05c6875699a36924fe39 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 4.14 1/4] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 760efbca74a405dc439a013a5efaa9fadc95a8c3 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2874 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 4.19 4/5] drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL

2023-11-07 Thread Sasha Levin
From: Qu Huang [ Upstream commit 5104fdf50d326db2c1a994f8b35dcd46e63ae4ad ] In certain types of chips, such as VEGA20, reading the amdgpu_regs_smc file could result in an abnormal null pointer access when the smc_rreg pointer is NULL. Below are the steps to reproduce this issue and the corresp

[PATCH AUTOSEL 4.19 3/5] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 0f0e59075b5c22f1e871fbd508d6e4f495048356 ] For pptable structs that use flexible array sizes, use flexible arrays. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by

[PATCH AUTOSEL 4.19 1/5] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 760efbca74a405dc439a013a5efaa9fadc95a8c3 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2874 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 4.19 2/5] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit c63079c61177ba1b17fa05c6875699a36924fe39 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 5.4 5/6] drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL

2023-11-07 Thread Sasha Levin
From: Qu Huang [ Upstream commit 5104fdf50d326db2c1a994f8b35dcd46e63ae4ad ] In certain types of chips, such as VEGA20, reading the amdgpu_regs_smc file could result in an abnormal null pointer access when the smc_rreg pointer is NULL. Below are the steps to reproduce this issue and the corresp

[PATCH AUTOSEL 5.4 4/6] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 0f0e59075b5c22f1e871fbd508d6e4f495048356 ] For pptable structs that use flexible array sizes, use flexible arrays. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by

[PATCH AUTOSEL 5.4 2/6] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 760efbca74a405dc439a013a5efaa9fadc95a8c3 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2874 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 5.4 3/6] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit c63079c61177ba1b17fa05c6875699a36924fe39 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 5.10 10/11] drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL

2023-11-07 Thread Sasha Levin
From: Qu Huang [ Upstream commit 5104fdf50d326db2c1a994f8b35dcd46e63ae4ad ] In certain types of chips, such as VEGA20, reading the amdgpu_regs_smc file could result in an abnormal null pointer access when the smc_rreg pointer is NULL. Below are the steps to reproduce this issue and the corresp

[PATCH AUTOSEL 5.10 06/11] drm/amdgpu: Fix potential null pointer derefernce

2023-11-07 Thread Sasha Levin
From: "Stanley.Yang" [ Upstream commit 80285ae1ec8717b597b20de38866c29d84d321a1 ] The amdgpu_ras_get_context may return NULL if device not support ras feature, so add check before using. Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin

[PATCH AUTOSEL 5.10 05/11] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 0f0e59075b5c22f1e871fbd508d6e4f495048356 ] For pptable structs that use flexible array sizes, use flexible arrays. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by

[PATCH AUTOSEL 5.10 04/11] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit c63079c61177ba1b17fa05c6875699a36924fe39 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 5.10 03/11] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 760efbca74a405dc439a013a5efaa9fadc95a8c3 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2874 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 5.15 18/20] drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL

2023-11-07 Thread Sasha Levin
From: Qu Huang [ Upstream commit 5104fdf50d326db2c1a994f8b35dcd46e63ae4ad ] In certain types of chips, such as VEGA20, reading the amdgpu_regs_smc file could result in an abnormal null pointer access when the smc_rreg pointer is NULL. Below are the steps to reproduce this issue and the corresp

[PATCH AUTOSEL 5.15 17/20] drm/amdkfd: Fix shift out-of-bounds issue

2023-11-07 Thread Sasha Levin
From: Jesse Zhang [ Upstream commit 282c1d793076c2edac6c3db51b7e8ed2b41d60a5 ] [ 567.613292] shift exponent 255 is too large for 64-bit type 'long unsigned int' [ 567.614498] CPU: 5 PID: 238 Comm: kworker/5:1 Tainted: G OE 6.2.0-34-generic #34~22.04.1-Ubuntu [ 567.614502] Har

[PATCH AUTOSEL 5.15 15/20] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit cd90511557fdfb394bb4ac4c3b539b007383914c ] In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null pointer dereference. Signed-off

[PATCH AUTOSEL 5.15 12/20] drm/amdgpu: Fix potential null pointer derefernce

2023-11-07 Thread Sasha Levin
From: "Stanley.Yang" [ Upstream commit 80285ae1ec8717b597b20de38866c29d84d321a1 ] The amdgpu_ras_get_context may return NULL if device not support ras feature, so add check before using. Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin

[PATCH AUTOSEL 5.15 11/20] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 0f0e59075b5c22f1e871fbd508d6e4f495048356 ] For pptable structs that use flexible array sizes, use flexible arrays. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by

[PATCH AUTOSEL 5.15 10/20] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit c63079c61177ba1b17fa05c6875699a36924fe39 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 5.15 09/20] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 760efbca74a405dc439a013a5efaa9fadc95a8c3 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2874 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 5.15 03/20] drm/amd/display: use full update for clip size increase of large plane source

2023-11-07 Thread Sasha Levin
From: Wenjing Liu [ Upstream commit 05b78277ef0efc1deebc8a22384fffec29a3676e ] [why] Clip size increase will increase viewport, which could cause us to switch to MPC combine. If we skip full update, we are not able to change to MPC combine in fast update. This will cause corruption showing on t

[PATCH AUTOSEL 5.15 02/20] drm/amdkfd: Fix a race condition of vram buffer unref in svm code

2023-11-07 Thread Sasha Levin
From: Xiaogang Chen [ Upstream commit 709c348261618da7ed89d6c303e2ceb9e453ba74 ] prange->svm_bo unref can happen in both mmu callback and a callback after migrate to system ram. Both are async call in different tasks. Sync svm_bo unref operation to avoid random "use-after-free". Signed-off-by:

[PATCH AUTOSEL 6.1 23/25] drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL

2023-11-07 Thread Sasha Levin
From: Qu Huang [ Upstream commit 5104fdf50d326db2c1a994f8b35dcd46e63ae4ad ] In certain types of chips, such as VEGA20, reading the amdgpu_regs_smc file could result in an abnormal null pointer access when the smc_rreg pointer is NULL. Below are the steps to reproduce this issue and the corresp

[PATCH AUTOSEL 6.1 22/25] drm/amdkfd: Fix shift out-of-bounds issue

2023-11-07 Thread Sasha Levin
From: Jesse Zhang [ Upstream commit 282c1d793076c2edac6c3db51b7e8ed2b41d60a5 ] [ 567.613292] shift exponent 255 is too large for 64-bit type 'long unsigned int' [ 567.614498] CPU: 5 PID: 238 Comm: kworker/5:1 Tainted: G OE 6.2.0-34-generic #34~22.04.1-Ubuntu [ 567.614502] Har

[PATCH AUTOSEL 6.1 20/25] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit cd90511557fdfb394bb4ac4c3b539b007383914c ] In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null pointer dereference. Signed-off

[PATCH AUTOSEL 6.1 19/25] drm/radeon: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit 2c1fe3c480f9e1deefd50d4b18be4a046011ee1f ] In radeon_tv_get_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null point dereference. Signed-off-by: Ma K

[PATCH AUTOSEL 6.1 16/25] drm/amdgpu: Fix potential null pointer derefernce

2023-11-07 Thread Sasha Levin
From: "Stanley.Yang" [ Upstream commit 80285ae1ec8717b597b20de38866c29d84d321a1 ] The amdgpu_ras_get_context may return NULL if device not support ras feature, so add check before using. Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin

[PATCH AUTOSEL 6.1 15/25] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 0f0e59075b5c22f1e871fbd508d6e4f495048356 ] For pptable structs that use flexible array sizes, use flexible arrays. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by

[PATCH AUTOSEL 6.1 13/25] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 760efbca74a405dc439a013a5efaa9fadc95a8c3 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2874 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 6.1 14/25] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit c63079c61177ba1b17fa05c6875699a36924fe39 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 6.1 06/25] drm/amd/display: use full update for clip size increase of large plane source

2023-11-07 Thread Sasha Levin
From: Wenjing Liu [ Upstream commit 05b78277ef0efc1deebc8a22384fffec29a3676e ] [why] Clip size increase will increase viewport, which could cause us to switch to MPC combine. If we skip full update, we are not able to change to MPC combine in fast update. This will cause corruption showing on t

[PATCH AUTOSEL 6.1 05/25] drm/amd: Update `update_pcie_parameters` functions to use uint8_t arguments

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 7752ccf85b929a22e658ec145283e8f31232f4bb ] The matching values for `pcie_gen_cap` and `pcie_width_cap` when fetched from powerplay tables are 1 byte, so narrow the arguments to match to ensure min() and max() comparisons without casts. Signed-off-by: Ma

[PATCH AUTOSEL 6.1 04/25] drm/amdkfd: Fix a race condition of vram buffer unref in svm code

2023-11-07 Thread Sasha Levin
From: Xiaogang Chen [ Upstream commit 709c348261618da7ed89d6c303e2ceb9e453ba74 ] prange->svm_bo unref can happen in both mmu callback and a callback after migrate to system ram. Both are async call in different tasks. Sync svm_bo unref operation to avoid random "use-after-free". Signed-off-by:

[PATCH AUTOSEL 6.1 03/25] drm/amdgpu: not to save bo in the case of RAS err_event_athub

2023-11-07 Thread Sasha Levin
From: "David (Ming Qiang) Wu" [ Upstream commit fa1f1cc09d588a90c8ce3f507c47df257461d148 ] err_event_athub will corrupt VCPU buffer and not good to be restored in amdgpu_vcn_resume() and in this case the VCPU buffer needs to be cleared for VCN firmware to work properly. Acked-by: Leo Liu Signe

[PATCH AUTOSEL 6.5 32/37] drm/amd: check num of link levels when update pcie param

2023-11-07 Thread Sasha Levin
From: "Lin.Cao" [ Upstream commit 406e8845356d18bdf3d3a23b347faf67706472ec ] In SR-IOV environment, the value of pcie_table->num_of_link_levels will be 0, and num_of_levels - 1 will cause array index out of bounds Signed-off-by: Lin.Cao Acked-by: Jingwen Chen Signed-off-by: Alex Deucher Sign

  1   2   >