[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()

[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

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

[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

[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

[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 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

[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

[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

[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 +++-

[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

[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

[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

[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 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

[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

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 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

[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+ ---

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

[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

[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

[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

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

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: [PATCH] drm/amdgpu: move convert_error_address out of umc_ras

2022-10-14 Thread Chen, Guchun
default: + dev_warn(adev->dev, +"UMC address to Physical address translation is not supported\n"); + return NOTIFY_DONE; Before returning, maybe it's necessary to free err_data.err_addr? Regards, Guchun -Original Message- From:

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

2022-10-14 Thread Yang, Stanley
[AMD Official Use Only - General] Reviewed-by: Stanley.Yang Regards, Stanley > -Original Message- > From: amd-gfx On Behalf Of > Hawking Zhang > Sent: Friday, October 14, 2022 2:19 PM > To: amd-gfx@lists.freedesktop.org; Zhou1, Tao ; > Yang, Stanley > Cc: Russell, Kent ; Zhang,

[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

[PATCH 8/8] drm/amdgpu: Add sriov vf ras support in amdgpu_ras_asic_supported

2022-10-14 Thread Gao, Likun
[AMD Official Use Only - General] V2: Add sriov vf ras support in amdgpu_ras_asic_supported. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git

[PATCH 7/8] drm/amdgpu: Enable ras support for mp0 v13_0_0 and v13_0_10

2022-10-14 Thread Gao, Likun
[AMD Official Use Only - General] V1: Enable ras support for CHIP_IP_DISCOVERY asic type. V2: 1. Change commit comment. 2. Enable ras support for mp0 v13_0_0 and v13_0_10. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 10 ++ 1

[PATCH 6/8] drm/amdgpu: Enable gmc soft reset on gmc_v11_0_3

2022-10-14 Thread Gao, Likun
[AMD Official Use Only - General] Enable gmc soft reset on gmc_v11_0_3. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c

[PATCH 5/8] drm/amdgpu: skip mes self test for gc 11.0.3

2022-10-14 Thread Gao, Likun
[AMD Official Use Only - General] Temporary disable mes self teset for gc 11.0.3. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c

[PATCH 4/8] drm/amd/pm: skip loading pptable from driver on secure board for smu_v13_0_10

2022-10-14 Thread Gao, Likun
[AMD Official Use Only - General] skip loading pptable from driver on secure board since it's loaded from psp. Signed-off-by: Kenneth Feng Reviewed-by: Guan Yu --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 3/8] drm/amd/amdgpu: enable gfx clock gating features on smu_v13_0_10

2022-10-14 Thread Gao, Likun
[AMD Official Use Only - General] enable gfx clock gating features on smu_v13_0_10 Signed-off-by: Kenneth Feng Reviewed-by: Jack Gui --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/soc21.c | 6 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH 2/8] drm/amd/pm: remove the pptable id override on smu_v13_0_10

2022-10-14 Thread Gao, Likun
[AMD Official Use Only - General] remove the pptable id override on smu_v13_0_10, and the id is fetched from vbios now. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH 1/8] drm/amd/pm: temporarily disable thermal alert on smu_v13_0_10

2022-10-14 Thread Gao, Likun
[AMD Official Use Only - General] temporarily disable thermal alert on smu_v13_0_10 due to kfd test fail. will enable it again after confirming the thermal hardware setting. Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 ++ 1