Re: [PATCH] drm/radeon: Replace kmap() with kmap_local_page()

2022-10-14 Thread Christian König
Am 13.10.22 um 23:07 schrieb Fabio M. De Francesco: The use of kmap() is being deprecated in favor of kmap_local_page(). There are two main problems with kmap(): (1) It comes with an overhead as the mapping space is restricted and protected by a global lock for synchronization and (2) it also re

Re: [PATCH v3] drm/amdgpu: dequeue mes scheduler during fini

2022-10-14 Thread Christian König
Am 14.10.22 um 05:34 schrieb YuBiao Wang: Update: Remove redundant comments as Christian suggests. [Why] If mes is not dequeued during fini, mes will be in an uncleaned state during reload, then mes couldn't receive some commands which leads to reload failure. [How] Perform MES dequeue via MMIO

[PATCH] drm/amdgpu: move convert_error_address out of umc_ras

2022-10-14 Thread Hawking Zhang
RAS error address translation algorithm is common across dGPU and A + A platform as along as the SOC integrates the same generation of UMC IP. UMC RAS is managed by x86 MCA on A + A platform, umc_ras in GPU driver is not initialized at all on A + A platform. In such case, any umc_ras callback impl

[PATCH 2/2] drm/amd/pm: enable thermal alart on smu_v13_0_10

2022-10-14 Thread Kenneth Feng
enable thermal alart on smu_v13_0_10 Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index 3d436e7f6e95.

[PATCH 1/2] drm/amd/pm: update driver-if header for smu_v13_0_10

2022-10-14 Thread Kenneth Feng
update driver-if header for smu_v13_0_10 and merge with smu_v13_0_0 Signed-off-by: Kenneth Feng --- .../inc/pmfw_if/smu13_driver_if_v13_0_0.h | 87 +++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 3 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c| 6 +- 3 files change

RE: [PATCH 2/2] drm/amd/pm: enable thermal alart on smu_v13_0_10

2022-10-14 Thread Zhang, Hawking
[AMD Official Use Only - General] + if (ret) { + dev_err(adev->dev, "Failed to enable thermal alert!\n"); + return ret; It seems code alignment issue here, please double check before the commit Other than that, series is Reviewed-by: Hawking Zhang Regards, Hawking -O

[PATCH 1/2] drm/sched: add DRM_SCHED_FENCE_DONT_PIPELINE flag

2022-10-14 Thread Christian König
Setting this flag on a scheduler fence prevents pipelining of jobs depending on this fence. In other words we always insert a full CPU round trip before dependen jobs are pushed to the pipeline. Signed-off-by: Christian König CC: sta...@vger.kernel.org # 5.19+ --- drivers/gpu/drm/scheduler/sched

[PATCH 2/2] drm/amdgpu: use DRM_SCHED_FENCE_DONT_PIPELINE for VM updates

2022-10-14 Thread Christian König
Make sure that we always have a CPU round trip to let the submission code correctly decide if a TLB flush is necessary or not. Signed-off-by: Christian König CC: sta...@vger.kernel.org # 5.19+ --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 9 - 1 file changed, 8 insertions(+), 1 delet

Fixes for scheduler hang when killing a process

2022-10-14 Thread Christian König
Hi guys, rebased those patches on top of amd-staging-drm-next since the amdgpu changes are quite substencial. Please review and comment, Christian.

[PATCH 02/13] drm/scheduler: add drm_sched_job_add_resv_dependencies

2022-10-14 Thread Christian König
Add a new function to update job dependencies from a resv obj. Signed-off-by: Christian König --- drivers/gpu/drm/scheduler/sched_main.c | 49 ++ include/drm/gpu_scheduler.h| 5 +++ 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/

[PATCH 01/13] drm/scheduler: fix fence ref counting

2022-10-14 Thread Christian König
We leaked dependency fences when processes were beeing killed. Additional to that grab a reference to the last scheduled fence. Signed-off-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sc

[PATCH 06/13] drm/amdgpu: cleanup scheduler job initialization

2022-10-14 Thread Christian König
Init the DRM scheduler base class while allocating the job. This makes the whole handling much more cleaner. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c

[PATCH 04/13] drm/amdgpu: drop the fence argument from amdgpu_vmid_grab

2022-10-14 Thread Christian König
This is always the job anyway. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 20 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 +--- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git

[PATCH 03/13] drm/amdgpu: use drm_sched_job_add_resv_dependencies for moves

2022-10-14 Thread Christian König
Use the new common scheduler functions to figure out what to wait for. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/a

[PATCH 05/13] drm/amdgpu: drop amdgpu_sync from amdgpu_vmid_grab

2022-10-14 Thread Christian König
Instead return the fence directly. Avoids memory allocation to store the fence. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 42 + drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 12 +++ 3 file

[PATCH 07/13] drm/amdgpu: move explicit sync check into the CS

2022-10-14 Thread Christian König
This moves the memory allocation out of the critical code path. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 13 - drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 12 +++- drivers/gpu/drm/amd/amdgpu/am

[PATCH 08/13] drm/amdgpu: use scheduler depenencies for VM updates

2022-10-14 Thread Christian König
Instead of putting that into the job sync object. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c| 56 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h| 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 10 +++- 3 files changed, 52 insertions(+

[PATCH 09/13] drm/amdgpu: use scheduler depenencies for UVD msgs

2022-10-14 Thread Christian König
Instead of putting that into the job sync object. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index 8baddf79

[PATCH 11/13] drm/scheduler: remove drm_sched_dependency_optimized

2022-10-14 Thread Christian König
Not used any more. Signed-off-by: Christian König --- drivers/gpu/drm/scheduler/sched_main.c | 26 -- include/drm/gpu_scheduler.h| 2 -- 2 files changed, 28 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_m

[PATCH 10/13] drm/amdgpu: use scheduler depenencies for CS

2022-10-14 Thread Christian König
Entirely remove the sync obj in the job. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 1 -

[PATCH 13/13] drm/scheduler: rename dependency callback into prepare_job

2022-10-14 Thread Christian König
This now matches much better what this is doing. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 ++-- drivers/gpu/drm/scheduler/sched_entity.c | 4 ++-- include/drm/gpu_scheduler.h | 13 ++--- 3 files changed, 10 insertions(+), 11 deletions

[PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-10-14 Thread Christian König
This was buggy because when we had to wait for entities which were killed as well we would just deadlock. Instead move all the dependency handling into the callbacks so that will all happen asynchronously. Signed-off-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 197 +++

RE: [PATCH] drm/amd/display: Fix vblank refcount in vrr transition

2022-10-14 Thread Li, Yunxiang (Teddy)
[AMD Official Use Only - General] > This patch results in a large number of compile errors if CONFIG_DEBUG_FS=n. > Reverting it fixes the problem. > > This is an architecture independent problem. > > Guenter Oops, seem to be because at amdgpu_dm.c:8328 the } should be inside the #endif not outs

[PATCH] drm/amd/display: Fix build breakage with CONFIG_DEBUG_FS=n

2022-10-14 Thread Nathan Chancellor
After commit 8799c0be89eb ("drm/amd/display: Fix vblank refcount in vrr transition"), a build with CONFIG_DEBUG_FS=n is broken due to a misplaced brace, along the lines of: In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_trace.h:39, from drive

[PATCH] drm/amd/display: add a WARN() to irq service functions

2022-10-14 Thread Hamza Mahfooz
Currently, if we encounter unimplemented functions, it is difficult to tell what caused them just by looking at dmesg and that is compounded by the fact that it is often hard to reproduce said issues. So, to have access to more detailed debugging information, add a WARN() to dal_irq_service_ack() a