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

2025-01-30 Thread Gwan-gyeong Mun
On 1/29/25 9:51 PM, Matthew Brost wrote: 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/migrat

Re: [PATCH 1/2] dt-bindings: display: panel: Add generic MIPI-DSI/DPI panels

2025-01-30 Thread Krzysztof Kozlowski
On Fri, Jan 31, 2025 at 03:43:53PM +0900, Hironori KIKUCHI wrote: > This is a binding for generic MIPI-DSI/DPI panels that require > initialization with a simple command sequence before use. > > Although the `panel-simple` binding exists for generic panels, it is not > suitable for panels that req

Re: [PATCH v3] drm/bridge: display-connector: implement the error path of .probe()

2025-01-30 Thread Joe Hattori
Hi Dan, Thank you for your review. On 1/31/25 14:48, Dan Carpenter wrote: Unrelated to this patch but from a naive reading of the code the conn->hpd_irq = gpiod_to_irq(conn->hpd_gpio); assignment can fail with -EPROBE_DEFER if CONFIG_GPIOLIB_IRQCHIP is enabled. The driver can functio

[PATCH v4] drm/bridge: display-connector: implement the error path of .probe()

2025-01-30 Thread Joe Hattori
Current implementation of .probe() leaks a reference of i2c_adapter. Implement an error path and call put_device() on the obtained i2c_adapter in it to fix this refcount bug. Also, remove the IS_ERR() check before calling i2c_put_adapter(conn->bridge.ddc) since conn->bridge.dcc is either NULL or a

[PATCH 2/2] drm: panel: Add a driver for Generic MIPI-DSI/DPI(+SPI) panels

2025-01-30 Thread Hironori KIKUCHI
Although the MIPI specifications define how to communicate with a panel to display an image, some panels still require a panel-specific initialization sequence to be sent. This is a driver for such generic MIPI-DSI/DPI panels that require initialization with a simple command sequence before use.

[PATCH 1/2] dt-bindings: display: panel: Add generic MIPI-DSI/DPI panels

2025-01-30 Thread Hironori KIKUCHI
This is a binding for generic MIPI-DSI/DPI panels that require initialization with a simple command sequence before use. Although the `panel-simple` binding exists for generic panels, it is not suitable for panels that require initialization via their communication bus, as such panels cannot be co

[PATCH 0/2] drm: panel: Add Generic MIPI Panel Driver

2025-01-30 Thread Hironori KIKUCHI
This is a Generic MIPI-DSI / DPI(+SPI) dual stack panel driver. Although the MIPI specifications define how to communicate with a panel to display an image, some panels still require a panel-specific initialization sequence to be sent. While there are many dedicated drivers for such panels, they

Re: [PATCH v3] drm/bridge: display-connector: implement the error path of .probe()

2025-01-30 Thread Dan Carpenter
Unrelated to this patch but from a naive reading of the code the conn->hpd_irq = gpiod_to_irq(conn->hpd_gpio); assignment can fail with -EPROBE_DEFER if CONFIG_GPIOLIB_IRQCHIP is enabled. The driver can function without an IRQ so we just ignore the error, but probably it would be better

Re: [PATCH v2] drm/bridge: display-connector: implement the error path of .probe()

2025-01-30 Thread Joe Hattori
Hi Dan, Sorry for the late reply. On 1/6/25 18:02, Dan Carpenter wrote: Hi Joe, kernel test robot noticed the following build warnings: https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Joe-Hattori/drm-bridge-display-con

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

2025-01-30 Thread Alistair Popple
On Wed, Jan 29, 2025 at 11:51:41AM -0800, Matthew Brost wrote: > 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 usi

[PATCH v3] drm/bridge: display-connector: implement the error path of .probe()

2025-01-30 Thread Joe Hattori
Current implementation of .probe() leaks a reference of i2c_adapter. Implement an error path and call put_device() on the obtained i2c_adapter in it to fix this refcount bug. This bug was found by an experimental static analysis tool that I am developing. Fixes: 0c275c30176b ("drm/bridge: Add bri

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

2025-01-30 Thread Alistair Popple
On Thu, Jan 30, 2025 at 04:57:39PM +1100, Alistair Popple wrote: > On Wed, Jan 29, 2025 at 12:54:01PM +0100, David Hildenbrand wrote: [...] > > -int make_device_exclusive_range(struct mm_struct *mm, unsigned long start, > > - unsigned long end, struct page **pages, > > -

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

2025-01-30 Thread Demi Marie Obenour
On Wed, Jan 29, 2025 at 03:54:59PM -0500, 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,

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

2025-01-30 Thread Alistair Popple
On Thu, Jan 30, 2025 at 11:43:25AM +0100, Simona Vetter wrote: > On Thu, Jan 30, 2025 at 11:27:37AM +1100, Alistair Popple wrote: > > 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

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

2025-01-30 Thread Alistair Popple
On Thu, Jan 30, 2025 at 04:29:33PM +0100, David Hildenbrand wrote: > On 30.01.25 14:31, Simona Vetter wrote: > > On Thu, Jan 30, 2025 at 10:37:06AM +0100, David Hildenbrand wrote: > > > On 30.01.25 01:27, Alistair Popple wrote: > > > > On Wed, Jan 29, 2025 at 12:58:02PM +0100, David Hildenbrand wro

Re: [PATCH v1 07/12] mm/page_vma_mapped: device-private entries are not migration entries

2025-01-30 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:54:05PM +0100, David Hildenbrand wrote: > It's unclear why they would be considered migration entries; they are > not. Yeah, I agree that doesn't seem right. I suspect I was initially modelling device exclusive entries similar to migration entries but obviously went too

Re: [PATCH v2 0/3] Add Mali GPU support for Mediatek MT8370 SoC

2025-01-30 Thread Rob Herring (Arm)
ran DT checks and didn't see these error(s), then make sure dt-schema is up to date: pip3 install dtschema --upgrade New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/mediatek/' for 20250130-mt8370-enable-gpu-v2-0-c154d0815...@collabora.com: arch/arm64/boot/dts/me

Re: [PATCH v1 06/12] mm: use single SWP_DEVICE_EXCLUSIVE entry type

2025-01-30 Thread Alistair Popple
On Wed, Jan 29, 2025 at 12:54:04PM +0100, David Hildenbrand wrote: > There is no need for the distinction anymore; let's merge the readable > and writable device-exclusive entries into a single device-exclusive > entry type. > > Signed-off-by: David Hildenbrand > --- > include/linux/swap.h|

Re: [RFC PATCH 1/5] dt-bindings: dma: Add CMA Heap bindings

2025-01-30 Thread Rob Herring
On Thu, Jan 30, 2025 at 01:08:57PM +, Florent Tomasin wrote: > Introduce a CMA Heap dt-binding allowing custom > CMA heap registrations. > > * Note to the reviewers: > The patch was used for the development of the protected mode > feature in Panthor CSF kernel driver and is not initially thoug

Re: [PATCH v1 05/12] mm/memory: detect writability in restore_exclusive_pte() through can_change_pte_writable()

2025-01-30 Thread Alistair Popple
On Thu, Jan 30, 2025 at 02:03:42PM +0100, Simona Vetter wrote: > On Thu, Jan 30, 2025 at 10:58:51AM +0100, David Hildenbrand wrote: > > On 30.01.25 10:51, Simona Vetter wrote: > > > On Wed, Jan 29, 2025 at 12:54:03PM +0100, David Hildenbrand wrote: > > > > Let's do it just like mprotect write-upgra

Re: [PATCH v6 4/6] drm/xe/guc: Move xe_hw_engine_snapshot creation back to xe_hw_engine.c

2025-01-30 Thread Rodrigo Vivi
On Tue, Jan 28, 2025 at 10:36:50AM -0800, Alan Previn wrote: > xe_devcoredump calls xe_engine_snapshot_capture_for_queue() to allocate > and populate the xe_hw_engine_snapshot structure. Move that function > back into xe_hw_engine.c since it doesn't make sense for > GuC-Err-Capture to allocate a st

Re: [PATCH v6 3/6] drm/xe/guc: Split engine state print between xe_hw_engine vs xe_guc_capture

2025-01-30 Thread Rodrigo Vivi
On Tue, Jan 28, 2025 at 10:36:49AM -0800, Alan Previn wrote: > Relocate the xe_engine_snapshot_print function from xe_guc_capture.c > into xe_hw_engine.c but split out the GuC-Err-Capture register printing > portion out into a separate helper inside xe_guc_capture.c so that > we can have a clear se

Re: [PATCH v6 1/6] drm/xe/guc: Rename __guc_capture_parsed_output

2025-01-30 Thread Rodrigo Vivi
On Tue, Jan 28, 2025 at 10:36:47AM -0800, Alan Previn wrote: > Since '__guc_capture_parsed_output *' is a handle that > is retrieved, stored and relinquished by an entity > external to GuC (i.e. xe_devcoredump), lets rename it to > something formal without the'__' prefix and export it > via give a

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

2025-01-30 Thread Alistair Popple
On Thu, Jan 30, 2025 at 10:24:37AM +0100, David Hildenbrand wrote: > On 30.01.25 10:01, David Hildenbrand wrote: > > On 30.01.25 07:11, Alistair Popple wrote: > > > On Wed, Jan 29, 2025 at 12:54:02PM +0100, David Hildenbrand wrote: > > > > We require a writable PTE and only support anonymous folio:

Re: [PATCH v3 1/2] drm/bridge: synopsys: Add audio support for dw-hdmi-qp

2025-01-30 Thread Dmitry Baryshkov
On Thu, Jan 30, 2025 at 11:45:17AM -0500, Detlev Casanova wrote: > From: Sugar Zhang > > Register the dw-hdmi-qp bridge driver as an HDMI audio codec. > > The register values computation functions (for n) are based on the > downstream driver, as well as the register writing functions. > > The d

Re: [PATCH] drm/vmwgfx: Fix dumb buffer leak

2025-01-30 Thread Ian Forbes
On Tue, Jan 21, 2025 at 1:42 PM Zack Rusin wrote: > > > Ah, that makes sense. If you could improve the commit message that'd > be great (just describe both issues. i.e. the buffer handle being > allocated via vmw_gem_object_create_with_handle which create a gem > handle that holds the reference an

Re: [PATCHv3 11/11] mm: Rename PG_dropbehind to PG_reclaim

2025-01-30 Thread Yu Zhao
On Thu, Jan 30, 2025 at 3:01 AM Kirill A. Shutemov wrote: > > Now as PG_reclaim is gone, its name can be reclaimed for better > use :) > > Rename PG_dropbehind to PG_reclaim and rename all helpers around it. > > Signed-off-by: Kirill A. Shutemov Acked-by: Yu Zhao

Re: [PATCHv3 01/11] mm/migrate: Transfer PG_dropbehind to the new folio

2025-01-30 Thread Yu Zhao
On Thu, Jan 30, 2025 at 3:01 AM Kirill A. Shutemov wrote: > > Do not lose the flag on page migration. > > Ideally, these folios should be freed instead of migration. But it > requires to find right spot do this and proper testing. > > Transfer the flag for now. > > Signed-off-by: Kirill A. Shutemo

Re: [PATCHv3 05/11] mm/truncate: Use folio_set_dropbehind() instead of deactivate_file_folio()

2025-01-30 Thread Yu Zhao
On Thu, Jan 30, 2025 at 3:01 AM Kirill A. Shutemov wrote: > > The recently introduced PG_dropbehind allows for freeing folios > immediately after writeback. Unlike PG_reclaim, it does not need vmscan > to be involved to get the folio freed. > > The new flag allows to replace whole deactivate_file_

Re: [PATCH v6 08/14] drm/rockchip: analogix_dp: Add support to get panel from the DP AUX bus

2025-01-30 Thread Heiko Stübner
Hi Damon, Am Donnerstag, 23. Januar 2025, 11:07:41 MEZ schrieb Damon Ding: > Move drm_of_find_panel_or_bridge() a little later and combine it with > component_add() into a new function rockchip_dp_link_panel(). The function > will serve as done_probing() callback of devm_of_dp_aux_populate_bus(),

RE: hyper_bf soft lockup on Azure Gen2 VM when taking kdump or executing kexec

2025-01-30 Thread Michael Kelley
From: Thomas Tai Sent: Thursday, January 30, 2025 10:50 AM > > Sorry for the typo in the subject title. It should have been 'hyperv_fb soft > lockup on > Azure Gen2 VM when taking kdump or executing kexec' > > Thomas > > > > > Hi Michael, > > > > We see an issue with the mainline kernel on th

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

2025-01-30 Thread Harry Wentland
On 2025-01-30 12:51, Nathan Chancellor wrote: > Hey Greg and Harry, > [snip] >> A more robust solution would be to do a greater-than check here >> (for all the cases) and only set -Wframe-larger-than if the value >> is greater than the one defined by CONFIG_FRAME_WARN. There are >> a few "-gt

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

2025-01-30 Thread Thomas Hellström
On Thu, 2025-01-30 at 09:31 -0800, Matthew Brost wrote: > On Thu, Jan 30, 2025 at 04:56:39PM +, Matthew Auld wrote: > > On 30/01/2025 16:32, Matthew Brost wrote: > > > On Thu, Jan 30, 2025 at 02:22:55PM +, Matthew Auld wrote: > > > > On 29/01/2025 19:52, Matthew Brost wrote: > > > > > Migra

RE: hyper_bf soft lockup on Azure Gen2 VM when taking kdump or executing kexec

2025-01-30 Thread Thomas Tai
> -Original Message- > From: Thomas Tai > Sent: Thursday, January 30, 2025 1:37 PM > To: mhkelle...@gmail.com; haiya...@microsoft.com; wei@kernel.org; > de...@microsoft.com; drawat.fl...@gmail.com; javi...@redhat.com; Helge > Deller ; dan...@ffwll.ch; airl...@gmail.com; > tzimmerm...@s

hyper_bf soft lockup on Azure Gen2 VM when taking kdump or executing kexec

2025-01-30 Thread Thomas Tai
Hi Michael, We see an issue with the mainline kernel on the Azure Gen 2 VM when trying to induce a kernel panic with sysrq commands. The VM would hang with soft lockup. A similar issue happens when executing kexec on the VM. This issue is seen only with Gen2 VMs(with UEFI boot). Gen1 VMs with b

Re: [PATCH v6 2/6] drm/xe/guc: Don't store capture nodes in xe_devcoredump_snapshot

2025-01-30 Thread Teres Alexis, Alan Previn
On Tue, 2025-01-28 at 10:36 -0800, Teres Alexis, Alan Previn wrote: > GuC-Err-Capture should not be storing register snapshot > nodes directly inside of the top level xe_devcoredump_snapshot > structure that it doesn't control. Furthermore, that is > is not right from a driver subsystem layering pe

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

2025-01-30 Thread Nathan Chancellor
Hey Greg and Harry, On Thu, Jan 30, 2025 at 11:02:37AM -0500, Harry Wentland wrote: > On 2025-01-30 02:04, Greg KH wrote: > > On Thu, Jan 30, 2025 at 07:47:59AM +0100, Greg KH wrote: > > > Thanks, but I am still getting this error on Linus's current tree right > > > now, with this commit applied:

Re: [RFC PATCH 0/5] drm/panthor: Protected mode support for Mali CSF GPUs

2025-01-30 Thread Nicolas Dufresne
Le jeudi 30 janvier 2025 à 17:38 +0100, Maxime Ripard a écrit : > Hi Nicolas, > > On Thu, Jan 30, 2025 at 10:59:56AM -0500, Nicolas Dufresne wrote: > > Le jeudi 30 janvier 2025 à 14:46 +0100, Maxime Ripard a écrit : > > > Hi, > > > > > > I started to review it, but it's probably best to discuss i

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

2025-01-30 Thread Jason Gunthorpe
On Thu, Jan 30, 2025 at 05:09:44PM +0100, Simona Vetter wrote: > > You could also use an integer instead of a pointer to indicate the > > cluster of interconnect, I think there are many options.. > > Hm yeah I guess an integer allocater of the atomic_inc kind plus "surely > 32bit is enough" could

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

2025-01-30 Thread Matthew Brost
On Thu, Jan 30, 2025 at 04:56:39PM +, Matthew Auld wrote: > On 30/01/2025 16:32, Matthew Brost wrote: > > On Thu, Jan 30, 2025 at 02:22:55PM +, Matthew Auld wrote: > > > On 29/01/2025 19:52, Matthew Brost wrote: > > > > Migration is implemented with range granularity, with VRAM backing bein

[PATCH v10 4/5] Documentation/gpu: Add fdinfo meanings of panthor-*-memory tags

2025-01-30 Thread Adrián Larumbe
A previous commit enabled display of driver-internal kernel BO sizes through the device file's fdinfo interface. Expand the description of the relevant driver-specific key:value pairs with the definitions of the new panthor-*-memory ones. Reviewed-by: Mihail Atanassov Reviewed-by: Liviu Dudau R

[PATCH v10 5/5] drm/panthor: Fix race condition when gathering fdinfo group samples

2025-01-30 Thread Adrián Larumbe
Commit e16635d88fa0 ("drm/panthor: add DRM fdinfo support") failed to protect access to groups with an xarray lock, which could lead to use-after-free errors. Fixes: e16635d88fa0 ("drm/panthor: add DRM fdinfo support") Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Signed-off-by: Adrián

[PATCH v10 3/5] drm/panthor: Expose size of driver internal BO's over fdinfo

2025-01-30 Thread Adrián Larumbe
This will display the sizes of kenrel BO's bound to an open file, which are otherwise not exposed to UM through a handle. The sizes recorded are as follows: - Per group: suspend buffer, protm-suspend buffer, syncobjcs - Per queue: ringbuffer, profiling slots, firmware interface - For all heaps

[PATCH v10 2/5] drm/file: Add fdinfo helper for printing regions with prefix

2025-01-30 Thread Adrián Larumbe
This is motivated by the desire of some drivers (eg. Panthor) to print the size of internal memory regions with a prefix that reflects the driver name, as suggested in the previous documentation commit. That means adding a new argument to print_size and making it available for DRM users. Cc: Tvrt

[PATCH v10 1/5] Documentation/gpu: Clarify format of driver-specific fidnfo keys

2025-01-30 Thread Adrián Larumbe
This change reflects de facto usage by amdgpu, as exemplified by commit d6530c33a978 ("drm/amdgpu: expose more memory stats in fdinfo"). Cc: Tvrtko Ursulin Acked-by: Tvrtko Ursulin Signed-off-by: Adrián Larumbe --- Documentation/gpu/drm-usage-stats.rst | 5 - 1 file changed, 4 insertions(+

[PATCH v10 0/5] drm/panthor: Display size of internal kernel BOs through fdinfo

2025-01-30 Thread Adrián Larumbe
This patch series enables display of the size of driver-owned shmem BO's that aren't exposed to userspace through a DRM handle. Also fixes a use-after-free bug in the existing fdinfo implementation for Panthor. Discussion of previous revision can be found here [1]. Changelog: v10: - Simplified

[Bug 211807] [drm:drm_dp_mst_dpcd_read] *ERROR* mstb 000000004e6288dd port 3: DPCD read on addr 0x60 for 1 bytes NAKed

2025-01-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=211807 Myasiantv (sidrabush...@gmail.com) changed: What|Removed |Added CC||sidrabush...@gmail.co

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

2025-01-30 Thread Matthew Auld
On 30/01/2025 16:32, Matthew Brost wrote: On Thu, Jan 30, 2025 at 02:22:55PM +, Matthew Auld wrote: On 29/01/2025 19:52, Matthew Brost wrote: 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

[PATCH v3 1/2] drm/bridge: synopsys: Add audio support for dw-hdmi-qp

2025-01-30 Thread Detlev Casanova
From: Sugar Zhang Register the dw-hdmi-qp bridge driver as an HDMI audio codec. The register values computation functions (for n) are based on the downstream driver, as well as the register writing functions. The driver uses the generic HDMI Codec framework in order to implement the HDMI audio

[PATCH v3 2/2] arm64: dts: rockchip: Add HDMI0 audio output on rock-5b

2025-01-30 Thread Detlev Casanova
Use the simple-audio-card driver with the hdmi0 QP node as CODEC and the i2s5 device as CPU. The simple-audio-card,mclk-fs value is set to 128 as it is done in the downstream driver. The #sound-dai-cells value is set to 0 in the hdmi0 node so that it can be used as an audio codec node. Signed-of

[PATCH v3 0/2] Add HDMI audio on the Radxa ROCK 5B

2025-01-30 Thread Detlev Casanova
To support HDMI audio on the rk3588 based devices, the generic HDMI Codec framework is used in the dw-hdmi-qp DRM bridge driver. The implementation is mainly based on the downstream driver, ported to the generic HDMI Codec framework [1] recently merged in the master branch. The parameters computat

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

2025-01-30 Thread Thomas Hellström
On Thu, 2025-01-30 at 08:32 -0800, Matthew Brost wrote: > On Thu, Jan 30, 2025 at 02:22:55PM +, Matthew Auld wrote: > > On 29/01/2025 19:52, Matthew Brost wrote: > > > Migration is implemented with range granularity, with VRAM > > > backing being > > > a VM private TTM BO (i.e., shares dma-resv

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

2025-01-30 Thread Matthew Brost
On Thu, Jan 30, 2025 at 03:13:22PM +0200, Gwan-gyeong Mun wrote: > > > On 1/30/25 1:17 PM, Matthew Auld wrote: > > On 29/01/2025 19:51, Matthew Brost wrote: > > > This patch introduces support for GPU Shared Virtual Memory (SVM) in the > > > Direct Rendering Manager (DRM) subsystem. SVM allows fo

Re: [RFC PATCH 0/5] drm/panthor: Protected mode support for Mali CSF GPUs

2025-01-30 Thread Maxime Ripard
Hi Nicolas, On Thu, Jan 30, 2025 at 10:59:56AM -0500, Nicolas Dufresne wrote: > Le jeudi 30 janvier 2025 à 14:46 +0100, Maxime Ripard a écrit : > > Hi, > > > > I started to review it, but it's probably best to discuss it here. > > > > On Thu, Jan 30, 2025 at 01:08:56PM +, Florent Tomasin wro

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

2025-01-30 Thread Matthew Brost
On Thu, Jan 30, 2025 at 02:22:55PM +, Matthew Auld wrote: > On 29/01/2025 19:52, Matthew Brost wrote: > > 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 r

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

2025-01-30 Thread Matthew Brost
On Thu, Jan 30, 2025 at 10:50:49AM +, Matthew Auld wrote: > On 29/01/2025 19:51, Matthew Brost wrote: > > 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/vm

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

2025-01-30 Thread Matthew Brost
On Thu, Jan 30, 2025 at 09:49:54AM +0100, Thomas Hellström wrote: > On Wed, 2025-01-29 at 11:51 -0800, Matthew Brost wrote: > > 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 > >

Re: [PATCH v2] drm/vkms: Add support for ABGR8888 pixel format

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 14:20, Paz Zcharya wrote: > From: Paz Zcharya > > Add support for pixel format ABGR, which is the default format > on Android devices. This will allow us to use VKMS as the default > display driver in Android Emulator (Cuttlefish) and increase VKMS > adoption. > > Signed-off-by

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

2025-01-30 Thread Matthew Brost
On Thu, Jan 30, 2025 at 03:24:13PM +0200, Gwan-gyeong Mun wrote: > > > On 1/30/25 12:54 PM, Matthew Auld wrote: > > On 29/01/2025 19:52, Matthew Brost wrote: > > > From: Thomas Hellström > > > > > > Add support for mapping device pages to Xe SVM by attaching drm_pagemap > > > to a memory region

Re: [PATCH v1 08/12] mm/rmap: handle device-exclusive entries correctly in try_to_unmap_one()

2025-01-30 Thread Simona Vetter
On Thu, Jan 30, 2025 at 10:08:32AM -0400, Jason Gunthorpe wrote: > On Thu, Jan 30, 2025 at 02:06:12PM +0100, Simona Vetter wrote: > > On Thu, Jan 30, 2025 at 12:08:42PM +0100, David Hildenbrand wrote: > > > On 30.01.25 11:10, Simona Vetter wrote: > > > > On Wed, Jan 29, 2025 at 12:54:06PM +0100, Da

Re: [RFC PATCH 0/5] drm/panthor: Protected mode support for Mali CSF GPUs

2025-01-30 Thread Simona Vetter
On Thu, Jan 30, 2025 at 01:08:56PM +, Florent Tomasin wrote: > Hi, > > This is a patch series covering the support for protected mode execution in > Mali Panthor CSF kernel driver. > > The Mali CSF GPUs come with the support for protected mode execution at the > HW level. This feature require

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

2025-01-30 Thread Simona Vetter
On Thu, Jan 30, 2025 at 09:23:17AM -0400, Jason Gunthorpe wrote: > On Thu, Jan 30, 2025 at 11:50:27AM +0100, Simona Vetter wrote: > > On Wed, Jan 29, 2025 at 09:47:57AM -0400, Jason Gunthorpe wrote: > > > On Wed, Jan 29, 2025 at 02:38:58PM +0100, Simona Vetter wrote: > > > > > > > > The pgmap->own

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

2025-01-30 Thread Harry Wentland
On 2025-01-30 02:04, Greg KH wrote: 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] drive

Re: [RFC PATCH 0/5] drm/panthor: Protected mode support for Mali CSF GPUs

2025-01-30 Thread Nicolas Dufresne
Le jeudi 30 janvier 2025 à 14:46 +0100, Maxime Ripard a écrit : > Hi, > > I started to review it, but it's probably best to discuss it here. > > On Thu, Jan 30, 2025 at 01:08:56PM +, Florent Tomasin wrote: > > Hi, > > > > This is a patch series covering the support for protected mode executi

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

2025-01-30 Thread David Hildenbrand
Note that the PTE is always writable, and we can always create a writable-device-exclusive entry. With this change, device-exclusive is fully compatible with THPs / large folios. We still require PMD-sized THPs to get PTE-mapped, and supporting PMD-mapped THP (without the PTE-remapping) is a diff

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

2025-01-30 Thread David Hildenbrand
On 30.01.25 14:46, Simona Vetter wrote: 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

Re: [PATCH v1 08/12] mm/rmap: handle device-exclusive entries correctly in try_to_unmap_one()

2025-01-30 Thread David Hildenbrand
On 30.01.25 14:06, Simona Vetter wrote: On Thu, Jan 30, 2025 at 12:08:42PM +0100, David Hildenbrand wrote: On 30.01.25 11:10, Simona Vetter wrote: On Wed, Jan 29, 2025 at 12:54:06PM +0100, David Hildenbrand wrote: Ever since commit b756a3b5e7ea ("mm: device exclusive memory access") we can ret

Re: [PATCH v1 12/12] mm/rmap: keep mapcount untouched for device-exclusive entries

2025-01-30 Thread David Hildenbrand
Assume you have a THP (or any mTHP today). You can easily trigger the scenario that folio_mapcount() != 0 with active device-exclusive entries, and you start doing rmap walks and stumble over these device-exclusive entries and *not* handle them properly. Note that more and more systems are configu

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

2025-01-30 Thread David Hildenbrand
On 30.01.25 14:31, Simona Vetter wrote: On Thu, Jan 30, 2025 at 10:37:06AM +0100, David Hildenbrand wrote: On 30.01.25 01:27, Alistair Popple wrote: 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 th

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

2025-01-30 Thread David Hildenbrand
On 30.01.25 14:29, Simona Vetter wrote: On Thu, Jan 30, 2025 at 10:28:00AM +0100, David Hildenbrand wrote: On 30.01.25 06:34, Alistair Popple wrote: Looking at hmm_test I see that doesn't use the sequence counter to ensure the PTE remains valid whilst it is mapped. I think that is probably wron

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

2025-01-30 Thread Matthew Auld
On 29/01/2025 19:52, Matthew Brost wrote: 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

Re: [PATCH v1 08/12] mm/rmap: handle device-exclusive entries correctly in try_to_unmap_one()

2025-01-30 Thread Jason Gunthorpe
On Thu, Jan 30, 2025 at 02:06:12PM +0100, Simona Vetter wrote: > On Thu, Jan 30, 2025 at 12:08:42PM +0100, David Hildenbrand wrote: > > On 30.01.25 11:10, Simona Vetter wrote: > > > On Wed, Jan 29, 2025 at 12:54:06PM +0100, David Hildenbrand wrote: > > > > Ever since commit b756a3b5e7ea ("mm: devic

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

2025-01-30 Thread Gwan-gyeong Mun
Hi Matt, I report this VM_WARN_ON_ONCE_FOLIO(), which also occurred when testing with v3, but also occurs in the same callstack when testing with this version. G.G. [ 249.486325] [IGT] xe_exec_system_allocator: executing [ 249.530682] [IGT] xe_exec_system_allocator: starting subtest once-

Re: [PATCH 09/13] drm/vkms: Allow to attach planes and CRTCs

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add a list of possible CRTCs to the plane configuration and helpers to > attach, detach and get the primary and cursor planes attached to a CRTC. > > Now that the default configuration has its planes and CRTC correctly > attached, configure the output fo

Re: [PATCH 08/13] drm/vkms: Allow to configure multiple CRTCs

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add a list of CRTCs to vkms_config and helper functions to add and > remove as many CRTCs as wanted. > > For backwards compatibility, add one CRTC to the default configuration. > > A future patch will allow to attach planes and CRTCs, but for the > mome

Re: [PATCH 13/13] drm/vkms: Allow to attach connectors and encoders

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add a list of possible encoders to the connector configuration and > helpers to attach and detach them. > > Now that the default configuration has its connector and encoder > correctly, configure the output following the configuration. > > Signed-off-by

Re: [PATCH 06/13] drm/vkms: Add a validation function for VKMS configuration

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > From: Louis Chauvet > > As the configuration will be used by userspace, add a validator to avoid > creating a broken DRM device. > > For the moment, the function always returns true, but rules will be > added in future patches. > > Signed-off-by: José

Re: [PATCH 02/13] drm/vkms: Add KUnit test scaffolding

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add the required boilerplate to start creating KUnit test. > > To run the tests: > > $ ./tools/testing/kunit/kunit.py run \ > --kunitconfig=drivers/gpu/drm/vkms/tests > > Signed-off-by: Arthur Grillo > Signed-off-by: Louis Chauvet > Signed-

Re: [PATCH 07/13] drm/vkms: Allow to configure multiple planes

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add a list of planes to vkms_config and create as many planes as > configured during output initialization. > > For backwards compatibility, add one primary plane and, if configured, > one cursor plane and NUM_OVERLAY_PLANES planes to the default > confi

Re: [PATCH 10/13] drm/vkms: Allow to configure multiple encoders

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add a list of encoders to vkms_config and helper functions to add and > remove as many encoders as wanted. > > For backwards compatibility, add one encoder to the default > configuration. > > A future patch will allow to attach encoders and CRTCs, but f

Re: [PATCH 12/13] drm/vkms: Allow to configure multiple connectors

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add a list of connectors to vkms_config and helper functions to add and > remove as many connectors as wanted. > > Unlike planes, CRTCs and encoders, connectors can be added and removed > once the device is created. To reflect it, add an "enabled" flag i

Re: [PATCH 11/13] drm/vkms: Allow to attach encoders and CRTCs

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Add a list of possible CRTCs to the encoder configuration and helpers to > attach and detach them. > > Now that the default configuration has its encoder and CRTC correctly > attached, configure the output following the configuration. > > Signed-off-by:

Re: [PATCH 04/13] drm/vkms: Move default_config creation to its own function

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Extract the initialization of the default configuration to a function. > Refactor, no functional changes. > > Signed-off-by: Louis Chauvet > Signed-off-by: José Expósito Co-developped-by: Louis Chauvet Signed-off-by: Louis Chauvet Signed-off-by: Jos

Re: [PATCH 05/13] drm/vkms: Set device name from vkms_config

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > In order to be able to create multiple devices, the device name needs to > be unique. > > Allow to set it in the VKMS configuration. > > Signed-off-by: José Expósito [...] > diff --git a/drivers/gpu/drm/vkms/tests/vkms_config_test.c > b/drivers/gpu/

Re: [PATCH 03/13] drm/vkms: Extract vkms_config header

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Creating a new vkms_config structure will be more complex once we > start adding more options. > > Extract the vkms_config structure to its own header and source files > and add functions to create and delete a vkms_config and to initialize > debugfs. >

Re: [PATCH 00/13] drm/vkms: Allow to configure device

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Hi everyone, > > In preparation for ConfigFS support, a flexible way to configure VKMS > device(s) > is required. > This series adds the required APIs to create a configuration, the code changes > required to apply it and KUnit test validating the chang

Re: [PATCH 01/13] drm/vkms: Extract vkms_connector header

2025-01-30 Thread Louis Chauvet
On 29/01/25 - 12:00, José Expósito wrote: > Up until now, the logic to manage connectors was in vkms_output.c. > > Since more options will be added to connectors in the future, extract > the code to its own file. > > Refactor, no functional changes. > > Signed-off-by: José Expósito Non blockin

Re: [RFC PATCH 0/5] drm/panthor: Protected mode support for Mali CSF GPUs

2025-01-30 Thread Maxime Ripard
Hi, I started to review it, but it's probably best to discuss it here. On Thu, Jan 30, 2025 at 01:08:56PM +, Florent Tomasin wrote: > Hi, > > This is a patch series covering the support for protected mode execution in > Mali Panthor CSF kernel driver. > > The Mali CSF GPUs come with the sup

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

2025-01-30 Thread Simona Vetter
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 06/12] mm: use single SWP_DEVICE_EXCLUSIVE entry type

2025-01-30 Thread Simona Vetter
On Wed, Jan 29, 2025 at 12:54:04PM +0100, David Hildenbrand wrote: > There is no need for the distinction anymore; let's merge the readable > and writable device-exclusive entries into a single device-exclusive > entry type. > > Signed-off-by: David Hildenbrand Yeah I really don't think there's

Re: [RFC PATCH 2/5] cma-heap: Allow registration of custom cma heaps

2025-01-30 Thread Maxime Ripard
Hi, On Thu, Jan 30, 2025 at 01:08:58PM +, Florent Tomasin wrote: > This patch introduces a cma-heap probe function, allowing > users to register custom cma heaps in the device tree. > > A "memory-region" is bound to the cma heap at probe time > allowing allocation of DMA buffers from that hea

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

2025-01-30 Thread Simona Vetter
On Thu, Jan 30, 2025 at 10:37:06AM +0100, David Hildenbrand wrote: > On 30.01.25 01:27, Alistair Popple wrote: > > 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

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

2025-01-30 Thread Simona Vetter
On Thu, Jan 30, 2025 at 10:28:00AM +0100, David Hildenbrand wrote: > On 30.01.25 06:34, Alistair Popple wrote: > > Looking at hmm_test I see that doesn't use the sequence counter to ensure > > the PTE remains valid whilst it is mapped. I think that is probably wrong, > > so > > apologies if that l

Re: [RFC PATCH 1/5] dt-bindings: dma: Add CMA Heap bindings

2025-01-30 Thread Maxime Ripard
Hi, On Thu, Jan 30, 2025 at 01:08:57PM +, Florent Tomasin wrote: > Introduce a CMA Heap dt-binding allowing custom > CMA heap registrations. > > * Note to the reviewers: > The patch was used for the development of the protected mode > feature in Panthor CSF kernel driver and is not initially

Re: [RFC PATCH 3/5] dt-bindings: gpu: Add protected heap name to Mali Valhall CSF binding

2025-01-30 Thread Krzysztof Kozlowski
On 30/01/2025 14:08, Florent Tomasin wrote: > Allow mali-valhall-csf driver to retrieve a protected > heap at probe time by passing the name of the heap > as attribute to the device tree GPU node. Please wrap commit message according to Linux coding style / submission process (neither too early no

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

2025-01-30 Thread Gwan-gyeong Mun
On 1/30/25 12:54 PM, Matthew Auld wrote: On 29/01/2025 19:52, Matthew Brost wrote: 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 devic

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

2025-01-30 Thread Jason Gunthorpe
On Thu, Jan 30, 2025 at 11:50:27AM +0100, Simona Vetter wrote: > On Wed, Jan 29, 2025 at 09:47:57AM -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 > >

Re: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC

2025-01-30 Thread Krzysztof Kozlowski
On 30/01/2025 13:15, Louis-Alexis Eyraud wrote: > Hello, > > sorry for the delay, You gave yourself 12 days to respond, which is fine. But to me, you gave 15 minutes and immediately sent v2. So now your v2 will be still rejected. Best regards, Krzysztof

Re: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC

2025-01-30 Thread Krzysztof Kozlowski
On 30/01/2025 13:15, Louis-Alexis Eyraud wrote: > Hello, > > sorry for the delay, > > On Sat, 18 Jan 2025 17:08:10 +0100 Krzysztof Kozlowski wrote --- > > On Thu, Jan 16, 2025 at 03:25:58PM +0100, Louis-Alexis Eyraud wrote: > > > This commit adds a compatible for the MediaTek MT8370 So

Re: [PATCH v1 12/12] mm/rmap: keep mapcount untouched for device-exclusive entries

2025-01-30 Thread Simona Vetter
On Thu, Jan 30, 2025 at 12:42:26PM +0100, David Hildenbrand wrote: > On 30.01.25 11:37, Simona Vetter wrote: > > On Wed, Jan 29, 2025 at 12:54:10PM +0100, David Hildenbrand wrote: > > > Now that conversion to device-exclusive does no longer perform an > > > rmap walk and the main page_vma_mapped_wa

  1   2   >