Re: [PATCH] drm/radeon/evergreen_cs: fix int overflow errors in cs track offsets

2024-08-19 Thread Christian König
Am 05.08.24 um 09:34 schrieb Nikita Zhandarovich: On 7/30/24 23:56, Christian König wrote: Am 30.07.24 um 19:36 schrieb Nikita Zhandarovich: On 7/29/24 11:12, Christian König wrote: Am 29.07.24 um 20:04 schrieb Christian König: Am 29.07.24 um 19:26 schrieb Nikita Zhandarovich: Hi, On 7/29

Re: [PATCH] drm/amdgpu: Add DCC GFX12 flag to enable address alignment

2024-08-19 Thread Christian König
Am 05.08.24 um 16:01 schrieb Arunpravin Paneer Selvam: We require this flag AMDGPU_GEM_CREATE_GFX12_DCC or any other kernel level GFX12 DCC flag to differentiate the DCC buffers and other pinned display buffers(which has TTM_PL_FLAG_CONTIGUOUS enabled). That's a pretty bad idea, the DCC flag is

Re: [PATCH 1/2] drm/amd/amdgpu: command submission parser for JPEG

2024-08-19 Thread Christian König
Am 06.08.24 um 18:00 schrieb David (Ming Qiang) Wu: Add JPEG IB command parser to ensure registers in the command are within the JPEG IP block. You should probably re-order the patches so that the cleanup comes first and then the new functionality. Apart from that looks good to me. Regards,

Re: [PATCH v3 0/3] drm/amdgpu: Explicit sync for GEM VA operations

2024-08-19 Thread Christian König
Am 19.08.24 um 09:21 schrieb Friedrich Vock: In Vulkan, it is the application's responsibility to perform adequate synchronization before a sparse unmap, replace or BO destroy operation. This adds an option to AMDGPU_VA_OPs to disable redundant implicit sync that happens on sparse unmap or replac

Re: [RFC] amdgpu: Add a context flag to disable implicit sync

2024-08-19 Thread Christian König
to wait another year for the fix to reach users. >However, I understand that back-porting UAPI is problematic and I'll >leave that decision up to the amdgpu maintainers. Michel suggested that >a new CTX_OP would make more sense if we wan

Re: [PATCH] drm/amdgpu: Block MMR_READ IOCTL in reset

2024-08-19 Thread Christian König
Am 08.08.24 um 19:48 schrieb Victor Skvortsov: Register access from userspace should be blocked until reset is complete. Signed-off-by: Victor Skvortsov --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 44 ++--- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a

[PATCH 2/3] drm/amdgpu: sync to KFD fences before clearing PTEs

2024-08-21 Thread Christian König
This patch tries to solve the basic problem we also need to sync to the KFD fences of the BO because otherwise it can be that we clear PTEs while the KFD queues are still running. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 30 drivers

[PATCH 1/3] drm/amdgpu: re-work VM syncing

2024-08-21 Thread Christian König
Rework how VM operations synchronize to submissions. Provide an amdgpu_sync container to the backends instead of an reservation object and fill in the amdgpu_sync object in the higher layers of the code. No intended functional change, just prepares for upcomming changes. Signed-off-by: Christian

[PATCH 3/3] drm/amdgpu: stop syncing PRT map operations

2024-08-21 Thread Christian König
Requested by both Bas and Friedrich. Mapping PTEs as PRT doesn't need to sync for anything. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/driver

Re: [PATCH 02/17] drm/amdgpu: Add infrastructure for Cleaner Shader feature

2024-08-21 Thread Christian König
Am 15.08.24 um 02:04 schrieb Alex Deucher: From: Srinivasan Shanmugam The cleaner shader is used by the CP firmware to clean LDS and GPRs between processes on the CUs. This adds an internal API for GFX IP code to allocate and initialize the cleaner shader. Cc: Christian König Cc: Alex

Re: [PATCH 07/17] drm/amdgpu: Add sysfs interface for running cleaner shader

2024-08-21 Thread Christian König
butes. v2: fix error handling (Alex) Cc: Christian König Cc: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Srinivasan Shanmugam --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 134 1 file changed, 134 insertions(+) diff --git a/drivers/gpu/drm/amd/a

Re: [PATCH 15/17] drm/amdgpu/gfx9: Apply Isolation Enforcement to GFX & Compute rings

2024-08-21 Thread Christian König
. Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Signed-off-by: Alex Deucher Suggested-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm

Re: [PATCH 00/17] Process Isolation Support

2024-08-21 Thread Christian König
Reviewed-by: Christian König for patches #1, #3-#5, Acked-by: Christian König for patches #6, #8-#10, #12, #13, #14, #17. Some nit picks in patches #2, use of // for comments in patch #11 and question on patch #15/#16 Really big bug in patch #7, that needs to be addressed. Regards

Re: [PATCH 2/3] drm/amdgpu: sync to KFD fences before clearing PTEs

2024-08-22 Thread Christian König
Am 21.08.24 um 22:01 schrieb Felix Kuehling: On 2024-08-21 08:03, Christian König wrote: This patch tries to solve the basic problem we also need to sync to the KFD fences of the BO because otherwise it can be that we clear PTEs while the KFD queues are still running. This is going to trigger

Re: [PATCH] Revert "drm/ttm: increase ttm pre-fault value to PMD size"

2024-08-23 Thread Christian König
Link: https://www.spinics.net/lists/dri-devel/msg457005.html Signed-off-by: Alex Deucher Cc: Zhu Lingshan Cc: Christian König Reviewed-by: Christian König --- include/drm/ttm/ttm_bo.h | 4 1 file changed, 4 deletions(-) diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h

Re: [PATCH] drm/amdgpu: always allocate cleared VRAM for GEM allocations

2024-08-23 Thread Christian König
me of the bootup time constrains we have. In addition this fixes the high CPU spikes seen when doing wipe on release. Mhm, interesting. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3528 Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: Arunpravin Paneer Selvam Cc: Chri

[PATCH 2/3] drm/amdgpu: remove amdgpu_pin_restricted()

2024-08-27 Thread Christian König
We haven't used the functionality to pin BOs in a certain range at all while the driver existed. Just nuke it. Signed-off-by: Christian König --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c| 56 ++- drivers/gpu/dr

[PATCH 3/3] drm/amdgpu: nuke the VM PD/PT shadow handling

2024-08-27 Thread Christian König
recoverable in any way when VRAM is lost. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 87 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 67 +--- drivers/gpu/drm/amd/amdgpu

[PATCH 1/3] drm/amdgpu: explicitely set the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag

2024-08-27 Thread Christian König
Instead of having that in the amdgpu_bo_pin() function applied for all pinned BOs. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c

Re: [PATCH] drm/amdgpu: use CPU for page table update if SDMA is unavailable

2024-08-27 Thread Christian König
Am 30.07.24 um 06:36 schrieb Yifan Zhang: avoid using SDMA if it is unavailable. That is clearly not something we should do. The SDMA is mandatory for the driver to work. We could do this for emulation and bringup, but in those cases the engineer should probably enabled CPU based updates ma

[PATCH] drm/amdgpu: revert "use CPU for page table update if SDMA is unavailable"

2024-08-27 Thread Christian König
23335f9577e0b509c20ad8d65d9fdedd14545b55. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 3464a7a880f0..f0ccc560fd5c 100644 --- a/drivers/gpu/drm/amd/amdgpu

Re: [PATCH 2/3] drm/amdgpu: sync to KFD fences before clearing PTEs

2024-08-29 Thread Christian König
Am 29.08.24 um 00:40 schrieb Felix Kuehling: On 2024-08-22 05:07, Christian König wrote: Am 21.08.24 um 22:01 schrieb Felix Kuehling: On 2024-08-21 08:03, Christian König wrote: This patch tries to solve the basic problem we also need to sync to the KFD fences of the BO because otherwise it

Re: [PATCH -next 2/3] drm/amdgpu: use clamp() in amdgpu_vm_adjust_size()

2024-08-30 Thread Christian König
Am 30.08.24 um 03:22 schrieb Li Zetao: When it needs to get a value within a certain interval, using clamp() makes the code easier to understand than min(max()). Signed-off-by: Li Zetao This patch and #1 is a nice cleanup and Reviewed-by: Christian König But as Alex also pointed out

Re: [PATCH] drm/amdgpu: fix invalid fence handling in amdgpu_vm_tlb_flush

2024-09-02 Thread Christian König
like "CPU based updates doesn't produce a fence." With that done Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/

Re: [PATCH] drm/amdgpu: fix a call trace when unload amdgpu driver

2024-09-03 Thread Christian König
ger is finilized, drain the workqueue in ttm_device. Fixes:d99fbd9aab62 ("drm/ttm: Always take the bo delayed cleanup path for imported bos") Acked-by: Christian König The correct tag is Suggested-by. Signed-off-by: Asher Song --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 + 1

Re: [PATCH] drm/amdgpu: Replace 'amdgpu_job_submit_direct' with 'drm_sched_entity' in cleaner shader

2024-09-04 Thread Christian König
t;drm/amdgpu: Add sysfs interface for running cleaner shader") Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Suggested-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 32 - drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 +

Re: [PATCH v2] drm/amdgpu: fix a call trace when unload amdgpu driver

2024-09-04 Thread Christian König
ger is finilized, drain the workqueue in ttm_device. v2: move drain_workqueue to amdgpu_ttm.c Fixes:d99fbd9aab62 ("drm/ttm: Always take the bo delayed cleanup path for imported bos") Suggested-by: Christian König Signed-off-by: Asher Song Reviewed-by: Christian König --- dri

Re: [PATCH v2] drm/amdgpu: Replace 'amdgpu_job_submit_direct' with 'drm_sched_entity' in cleaner shader

2024-09-04 Thread Christian König
t;drm/amdgpu: Add sysfs interface for running cleaner shader") Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Suggested-by: Christian König Reviewed-by: Christian König --- v2: - Dropped default assignment of f. (Christian) - Moved drm_sched entity; to

Re: [PATCH] drm/amdgpu/gfx9: Convert `//` to `/* ... */` in cleaner shader code

2024-09-04 Thread Christian König
shader uses two kernels launched separately to clean VGPRs, LDS, and lower SGPRs, and to clean remaining SGPRs. Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Acked-by: Christian König --- .../amd/amdgpu/gfx_v9_4_3_cleaner_shader.asm | 139 +- 1

Re: [PATCH v2] drm/amdgpu/gfx9: Convert `//` to `/* ... */` in cleaner shader code

2024-09-04 Thread Christian König
, and lower SGPRs, and to clean remaining SGPRs. Fixes: 3b721dfb2c95 ("drm/amdgpu/gfx9: Add cleaner shader for GFX9.4.3") Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam --- v2:  - Corrected typo for iteraions  - Added fixes tag  .../amd/amdgpu/gfx_v9_4_3_cle

Re: [PATCH 00/10] Support XGMI reset on init

2024-09-04 Thread Christian König
Am 02.09.24 um 09:34 schrieb Lijo Lazar: There are case where a device needs to be reset first before it is fully initialized. An example case is a driver reinstallation with a different version of PSP TOS. In such a case, if a device supports reset in which PSP TOS is unloaded, then driver needs

Re: [PATCH v2] drm/amdgpu/: Add missing kdoc entry in amdgpu_vm_handle_fault function

2024-09-05 Thread Christian König
member 'ts' not described in 'amdgpu_vm_handle_fault' Cc: Xiaogang.Chen Cc: Christian König Cc: Alex Deucher Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202408251419.vgzhg3gv-...@intel.com/ Signed-off-by: Srinivasan Shanmugam Reviewed-b

Re: [PATCH] drm/amdgpu: Fix kdoc entry in 'amdgpu_vm_cpu_prepare'

2024-09-05 Thread Christian König
u.c:50: warning: Excess function parameter 'sync_mode' description in 'amdgpu_vm_cpu_prepare' Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

Re: [PATCH 1/6] drm/amdgpu: Implement userqueue signal/wait IOCTL

2024-09-05 Thread Christian König
L. V9: (Christian) - Store all the fence_drv ref to other drivers and not ourself. - Remove the userq fence xa implementation and replace with kvmalloc_array. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

Re: [PATCH 4/6] drm/amdgpu: Enable userq fence interrupt support

2024-09-05 Thread Christian König
call within the xa_lock as there is a chance that fence_drv might be freed. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 2 ++ .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 6 + drivers/gpu/drm/amd/a

Re: [PATCH] drm/amdgpu: Raise dma resv usage for created TLB fence

2024-09-05 Thread Christian König
Am 05.09.24 um 10:58 schrieb Dejan Andjelkovic: When using SDMA for PT updates, a TLB fence hooked to a buffer objects dma resv object with usage declared as BOOKKEEP leaves a chance for TLB flush to occur prematurely. This will lead to a page fault. Raising the usage from BOOKKEEP to KERNEL remo

Re: [PATCH 3/6] drm/amdgpu: screen freeze and userq driver crash

2024-09-05 Thread Christian König
Am 30.08.24 um 20:43 schrieb Arunpravin Paneer Selvam: Screen freeze and userq fence driver crash while playing Xonotic Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a

Re: [PATCH 5/6] drm/amdgpu: Remove the MES self test

2024-09-05 Thread Christian König
Am 30.08.24 um 20:43 schrieb Arunpravin Paneer Selvam: Remove MES self test as this conflicts the userqueue fence interrupts. v2:(Christian) - remove the amdgpu_mes_self_test() function and any now unused code. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König

Re: [PATCH 6/6] drm/amdgpu: Add few optimizations to userq fence driver

2024-09-05 Thread Christian König
Am 30.08.24 um 20:43 schrieb Arunpravin Paneer Selvam: Add few optimizations to userq fence driver. v1:(Christian): - Remove unnecessary comments. - In drm_exec_init call give num_bo_handles as last parameter it would making allocation of the array more efficient - Handle return va

Re: [PATCH] drm/amdgpu: Raise dma resv usage for created TLB fence

2024-09-05 Thread Christian König
Well that explanation doesn't seem to make much sense either. What do you mean with TLB flush is occurring prematurely? Regards, Christian. Am 05.09.24 um 14:38 schrieb Andjelkovic, Dejan: [AMD Official Use Only - AMD Internal Distribution Only] Hi there. We're running into a page fault iss

Re: [PATCH] drm/amdkfd: fix vm-pasid lookup for multiple partitions

2024-09-05 Thread Christian König
Am 19.08.24 um 19:59 schrieb Jonathan Kim: Currently multiple partitions will incorrectly overwrite the VM lookup table since the table is indexed by PASID and multiple partitions can register different VM objects on the same PASID. That's a rather bad idea. Why do we have the same PASID for di

Re: [PATCH] drm/amdgpu: Raise dma resv usage for created TLB fence

2024-09-06 Thread Christian König
Well that's the whole reason I'm asking :) Why do you think it should be added as dependency in amdgpu_vm_sdma_update? As far as I can see that is complete nonsense. Page table updates never depend on TLB flushes, it's the TLB flush which depends on the page table update. Regards, Christian

Re: [RFC 1/4] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Christian König
ting the two. Then audit the code if all users of rq and priority actually hold the correct locks while reading and writing them. Regards, Christian. P. Signed-off-by: Tvrtko Ursulin Fixes: b37aced31eb0 ("drm/scheduler: implement a function to modify sched list") Cc: Christ

Re: [RFC 2/4] drm/sched: Always wake up correct scheduler in drm_sched_entity_push_job

2024-09-09 Thread Christian König
: b37aced31eb0 ("drm/scheduler: implement a function to modify sched list") Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew Brost Cc: David Airlie Cc: Daniel Vetter Cc: dri-de...@lists.freedesktop.org Cc: # v5.7+ --- drivers/gpu/drm/scheduler/sched_entity.c | 8 ++-

Re: [RFC 3/4] drm/sched: Always increment correct scheduler score

2024-09-09 Thread Christian König
ueues") Good catch, that might explain some of the odd behavior we have seen for load balancing. Reviewed-by: Christian König Cc: Nirmoy Das Cc: Christian König Cc: Luben Tuikov Cc: Matthew Brost Cc: David Airlie Cc: Daniel Vetter Cc: dri-de...@lists.freedesktop.org C

Re: [RFC 1/4] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Christian König
Am 09.09.24 um 14:13 schrieb Philipp Stanner: On Mon, 2024-09-09 at 13:29 +0200, Christian König wrote: Am 09.09.24 um 11:44 schrieb Philipp Stanner: On Fri, 2024-09-06 at 19:06 +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Without the locking amdgpu currently can race

Re: [RFC 1/2] drm/amdgpu: Remove dynamic DRM scheduling priority override

2024-09-09 Thread Christian König
nt different hw priorities. Christian. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c ind

Re: [RFC 1/4] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-09 Thread Christian König
tko Cheers, P. Regards, Tvrtko [...] P. Then audit the code if all users of rq and priority actually hold the correct locks while reading and writing them. Regards, Christian. P. Signed-off-by: Tvrtko Ursulin Fixes: b37aced31eb0 ("drm/scheduler: implement a function

Re: [PATCH] drm/amdkfd: fix vm-pasid lookup for multiple partitions

2024-09-09 Thread Christian König
Am 09.09.24 um 18:02 schrieb Kim, Jonathan: [Public] -Original Message- From: Christian König Sent: Thursday, September 5, 2024 10:24 AM To: Kim, Jonathan ; amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Deucher, Alexander ; Joshi, Mukul Subject: Re: [PATCH] drm/amdkfd: fix vm

Re: [PATCH 1/8] drm/sched: Add locking to drm_sched_entity_modify_sched

2024-09-10 Thread Christian König
and entity->num_sched_list pair. v2: * Improve commit message. (Philipp) Signed-off-by: Tvrtko Ursulin Fixes: b37aced31eb0 ("drm/scheduler: implement a function to modify sched list") Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew Brost Cc: David Airlie Cc: D

Re: [PATCH 2/8] drm/sched: Always wake up correct scheduler in drm_sched_entity_push_job

2024-09-10 Thread Christian König
ent a function to modify sched list") Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew Brost Cc: David Airlie Cc: Daniel Vetter Cc: Philipp Stanner Cc: dri-de...@lists.freedesktop.org Cc: # v5.7+ --- drivers/gpu/drm/scheduler/sched_entity.c | 10 -- 1 file

Re: [PATCH 4/8] drm/sched: Optimise drm_sched_entity_push_job

2024-09-10 Thread Christian König
Am 09.09.24 um 19:19 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin In FIFO mode We can avoid dropping the lock only to immediately re-acquire by adding a new drm_sched_rq_update_fifo_locked() helper. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc

Re: [PATCH 5/8] drm/sched: Stop setting current entity in FIFO mode

2024-09-10 Thread Christian König
to restart from the first entity, instead of continuing in RR mode from where FIFO left it, and that sounds completely fine. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew Brost Cc: Philipp Stanner Acked-by: Christian König --- drive

Re: [PATCH 6/8] drm/sched: Re-order struct drm_sched_rq members for clarity

2024-09-10 Thread Christian König
Am 09.09.24 um 19:19 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin Lets re-order the members to make it clear which are protected by the lock and at the same time document it via kerneldoc. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew

Re: [PATCH 7/8] drm/sched: Re-group and rename the entity run-queue lock

2024-09-10 Thread Christian König
: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew Brost Cc: Philipp Stanner Reviewed-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 24 drivers/gpu/drm/scheduler/sched_main.c | 6 +++--- include/drm/gpu_scheduler.h

Re: [PATCH 8/8] drm/sched: Further optimise drm_sched_entity_push_job

2024-09-10 Thread Christian König
same expectation to drm_sched_rq_update_fifo_locked(). For more stream-lining we also add the run-queue as an explicit parameter to drm_sched_rq_remove_fifo_locked() to avoid both callers and callee having to dereference entity->rq. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: A

Re: [PATCH 8/8] drm/sched: Further optimise drm_sched_entity_push_job

2024-09-10 Thread Christian König
Am 10.09.24 um 11:46 schrieb Tvrtko Ursulin: On 10/09/2024 10:08, Christian König wrote: Am 09.09.24 um 19:19 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin Having removed one re-lock cycle on the entity->lock in a patch titled "drm/sched: Optimise drm_sched_entity_push_job", wit

Re: [PATCH 8/8] drm/sched: Further optimise drm_sched_entity_push_job

2024-09-10 Thread Christian König
e add "without holding the appropriate lock". Christian. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew Brost Cc: Philipp Stanner ---  drivers/gpu/drm/scheduler/sched_entity.c |  7 ++--  drivers/gpu/d

Re: [PATCH v2 2/2] drm/amdgpu: track bo memory stats at runtime

2024-09-10 Thread Christian König
Am 24.06.24 um 16:08 schrieb Yunxiang Li: Before, every time fdinfo is queried we try to lock all the BOs in the VM and calculate memory usage from scratch. This works okay if the fdinfo is rarely read and the VMs don't have a ton of BOs. If either of these conditions is not true, we get a massiv

Re: [PATCH v2 2/2] drm/amdgpu: track bo memory stats at runtime

2024-09-10 Thread Christian König
Am 10.09.24 um 19:40 schrieb Li, Yunxiang (Teddy): [Public] Ok that looks extremely ugly. Please just add a separate function and call that from the TTM move function. Should I still remove the adev argument? It is never used and causes a few call sites having to find an adev unnecessarily.

Re: [PATCH v1] drm/amdgpu: fix typo in the comment

2024-09-10 Thread Christian König
#x27; with 'disable' in the comment & replace 'Initiailize' with 'Initialize' in the comment & replace 'disble' with 'disable' in the comment & replace 'Disbale' with 'Disable' in the comment & replace 'enogh'

Re: [PATCH 3/6] drm/amdgpu: screen freeze and userq driver crash

2024-09-11 Thread Christian König
Am 11.09.24 um 07:00 schrieb Paneer Selvam, Arunpravin: Hi Christian, On 9/5/2024 4:50 PM, Christian König wrote: Am 30.08.24 um 20:43 schrieb Arunpravin Paneer Selvam: Screen freeze and userq fence driver crash while playing Xonotic Signed-off-by: Arunpravin Paneer Selvam ---   drivers

Re: [PATCH v3 1/3] drm/amdgpu: stop tracking visible memory stats

2024-09-13 Thread Christian König
Li Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 14 -- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/drivers

Re: [PATCH v3 2/3] drm/amdgpu: remove unused function parameter

2024-09-13 Thread Christian König
Am 11.09.24 um 17:13 schrieb Yunxiang Li: amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all callers have a reference to adev handy, so remove it for cleanliness. Signed-off-by: Yunxiang Li Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

Re: [PATCH 4/8] drm/sched: Optimise drm_sched_entity_push_job

2024-09-16 Thread Christian König
Ursulin Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc: Matthew Brost Cc: Philipp Stanner Reviewed-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 13 + drivers/gpu/drm/scheduler/sched_main.c | 6 +++--- include/drm/gpu_scheduler.h

Re: [PATCH 8/8] drm/sched: Further optimise drm_sched_entity_push_job

2024-09-16 Thread Christian König
_update_fifo_locked(). Finally, to align drm_sched_rq_update_fifo_locked(), drm_sched_rq_add_entity_locked() and drm_sched_rq_remove_fifo_locked() function signatures, we add rq as a parameter to the latter. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Alex Deucher Cc: Luben Tuikov Cc

Re: [PATCH v11 08/28] drm/amdgpu: map wptr BO into GART

2024-09-16 Thread Christian König
V8: Rebase V9: Changed the function names from gfx_v11* to mes_v11* V10: Remove unused adev (Harish) Cc: Alex Deucher Cc: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Reviewed-by: Christian König --- .../gpu/drm/amd/amdgpu/mes_v11_0_userqueue.c |

Re: [PATCH v11 21/28] drm/amdgpu: add gfx eviction fence helpers

2024-09-16 Thread Christian König
Am 09.09.24 um 22:06 schrieb Shashank Sharma: This patch adds basic eviction fence framework for the gfx buffers. The idea is to: - One eviction fence is created per gfx process, at kms_open. - This fence is attached to all the gem buffers created by this process. - This fence is detached to a

Re: [PATCH v3] drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()'

2024-01-30 Thread Christian König
("drm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()'") Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Christian König --- v3: - Changed from 'return r;' to 'return 0' (Christian) drivers/gpu/d

Re: [PATCH v2 1/1] drm/virtio: Implement device_attach

2024-01-30 Thread Christian König
Am 30.01.24 um 12:16 schrieb Daniel Vetter: On Tue, Jan 30, 2024 at 12:10:31PM +0100, Daniel Vetter wrote: On Mon, Jan 29, 2024 at 06:31:19PM +0800, Julia Zhang wrote: As vram objects don't have backing pages and thus can't implement drm_gem_object_funcs.get_sg_table callback. This removes drm

Re: [PATCH 1/2] drm/amdgpu: Reduce VA_RESERVED_BOTTOM to 64KB

2024-01-31 Thread Christian König
virtual address mappings as seen in /proc/sys/vm/mmap_min_addr. Signed-off-by: Felix Kuehling Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers

Re: [PATCH 2/2] drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole (v2)

2024-01-31 Thread Christian König
Am 30.01.24 um 21:08 schrieb Felix Kuehling: The TBA and TMA, along with an unused IB allocation, reside at low addresses in the VM address space. A stray VM fault which hits these pages must be serviced by making their page table entries invalid. The scheduler depends upon these pages being r

Re: [PATCH v2 1/1] drm/virtio: Implement device_attach

2024-01-31 Thread Christian König
Am 31.01.24 um 11:20 schrieb Zhang, Julia: On 2024/1/30 22:23, Christian König wrote: Am 30.01.24 um 12:16 schrieb Daniel Vetter: On Tue, Jan 30, 2024 at 12:10:31PM +0100, Daniel Vetter wrote: [SNIP] Hi Sima, Christian, Yeah, that is really just speculative. All importers need to set the

Re: [PATCH v2 3/3] drm/amdgpu: sync page table freeing with tlb flush

2024-02-01 Thread Christian König
structure to save vm The idea is to delay freeing of page table objects until we have the respective TLB entries flushed. V2: rebase Cc: Christian König Cc: Alex Deucher Cc: Felix Kuehling Cc: Rajneesh Bhardwaj Signed-off-by: Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Re: [PATCH] drm/amdgpu: fix typo in parameter description

2024-02-01 Thread Christian König
Am 11.01.24 um 16:58 schrieb Alex Deucher: Missing space. Signed-off-by: Alex Deucher Reviewed-by: Christian König And sorry that this took so long. I'm still trying to catch up to my mails. Christian. --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 inse

Re: [PATCH 1/2] drm/amdgpu: Reset IH OVERFLOW_CLEAR bit after writing rptr

2024-02-02 Thread Christian König
. :P Thanks - Joshie 🐸✨ On 1/23/24 12:49, Christian König wrote: Am 23.01.24 um 12:35 schrieb Friedrich Vock: On 23.01.24 10:36, Christian König wrote: Am 22.01.24 um 23:39 schrieb Joshua Ashton: [SNIP] Most work submissions in practice submit more waves than the number of wave slots

Re: [PATCH 1/3] driver core: bus: introduce can_remove()

2024-02-05 Thread Christian König
Am 02.02.24 um 23:25 schrieb Hamza Mahfooz: Currently, drivers have no mechanism to block requests to unbind devices. However, this can cause resource leaks and leave the device in an inconsistent state, such that rebinding the device may cause a hang or otherwise prevent the device from being re

Re: [PATCH] PCI: Add vf reset notification for pf

2024-02-05 Thread Christian König
Am 04.02.24 um 07:12 schrieb Emily Deng: When a vf has been reset, the pf wants to get notification to remove the vf out of schedule. Solution: Add the callback function in pci_driver sriov_vf_reset_notification. When vf reset happens, then call this callback function. Well that doesn't make m

Re: [PATCH 3/3] drm/amdgpu: wire up the can_remove() callback

2024-02-06 Thread Christian König
ll. sorry, but please, just fix your driver. fwiw Christian König from amd already rejected this too, I have no idea why this was submitted Well that was my fault. I commented on an internal bug tracker that when sysfs bind/undbind is a different code path from PCI remove/re-scan we could try

Re: [PATCH 1/2] drm/amdgpu: Unmap only clear the page table leaves

2024-02-07 Thread Christian König
Am 01.02.24 um 17:50 schrieb Philip Yang: SVM migration unmap pages from GPU and then update mapping to GPU to recover page fault. Currently unmap clears the PDE entry for range length >= huge page and free PTB bo, update mapping to alloc new PT bo. There is race bug that the freed entry bo maybe

Re: [PATCH v4 3/3] drm/amd: Drop unneeded functions to check if s3/s0ix active

2024-02-07 Thread Christian König
Am 08.02.24 um 06:52 schrieb Mario Limonciello: amdgpu_acpi_is_s0ix_active() and amdgpu_acpi_is_s0ix_active() aren't needed to be checked multiple times in a suspend cycle. Checking and setting up policy one time in the prepare() callback is sufficient. Mhm, looking at amdgpu_acpi_is_s3_active

Re: [PATCH] drm/buddy: Fix alloc_range() error handling code

2024-02-07 Thread Christian König
allocation") Signed-off-by: Arunpravin Paneer Selvam Tested-by: Mario Limonciello Acked-by: Christian König CC: stable.. ? --- drivers/gpu/drm/drm_buddy.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index f57e6d74fb0

Re: [PATCH v4 3/3] drm/amd: Drop unneeded functions to check if s3/s0ix active

2024-02-08 Thread Christian König
Am 08.02.24 um 16:04 schrieb Mario Limonciello: On 2/8/2024 00:54, Christian König wrote: Am 08.02.24 um 06:52 schrieb Mario Limonciello: amdgpu_acpi_is_s0ix_active() and amdgpu_acpi_is_s0ix_active() aren't needed to be checked multiple times in a suspend cycle. Checking and setti

Re: [PATCH 2/2] drm/tests/drm_buddy: add alloc_contiguous test

2024-02-13 Thread Christian König
changed the patch authorship here. Going to fix this if I get tasked with pushing this to drm-misc-fixes. But I still have hope that Arun will figure out how to do this himself. Christian. Cc: Arunpravin Paneer Selvam Cc: Limonciello Cc: Christian König Signed-off-by: Arunpravin Paneer

Re: [PATCH v2 1/6] tracing, dma-buf: add a trace_dma_fence_sync_to event

2024-02-14 Thread Christian König
Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: This new event can be used to trace where a given dma_fence is added as a dependency of some other work. I plan to use it in amdgpu. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/dma-buf/dma-fence.c | 1 + include/trace/

Re: [PATCH v2 4/6] drm/amdgpu: add BO clear event

2024-02-14 Thread Christian König
Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: Useful to identify why sdma jobs are submitted. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 16 2 files changed, 18 in

Re: [PATCH v2 5/6] drm/amdgpu: add a amdgpu_cs_ioctl2 event

2024-02-14 Thread Christian König
Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: amdgpu_cs_ioctl already exists but serves a different purpose. amdgpu_cs_ioctl2 marks the beginning of the kernel processing of the ioctl which is useful for tools to map which events belong to the same submission (without this, the first

Re: [PATCH v2 3/6] amdgpu: use trace_dma_fence_sync_to in amdgpu_fence_sync

2024-02-14 Thread Christian König
Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: This makes it possible to understand the dependencies between jobs. Possible usage of this trace: * stuttering issues like Mesa !9189 * incorrect synchronization: I don't have a link for this one, but having these events was very usef

Re: [PATCH v2 5/6] drm/amdgpu: add a amdgpu_cs_ioctl2 event

2024-02-14 Thread Christian König
Am 14.02.24 um 17:38 schrieb Pierre-Eric Pelloux-Prayer: Le 14/02/2024 à 13:09, Christian König a écrit : Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: amdgpu_cs_ioctl already exists but serves a different purpose. amdgpu_cs_ioctl2 marks the beginning of the kernel processing of

Re: Reporting a use-after-free in amdgpu

2024-02-14 Thread Christian König
That looks like an incorrect error handling to me. The invalid address is rejected and because of this we free up the data structures, but probably in the wrong order or something like that. Going to take a look. Thanks, Christian. Am 15.02.24 um 03:34 schrieb 정준교: Hello, We would like to

Re: [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset

2024-02-14 Thread Christian König
Well using this is in sysfs is a bug to begin with. This would prevent starting new applications and crashing applications which don't expect to get an -EPERM in return here. If we need to make operations mutual exclusive with resets then we need to take the appropriate locks and *not* work ar

Re: [PATCH 0/6 V4] fdinfo shared stats

2024-02-15 Thread Christian König
istency. v4: switch drm_gem_object_is_shared_for_memory_stats() to an inline function I'm still not sure if looking at the actual handle count is the right approach, but it's certainly better than before. So Reviewed-by: Christian König for the entire series. Should I take this through drm-misc-next? Regards,

Re: [PATCH v3] drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole

2024-02-15 Thread Christian König
: Christian Koenig Signed-off-by: Jay Cornwall Signed-off-by: Felix Kuehling Can't full judge the KFD VI changes, but the rest looks good to me. Reviewed-by: Christian König Regards, Christian. --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 3 +- drivers/gpu/drm/amd/a

Re: [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset

2024-02-15 Thread Christian König
Am 15.02.24 um 15:36 schrieb Alex Deucher: On Thu, Feb 15, 2024 at 2:53 AM Christian König wrote: Well using this is in sysfs is a bug to begin with. This would prevent starting new applications and crashing applications which don't expect to get an -EPERM in return here. If we need to

Re: [PATCH] drm/amdgpu: bail on INFO IOCTL if the GPU is in reset

2024-02-15 Thread Christian König
Am 15.02.24 um 15:43 schrieb Christian König: Am 15.02.24 um 15:36 schrieb Alex Deucher: On Thu, Feb 15, 2024 at 2:53 AM Christian König wrote: Well using this is in sysfs is a bug to begin with. This would prevent starting new applications and crashing applications which don't expe

Re: [PATCH] drm/amdgpu: Fix missing parameter descriptions in ih_v7_0.c

2024-02-15 Thread Christian König
drm/amd/amdgpu/ih_v7_0.c:458: warning: Function parameter or member 'ih' not described in 'ih_v7_0_set_rptr' Fixes: b6ba7a165b13 ("drm/amdgpu: Add ih v7_0 ip block support") Cc: Likun Gao Cc: Hawking Zhang Cc: Christian König Cc: Alex Deucher Signed-off-by: Sriniva

Re: 7840U amdgpu MMVM_L2_PROTECTION_FAULT_STATUS

2024-02-16 Thread Christian König
Can you bisect where exactly between 6.6.0 and 6.7.4 the problems started? Thanks, Christian. Am 15.02.24 um 16:59 schrieb Michael Zimmermann: I have a Framework 13 with a 7840U and started having massive GPU driver issues a few weeks ago (including system freezes). Unfortunately the informatio

Re: [PATCH v2] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors

2024-02-16 Thread Christian König
Am 02.02.24 um 16:28 schrieb Hamza Mahfooz: We want programs besides the compositor to be able to enable or disable panel power saving features. Well I don't know the full background, but that is usually a no-go. However, since they are currently only configurable through DRM properties, that

Re: [PATCH] drm/buddy: Modify duplicate list_splice_tail call

2024-02-16 Thread Christian König
Am 16.02.24 um 12:46 schrieb Arunpravin Paneer Selvam: On 2/16/2024 4:41 PM, Matthew Auld wrote: On 16/02/2024 10:00, Arunpravin Paneer Selvam wrote: Remove the duplicate list_splice_tail call when the total_allocated < size condition is true. Cc: # 6.7+ Fixes: 8746c6c9dfa3 ("drm/buddy:

Re: [PATCH 0/9] PSP 14.0 support

2024-02-16 Thread Christian König
boot_time_tmr flag drm/amdgpu: add psp_timeout to limit PSP related operation drm/amdgpu: support psp ip block discovery for psp v14 Acked-by: Christian König for the series. drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1

  1   2   3   4   5   6   7   8   9   10   >