Re: [PATCH 1/1] Refactor radeon driver to use drm_gem_create_map_offset() instead of its custom implementation for associating GEM object with a fake offset. Since, we already have a generic implement

2024-01-07 Thread Christian König
Am 06.01.24 um 15:14 schrieb Dipam Turkar: Signed-off-by: Dipam Turkar --- drivers/gpu/drm/radeon/radeon_drv.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c | 24 ++-- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/dr

Re: [PATCH v2] drm/amdkfd: Fix sparse __rcu annotation warnings

2024-01-07 Thread Christian König
-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++-- drivers/gpu/drm/amd/amdkfd/kfd_priv.h| 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 7 +-- 4 files changed, 9 inserti

Re: [PATCH] drm/amdgpu: Check resize bar register when system uses large bar

2024-01-05 Thread Christian König
Am 21.12.23 um 02:58 schrieb Ma, Jun: Hi Christian, On 12/20/2023 10:10 PM, Christian König wrote: Am 19.12.23 um 06:58 schrieb Ma Jun: Print a warnning message if the system can't access the resize bar register when using large bar. Well pretty clear NAK, we have embedded use cases

Re: [PATCH] drm/amdkfd: Fix sparse __rcu annotation warnings

2024-01-05 Thread Christian König
Am 20.12.23 um 17:58 schrieb Felix Kuehling: On 2023-12-11 10:56, Felix Kuehling wrote: On 2023-12-08 05:11, Christian König wrote: Am 07.12.23 um 20:14 schrieb Felix Kuehling: On 2023-12-05 17:20, Felix Kuehling wrote: Properly mark kfd_process->ef as __rcu and consistently access it w

Re: [PATCH v2] drm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()'

2024-01-05 Thread Christian König
drm/amd/amdgpu/gmc_v9_0.c:2344 gmc_v9_0_hw_init() warn: missing error code? 'r' Cc: Xiaojian Du Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Suggested-by: Christian König Reviewed-by: Christian König --- v2: - release temporary buffers,

Re: [PATCH] drm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()'

2024-01-04 Thread Christian König
drm/amd/amdgpu/gmc_v9_0.c:2344 gmc_v9_0_hw_init() warn: missing error code? 'r' Cc: Xiaojian Du Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Suggested-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 +++--- 1 file change

Re: [PATCH v2] drm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()'

2024-01-04 Thread Christian König
Am 04.01.24 um 10:26 schrieb Srinivasan Shanmugam: Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:1404 amdgpu_ucode_request() warn: '*fw' from request_firmware() not released on lines: 1404. Cc: Mario Limonciello Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher

Re: [PATCH v5 1/2] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2024-01-04 Thread Christian König
Am 04.01.24 um 00:15 schrieb 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

Re: [PATCH] drm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()'

2024-01-04 Thread Christian König
Am 04.01.24 um 04:23 schrieb Srinivasan Shanmugam: Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:1404 amdgpu_ucode_request() warn: '*fw' from request_firmware() not released on lines: 1404. Cc: Mario Limonciello Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher

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

2024-01-03 Thread Christian König
drm/amd/amdgpu/gmc_v9_0.c:2344 gmc_v9_0_hw_init() warn: missing error code? 'r' Cc: Xiaojian Du Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 11

Re: [PATCH] drm/amdgpu: Use kvcalloc instead of kvmalloc_array in amdgpu_cs_parser_bos()

2023-12-20 Thread Christian König
Am 20.12.23 um 15:10 schrieb Srinivasan Shanmugam: kvmalloc_array + __GFP_ZERO is the same with kvcalloc. Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:873 amdgpu_cs_parser_bos() warn: Please consider using kvcalloc instead of kvmalloc_array Cc: Christian König Cc: Alex Deucher

Re: [PATCH] drm/amdgpu: Remove unreachable code in amdgpu_xgmi_set_pstate()

2023-12-20 Thread Christian König
Am 20.12.23 um 14:56 schrieb Srinivasan Shanmugam: Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:706 amdgpu_xgmi_set_pstate() warn: ignoring unreachable code. Cc: Jonathan Kim Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam

Re: [PATCH] drm/amdgpu: Check resize bar register when system uses large bar

2023-12-20 Thread Christian König
Am 19.12.23 um 06:58 schrieb Ma Jun: Print a warnning message if the system can't access the resize bar register when using large bar. Well pretty clear NAK, we have embedded use cases where this would trigger an incorrect warning. What should that be good for in the first place? Regards, C

Re: [PATCH] drm/amdgpu: Cleanup indenting in amdgpu_connector_dvi_detect()

2023-12-20 Thread Christian König
Am 19.12.23 um 14:38 schrieb Srinivasan Shanmugam: drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1106 amdgpu_connector_dvi_detect() warn: inconsistent indenting 'Fixes: 760817a60724 ("drm/amdgpu: Refactor 'amdgpu_connector_dvi_detect' in amdgpu_connectors.c")'

Re: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET

2023-12-20 Thread Christian König
Well not the reset lock, but there should only be a single reset queue which this runs on. Regards, Christian. Am 20.12.23 um 10:49 schrieb Xiao, Jack: [AMD Official Use Only - General] It's already protected by the reset lock. In my understanding, soft reset should not run in parallel. Reg

Re: [PATCH v3 1/2] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2023-12-20 Thread Christian König
Am 19.12.23 um 23:43 schrieb Felix Kuehling: On 2023-12-19 3:10, Christian König wrote: Am 15.12.23 um 16:19 schrieb Felix Kuehling: On 2023-12-15 07:30, Christian König wrote: @@ -1425,11 +1451,21 @@ int amdgpu_vm_handle_moved(struct amdgpu_device *adev,   }     r

Re: [PATCH v3 1/2] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2023-12-19 Thread Christian König
Am 15.12.23 um 16:19 schrieb Felix Kuehling: On 2023-12-15 07:30, Christian König wrote: @@ -1425,11 +1451,21 @@ int amdgpu_vm_handle_moved(struct amdgpu_device *adev,   }     r = amdgpu_vm_bo_update(adev, bo_va, clear); -    if (r) -    return r;     if

Re: [PATCH] drm/amdgpu: re-create idle bo's PTE during VM state machine reset

2023-12-18 Thread Christian König
d catch, Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 7da71b6a9dc6..b8fcb6c55698 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +

Re: [PATCH] drm/amdgpu: Let KFD sync with VM fences

2023-12-18 Thread Christian König
Am 19.12.23 um 08:51 schrieb Christian König: Am 18.12.23 um 22:21 schrieb Felix Kuehling: Change the rules for amdgpu_sync_resv to let KFD synchronize with VM fences on page table reservations. This fixes intermittent memory corruption after evictions when using amdgpu_vm_handle_moved to

Re: [PATCH] drm/amdgpu: Let KFD sync with VM fences

2023-12-18 Thread Christian König
render nodes. Signed-off-by: Felix Kuehling Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index dcd8c066bc1f

Re: amdgpu didn't start with pci=nocrs parameter, get error "Fatal error during GPU init"

2023-12-15 Thread Christian König
Am 15.12.23 um 12:45 schrieb Mikhail Gavrilov: On Tue, Feb 28, 2023 at 5:43 PM Christian König wrote: The point is it doesn't need to talk to the amdgpu hardware. What it does is that it talks to the good old VGA/VESA emulation and that just happens to be still enabled by the BIOS/GRUB.

Re: [PATCH v3 1/2] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2023-12-15 Thread Christian König
Am 14.12.23 um 23:30 schrieb 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

Re: [PATCH 2/2] drm/amdgpu: Enable clear page functionality

2023-12-14 Thread Christian König
Am 13.12.23 um 16:46 schrieb Michel Dänzer: From a security PoV, the kernel should never return uncleared memory to (at least unprivileged) user space. This series seems like a big step in that direction. Well please take a look at the MAP_UNINITIALIZED flag for mmap(). We even have the fun

Re: [PATCH v2] drm/amd: Add a workaround for GFX11 systems that fail to flush TLB

2023-12-14 Thread Christian König
Am 13.12.23 um 21:31 schrieb Mario Limonciello: Some systems with MP1 13.0.4 or 13.0.11 have a firmware bug that causes the first MES packet after resume to fail. Typically this packet is used to flush the TLB when GART is enabled. This issue is fixed in newer firmware, but as OEMs may not ro

Re: [PATCH] drm/amd: Add a workaround for GFX11 systems that fail to flush TLB

2023-12-14 Thread Christian König
Am 13.12.23 um 20:44 schrieb Alex Deucher: On Wed, Dec 13, 2023 at 2:32 PM Mario Limonciello wrote: On 12/13/2023 13:12, Mario Limonciello wrote: On 12/13/2023 13:07, Alex Deucher wrote: On Wed, Dec 13, 2023 at 1:00 PM Mario Limonciello wrote: Some systems with MP1 13.0.4 or 13.0.11 have a

Re: [PATCH 2/2] drm/amdgpu: Enable clear page functionality

2023-12-13 Thread Christian König
Am 13.12.23 um 16:39 schrieb Felix Kuehling: On 2023-12-13 9:20, Christian König wrote: Am 12.12.23 um 00:32 schrieb Felix Kuehling: On 2023-12-11 04:50, Christian König wrote: Am 08.12.23 um 20:53 schrieb Alex Deucher: [SNIP] You also need a functionality which resets all cleared blocks

Re: [PATCH v2 1/2] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2023-12-13 Thread Christian König
Am 06.12.23 um 22:44 schrieb 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

Re: [PATCH 2/2] drm/amdgpu: Enable clear page functionality

2023-12-13 Thread Christian König
Am 12.12.23 um 00:32 schrieb Felix Kuehling: On 2023-12-11 04:50, Christian König wrote: Am 08.12.23 um 20:53 schrieb Alex Deucher: [SNIP] You also need a functionality which resets all cleared blocks to uncleared after suspend/resume. No idea how to do this, maybe Alex knows of hand. Since

Re: [PATCH v3] drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap

2023-12-13 Thread Christian König
move_notify is called before move happens, but actually it is called after move happens, here the new_mem is same as bo->resource Fix: move trace_amdgpu_bo_move from move_notify to amdgpu_bo_move Signed-off-by: Wang, Beyond wang.bey...@amd.com Yeah, that makes much more sense. Reviewe

Re: [PATCH v2] drm/radeon: Prevent multiple debug error lines on suspend

2023-12-12 Thread Christian König
ready present! Patch v1: The fix was to run lookup() for the file before trying to (re)create that debug file. Patch v2: Call the radeon_debugfs_init() only once when radeon ring is initialized (as suggested  by Christian K. - thanks) Signed-off-by: Woody Suwalski Reviewed-by: Christian K

Re: [PATCH 1/1] drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap

2023-12-12 Thread Christian König
Am 11.12.23 um 05:29 schrieb Wang, Beyond: [AMD Official Use Only - General] Subject: [PATCH 1/1] drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap Issue: during evict or validate happened on amdgpu_bo, the 'from' and 'to' is always same in ftrace event of amdgpu_bo_move

Re: [PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages

2023-12-12 Thread Christian König
Am 12.12.23 um 00:43 schrieb Felix Kuehling: On 2023-12-11 05:38, Christian König wrote: Am 09.12.23 um 00:01 schrieb James Zhu: Needn't do schedule for each hmm_range_fault, and use cond_resched to replace schedule. cond_resched() is usually NAKed upstream since it is a NO-OP in

Re: [PATCH V2] drm/amdgpu/sdma5.2: add begin/end_use ring callbacks

2023-12-11 Thread Christian König
://gitlab.freedesktop.org/drm/amd/-/issues/2220 Reviewed-by: Mario Limonciello (v1) Tested-by: Mario Limonciello (v1) Signed-off-by: Alex Deucher Maybe add a one line code comment explaining why we do this, with that done Reviewed-by: Christian König Christian. --- drivers/gpu/drm/amd

Re: [GIT PULL] mmutable branch between pdx86 amd wbrf branch and wifi / amdgpu due for the v6.8 merge window

2023-12-11 Thread Christian König
Am 11.12.23 um 12:02 schrieb Hans de Goede: Hi Wifi and AMDGPU maintainers, Here is a pull-request for the platform-drivers-x86 parts of: https://lore.kernel.org/platform-driver-x86/20231211100630.2170152-1-jun@amd.com/ From my pov the pdx86 bits are ready and the platform-drivers-x86-am

Re: [PATCH v2 2/2] drm/amdgpu: Enable clear page functionality

2023-12-11 Thread Christian König
the size calculation (Christian) - Use AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE for clearing the buffers in the free path to properly wait for fences etc.. (Christian) Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.

Re: [PATCH] drm/radeon: Prevent multiple error lines on suspend

2023-12-11 Thread Christian König
Am 10.12.23 um 19:24 schrieb Woody Suwalski: Hello, it has been now over 2 weeks and I have not seen any response to this patch. Has it been lost in the cracks of the wide internet ? :-( Well your patch is malformed ("#" before each line in the commit message) and probably ended up being igno

Re: [PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages

2023-12-11 Thread Christian König
Am 09.12.23 um 00:01 schrieb James Zhu: Needn't do schedule for each hmm_range_fault, and use cond_resched to replace schedule. cond_resched() is usually NAKed upstream since it is a NO-OP in most situations. IIRC there was even a patch set to completely remove it. Christian. Signed-off-

Re: [PATCH 2/2] drm/amdgpu: Enable clear page functionality

2023-12-11 Thread Christian König
Am 08.12.23 um 20:53 schrieb Alex Deucher: [SNIP] You also need a functionality which resets all cleared blocks to uncleared after suspend/resume. No idea how to do this, maybe Alex knows of hand. Since the buffers are cleared on creation, is there actually anything to do? Well exactly that'

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Christian König
Am 08.12.23 um 12:43 schrieb Friedrich Vock: On 08.12.23 10:51, Christian König wrote: Well longer story short Alex and I have been digging up the documentation for this and as far as we can tell this isn't correct. Huh. I initially talked to Marek about this, adding him in Cc. Yeah,

Re: [PATCH 1/2] drm/amdgpu/debugfs: fix error code when smc register accessors are NULL

2023-12-08 Thread Christian König
The second patch never made it into my inbox, but the first one is Reviewed-by: Christian König . Christian. Am 07.12.23 um 18:39 schrieb Alex Deucher: Ping on this series? Alex On Mon, Nov 27, 2023 at 5:52 PM Alex Deucher wrote: Should be -EOPNOTSUPP. Fixes: 5104fdf50d32 ("drm/a

[PATCH 2/2] drm/amdgpu: warn when there are still mappings when a BO is destroyed v2

2023-12-08 Thread Christian König
This can only happen when there is a reference counting bug. v2: fix typo Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 1/2] drm/amdgpu: fix tear down order in amdgpu_vm_pt_free

2023-12-08 Thread Christian König
When freeing PD/PT with shadows it can happen that the shadow destruction races with detaching the PD/PT from the VM causing a NULL pointer dereference in the invalidation code. Fix this by detaching the the PD/PT from the VM first and then freeinguthe shadow instead. Signed-off-by: Christian

Re: [PATCH] drm/amdkfd: Fix sparse __rcu annotation warnings

2023-12-08 Thread Christian König
Am 07.12.23 um 20:14 schrieb Felix Kuehling: On 2023-12-05 17:20, Felix Kuehling wrote: Properly mark kfd_process->ef as __rcu and consistently access it with rcu_dereference_protected. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312052245.yfpbsgnh-...@int

Re: [PATCH 2/2] drm/amdgpu: Enable clear page functionality

2023-12-08 Thread Christian König
Am 07.12.23 um 16:11 schrieb Arunpravin Paneer Selvam: Add clear page support in vram memory region. The first patch looks good, but this here needs quite some work. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c| 13 +++-- .../gpu/drm/amd/amdg

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Christian König
Well longer story short Alex and I have been digging up the documentation for this and as far as we can tell this isn't correct. You need to do quite a bit more before you can turn on this feature. What userspace side do you refer to? Regards, Christian. Am 08.12.23 um 09:19 schrieb Friedric

Re: radeon flooding "flip queue failed" in Xorg and system log

2023-12-04 Thread Christian König
ry in BIOS the error goes away. Still would be nice if the error would point to "out of VMem" or something. Best Regards Christian König schrieb am Montag, 4. Dezember 2023 um 16:18: Am 02.12.23 um 20:00 schrieb smesgr: Hi, I have installed Debian 12 on my old Fujitsu S920 with

Re: radeon flooding "flip queue failed" in Xorg and system log

2023-12-04 Thread Christian König
Am 02.12.23 um 20:00 schrieb smesgr: Hi, I have installed Debian 12 on my old Fujitsu S920 with AMD GX-424CC. After the installation completed, my logs are flooded by the following error messages: dmesg: [  967.869183] radeon :00:01.0: 3ba3c813 pin failed [  967.869212] [drm:radeo

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-12-04 Thread Christian König
Am 04.12.23 um 00:32 schrieb Alistair Popple: Christian König writes: Am 01.12.23 um 06:48 schrieb Zeng, Oak: [SNIP] Besides memory eviction/oversubscription, there are a few other pain points when I use hmm: 1) hmm doesn't support file-back memory, so it is hard to share memor

Re: [PATCH 2/2] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2023-12-04 Thread Christian König
Am 15.11.23 um 00:32 schrieb 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

Re: [PATCH] drm/radeon/dpm: fix a memleak in sumo_parse_power_table

2023-12-04 Thread Christian König
Am 03.12.23 um 18:16 schrieb Zhipeng Lu: The rdev->pm.dpm.ps allocated by kcalloc should be freed in every following error-handling path. However, in the error-handling of rdev->pm.power_state[i].clock_info the rdev->pm.dpm.ps is not freed, resulting in a memleak in this function. Fixes: 80ea2c1

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-12-01 Thread Christian König
emory attribute of a virtual address range? Do you need to extend vm_area_struct to save it? With hmm, we have to maintain such information at driver. This ends up with pretty complicated logic to split/merge those address range. I know core mm has similar logic to split/merge vma... Oak -Weixi

Re: [Linaro-mm-sig] Re: [PATCH] dma-buf: Correct the documentation of name and exp_name symbols

2023-11-30 Thread Christian König
Am 29.11.23 um 22:18 schrieb Alex Deucher: On Wed, Nov 22, 2023 at 1:58 PM Christian König wrote: Am 22.11.23 um 17:05 schrieb Ramesh Errabolu: Fix the documentation of struct dma_buf members name and exp_name as to how these members are to be used and accessed. Signed-off-by: Ramesh

Re: [PATCH] drm/amdgpu: add shared fdinfo stats

2023-11-30 Thread Christian König
Am 28.11.23 um 18:52 schrieb Rob Clark: On Tue, Nov 28, 2023 at 6:28 AM Alex Deucher wrote: On Tue, Nov 28, 2023 at 9:17 AM Christian König wrote: Am 17.11.23 um 20:56 schrieb Alex Deucher: Add shared stats. Useful for seeing shared memory. Signed-off-by: Alex Deucher --- drivers/gpu

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread Christian König
MM for that. Regards, Christian. PS, hmadvise() is based on the idea of Nvidia's cudaMemAdvise() which provides abundant and useful memory policies. HMM extended mbind() instead. -Weixi -Original Message- From: Christian König Sent: Wednesday, November 29, 2023 11:22 PM To: zhu

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread Christian König
on helpers. For #3, since we have a common drm/buddy layer, I don't think it is a big problem for driver writer now. I do see #4 is something you solved more beautifully, requires new system call though. Oak -Original Message- From: dri-devel On Behalf Of Christian König Sent: T

Re: [PATCH] drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()

2023-11-29 Thread Christian König
Am 29.11.23 um 17:03 schrieb Alex Deucher: On Wed, Nov 29, 2023 at 10:47 AM Christian König wrote: Am 29.11.23 um 16:22 schrieb Nikita Zhandarovich: While improbable, there may be a chance of hitting integer overflow when the result of radeon_get_ib_value() gets shifted left. Avoid it by

Re: [PATCH] drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()

2023-11-29 Thread Christian König
Am 29.11.23 um 16:22 schrieb Nikita Zhandarovich: While improbable, there may be a chance of hitting integer overflow when the result of radeon_get_ib_value() gets shifted left. Avoid it by casting one of the operands to larger data type (u64). Found by Linux Verification Center (linuxtesting.o

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-29 Thread Christian König
arsten Schwan. "An evolutionary study of linux memory management for fun and profit." 2016 USENIX Annual Technical Conference (USENIX ATC 16). 2016. Thanks, Weixi -Original Message- From: Dave Airlie Sent: Wednesday, November 29, 2023 1:15 PM To: Christian König Cc: zhuweixi ;

Re: [PATCH] drm/amdgpu: add shared fdinfo stats

2023-11-28 Thread Christian König
Am 17.11.23 um 20:56 schrieb Alex Deucher: Add shared stats. Useful for seeing shared memory. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 +

Re: [PATCH] drm/amdgpu: Fix uninitialized return value

2023-11-28 Thread Christian König
Am 28.11.23 um 10:49 schrieb Lazar, Lijo: On 11/28/2023 3:07 PM, Christian König wrote: Am 27.11.23 um 22:55 schrieb Alex Deucher: On Mon, Nov 27, 2023 at 2:22 PM Christian König wrote: Am 27.11.23 um 19:29 schrieb Lijo Lazar: The return value is uniinitialized if ras context is NULL

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-28 Thread Christian König
Adding a few missing important people to the explicit to list. Am 28.11.23 um 13:50 schrieb Weixi Zhu: The problem: Accelerator driver developers are forced to reinvent external MM subsystems case by case, because Linux core MM only considers host memory resources. These reinvented MM subsystem

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-28 Thread Christian König
Am 28.11.23 um 13:50 schrieb Weixi Zhu: The problem: Accelerator driver developers are forced to reinvent external MM subsystems case by case, because Linux core MM only considers host memory resources. These reinvented MM subsystems have similar orders of magnitude of LoC as Linux MM (80K), e.g

Re: [PATCH] drm/amdgpu: Fix uninitialized return value

2023-11-28 Thread Christian König
Am 27.11.23 um 22:55 schrieb Alex Deucher: On Mon, Nov 27, 2023 at 2:22 PM Christian König wrote: Am 27.11.23 um 19:29 schrieb Lijo Lazar: The return value is uniinitialized if ras context is NULL. Fixes: 0f4c8faa043c (drm/amdgpu: Move mca debug mode decision to ras) Signed-off-by: Lijo

Re: [PATCH 1/2] drm/amdgpu/gmc: check if AGP is disabled in amdgpu_gmc_agp_addr()

2023-11-27 Thread Christian König
Am 21.11.23 um 16:05 schrieb Alex Deucher: Return AMDGPU_BO_INVALID_OFFSET if the AGP aperture is disabled. There is no reason to check further if the aperture is disabled. Yeah, but there shouldn't be a reason to check it earlier either. The "if (bo->ttm->dma_address[0] + PAGE_SIZE >= adev->g

Re: [PATCH 2/2] drm/amdgpu: use GTT only as fallback for VRAM|GTT

2023-11-27 Thread Christian König
Am 27.11.23 um 17:47 schrieb Bhardwaj, Rajneesh: [AMD Official Use Only - General] -Original Message- From: amd-gfx On Behalf Of Hamza Mahfooz Sent: Monday, November 27, 2023 10:53 AM To: Christian König ; jani.nik...@linux.intel.com; kher...@redhat.com; d...@redhat.com; za

Re: [PATCH] drm/amdgpu: Fix uninitialized return value

2023-11-27 Thread Christian König
Am 27.11.23 um 19:29 schrieb Lijo Lazar: The return value is uniinitialized if ras context is NULL. Fixes: 0f4c8faa043c (drm/amdgpu: Move mca debug mode decision to ras) Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH 2/2] drm/amdgpu: use GTT only as fallback for VRAM|GTT

2023-11-27 Thread Christian König
Try to fill up VRAM as well by setting the busy flag on GTT allocations. This fixes the issue that when VRAM was evacuated for suspend it's never filled up again unless the application is restarted. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6

[PATCH 1/2] drm/ttm: replace busy placement with flags v3

2023-11-27 Thread Christian König
From: Somalapuram Amaranath Instead of a list of separate busy placement add flags which indicate that a placement should only be used when there is room or if we need to evict. v2: add missing TTM_PL_FLAG_IDLE for i915 v3: fix auto build test ERROR on drm-tip/drm-tip Signed-off-by: Christian

TTM improvement and amdgpu fix

2023-11-27 Thread Christian König
Hi guys, TTM has a feature which allows to specify placements for normal operation as well as when all domains are "busy" and don't have free space. Not very widely used since it was a bit inflexible and required making multiple placement lists. Replace the multiple lists with flags and start t

Re: [PATCH 1/3] Revert "drm/prime: Unexport helpers for fd/handle conversion"

2023-11-23 Thread Christian König
associated with GEM objects while ensuring that move notifier callbacks are working as intended. CC: Christian König CC: Thomas Zimmermann Signed-off-by: Felix Kuehling Re: our discussion about v2 of this patch: If this version is acceptable, can I get an R-b or A-b? From my side feel free to

Re: [PATCH v2] drm/amdgpu: Fix cat debugfs amdgpu_regs_didt causes kernel null pointer

2023-11-23 Thread Christian König
;RREG32_DIDT' 'WREG32_DIDT' lacks of relevant judgment. And other 'amdgpu_ip_block_version' that use these two definitions won't be added for 'AMDGPU_FAMILY_SI'. So, add null pointer judgment before calling. Signed-off-by: Lu Yao Reviewed-by: Christian König --- Changes

Re: [PATCH] dma-buf: Correct the documentation of name and exp_name symbols

2023-11-22 Thread Christian König
Am 22.11.23 um 17:05 schrieb Ramesh Errabolu: Fix the documentation of struct dma_buf members name and exp_name as to how these members are to be used and accessed. Signed-off-by: Ramesh Errabolu Reviewed-by: Christian König --- include/linux/dma-buf.h | 11 +++ 1 file changed

Re: [PATCH] dma-buf: Correct the documentation of name and exp_name symbols

2023-11-22 Thread Christian König
Am 21.11.23 um 19:11 schrieb Ramesh Errabolu: Fix the documentation of struct dma_buf members name and exp_name as to how these members are to be used and accessed. Signed-off-by: Ramesh Errabolu Looks good to me, but you need to send this to dri-devel and a bunch of other lists as well. T

Re: [PATCH] drm/amdgpu: Fix cat debugfs amdgpu_regs_didt causes kernel null pointer

2023-11-22 Thread Christian König
Am 22.11.23 um 10:35 schrieb Lu Yao: For 'AMDGPU_FAMILY_SI' family cards, in 'si_common_early_init' func, init 'didt_rreg' and 'didt_wreg' to 'NULL'. But in func 'amdgpu_debugfs_regs_didt_read/write', using 'RREG32_DIDT' 'WREG32_DIDT' lacks of relevant judgment. And other 'amdgpu_ip_block_version

Re: [PATCH] drm/amdgpu: fix memory overflow in the IB test

2023-11-21 Thread Christian König
_DIRECT, &ib); Not the fault of your patch, but the indentation here and below seems to be wrong, please check your patch with checkpatch.pl. When you don't get a warning feel free to add Reviewed-by: Christian König . Regards, Christian. if (r) goto err1; d

Re: WARNING in allocate_mst_payload

2023-11-21 Thread Christian König
Hi Jeff, first of all adding Harry from our display team. From a quick look the obvious missing information is how are your monitors wired up? Are those individually DP or HDMI connected to the PC or are they daisy chained through MST? If it's daisy chained please double check that you don't

Re: [PATCH] gpu: display: remove unnecessary braces to fix coding style

2023-11-21 Thread Christian König
Am 21.11.23 um 05:36 schrieb RutingZhang: checkpatch complains that: WARNING: braces {} are not necessary for single statement blocks +if (pool->base.irqs != NULL) { +dal_irq_service_destroy(&pool->base.irqs); +} Fixed it by removing unnec

Re: [PATCH 1/3] Revert "drm/prime: Unexport helpers for fd/handle conversion"

2023-11-20 Thread Christian König
Am 20.11.23 um 17:28 schrieb Thomas Zimmermann: Hi Am 20.11.23 um 17:22 schrieb Christian König: Am 20.11.23 um 17:15 schrieb Felix Kuehling: On 2023-11-20 11:02, Thomas Zimmermann wrote: Hi Christian Am 20.11.23 um 16:22 schrieb Christian König: Am 20.11.23 um 16:18 schrieb Thomas

Re: Radeon regression in 6.6 kernel

2023-11-20 Thread Christian König
Am 20.11.23 um 17:08 schrieb Alex Deucher: On Mon, Nov 20, 2023 at 10:57 AM Christian König wrote: Am 19.11.23 um 07:47 schrieb Dave Airlie: On 12.11.23 01:46, Phillip Susi wrote: I had been testing some things on a post 6.6-rc5 kernel for a week or two and then when I pulled to a post 6.6

Re: [PATCH 1/3] Revert "drm/prime: Unexport helpers for fd/handle conversion"

2023-11-20 Thread Christian König
Am 20.11.23 um 17:15 schrieb Felix Kuehling: On 2023-11-20 11:02, Thomas Zimmermann wrote: Hi Christian Am 20.11.23 um 16:22 schrieb Christian König: Am 20.11.23 um 16:18 schrieb Thomas Zimmermann: Hi Am 20.11.23 um 16:06 schrieb Felix Kuehling: On 2023-11-20 6:54, Thomas Zimmermann wrote

Re: [PATCH] drm/amdgpu: fix AGP addressing when GART is not at 0

2023-11-20 Thread Christian König
Am 17.11.23 um 20:24 schrieb Alex Deucher: On Fri, Nov 10, 2023 at 10:22 AM Christian König wrote: Am 10.11.23 um 16:02 schrieb Alex Deucher: This worked by luck if the GART aperture ended up at 0. When we ended up moving GART on some chips, the GART aperture ended up offsetting the the AGP

Re: Radeon regression in 6.6 kernel

2023-11-20 Thread Christian König
Am 19.11.23 um 07:47 schrieb Dave Airlie: On 12.11.23 01:46, Phillip Susi wrote: I had been testing some things on a post 6.6-rc5 kernel for a week or two and then when I pulled to a post 6.6 release kernel, I found that system suspend was broken. It seems that the radeon driver failed to suspe

Re: [PATCH 1/3] Revert "drm/prime: Unexport helpers for fd/handle conversion"

2023-11-20 Thread Christian König
space. Regards, Christian. Best regards Thomas Regards,    Felix Best regards Thomas CC: Christian König CC: Thomas Zimmermann Signed-off-by: Felix Kuehling ---   drivers/gpu/drm/drm_prime.c | 33 ++---   include/drm/drm_prime.h |  7 +++   2 files change

Re: [PATCH 1/3] Revert "drm/prime: Unexport helpers for fd/handle conversion"

2023-11-20 Thread Christian König
render or primary node. Essentially the KFD node is a separate file descriptor AMD GPUs came up with for supporting compute. Regards, Christian. Best regards Thomas CC: Christian König CC: Thomas Zimmermann Signed-off-by: Felix Kuehling ---   drivers/gpu/drm/drm_pr

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

2023-11-17 Thread Christian König
Am 16.11.23 um 22:53 schrieb Felix Kuehling: On 2023-11-07 11:58, Felix Kuehling wrote: 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. This patch (and th

Re: [PATCH] drm/amd: Enable checkpoint and restore of VRAM Bos with no VA

2023-11-16 Thread Christian König
Am 16.11.23 um 03:47 schrieb Ramesh Errabolu: Tag VRAM BOs that do not have a VA with a unique Id, a 128-bit UUID. This unique Id is used to distinguish BOs that might otherwise be of same size. Checkpoint and restore assumes that these BOs are not imported into a DRM device that is accessible

Re: [PATCH v2] Add function parameter 'xcc_mask' not described in 'amdgpu_vm_flush_compute_tlb'

2023-11-16 Thread Christian König
Am 15.11.23 um 17:15 schrieb Srinivasan Shanmugam: Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1373: warning: Function parameter or member 'xcc_mask' not described in 'amdgpu_vm_flush_compute_tlb' Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Cc: &

Re: regression/bisected/6.7rc1: Instead of desktop I see a horizontal flashing bar with a picture of the desktop background on white screen

2023-11-16 Thread Christian König
Am 15.11.23 um 21:08 schrieb Mikhail Gavrilov: On Wed, Nov 15, 2023 at 11:39 PM Lee, Alvin wrote: This change has a DMCUB dependency - are you able to update your DMCUB version as well? I can confirm this issue was gone after updating firmware. ❯ dmesg | grep DMUB [ 11.496679] [drm] Loadi

Re: [PATCH v3 2/7] drm/radeon: Switch from pci_is_thunderbolt_attached() to dev_is_removable()

2023-11-15 Thread Christian König
it's connected to a Thunderbolt controller or USB4 router. Signed-off-by: Mario Limonciello Acked-by: Christian König for this one. --- v2->v3: * Update commit message --- drivers/gpu/drm/radeon/radeon_device.c | 4 ++-- drivers/gpu/drm/radeon/radeon_kms.c| 2 +- 2 files changed,

Re: [PATCH] Add function parameter 'xcc_mask' not described in 'amdgpu_vm_flush_compute_tlb'

2023-11-14 Thread Christian König
: Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1373: warning: Function parameter or member 'xcc_mask' not described in 'amdgpu_vm_flush_compute_tlb' Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Cc: "Pan, Xinhui" Signed-off-by: Srinivasan Sh

Re: [Patch v3] drm/ttm: Schedule delayed_delete worker closer

2023-11-13 Thread Christian König
such as GFXIP9.4.3. Acked-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Reviewed-by: Christian König --- Changes in v3: * Use WQ_UNBOUND to address the warning reported by CI pipeline. drivers/gpu/drm/ttm/ttm_bo.c | 8 +++- drivers/gpu/drm/ttm/ttm_device.c | 6 -- 2

Re: [PATCH v2] drm/amd/display: add a debugfs interface for the DMUB trace mask

2023-11-13 Thread Christian König
dynamically at runtime and document how to use it. Cc: Alex Deucher Cc: Mario Limonciello Signed-off-by: Hamza Mahfooz Acked-by: Christian König --- v2: only return -ETIMEDOUT for DMUB_STATUS_TIMEOUT --- Documentation/gpu/amdgpu/display/dc-debug.rst | 41 .../gpu/amdgpu/display

Re: [PATCH v2] drm/amdgpu: Address member 'ring' not described in 'amdgpu_ vce, uvd_entity_init()'

2023-11-13 Thread Christian König
ter or member 'ring' not described in 'amdgpu_uvd_entity_init' Cc: Christian König Cc: Alex Deucher Cc: "Pan, Xinhui" Signed-off-by: Srinivasan Shanmugam Reviewed-by: Christian König --- Updated ring variable description to "amdgpu_ring pointer to check

Re: [PATCH] drm/amdgpu: Address member 'ring' not described in 'amdgpu_ vce, uvd_entity_init()'

2023-11-13 Thread Christian König
ter or member 'ring' not described in 'amdgpu_uvd_entity_init' Cc: Christian König Cc: Alex Deucher Cc: "Pan, Xinhui" Signed-off-by: Srinivasan Shanmugam --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 1 + 2 files

Re: [PATCH] drm/ttm: set max_active to recommened default

2023-11-13 Thread Christian König
Am 11.11.23 um 14:11 schrieb Rajneesh Bhardwaj: To maximize per cpu execution context for the work items, use the recommended settings i.e. WQ_DFL_ACTIVE(256). There is no apparent reason to throttle to 16 while process tear down. Well big NAK to this. During process tear down it can be that hu

Re: [PATCH] drm/amdgpu: Skip execution of pending reset jobs

2023-11-10 Thread Christian König
Am 10.11.23 um 16:07 schrieb Lazar, Lijo: On 11/10/2023 8:18 PM, Christian König wrote: Am 09.11.23 um 08:38 schrieb Lijo Lazar: cancel_work is not backported to all custom kernels. Well this is pretty clear NAK to pushing this upstream. We absolutely can't add workaround for

Re: [PATCH] drm/amdgpu: fix AGP addressing when GART is not at 0

2023-11-10 Thread Christian König
AGP address setup into amdgpu_bo_gpu_offset_no_check(). v2: check mem_type before checking agp Fixes: 67318cb84341 ("drm/amdgpu/gmc11: set gart placement GC11") Reported-by: Jesse Zhang Reported-by: Yifan Zhang Signed-off-by: Alex Deucher Cc: christian.koe...@amd.com Reviewed-by: Ch

Re: [PATCH] drm/amdgpu: fix AGP addressing when GART is not at 0

2023-11-10 Thread Christian König
Am 10.11.23 um 15:47 schrieb Alex Deucher: This worked by luck if the GART aperture ended up at 0. When we ended up moving GART on some chips, the GART aperture ended up offsetting the the AGP address since the resource->start is a GART offset, not an MC address. Fix this by moving the AGP addr

Re: [PATCH] drm/amdgpu: Skip execution of pending reset jobs

2023-11-10 Thread Christian König
Am 09.11.23 um 08:38 schrieb Lijo Lazar: cancel_work is not backported to all custom kernels. Well this is pretty clear NAK to pushing this upstream. We absolutely can't add workaround for older kernels. You could keep this in the backported kernel, but why should cancel_work not be availab

Re: [PATCH] drm/amdgpu: exclude domain start when calucales offset for AGP aperture BOs

2023-11-10 Thread Christian König
Just call amdgpu_gmc_agp_addr() and check the return value for != AMDGPU_BO_INVALID_OFFSET; The problem is simply that we can't cache that result anywhere because bo->resource->start is essentially the offset into the GART and not the MC address. That must have been sneaked in years ago when

<    3   4   5   6   7   8   9   10   11   >