Re: [PATCH v2] drm/amdgpu: Fix call trace warning and hang when removing amdgpu device

2023-03-01 Thread Christian König
Am 02.03.23 um 07:32 schrieb lyndonli: On GPUs with RAS enabled, below call trace and hang are observed when shutting down device. v2: use DRM device unplugged flag instead of shutdown flag as the check to prevent memory wipe in shutdown stage. [ +0.00] RIP:

[PATCH] drm/amdgpu: disable cstate properly for driver reloading scenario

2023-03-01 Thread Evan Quan
Gpu reset might be needed during driver reloading. To guard that(gpu reset) work, df cstate needs to be disabled properly. Signed-off-by: Evan Quan Change-Id: I5c074c265c0b08a67b6934ae1ad9aa3fed245461 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 + 1 file changed, 9 insertions(+)

Re: [PATCH 1/9] drm: execution context for GEM buffers v3

2023-03-01 Thread Christian König
Am 28.02.23 um 20:13 schrieb Danilo Krummrich: [SNIP] +    if (exec->prelocked) { +    dma_resv_unlock(exec->prelocked->resv); +    drm_gem_object_put(exec->prelocked); +    exec->prelocked = NULL; +    } Let's say we try to lock 3 objects A, B and C in chronological order and in

[PATCH] drm/amd/pm: set vangogh_set_apu_thermal_limit storage-class-specifier to static

2023-03-01 Thread Tom Rix
gcc with W=1 reports drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1600:5: error: no previous prototype for ‘vangogh_set_apu_thermal_limit’ [-Werror=missing-prototypes] 1600 | int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t limit) |

[PATCH v2] drm/amdkfd: Cal vram offset in TTM resource for each svm_migrate_copy_to_vram

2023-03-01 Thread Xiaogang . Chen
From: Xiaogang Chen svm_migrate_ram_to_vram migrates a prange from sys ram to vram. The prange may cross multiple vma. Need remember current dst vram offset in the TTM resource for each migration. Signed-off-by: Xiaogang Chen --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 17

[linux-next:master] BUILD REGRESSION 1716a175592aff9549a0c07aac8f9cadd03003f5

2023-03-01 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 1716a175592aff9549a0c07aac8f9cadd03003f5 Add linux-next specific files for 20230301 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202302111601.jty4lkra-...@intel.com https

Re: [PATCH v2] drm/amdkfd: Cal vram offset in TTM resource for each svm_migrate_copy_to_vram

2023-03-01 Thread Chen, Xiaogang
On 3/1/2023 12:54 PM, Felix Kuehling wrote: Am 2023-03-01 um 11:34 schrieb Xiaogang.Chen: From: Xiaogang Chen svm_migrate_ram_to_vram migrates a prange from sys ram to vram. The prange may cross multiple vma. Need remember current dst vram offset in the TTM resource for each migration.

Re: [PATCH v2] drm/amdkfd: Cal vram offset in TTM resource for each svm_migrate_copy_to_vram

2023-03-01 Thread Felix Kuehling
Am 2023-03-01 um 11:34 schrieb Xiaogang.Chen: From: Xiaogang Chen svm_migrate_ram_to_vram migrates a prange from sys ram to vram. The prange may cross multiple vma. Need remember current dst vram offset in the TTM resource for each migration. Signed-off-by: Xiaogang Chen The patch looks

Re: [PATCH] drm/amd/display: Simplify same effect if/else blocks

2023-03-01 Thread Deepak R Varma
On Mon, Jan 23, 2023 at 12:23:19AM +0530, Deepak R Varma wrote: > On Sun, Jan 15, 2023 at 12:52:10PM -0800, Joe Perches wrote: > > On Sun, 2023-01-15 at 15:30 +0530, Deepak R Varma wrote: > > > The if / else block code has same effect irrespective of the logical > > > evaluation. Hence, simply

[PATCH 1/2] drm/amdgpu: skip hdp invalidation for HDP 4.4.2

2023-03-01 Thread Alex Deucher
From: Le Ma No mmHDP_READ_CACHE_INVALIDATE register on HDP 4.4.2. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c

[PATCH 2/2] drm/amdgpu: add HDP ip block for HDP 4.4.2

2023-03-01 Thread Alex Deucher
From: Hawking Zhang Add HDP IP handling for HDP 4.4.2 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 0/3] Add support for SDMA 4.4.2

2023-03-01 Thread Alex Deucher
This add support for SDMA 4.4.2. The first patch is register header updates and was too large for the mailing list. Hawking Zhang (1): drm/amdgpu: add sdma v4_4_2 ip headers Le Ma (2): drm/amdgpu: add sdma v4_4_2 support (v4) drm/amdgpu: set sdma v4_4_2 ip block

Re: [PATCH v2] drm/amdkfd: Cal vram offset in TTM resource for each svm_migrate_copy_to_vram

2023-03-01 Thread Felix Kuehling
On 2023-03-01 14:24, Chen, Xiaogang wrote: On 3/1/2023 12:54 PM, Felix Kuehling wrote: Am 2023-03-01 um 11:34 schrieb Xiaogang.Chen: From: Xiaogang Chen svm_migrate_ram_to_vram migrates a prange from sys ram to vram. The prange may cross multiple vma. Need remember current dst vram

[PATCH 1/3] drm/amdgpu: set ih chicken bit for IH 4.4.2

2023-03-01 Thread Alex Deucher
From: Le Ma Share same register address with IH 4.4.0. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c

[PATCH 2/3] drm/amdgpu: skip ih2 rb allocation for IH 4.4.2

2023-03-01 Thread Alex Deucher
From: Le Ma No ih2 hardware on IH 4.4.2. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c

[PATCH 3/3] drm/amdgpu: add IH ip block for IH 4.4.2

2023-03-01 Thread Alex Deucher
From: Hawking Zhang Add IH IP handling for IH 4.4.2 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 2/3] drm/amdgpu: add sdma v4_4_2 support (v4)

2023-03-01 Thread Alex Deucher
From: Le Ma Add support for SDMA 4.4.2. v1: Create sdma_v4_4_2.[c|h] for initial support (Le) v2: update amdgpu_ring_init call with atomic score (Hawking) v3: Squash in sdma_start fixes (Alex) v4: Comment out currently unused RAS code (Alex) Signed-off-by: Le Ma Signed-off-by: Hawking Zhang

[PATCH 3/3] drm/amdgpu: set sdma v4_4_2 ip block

2023-03-01 Thread Alex Deucher
From: Le Ma Use sdma 4.4.2 IP block for chips with sdma 4.4.2 hardware. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 1 file changed, 4 insertions(+) diff --git

RE: [PATCH] drm/amdgpu: Fix call trace warning and hang when removing amdgpu device

2023-03-01 Thread Chen, Guchun
- adev->in_suspend || adev->ddev.unplugged) I don't think the code base is correct. Please double check it. Regards, Guchun -Original Message- From: lyndonli Sent: Thursday, March 2, 2023 12:57 PM To: amd-gfx@lists.freedesktop.org Cc: Koenig, Christian ; Chen, Guchun ;

RE: [PATCH v2] drm/amdgpu: Fix call trace warning and hang when removing amdgpu device

2023-03-01 Thread Chen, Guchun
Reviewed-by: Guchun Chen Regards, Guchun -Original Message- From: lyndonli Sent: Thursday, March 2, 2023 2:33 PM To: amd-gfx@lists.freedesktop.org Cc: Koenig, Christian ; Chen, Guchun ; Chai, Thomas ; Xu, Feifei ; Li, Lyndon Subject: [PATCH v2] drm/amdgpu: Fix call trace warning

RE: [PATCH] drm/amdgpu: remove unused variable

2023-03-01 Thread Chen, Guchun
Reviewed-by: Guchun Chen Regards, Guchun -Original Message- From: bobzhou Sent: Thursday, March 2, 2023 2:44 PM To: amd-gfx@lists.freedesktop.org; Chen, Guchun ; Cui, Flora ; Shi, Leslie ; Ma, Jun Cc: Zhou, Bob Subject: [PATCH] drm/amdgpu: remove unused variable building with gcc

[PATCH v2] drm/amdgpu: Fix call trace warning and hang when removing amdgpu device

2023-03-01 Thread lyndonli
On GPUs with RAS enabled, below call trace and hang are observed when shutting down device. v2: use DRM device unplugged flag instead of shutdown flag as the check to prevent memory wipe in shutdown stage. [ +0.00] RIP: 0010:amdgpu_vram_mgr_fini+0x18d/0x1c0 [amdgpu] [ +0.01] PKRU:

[PATCH] drm/amdgpu: Fix call trace warning and hang when removing amdgpu device

2023-03-01 Thread lyndonli
On GPUs with RAS enabled, below call trace and hang are observed when shutting down device. v2: use DRM device unplugged flag instead of shutdown flag as the check to prevent memory wipe in shutdown stage. [ +0.00] RIP: 0010:amdgpu_vram_mgr_fini+0x18d/0x1c0 [amdgpu] [ +0.01] PKRU:

[pull] amdgpu, amdkfd, radeon drm-fixes-6.3

2023-03-01 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 6.3. A bit bigger than usual since it's two weeks worth of fixes. The following changes since commit a48bba98380cb0b43dcd01d276c7efc282e3c33f: msm/fbdev: fix unused variable warning with clang. (2023-02-23 09:48:05 +1000) are available in the Git repository at:

RE: [PATCH] drm/amdgpu: Stop clearing kiq position during fini

2023-03-01 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] After the patch merge, the "tmp" variable will not be used, and a compilation warning will be generated. Best Regards, Kevin -Original Message- From: amd-gfx On Behalf Of Yaoyao Lei Sent: Monday, February 27, 2023 2:46 PM To:

RE: [PATCH] drm/amdgpu: Fix call trace warning and hang when removing amdgpu device

2023-03-01 Thread Li, Lyndon
Sorry, the code base was incorrect. I just sent out a v2. Regards, Lyndon > -Original Message- > From: Chen, Guchun > Sent: Thursday, March 2, 2023 1:28 PM > To: Li, Lyndon ; amd-gfx@lists.freedesktop.org > Cc: Koenig, Christian ; Chai, Thomas > ; Xu, Feifei ; Li, Lyndon > > Subject:

[PATCH] drm/amdgpu: remove unused variable

2023-03-01 Thread bobzhou
building with gcc and W=1 reports drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:7292:11: error: unused variable 'tmp' [-Werror=unused-variable] uint32_t tmp; ^~~ tmp is not used so remove it. Signed-off-by: bobzhou --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 - 1 file changed, 1

Re: [PATCH 1/1] amdkfd: Memory availability can never be negative

2023-03-01 Thread Felix Kuehling
Am 2023-03-01 um 18:46 schrieb Daniel Phillips: Our assumptions about how much KFD memory is currently available for allocation may be violated by various complexities so we define the reported value as advisory, however we should never report negative availability. Signed-off-by: Daniel

[PATCH 1/1] amdkfd: Memory availability can never be negative

2023-03-01 Thread Daniel Phillips
Our assumptions about how much KFD memory is currently available for allocation may be violated by various complexities so we define the reported value as advisory, however we should never report negative availability. Signed-off-by: Daniel Phillips ---

[PATCH 1/1] amdkfd: Memory availability can never be negative

2023-03-01 Thread Daniel Phillips
Our assumptions about how much KFD memory is currently available for allocation may be violated by various complexities so we define the reported value as advisory, however we should never report negative availability. Signed-off-by: Daniel Phillips ---

RE: [PATCH] drm/amd/pm: Enable ecc_info table support for smu v13_0_10

2023-03-01 Thread Yang, Stanley
[AMD Official Use Only - General] Reviewed-by: Stanley.Yang Regards, Stanley > -Original Message- > From: amd-gfx On Behalf Of > Candice Li > Sent: Wednesday, March 1, 2023 2:10 PM > To: amd-gfx@lists.freedesktop.org > Cc: Li, Candice > Subject: [PATCH] drm/amd/pm: Enable ecc_info

RE: [PATCH] drm/amd/pm: Enable ecc_info table support for smu v13_0_10

2023-03-01 Thread Chen, Guchun
ret = smu_cmn_get_smc_version(smu, _version, _version); + if (ret) + return -EOPNOTSUPP; A nit-pick comment, looks querying if_version in this case is redundant, passing NULL may be more efficient. Regards, Guchun -Original Message- From: amd-gfx On Behalf Of

Re: [PATCH v2 1/1] drm/doc: Document DRM device reset expectations

2023-03-01 Thread Pekka Paalanen
On Tue, 28 Feb 2023 10:26:04 -0500 André Almeida wrote: > Hi Pekka, > > Thank you for your feedback, > > On 2/28/23 05:02, Pekka Paalanen wrote: > > On Mon, 27 Feb 2023 15:40:00 -0500 > > André Almeida wrote: > > > >> Create a section that specifies how to deal with DRM device resets for >