Re: [PATCH] drm/amd/display: Increase sanitizer frame larger than limit when compile testing with clang

2025-01-29 Thread Greg KH
On Thu, Jan 30, 2025 at 07:47:59AM +0100, Greg KH wrote: > On Mon, Jan 06, 2025 at 12:29:32PM -0500, Alex Deucher wrote: > > Applied. Thanks! > > Thanks, but I am still getting this error on Linus's current tree right > now, with this commit applied: > > CC [M] drivers/gpu/drm/amd/amdgpu/../d

Re: [PATCH] drm/amd/display: Increase sanitizer frame larger than limit when compile testing with clang

2025-01-29 Thread Greg KH
On Mon, Jan 06, 2025 at 12:29:32PM -0500, Alex Deucher wrote: > Applied. Thanks! Thanks, but I am still getting this error on Linus's current tree right now, with this commit applied: CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.o drivers/gpu/drm/amd/amdgpu/../displa

Re: [PATCH v1 04/12] mm/rmap: implement make_device_exclusive() using folio_walk instead of rmap walk

2025-01-29 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:54:02PM +0100, David Hildenbrand wrote: > We require a writable PTE and only support anonymous folio: we can only > have exactly one PTE pointing at that page, which we can just lookup > using a folio walk, avoiding the rmap walk and the anon VMA lock. > > So let's stop

Re: [PATCH v1 03/12] mm/rmap: convert make_device_exclusive_range() to make_device_exclusive()

2025-01-29 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:54:01PM +0100, David Hildenbrand wrote: > The single "real" user in the tree of make_device_exclusive_range() always > requests making only a single address exclusive. The current implementation > is hard to fix for properly supporting anonymous THP / large folios and > f

Re: [PATCH v1 02/12] mm/rmap: reject hugetlb folios in folio_make_device_exclusive()

2025-01-29 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:54:00PM +0100, David Hildenbrand wrote: > Even though FOLL_SPLIT_PMD on hugetlb now always fails with -EOPNOTSUPP, > let's add a safety net in case FOLL_SPLIT_PMD usage would ever be reworked. > > In particular, before commit 9cb28da54643 ("mm/gup: handle hugetlb in the

Re: [PATCH v1 01/12] mm/gup: reject FOLL_SPLIT_PMD with hugetlb VMAs

2025-01-29 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:53:59PM +0100, David Hildenbrand wrote: > We only have two FOLL_SPLIT_PMD users. While uprobe refuses hugetlb > early, make_device_exclusive_range() can end up getting called on > hugetlb VMAs. > > Right now, this means that with a PMD-sized hugetlb page, we can end > up

Re: [PATCH v1 3/4] mm/memory: pass folio and pte to restore_exclusive_pte()

2025-01-29 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:58:01PM +0100, David Hildenbrand wrote: > Let's pass the folio and the pte to restore_exclusive_pte(), so we > can avoid repeated page_folio() and ptep_get(). To do that, > pass the pte to try_restore_exclusive_pte() and use a folio in there > already. > > While at it, j

Re: [PATCH v1 2/4] mm/mmu_notifier: drop owner from MMU_NOTIFY_EXCLUSIVE

2025-01-29 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:58:00PM +0100, David Hildenbrand wrote: > We no longer get a MMU_NOTIFY_EXCLUSIVE on conversion with the owner set > that one has to filter out: if there already *is* a device-exclusive > entry (e.g., other device, we don't have that information), GUP will > convert it ba

Re: [PATCH v2] drm/aspeed: Use devm_platform_get_and_ioremap_resource()

2025-01-29 Thread Andrew Jeffery
On Wed, 2025-01-22 at 11:01 +0800, oushixiong1...@163.com wrote: > From: Shixiong Ou > > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to > devm_platform_get_and_ioremap_resource(). > > Signed-off-by: Shixiong Ou > --- > V1 -> V2: Add Missing commit message. > >  

Re: [PATCH 1/2] drm/ttm: test private resv obj on release/destroy

2025-01-29 Thread James Zhu
Reviewed-and-Tested-by: James Zhu for the series On 2025-01-29 10:28, Christian König wrote: Test the fences in the private dma_resv object instead of the pointer to a potentially shared dma_resv object. This only matters for imported BOs with an SG table since those don't get their dma_resv p

Re: [PATCH v5 03/14] drm/msm/dpu: switch RM to use crtc_id rather than enc_id for allocation

2025-01-29 Thread Dmitry Baryshkov
On Tue, Jan 28, 2025 at 07:20:35PM -0800, Jessica Zhang wrote: > From: Dmitry Baryshkov > > Up to now the driver has been using encoder to allocate hardware > resources. Switch it to use CRTC id in preparation for the next step. > > Reviewed-by: Abhinav Kumar > Signed-off-by: Dmitry Baryshkov

Re: [PATCH v1 1/4] lib/test_hmm: make dmirror_atomic_map() consume a single page

2025-01-29 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:57:59PM +0100, David Hildenbrand wrote: > The caller now always passes a single page; let's simplify, and return > "0" on success. Thanks for cleaning that up. Reviewed-by: Alistair Popple > Signed-off-by: David Hildenbrand > --- > lib/test_hmm.c | 33 ++

Re: [PATCH v1 4/4] mm/memory: document restore_exclusive_pte()

2025-01-29 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:58:02PM +0100, David Hildenbrand wrote: > Let's document how this function is to be used, and why the requirement > for the folio lock might maybe be dropped in the future. Sorry, only just catching up on your other thread. The folio lock was to ensure the GPU got a chan

Re: [PATCH] gpu: drm_dp_cec: fix broken CEC adapter properties check

2025-01-29 Thread Dmitry Baryshkov
On Wed, Jan 29, 2025 at 11:56:39PM +0100, Jens Schmidt wrote: > On 2025-01-29 10:51, Hans Verkuil wrote: > > > Jens (aka Farblos), can you test this patch? > > TL;DR: Your patch fixes the issue on my system, thanks. Could you please respond with the 'Tested-by: Your Name ' tag on a separate lin

Re: [PATCH v5 07/14] drm/msm/dpu: Reserve resources for CWB

2025-01-29 Thread Dmitry Baryshkov
On Tue, Jan 28, 2025 at 07:20:39PM -0800, Jessica Zhang wrote: > Add support for RM to reserve dedicated CWB PINGPONGs and CWB muxes > > For concurrent writeback, even-indexed CWB muxes must be assigned to > even-indexed LMs and odd-indexed CWB muxes for odd-indexed LMs. The same > even/odd rule a

Re: [PATCH v5 06/14] drm/msm/dpu: Fail atomic_check if multiple outputs request CDM block

2025-01-29 Thread Dmitry Baryshkov
On Tue, Jan 28, 2025 at 07:20:38PM -0800, Jessica Zhang wrote: > Currently, our hardware only supports a single output using CDM block at > most. Because of this, we cannot support cases where both writeback and DP > output request CDM simultaneously > > To avoid this happening when CWB is enabled

Re: [PATCH v5 02/14] drm/msm/dpu: move resource allocation to CRTC

2025-01-29 Thread Dmitry Baryshkov
On Tue, Jan 28, 2025 at 07:20:34PM -0800, Jessica Zhang wrote: > From: Dmitry Baryshkov > > All resource allocation is centered around the LMs. Then other blocks > (except DSCs) are allocated basing on the LMs that was selected, and LM > powers up the CRTC rather than the encoder. > > Moreover i

Re: [PATCH v4 07/11] mtd: intel-dg: wake card on operations

2025-01-29 Thread Rodrigo Vivi
On Wed, Jan 01, 2025 at 05:39:21PM +0200, Alexander Usyskin wrote: > Enable runtime PM in mtd driver to notify graphics driver that > whole card should be kept awake while nvm operations are > performed through this driver. > > CC: Lucas De Marchi > Acked-by: Miquel Raynal > Signed-off-by: Alexa

Re: [PATCH v1 01/12] mm/gup: reject FOLL_SPLIT_PMD with hugetlb VMAs

2025-01-29 Thread John Hubbard
On 1/29/25 3:53 AM, David Hildenbrand wrote: We only have two FOLL_SPLIT_PMD users. While uprobe refuses hugetlb early, make_device_exclusive_range() can end up getting called on hugetlb VMAs. Right now, this means that with a PMD-sized hugetlb page, we can end up calling split_huge_pmd(), becau

Re: [PATCH v4 10/11] drm/xe/nvm: add on-die non-volatile memory device

2025-01-29 Thread Rodrigo Vivi
On Wed, Jan 01, 2025 at 05:39:24PM +0200, Alexander Usyskin wrote: > Enable access to internal non-volatile memory on DGFX > with GSC/CSC devices via a child device. > The nvm child device is exposed via auxiliary bus. > > Reviewed-by: Rodrigo Vivi Since this patch needs a rebase anyway, please

[pull] amdgpu, amdkfd drm-fixes-6.14

2025-01-29 Thread Alex Deucher
Hi Dave, Simona, Fixes for 6.14. The following changes since commit 64179a1416e1420a34226ab3beb5f84710953d16: Merge tag 'drm-misc-next-fixes-2025-01-24' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next (2025-01-24 17:06:06 +0100) are available in the Git repository at: htt

Re: [PATCH v3 1/1] regmap: Synchronize cache for the page selector

2025-01-29 Thread Mark Brown
On Wed, Jan 29, 2025 at 06:50:57PM +0100, Marek Szyprowski wrote: > Bingo! This patch (on top of current linux-next) fixed the probe issue. > Feel free to add: > Reported-by: Marek Szyprowski > Tested-by: Marek Szyprowski > (although I'm not sure if this is a fix for the generic case or just

[PATCH v4 15/33] drm/xe: Add SVM garbage collector

2025-01-29 Thread Matthew Brost
Add basic SVM garbage collector which destroy a SVM range upon a MMU UNMAP event. The garbage collector runs on worker or in GPU fault handler and is required as locks in the path of reclaim are required and cannot be taken the notifier. v2: - Flush garbage collector in xe_svm_close v3: - Better

Re: [PATCH 06/16] rbd: convert timeouts to secs_to_jiffies()

2025-01-29 Thread Easwar Hariharan
On 1/28/2025 10:21 AM, Easwar Hariharan wrote: > Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced > secs_to_jiffies(). As the value here is a multiple of 1000, use > secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. > > This is converted using scripts/

Re: [RFC PATCH 3/3] drm/virtio: implement blob userptr resource object

2025-01-29 Thread Demi Marie Obenour
On 1/8/25 12:05 PM, Simona Vetter wrote: > On Fri, Dec 27, 2024 at 10:24:29AM +0800, Huang, Honglei1 wrote: >> >> On 2024/12/22 9:59, Demi Marie Obenour wrote: >>> On 12/20/24 10:35 AM, Simona Vetter wrote: On Fri, Dec 20, 2024 at 06:04:09PM +0800, Honglei Huang wrote: > From: Honglei Huan

[PATCH v4 28/33] drm/xe: Add SVM VRAM migration

2025-01-29 Thread Matthew Brost
Migration is implemented with range granularity, with VRAM backing being a VM private TTM BO (i.e., shares dma-resv with VM). The lifetime of the TTM BO is limited to when the SVM range is in VRAM (i.e., when a VRAM SVM range is migrated to SRAM, the TTM BO is destroyed). The design choice for usi

[PATCH v4 25/33] drm/xe: Add Xe SVM populate_devmem_pfn GPU SVM vfunc

2025-01-29 Thread Matthew Brost
Get device pfns from BO's buddy blocks. Used in migrate_* core MM functions called in GPU SVM to migrate between device and system memory. v2: - Use new drm_gpusvm_devmem_ops v3: - Better commit message (Thomas) Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Oak Zeng Signed-off-by: M

[PATCH v4 06/33] drm/gpusvm: Add support for GPU Shared Virtual Memory

2025-01-29 Thread Matthew Brost
This patch introduces support for GPU Shared Virtual Memory (SVM) in the Direct Rendering Manager (DRM) subsystem. SVM allows for seamless sharing of memory between the CPU and GPU, enhancing performance and flexibility in GPU computing tasks. The patch adds the necessary infrastructure for SVM, i

[PATCH v4 26/33] drm/xe: Add Xe SVM devmem_release GPU SVM vfunc

2025-01-29 Thread Matthew Brost
Implement with a simple BO put which releases the device memory. v2: - Use new drm_gpusvm_devmem_ops v3: - Better commit message (Thomas) v4: - Use xe_bo_put_async (Thomas) Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström --- drivers/gpu/drm/xe/xe_svm.c | 9 + 1 file chang

[PATCH v4 21/33] drm/xe: Add SVM device memory mirroring

2025-01-29 Thread Matthew Brost
Add SVM device memory mirroring which enables device pages for migration. Enabled via CONFIG_XE_DEVMEM_MIRROR Kconfig. Kconfig option defaults to enabled. If not enabled, SVM will work sans migration and KMD memory footprint will be less. v3: - Add CONFIG_XE_DEVMEM_MIRROR v4: - Fix Kconfig (Hima

[PATCH v4 20/33] drm/xe: Add migrate layer functions for SVM support

2025-01-29 Thread Matthew Brost
Add functions which migrate to / from VRAM accepting a single DPA argument (VRAM) and array of dma addresses (SRAM). Used for SVM migrations. v2: - Don't unlock job_mutex in error path of xe_migrate_vram v3: - Kernel doc (Thomas) - Better commit message (Thomas) - s/dword/num_dword (Thomas) -

[PATCH v4 09/33] drm/xe: Add SVM init / close / fini to faulting VMs

2025-01-29 Thread Matthew Brost
Add SVM init / close / fini to faulting VMs. Minimual implementation acting as a placeholder for follow on patches. v2: - Add close function v3: - Better commit message (Thomas) - Kernel doc (Thomas) - Update chunk array to be unsigned long (Thomas) - Use new drm_gpusvm.h header location (Tho

[PATCH v4 29/33] drm/xe: Basic SVM BO eviction

2025-01-29 Thread Matthew Brost
Wire xe_bo_move to GPU SVM migration via new helper xe_svm_bo_evict. v2: - Use xe_svm_bo_evict - Drop bo->range v3: - Kernel doc (Thomas) v4: - Add missing xe_bo.c code Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_bo.c | 19 +++ drivers/gpu/drm/xe/xe_svm.c | 15 ++

[PATCH v4 30/33] drm/xe: Add SVM debug

2025-01-29 Thread Matthew Brost
Add some useful SVM debug logging fro SVM range which prints the range's state. v2: - Upadte logging with latest structure layout v3: - Better commit message (Thomas) - New range structure (Thomas) - s/COLLECTOT/s/COLLECTOR (Thomas) v4: - Drop partial evict message (Thomas) - Use %p for poin

[PATCH v4 16/33] drm/xe: Add unbind to SVM garbage collector

2025-01-29 Thread Matthew Brost
Add unbind to SVM garbage collector. To facilitate add unbind support function to VM layer which unbinds a SVM range. Also teach PY layer to understand unbinds of SVM ranges. v3: - s/INVALID_VMA/XE_INVALID_VMA (Thomas) - Kernel doc (Thomas) - New GPU SVM range structure (Thomas) - s/DRM_GPUVA_

[PATCH v4 32/33] drm/xe: Add always_migrate_to_vram modparam

2025-01-29 Thread Matthew Brost
Used to show we can bounce memory multiple times which will happen once a real migration policy is implemented. Can be removed once migration policy is implemented. v3: - Pull some changes into the previous patch (Thomas) - Spell out power of 2 (Thomas) - Better commit message (Thomas) Signed-

[PATCH v4 22/33] drm/xe: Add drm_gpusvm_devmem to xe_bo

2025-01-29 Thread Matthew Brost
Add drm_gpusvm_devmem to xe_bo. Required to enable SVM migrations. Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström --- drivers/gpu/drm/xe/xe_bo_types.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_bo_types.h b/drivers/gpu/drm/xe/xe_bo_types.h index 46

[PATCH v4 04/33] drm/pagemap: Add DRM pagemap

2025-01-29 Thread Matthew Brost
From: Thomas Hellström Introduce drm_pagemap ops to map and unmap dma to VRAM resources. In the local memory case it's a matter of merely providing an offset into the device's physical address. For future p2p the map and unmap functions may encode as needed. Similar to how dma-buf works, let the

[PATCH v4 33/33] drm/doc: gpusvm: Add GPU SVM documentation

2025-01-29 Thread Matthew Brost
Add documentation for agree upon GPU SVM design principles, current status, and future plans. v4: - Address Thomas's feedback Signed-off-by: Matthew Brost --- Documentation/gpu/rfc/gpusvm.rst | 84 Documentation/gpu/rfc/index.rst | 4 ++ 2 files changed, 88 i

[PATCH v4 19/33] drm/xe/uapi: Add DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR

2025-01-29 Thread Matthew Brost
Add the DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR device query flag, which indicates whether the device supports CPU address mirroring. The intent is for UMDs to use this query to determine if a VM can be set up with CPU address mirroring. This flag is implemented by checking if the device suppo

[PATCH v4 24/33] drm/xe: Add GPUSVM device memory copy vfunc functions

2025-01-29 Thread Matthew Brost
Add GPUSVM device memory copy vfunc functions and connect to migration layer. Used for device memory migration. v2: - Allow NULL device pages in xe_svm_copy - Use new drm_gpusvm_devmem_ops v3: - Prefix defines with XE_ (Thomas) - Change copy chunk size to 8M - Add a bunch of comments to xe_sv

[PATCH v4 23/33] drm/xe: Add drm_pagemap ops to SVM

2025-01-29 Thread Matthew Brost
From: Thomas Hellström Add support for mapping device pages to Xe SVM by attaching drm_pagemap to a memory region, which is then linked to a GPU SVM devmem allocation. This enables GPU SVM to derive the device page address. v3: - Better commit message (Thomas) - New drm_pagemap.h location Sig

[PATCH v4 31/33] drm/xe: Add modparam for SVM notifier size

2025-01-29 Thread Matthew Brost
Useful to experiment with notifier size and how it affects performance. v3: - Pull missing changes including in following patch (Thomas) Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_module.c | 4 drivers/gpu/drm/xe/xe_module.h | 1 + drivers/gpu/drm/xe/xe_svm.c| 4 +++- 3 fi

[PATCH v4 27/33] drm/xe: Add BO flags required for SVM

2025-01-29 Thread Matthew Brost
Add XE_BO_FLAG_CPU_ADDR_MIRROR to indicate BO is tied to SVM range. While these BO's are kernel allocations, we need a VM reference in this case which this flag indicates. In addition, we do not support CCS on these BO's either. The later can be revisited later. v2: - Take VM ref for system alloc

[PATCH v4 18/33] drm/xe: Enable CPU address mirror uAPI

2025-01-29 Thread Matthew Brost
Support for CPU address mirror bindings in SRAM fully in place, enable the implementation. v3: - s/system allocator/CPU address mirror (Thomas) Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström --- drivers/gpu/drm/xe/xe_svm.c | 10 ++ drivers/gpu/drm/xe/xe_vm.c | 6 --

[PATCH v4 07/33] drm/xe: Select DRM_GPUSVM Kconfig

2025-01-29 Thread Matthew Brost
Xe depends on DRM_GPUSVM for SVM implementation, select it in Kconfig. Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 99219c16e8aa..60b922f75001 100644 --- a/drivers/gpu

[PATCH v4 12/33] drm/xe: Add SVM range invalidation and page fault handler

2025-01-29 Thread Matthew Brost
Add SVM range invalidation vfunc which invalidates PTEs. A new PT layer function which accepts a SVM range is added to support this. In addition, add the basic page fault handler which allocates a SVM range which is used by SVM range invalidation vfunc. v2: - Don't run invalidation if VM is close

[PATCH v4 14/33] drm/xe: Add (re)bind to SVM page fault handler

2025-01-29 Thread Matthew Brost
Add (re)bind to SVM page fault handler. To facilitate add support function to VM layer which (re)binds a SVM range. Also teach PT layer to understand (re)binds of SVM ranges. v2: - Don't assert BO lock held for range binds - Use xe_svm_notifier_lock/unlock helper in xe_svm_close - Use drm_pagem

[PATCH v4 17/33] drm/xe: Do not allow CPU address mirror VMA unbind if the GPU has bindings

2025-01-29 Thread Matthew Brost
uAPI is designed with the use case that only mapping a BO to a malloc'd address will unbind a CPU-address mirror VMA. Therefore, allowing a CPU-address mirror VMA to unbind when the GPU has bindings in the range being unbound does not make much sense. This behavior is not supported, as it simplifie

[PATCH v4 08/33] drm/xe/uapi: Add DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR flag

2025-01-29 Thread Matthew Brost
Add the DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR flag, which is used to create unpopulated virtual memory areas (VMAs) without memory backing or GPU page tables. These VMAs are referred to as CPU address mirror VMAs. The idea is that upon a page fault or prefetch, the memory backing and GPU page tables

[PATCH v4 13/33] drm/gpuvm: Add DRM_GPUVA_OP_DRIVER

2025-01-29 Thread Matthew Brost
Add DRM_GPUVA_OP_DRIVER which allows driver to define their own gpuvm ops. Useful for driver created ops which can be passed into the bind software pipeline. v3: - s/DRM_GPUVA_OP_USER/DRM_GPUVA_OP_DRIVER (Thomas) - Better commit message (Thomas) Cc: Danilo Krummrich Signed-off-by: Matthew Bros

[PATCH v4 00/33] Introduce GPU SVM and Xe SVM implementation

2025-01-29 Thread Matthew Brost
Version 4 of GPU SVM. Thanks to everyone (especially Sima, Thomas, Alistair, Himal) for their numerous reviews on revision 1, 2, 3 and for helping to address many design issues. This version has been tested with IGT [1] on PVC, BMG, and LNL. Also tested with level0 (UMD) PR [2]. Major changes in

[PATCH v4 05/33] drm/xe/bo: Introduce xe_bo_put_async

2025-01-29 Thread Matthew Brost
From: Thomas Hellström Introduce xe_bo_put_async to put a bo where the context is such that the bo destructor can't run due to lockdep problems or atomic context. If the put is the final put, freeing will be done from a work item. Signed-off-by: Matthew Brost Signed-off-by: Thomas Hellström -

[PATCH v4 03/33] mm/migrate: Trylock device page in do_swap_page

2025-01-29 Thread Matthew Brost
Avoid multiple CPU page faults to the same device page racing by trying to lock the page in do_swap_page before taking an extra reference to the page. This prevents scenarios where multiple CPU page faults each take an extra reference to a device page, which could abort migration in folio_migrate_m

[PATCH v4 11/33] drm/xe: Nuke VM's mapping upon close

2025-01-29 Thread Matthew Brost
Clear root PT entry and invalidate entire VM's address space when closing the VM. Will prevent the GPU from accessing any of the VM's memory after closing. v2: - s/vma/vm in kernel doc (CI) - Don't nuke migration VM as this occur at driver unload (CI) v3: - Rebase and pull into SVM series (Thom

[PATCH v4 10/33] drm/xe: Add dma_addr res cursor

2025-01-29 Thread Matthew Brost
From: Thomas Hellström Add dma_addr res cursor which walks an array of drm_pagemap_dma_addr. Useful for SVM ranges and programing page tables. v3: - Better commit message (Thomas) - Use new drm_pagemap.h location Signed-off-by: Matthew Brost Signed-off-by: Thomas Hellström --- drivers/gpu/

[PATCH v4 01/33] drm/xe: Retry BO allocation

2025-01-29 Thread Matthew Brost
TTM doesn't support fair eviction via WW locking, this mitigated in by using retry loops in exec and preempt rebind worker. Extend this retry loop to BO allocation. Once TTM supports fair eviction this patch can be reverted. v4: - Keep line break (Stuart) Signed-off-by: Matthew Brost Reviewed-b

[PATCH v4 02/33] mm/migrate: Add migrate_device_pfns

2025-01-29 Thread Matthew Brost
Add migrate_device_pfns which prepares an array of pre-populated device pages for migration. This is needed for eviction of known set of non-contiguous devices pages to cpu pages which is a common case for SVM in DRM drivers using TTM. v2: - s/migrate_device_vma_range/migrate_device_prepopulated_

Re: [RFC PATCH 3/3] drm/virtio: implement blob userptr resource object

2025-01-29 Thread Demi Marie Obenour
On 1/20/25 4:54 AM, Huang, Honglei1 wrote: > On 2024/12/27 10:02, Huang, Honglei1 wrote: >> On 2024/12/22 9:59, Demi Marie Obenour wrote: >>> On 12/20/24 10:35 AM, Simona Vetter wrote: On Fri, Dec 20, 2024 at 06:04:09PM +0800, Honglei Huang wrote: > From: Honglei Huang > > A virtio

Re: [RFC PATCH 3/3] drm/virtio: implement blob userptr resource object

2025-01-29 Thread Demi Marie Obenour
On 1/24/25 7:42 PM, Demi Marie Obenour wrote: > On 1/8/25 12:05 PM, Simona Vetter wrote: >> On Fri, Dec 27, 2024 at 10:24:29AM +0800, Huang, Honglei1 wrote: >>> >>> On 2024/12/22 9:59, Demi Marie Obenour wrote: On 12/20/24 10:35 AM, Simona Vetter wrote: > On Fri, Dec 20, 2024 at 06:04:09PM

Re: [PATCH 09/14] drm/sti: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Anusha Srivatsa
On Wed, Jan 29, 2025 at 4:10 AM Raphael Gallais-Pou < raphael.gallais-...@foss.st.com> wrote: > > On 1/28/25 23:29, Anusha Srivatsa wrote: > > Replace platform_get_resource/_byname + devm_ioremap > > with just devm_platform_ioremap_resource() > > > > Used Coccinelle to do this change. SmPl patch:

Re: [PATCH v3 08/10] drm/display: bridge-connector: handle CEC adapters

2025-01-29 Thread Dmitry Baryshkov
On Wed, Jan 29, 2025 at 05:44:31PM +0100, Neil Armstrong wrote: > On 29/01/2025 00:44, Dmitry Baryshkov wrote: > > On Tue, Jan 28, 2025 at 05:14:06PM +0100, Maxime Ripard wrote: > > > On Sun, Jan 26, 2025 at 03:29:13PM +0200, Dmitry Baryshkov wrote: > > > > /* > > > > ---

Re: [PATCH 13/26] RFC drm/xe/eudebug: userptr vm pread/pwrite

2025-01-29 Thread Joonas Lahtinen
Quoting Christian König (2025-01-29 12:33:52) > Am 29.01.25 um 09:03 schrieb Joonas Lahtinen: > > Quoting Christian König (2024-12-20 14:56:14) > >> Am 20.12.24 um 12:31 schrieb Mika Kuoppala: > >>> Implement debugger vm access for userptrs. > >>> > >>> When bind is done, take ref to current task s

Re: [PATCH 09/16] xfs: convert timeouts to secs_to_jiffies()

2025-01-29 Thread Easwar Hariharan
On 1/29/2025 9:12 AM, Easwar Hariharan wrote: > On 1/28/2025 9:21 PM, Christoph Hellwig wrote: >> On Tue, Jan 28, 2025 at 06:21:54PM +, Easwar Hariharan wrote: >>> else >>> - cfg->retry_timeout = msecs_to_jiffies( >>> - init[i].ret

Re: [PATCH 13/14] drm/vc4: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Anusha Srivatsa
On Wed, Jan 29, 2025 at 8:18 AM Dave Stevenson < dave.steven...@raspberrypi.com> wrote: > Hi Anusha > > On Tue, 28 Jan 2025 at 22:33, Anusha Srivatsa wrote: > > > > Replace platform_get_resource_byname + devm_ioremap_resource > > with just devm_platform_ioremap_resource() > > > > Used Coccinelle

Re: [PATCH v5 00/14] drm/msm/dpu: Add Concurrent Writeback Support for DPU 10.x+

2025-01-29 Thread Dmitry Baryshkov
On Tue, Jan 28, 2025 at 07:20:32PM -0800, Jessica Zhang wrote: > DPU supports a single writeback session running concurrently with primary > display when the CWB mux is configured properly. This series enables > clone mode for DPU driver and adds support for programming the CWB mux > in cases where

Re: [PATCH v3 1/1] regmap: Synchronize cache for the page selector

2025-01-29 Thread Marek Szyprowski
On 29.01.2025 16:07, Andy Shevchenko wrote: >> [...] > Meanwhile, can you test this patch (on top of non-working case)? > > diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c > index 2314744201b4..f799a7a80231 100644 > --- a/drivers/base/regmap/regmap.c > +++ b/drivers/base/re

Re: [PATCH v3 04/30] drm/pagemap: Add DRM pagemap

2025-01-29 Thread Matthew Brost
On Fri, Jan 24, 2025 at 09:19:41AM +0200, Gwan-gyeong Mun wrote: > > > On 12/18/24 1:33 AM, Matthew Brost wrote: > > From: Thomas Hellström > > > > Introduce drm_pagemap ops to map and unmap dma to VRAM resources. In the > > local memory case it's a matter of merely providing an offset into the

Re: [PATCH 08/16] libata: zpodd: convert timeouts to secs_to_jiffies()

2025-01-29 Thread Easwar Hariharan
On 1/28/2025 4:21 PM, Damien Le Moal wrote: > On 1/29/25 3:21 AM, Easwar Hariharan wrote: >> Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced >> secs_to_jiffies(). As the value here is a multiple of 1000, use >> secs_to_jiffies() instead of msecs_to_jiffies to avoid the multipl

Re: [PATCH v12 2/2] drm/amdgpu: Enable async flip on overlay planes

2025-01-29 Thread Xaver Hugl
> It's not the intention of this patch to disable async updates on cursor > planes... but I don't think it's happening here? Async plane updates and > async page flips are different things. Right, these are different code paths. Nevermind then, it's just a bit confusing. > Any function that used t

Re: [RFC 1/5] mm/hmm: HMM API to enable P2P DMA for device private pages

2025-01-29 Thread Thomas Hellström
On Wed, 2025-01-29 at 09:47 -0400, Jason Gunthorpe wrote: > On Wed, Jan 29, 2025 at 02:38:58PM +0100, Simona Vetter wrote: > > > > The pgmap->owner doesn't *have* to fixed, certainly during early > > > boot before > > > you hand out any page references it can be changed. I wouldn't be > > > surpri

Re: [PATCH 09/16] xfs: convert timeouts to secs_to_jiffies()

2025-01-29 Thread Easwar Hariharan
On 1/28/2025 9:21 PM, Christoph Hellwig wrote: > On Tue, Jan 28, 2025 at 06:21:54PM +, Easwar Hariharan wrote: >> else >> -cfg->retry_timeout = msecs_to_jiffies( >> -init[i].retry_timeout * MSEC_PER_SEC); >> +

Re: [PATCH 14/16] platform/x86/amd/pmf: convert timeouts to secs_to_jiffies()

2025-01-29 Thread Easwar Hariharan
On 1/29/2025 5:12 AM, Ilpo Järvinen wrote: > On Tue, 28 Jan 2025, Easwar Hariharan wrote: > >> Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced >> secs_to_jiffies(). As the value here is a multiple of 1000, use >> secs_to_jiffies() instead of msecs_to_jiffies to avoid the mult

Re: [PATCH 2/2] drm/amdgpu: remove all KFD fences from the BO on release

2025-01-29 Thread Felix Kuehling
On 2025-01-29 10:28, Christian König wrote: > Remove all KFD BOs from the private dma_resv object. > > This prevents the KFD from being evitec unecessarily when an exported BO > is released. > > Signed-off-by: Christian König Looks good to me. Assuming James doesn't find any issues in testin

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-29 Thread Danilo Krummrich
On Wed, Jan 29, 2025 at 04:18:30PM +0100, Philipp Stanner wrote: > On Tue, 2025-01-28 at 15:56 +0100, Danilo Krummrich wrote: > > On Tue, Jan 28, 2025 at 03:29:27PM +0100, Philipp Stanner wrote: > > > diff --git a/drivers/gpu/drm/nouveau/nouveau_sched.c > > > b/drivers/gpu/drm/nouveau/nouveau_sched

Re: [PATCH v3 08/10] drm/display: bridge-connector: handle CEC adapters

2025-01-29 Thread Neil Armstrong
On 29/01/2025 00:44, Dmitry Baryshkov wrote: On Tue, Jan 28, 2025 at 05:14:06PM +0100, Maxime Ripard wrote: On Sun, Jan 26, 2025 at 03:29:13PM +0200, Dmitry Baryshkov wrote: /* - * Bridge Connector Initialisation

Re: [PATCH 14/14] Documentation: Update the todo

2025-01-29 Thread Thierry Reding
On Wed, Jan 29, 2025 at 04:28:49PM +0100, Maxime Ripard wrote: > On Wed, Jan 29, 2025 at 03:41:32PM +0100, Thierry Reding wrote: > > On Wed, Jan 29, 2025 at 03:31:50PM +0100, Maxime Ripard wrote: > > > Hi Thomas, > > > > > > On Wed, Jan 29, 2025 at 02:06:15PM +0100, Thomas Zimmermann wrote: > > >

Re: [Question] Are "device exclusive non-swap entries" / "SVM atomics in Nouveau" still getting used in practice?

2025-01-29 Thread David Hildenbrand
On 29.01.25 15:05, Simona Vetter wrote: On Wed, Jan 29, 2025 at 12:31:14PM +0100, David Hildenbrand wrote: On 29.01.25 12:28, Simona Vetter wrote: On Wed, Jan 29, 2025 at 11:48:03AM +0100, Simona Vetter wrote: On Tue, Jan 28, 2025 at 09:24:33PM +0100, David Hildenbrand wrote: On 28.01.25 21:1

Re: [PATCH v12 2/2] drm/amdgpu: Enable async flip on overlay planes

2025-01-29 Thread André Almeida
Em 29/01/2025 11:36, Xaver Hugl escreveu: Am Mo., 27. Jan. 2025 um 21:00 Uhr schrieb André Almeida : amdgpu can handle async flips on overlay planes, so allow it for atomic async checks. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 10 ++

Re: [PATCH 05/14] drm/meson: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Neil Armstrong
On 29/01/2025 16:40, Maxime Ripard wrote: On Tue, Jan 28, 2025 at 05:29:29PM -0500, Anusha Srivatsa wrote: Replace platform_get_resource_byname + devm_ioremap with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_3@ identifier res; expression ioremap; i

Re: [PATCH 11/14] drm/tegra: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Maxime Ripard
On Tue, Jan 28, 2025 at 05:29:35PM -0500, Anusha Srivatsa wrote: > Replace platform_get_resource + devm_ioremap_resource > with just devm_platform_ioremap_resource() > > Used Coccinelle to do this change. SmPl patch: > @rule_1@ > identifier res; > expression ioremap_res; > identifier pdev; > @@ >

Re: [PATCH 07/14] drm/rockchip: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Maxime Ripard
On Tue, Jan 28, 2025 at 05:29:31PM -0500, Anusha Srivatsa wrote: > Replace platform_get_resource + devm_ioremap_resource > with just devm_platform_ioremap_resource() > > Used Coccinelle to do this change. SmPl patch: > @rule_1@ > identifier res; > expression ioremap_res; > identifier pdev; > @@ >

Re: [PATCH 05/14] drm/meson: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Maxime Ripard
On Tue, Jan 28, 2025 at 05:29:29PM -0500, Anusha Srivatsa wrote: > Replace platform_get_resource_byname + devm_ioremap > with just devm_platform_ioremap_resource() > > Used Coccinelle to do this change. SmPl patch: > @rule_3@ > identifier res; > expression ioremap; > identifier pdev; > constant me

[PATCH 2/2] drm/amdgpu: remove all KFD fences from the BO on release

2025-01-29 Thread Christian König
Remove all KFD BOs from the private dma_resv object. This prevents the KFD from being evitec unecessarily when an exported BO is released. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 5 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 52 ---

Re: [PATCH 06/14] drm/mxsfb: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Maxime Ripard
On Tue, Jan 28, 2025 at 05:29:30PM -0500, Anusha Srivatsa wrote: > Replace platform_get_resource + devm_ioremap_resource > with just devm_platform_ioremap_resource() > > Used Coccinelle to do this change. SmPl patch: > @rule_1@ > identifier res; > expression ioremap_res; > identifier pdev; > @@ >

Re: [PATCH 03/14] drm/hisilicon: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Maxime Ripard
On Tue, Jan 28, 2025 at 05:29:27PM -0500, Anusha Srivatsa wrote: > Replace platform_get_resource + devm_ioremap_resource > with just devm_platform_ioremap_resource() > > Used Coccinelle to do this change. SmPl patch: > @rule_1@ > identifier res; > expression ioremap_res; > identifier pdev; > @@ >

Re: [PATCH 02/14] drm/fsl-dcu: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Maxime Ripard
On Tue, Jan 28, 2025 at 05:29:26PM -0500, Anusha Srivatsa wrote: > Replace platform_get_resource + devm_ioremap_resource > with just devm_platform_ioremap_resource() > > Used Coccinelle to do this change. SmPl patch: > @rule_1@ > identifier res; > expression ioremap_res; > identifier pdev; > @@ >

Re: [PATCH 01/14] drm/aspeed: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Maxime Ripard
On Tue, Jan 28, 2025 at 05:29:25PM -0500, Anusha Srivatsa wrote: > Replace platform_get_resource + devm_ioremap_resource > with just devm_platform_ioremap_resource() > > Used Coccinelle to do this change. SmPl patch: > @rule_1@ > identifier res; > expression ioremap_res; > identifier pdev; > @@ >

Re: [PATCH 12/14] drm/tiny: move to devm_platform_ioremap_resource() usage

2025-01-29 Thread Maxime Ripard
On Tue, Jan 28, 2025 at 05:29:36PM -0500, Anusha Srivatsa wrote: > Replace platform_get_resource + devm_ioremap_resource > with just devm_platform_ioremap_resource() > > Used Coccinelle to do this change. SmPl patch: > @rule_1@ > identifier res; > expression ioremap_res; > identifier pdev; > @@ >

Re: [PATCH 14/14] Documentation: Update the todo

2025-01-29 Thread Maxime Ripard
On Wed, Jan 29, 2025 at 03:41:32PM +0100, Thierry Reding wrote: > On Wed, Jan 29, 2025 at 03:31:50PM +0100, Maxime Ripard wrote: > > Hi Thomas, > > > > On Wed, Jan 29, 2025 at 02:06:15PM +0100, Thomas Zimmermann wrote: > > > Am 28.01.25 um 23:29 schrieb Anusha Srivatsa: > > > > Remove the TODO now

[PATCH 1/2] drm/ttm: test private resv obj on release/destroy

2025-01-29 Thread Christian König
Test the fences in the private dma_resv object instead of the pointer to a potentially shared dma_resv object. This only matters for imported BOs with an SG table since those don't get their dma_resv pointer replaced on release. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c |

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-29 Thread Philipp Stanner
On Tue, 2025-01-28 at 15:56 +0100, Danilo Krummrich wrote: > On Tue, Jan 28, 2025 at 03:29:27PM +0100, Philipp Stanner wrote: > > drm_sched_init() has a great many parameters and upcoming new > > functionality for the scheduler might add even more. Generally, the > > great number of parameters redu

Re: [PATCH v3 1/1] regmap: Synchronize cache for the page selector

2025-01-29 Thread Andy Shevchenko
On Tue, Jan 28, 2025 at 06:43:26PM +0200, Andy Shevchenko wrote: > On Tue, Jan 28, 2025 at 05:08:08PM +0100, Marek Szyprowski wrote: > > On 21.01.2025 14:29, Andy Shevchenko wrote: > > > On Tue, Jan 21, 2025 at 08:33:09AM +0100, Marek Szyprowski wrote: > > >> On 17.01.2025 18:28, Andy Shevchenko wr

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-29 Thread Maíra Canal
Hi Philipp, On 29/01/25 09:39, Philipp Stanner wrote: On Wed, 2025-01-29 at 07:53 -0300, Maíra Canal wrote: Hi Philipp, On 28/01/25 11:29, Philipp Stanner wrote: drm_sched_init() has a great many parameters and upcoming new functionality for the scheduler might add even more. Generally, the g

Re: [PATCH RFC] drm/msm/dsi/phy: Program clock inverters in correct register

2025-01-29 Thread Krzysztof Kozlowski
On 29/01/2025 15:31, Dmitry Baryshkov wrote: > On Wed, Jan 29, 2025 at 12:55:04PM +0100, Krzysztof Kozlowski wrote: >> Since SM8250 all downstream sources program clock inverters in >> PLL_CLOCK_INVERTERS_1 register and leave the PLL_CLOCK_INVERTERS as >> reset value (0x0). The most recent Hardwar

Re: [PATCH 14/14] Documentation: Update the todo

2025-01-29 Thread Thierry Reding
On Wed, Jan 29, 2025 at 03:31:50PM +0100, Maxime Ripard wrote: > Hi Thomas, > > On Wed, Jan 29, 2025 at 02:06:15PM +0100, Thomas Zimmermann wrote: > > Am 28.01.25 um 23:29 schrieb Anusha Srivatsa: > > > Remove the TODO now that this series addresses > > > the changes needed. > > > > While your se

Re: [PATCH v2] drm/virtio: Align host mapping request to maximum platform page size

2025-01-29 Thread Dmitry Osipenko
On 1/26/25 00:08, Sasha Finkelstein via B4 Relay wrote: > --- a/drivers/gpu/drm/virtio/virtgpu_vram.c > +++ b/drivers/gpu/drm/virtio/virtgpu_vram.c > @@ -150,8 +150,8 @@ static int virtio_gpu_vram_map(struct virtio_gpu_object > *bo) > return -EINVAL; > > spin_lock(&vgdev->hos

Re: [PATCH v12 2/2] drm/amdgpu: Enable async flip on overlay planes

2025-01-29 Thread Xaver Hugl
Am Mo., 27. Jan. 2025 um 21:00 Uhr schrieb André Almeida : > > amdgpu can handle async flips on overlay planes, so allow it for atomic > async checks. > > Signed-off-by: André Almeida > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 10 ++ > 1 file changed, 6 insertions(+

Re: [PATCH 14/14] Documentation: Update the todo

2025-01-29 Thread Maxime Ripard
Hi Thomas, On Wed, Jan 29, 2025 at 02:06:15PM +0100, Thomas Zimmermann wrote: > Am 28.01.25 um 23:29 schrieb Anusha Srivatsa: > > Remove the TODO now that this series addresses > > the changes needed. > > While your series is fine, this TODO item is unrelated. It's about various > ancient fbdev d

Re: [PATCH RFC] drm/msm/dsi/phy: Program clock inverters in correct register

2025-01-29 Thread Dmitry Baryshkov
On Wed, Jan 29, 2025 at 12:55:04PM +0100, Krzysztof Kozlowski wrote: > Since SM8250 all downstream sources program clock inverters in > PLL_CLOCK_INVERTERS_1 register and leave the PLL_CLOCK_INVERTERS as > reset value (0x0). The most recent Hardware Programming Guide for 3 nm, > 4 nm, 5 nm and 7 n

  1   2   3   >