Re: [PATCH 3/5] dt-bindings: display: simple-bridge: Document DPI color encoder

2025-03-05 Thread Liu Ying
On 03/04/2025, Maxime Ripard wrote: > On Tue, Mar 04, 2025 at 06:15:28PM +0800, Liu Ying wrote: >> A DPI color encoder, as a simple display bridge, converts input DPI color >> coding to output DPI color coding, like Adafruit Kippah DPI hat[1] which >> converts input 18-bit pixel data to 24-bit pixe

Re: [PATCH 1/5] dt-bindings: display: Document DPI color codings

2025-03-05 Thread Liu Ying
On 03/05/2025, Krzysztof Kozlowski wrote: > On 05/03/2025 09:26, Maxime Ripard wrote: >> On Wed, Mar 05, 2025 at 08:51:35AM +0100, Krzysztof Kozlowski wrote: >>> On Tue, Mar 04, 2025 at 11:33:44AM +0100, Maxime Ripard wrote: > +properties: > + dpi-color-coding: > +enum: > +

Re: [PATCH v5 04/16] drm/atomic: Introduce helper to lookup connector by encoder

2025-03-05 Thread Maxime Ripard
On Thu, Mar 06, 2025 at 09:16:24AM +0800, Andy Yan wrote: > > Hi Maxime and Dmitry: > > At 2025-03-06 04:13:53, "Dmitry Baryshkov" > wrote: > >On Wed, Mar 05, 2025 at 02:19:36PM +0100, Maxime Ripard wrote: > >> Hi Andy, > >> > >> On Wed, Mar 05, 2025 at 07:55:19PM +0800, Andy Yan wrote: > >> >

Re: [PATCH] drm/msm/dpu: Adjust CDM_MUX to support CWB PINGPONG

2025-03-05 Thread Dmitry Baryshkov
t > > dpu_hw_cdm *ctx, const enum dpu_ > > mux_cfg = DPU_REG_READ(c, CDM_MUX); > > mux_cfg &= ~0xf; > > - if (pp) > > + if (pp >= PINGPONG_CWB_0) > > + mux_cfg |= 0xd; > > + else if (pp) > > mux_cfg |= (pp

Re: [PATCH] drm/msm/dpu: Support YUV formats on writeback for DPU 5.x+

2025-03-05 Thread Dmitry Baryshkov
On Wed, Mar 05, 2025 at 09:06:08PM -0800, Abhinav Kumar wrote: > > > On 3/5/2025 7:15 PM, Jessica Zhang wrote: > > Now that CDM_0 has been enabled for DPU 5.x+, add support for YUV formats > > on writeback > > > > Signed-off-by: Jessica Zhang > > --- > > drivers/gpu/drm/msm/disp/dpu1/catalog/

Re: [PATCH] drm/msm/dpu: Clear perf params before calculating bw

2025-03-05 Thread Dmitry Baryshkov
On Wed, Mar 05, 2025 at 07:46:44PM -0800, Jessica Zhang wrote: > To prevent incorrect BW calculation, zero out dpu_core_perf_params > before it is passed into dpu_core_perf_aggregate(). > > Signed-off-by: Jessica Zhang > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 2 +- > 1 file change

Re: [PATCH] drm/msm/dpu: Adjust CDM_MUX to support CWB PINGPONG

2025-03-05 Thread Dmitry Baryshkov
d; Shouldn't it be 0xb for PINGPONG_CWB_2 and 3? > + else if (pp) > mux_cfg |= (pp - PINGPONG_0) & 0x7; > else > mux_cfg |= 0xf; > > --- > base-commit: 6d3175a72cc07e90f81fb35841048a8a9b5134cb > change-id: 20250305-cdm-cwb-mux-fix-69ed5297d4f7 > > Best regards, > -- > Jessica Zhang > -- With best wishes Dmitry

Re: [PATCH v5 0/5] Initial Nova Core series

2025-03-05 Thread Greg KH
On Wed, Mar 05, 2025 at 08:56:42PM +0100, Danilo Krummrich wrote: > On Tue, Mar 04, 2025 at 06:34:47PM +0100, Danilo Krummrich wrote: > > Danilo Krummrich (5): > > rust: module: add type `LocalModule` > > rust: firmware: introduce `firmware::ModInfoBuilder` > > rust: firmware: add `module_fir

Re: [PATCH 5/5] drm/bridge: simple-bridge: Add next panel support

2025-03-05 Thread Liu Ying
On 03/04/2025, Maxime Ripard wrote: > On Tue, Mar 04, 2025 at 06:15:30PM +0800, Liu Ying wrote: >> The next bridge connected to a simple bridge could be a panel, e.g., >> a DPI panel connected to a DPI color encoder. Add the next panel support, >> instead of supporting non-panel next bridge only. >

Re: [PATCH 4/5] drm/bridge: simple-bridge: Add DPI color encoder support

2025-03-05 Thread Liu Ying
On 03/04/2025, Maxime Ripard wrote: > On Tue, Mar 04, 2025 at 06:15:29PM +0800, Liu Ying wrote: >> A DPI color encoder, as a simple display bridge, converts input DPI color >> coding to output DPI color coding, like Adafruit Kippah DPI hat[1] which >> converts input 18-bit pixel data to 24-bit pixe

Re: [PATCH v7 32/32] drm/doc: gpusvm: Add GPU SVM documentation

2025-03-05 Thread Alistair Popple
On Wed, Mar 05, 2025 at 05:26:57PM -0800, Matthew Brost wrote: > Add documentation for agree upon GPU SVM design principles, current > status, and future plans. One minor nit and a comment below, but feel free to add: Acked-by: Alistair Popple > v4: > - Address Thomas's feedback > v5: > - s/C

Re: [PATCH] drm/msm/dpu: Adjust CDM_MUX to support CWB PINGPONG

2025-03-05 Thread Abhinav Kumar
0xf; --- base-commit: 6d3175a72cc07e90f81fb35841048a8a9b5134cb change-id: 20250305-cdm-cwb-mux-fix-69ed5297d4f7 Best regards,

Re: [PATCH] drm/msm/dpu: Support YUV formats on writeback for DPU 5.x+

2025-03-05 Thread Abhinav Kumar
On 3/5/2025 7:15 PM, Jessica Zhang wrote: Now that CDM_0 has been enabled for DPU 5.x+, add support for YUV formats on writeback Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 4

[RFC 08/11] mm/thp: add split during migration support

2025-03-05 Thread Balbir Singh
Support splitting pages during THP zone device migration as needed. The common case that arises is that after setup, during migrate the destination might not be able to allocate MIGRATE_PFN_COMPOUND pages. Add a new routine migrate_vma_split_pages() to support the splitting of already isolated pag

[RFC 02/11] mm/migrate_device: flags for selecting device private THP pages

2025-03-05 Thread Balbir Singh
Add flags to mark zone device migration pages. MIGRATE_VMA_SELECT_COMPOUND will be used to select THP pages during migrate_vma_setup() and MIGRATE_PFN_COMPOUND will make migrating device pages as compound pages during device pfn migration. Signed-off-by: Balbir Singh --- include/linux/migrate.h

Re: [PATCH drm-next 1/2] vmalloc: Add atomic_vmap

2025-03-05 Thread Matthew Wilcox
On Thu, Mar 06, 2025 at 12:25:53AM +0900, Ryosuke Yasuoka wrote: > Some drivers can use vmap in drm_panic, however, vmap is sleepable and > takes locks. Since drm_panic will vmap in panic handler, atomic_vmap > requests pages with GFP_ATOMIC and maps KVA without locks and sleep. In addition to the

[RFC 07/11] mm/memremap: Add folio_split support

2025-03-05 Thread Balbir Singh
When a zone device page is split (via huge pmd folio split). The driver callback for folio_split is invoked to let the device driver know that the folio size has been split into a smaller order. The HMM test driver has been updated to handle the split, since the test driver uses backing pages, it

[RFC 11/11] gpu/drm/nouveau: Add THP migration support

2025-03-05 Thread Balbir Singh
Change the code to add support for MIGRATE_VMA_SELECT_COMPOUND and appropriately handling page sizes in the migrate/evict code paths. Signed-off-by: Balbir Singh --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 244 + drivers/gpu/drm/nouveau/nouveau_svm.c | 6 +- drivers/g

[RFC 10/11] selftests/mm/hmm-tests: new tests for zone device THP migration

2025-03-05 Thread Balbir Singh
Add new tests for migrating anon THP pages, including anon_huge, anon_huge_zero and error cases involving forced splitting of pages during migration. Signed-off-by: Balbir Singh --- tools/testing/selftests/mm/hmm-tests.c | 407 + 1 file changed, 407 insertions(+) diff --

[RFC 06/11] lib/test_hmm: test cases and support for zone device private THP

2025-03-05 Thread Balbir Singh
Enhance the hmm test driver (lib/test_hmm) with support for THP pages. A new pool of free_folios() has now been added to the dmirror device, which can be allocated when a request for a THP zone device private page is made. Add compound page awareness to the allocation function during normal migra

[RFC 04/11] mm/migrate_device: THP migration of zone device pages

2025-03-05 Thread Balbir Singh
migrate_device code paths go through the collect, setup and finalize phases of migration. Support for MIGRATE_PFN_COMPOUND was added earlier in the series to mark THP pages as MIGRATE_PFN_COMPOUND. The entries in src and dst arrays passed to these functions still remain at a PAGE_SIZE granularity.

[RFC 05/11] mm/memory/fault: Add support for zone device THP fault handling

2025-03-05 Thread Balbir Singh
When the CPU touches a zone device THP entry, the data needs to be migrated back to the CPU, call migrate_to_ram() on these pages via do_huge_pmd_device_private() fault handling helper. Signed-off-by: Balbir Singh --- include/linux/huge_mm.h | 7 +++ mm/huge_memory.c| 35 +++

[RFC 03/11] mm/thp: zone_device awareness in THP handling code

2025-03-05 Thread Balbir Singh
Make THP handling code in the mm subsystem for THP pages aware of zone device pages. Although the code is designed to be generic when it comes to handling splitting of pages, the code is designed to work for THP page sizes corresponding to HPAGE_PMD_NR. Modify page_vma_mapped_walk() to return true

[RFC 00/11] THP support for zone device pages

2025-03-05 Thread Balbir Singh
This patch series adds support for THP migration of zone device pages. To do so, the patches implement support for folio zone device pages by adding support for setting up larger order pages. These patches build on the earlier posts by Ralph Campbell [1] Two new flags are added in vma_migration t

[RFC 01/11] mm/zone_device: support large zone device private folios

2025-03-05 Thread Balbir Singh
Add routines to support allocation of large order zone device folios and helper functions for zone device folios, to check if a folio is device private and helpers for setting zone device data. When large folios are used, the existing page_free() callback in pgmap is called when the folio is freed

[PATCH] drm/exynos/vidi: Remove redundant error handling in vidi_get_modes()

2025-03-05 Thread Wentao Liang
In the vidi_get_modes() function, if either drm_edid_dup() or  drm_edid_alloc() fails, the function will immediately return 0, indicating that no display modes can be retrieved. However, in the event of failure in these two functions, it is still necessary to call the subsequent drm_edid_connector_

[PATCH v2 0/2] Fix native cursors with vmwgfx

2025-03-05 Thread Zack Rusin
vmwgfx had a number of cursor issues that related both to our handling of dumb buffers and general detection when a cursor has actually changed. Fix those issues and bump the kernel module version to allow userspace to recognize fixed versions of the driver. v2: Include the fix for leaked dirty tr

[PATCH v2 2/2] drm/vmwgfx: Bump the minor version

2025-03-05 Thread Zack Rusin
Bump the minor version of vmwgfx in order to detect releases where the cursor issues have been fixed. Cursors created with dumb buffer were broken on vmwgfx. Userspace (e.g. kwin) has workarounds for those issues and often disables hardware cursors on vmwgfx. This allows enabling hardware cursors

[PATCH v2 1/2] drm/vmwgfx: Refactor cursor handling

2025-03-05 Thread Zack Rusin
Refactor cursor handling to make the code maintainable again. Over the last 12 years the svga device improved support for virtualized cursors and at the same time the drm interfaces evolved quite a bit from pre-atomic to current atomic ones. vmwgfx only added new code over the years, instead of adj

Re: [PATCH] drm/vmwgfx: Make sure the dirty tracker is released on surfaces

2025-03-05 Thread Zack Rusin
On Wed, Mar 5, 2025 at 2:10 PM kernel test robot wrote: > > Hi Zack, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on drm-exynos/exynos-drm-next] > [also build test ERROR on linus/master v6.14-rc5 next-20250305] > [If your patch is

[PATCH] drm/msm/dpu: Clear perf params before calculating bw

2025-03-05 Thread Jessica Zhang
ase-commit: 6d3175a72cc07e90f81fb35841048a8a9b5134cb change-id: 20250305-perf-calc-fix-07147a3ff410 Best regards, -- Jessica Zhang

[PATCH] drm/msm/dpu: Adjust CDM_MUX to support CWB PINGPONG

2025-03-05 Thread Jessica Zhang
a8a9b5134cb change-id: 20250305-cdm-cwb-mux-fix-69ed5297d4f7 Best regards, -- Jessica Zhang

[PATCH] drm/msm/dpu: Support YUV formats on writeback for DPU 5.x+

2025-03-05 Thread Jessica Zhang
_rgb), + .format_list = wb2_formats_rgb_yuv, + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .xin_id = 6, .vbif_idx = VBIF_RT, .maxlinewidth = 4096, --- base-commit: 6d3175a72cc07e90f81fb35841048a8a9b5134cb change-id: 20250305-cdm-yuv-fix-ef1cb4ff5c0a Best regards, -- Jessica Zhang

RE: [PATCH v3 2/2] fbdev: hyperv_fb: Allow graceful removal of framebuffer

2025-03-05 Thread Michael Kelley
From: Saurabh Sengar Sent: Saturday, March 1, 2025 8:17 AM > > When a Hyper-V framebuffer device is unbind, hyperv_fb driver tries to > release the framebuffer forcefully. If this framebuffer is in use it > produce the following WARN and hence this framebuffer is never released. > > [ 44.1112

RE: [PATCH v3 1/2] fbdev: hyperv_fb: Simplify hvfb_putmem

2025-03-05 Thread Michael Kelley
From: Saurabh Sengar Sent: Saturday, March 1, 2025 8:17 AM > > The device object required in 'hvfb_release_phymem' function > for 'dma_free_coherent' can also be obtained from the 'info' > pointer, making 'hdev' parameter in 'hvfb_putmem' redundant. > Remove the unnecessary 'hdev' argument from

Re: [PATCH] drm/imx: legacy-bridge: fix inconsistent indenting warning

2025-03-05 Thread Liu Ying
On 03/05/2025, Charles Han wrote: > Fix below inconsistent indenting smatch warning. > smatch warnings: > drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c:79 > devm_imx_drm_legacy_bridge() warn: inconsistent indenting > > Signed-off-by: Charles Han > --- > drivers/gpu/drm/bridge/imx/imx-legacy-br

Re: [PATCH] drm/panel/synaptics-r63353: Use _multi variants

2025-03-05 Thread Dmitry Baryshkov
On Wed, Mar 05, 2025 at 07:01:41PM -0500, Anusha Srivatsa wrote: > Move away from using deprecated API and use _multi > variants if available. Use mipi_dsi_msleep() > and mipi_dsi_usleep_range() instead of msleep() > and usleep_range() respectively. > > Used Coccinelle to find the multiple occuren

Re: [PATCH] drm/xe: Select INTEL_VSEC to fix build dependency

2025-03-05 Thread Su Hui
esktop.org/drm/xe/kernel.git drm-xe-next patch link: https://lore.kernel.org/r/20250227073205.1248282-1-suhui%40nfschina.com patch subject: [PATCH] drm/xe: Select INTEL_VSEC to fix build dependency config: loongarch-randconfig-001-20250304 (https://download.01.org/0day-ci/archive/20250305/20

Re: [PATCH v5 2/5] rust: firmware: introduce `firmware::ModInfoBuilder`

2025-03-05 Thread Danilo Krummrich
On Thu, Mar 06, 2025 at 01:35:52AM +, Benno Lossin wrote: > On Thu Mar 6, 2025 at 2:29 AM CET, Danilo Krummrich wrote: > > On Thu, Mar 06, 2025 at 12:24:21AM +, Benno Lossin wrote: > >> On Thu Mar 6, 2025 at 12:57 AM CET, Danilo Krummrich wrote: > >> > On Wed, Mar 05, 2025 at 11:36:54PM +00

Re: [PATCH v5 3/5] rust: firmware: add `module_firmware!` macro

2025-03-05 Thread Benno Lossin
On Thu Mar 6, 2025 at 2:38 AM CET, Danilo Krummrich wrote: > On Thu, Mar 06, 2025 at 01:27:19AM +, Benno Lossin wrote: >> On Thu Mar 6, 2025 at 2:04 AM CET, Danilo Krummrich wrote: >> > On Thu, Mar 06, 2025 at 12:31:14AM +, Benno Lossin wrote: >> >> On Tue Mar 4, 2025 at 6:34 PM CET, Danilo

Re: [PATCH v5 3/5] rust: firmware: add `module_firmware!` macro

2025-03-05 Thread Danilo Krummrich
On Thu, Mar 06, 2025 at 01:27:19AM +, Benno Lossin wrote: > On Thu Mar 6, 2025 at 2:04 AM CET, Danilo Krummrich wrote: > > On Thu, Mar 06, 2025 at 12:31:14AM +, Benno Lossin wrote: > >> On Tue Mar 4, 2025 at 6:34 PM CET, Danilo Krummrich wrote: > >> > >> > +#[macro_export] > >> > +macro_rul

[PATCH v7 07/32] drm/xe: Select DRM_GPUSVM Kconfig

2025-03-05 Thread Matthew Brost
Xe depends on DRM_GPUSVM for SVM implementation, select it in Kconfig. v6: - Don't select DRM_GPUSVM if UML (CI) v7: - Only select DRM_GPUSVM if DEVICE_PRIVATE (CI) Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström --- drivers/gpu/drm/xe/Kconfig |

[PATCH v7 16/32] drm/xe: Add unbind to SVM garbage collector

2025-03-05 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 PT 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_

Re: [PATCH v5 2/5] rust: firmware: introduce `firmware::ModInfoBuilder`

2025-03-05 Thread Benno Lossin
On Thu Mar 6, 2025 at 2:29 AM CET, Danilo Krummrich wrote: > On Thu, Mar 06, 2025 at 12:24:21AM +, Benno Lossin wrote: >> On Thu Mar 6, 2025 at 12:57 AM CET, Danilo Krummrich wrote: >> > On Wed, Mar 05, 2025 at 11:36:54PM +, Benno Lossin wrote: >> >> On Wed Mar 5, 2025 at 11:38 PM CET, Dani

Re: [PATCH v5 2/5] rust: firmware: introduce `firmware::ModInfoBuilder`

2025-03-05 Thread Danilo Krummrich
On Thu, Mar 06, 2025 at 12:24:21AM +, Benno Lossin wrote: > On Thu Mar 6, 2025 at 12:57 AM CET, Danilo Krummrich wrote: > > On Wed, Mar 05, 2025 at 11:36:54PM +, Benno Lossin wrote: > >> On Wed Mar 5, 2025 at 11:38 PM CET, Danilo Krummrich wrote: > >> > On Wed, Mar 05, 2025 at 10:30:31PM +0

Re: [PATCH v5 3/5] rust: firmware: add `module_firmware!` macro

2025-03-05 Thread Benno Lossin
On Thu Mar 6, 2025 at 2:04 AM CET, Danilo Krummrich wrote: > On Thu, Mar 06, 2025 at 12:31:14AM +, Benno Lossin wrote: >> On Tue Mar 4, 2025 at 6:34 PM CET, Danilo Krummrich wrote: >> >> > +#[macro_export] >> > +macro_rules! module_firmware { >> > +($($builder:tt)*) => { >> >> This should p

[PATCH v7 22/32] drm/xe: Add drm_gpusvm_devmem to xe_bo

2025-03-05 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 Reviewed-by: Himal Prasad Ghimiray --- 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/drive

[PATCH v7 19/32] drm/xe/uapi: Add DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR

2025-03-05 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 v7 23/32] drm/xe: Add drm_pagemap ops to SVM

2025-03-05 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 v5:

[PATCH v7 30/32] drm/xe: Add modparam for SVM notifier size

2025-03-05 Thread Matthew Brost
Useful to experiment with notifier size and how it affects performance. v3: - Pull missing changes including in following patch (Thomas) v5: - Spell out power of 2 (Thomas) Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Reviewed-by: Himal Prasad Ghimiray --- drivers/gpu/drm/xe/x

[PATCH v7 24/32] drm/xe: Add GPUSVM device memory copy vfunc functions

2025-03-05 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 v7 31/32] drm/xe: Add always_migrate_to_vram modparam

2025-03-05 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) - Better commit message (Thomas) Signed-off-by: Matthew Brost Reviewed-b

[PATCH v7 08/32] drm/xe/uapi: Add DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR

2025-03-05 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 v7 05/32] drm/xe/bo: Introduce xe_bo_put_async

2025-03-05 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. v5: - Kerenl doc for xe_bo_put_async (Thomas) v7: - Fix kernel

[PATCH v7 20/32] drm/xe: Add migrate layer functions for SVM support

2025-03-05 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 v7 29/32] drm/xe: Add SVM debug

2025-03-05 Thread Matthew Brost
Add some useful SVM debug logging fro SVM range which prints the range's state. v2: - Update 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 v7 28/32] drm/xe: Basic SVM BO eviction

2025-03-05 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 v5: - Add XE_BO_FLAG_CPU_ADDR_MIRROR flag in this patch (Thomas) - Add message on eviction failure v6: - Only compile if C

[PATCH v7 21/32] drm/xe: Add SVM device memory mirroring

2025-03-05 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 v7 18/32] drm/xe: Enable CPU address mirror uAPI

2025-03-05 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) v7: - Only enable uAPI if selected by GPU SVM (CI) Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström --- drivers/gpu/drm/xe/xe_vm.c | 9 ++-

[PATCH v7 17/32] drm/xe: Do not allow CPU address mirror VMA unbind if

2025-03-05 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 v7 32/32] drm/doc: gpusvm: Add GPU SVM documentation

2025-03-05 Thread Matthew Brost
Add documentation for agree upon GPU SVM design principles, current status, and future plans. v4: - Address Thomas's feedback v5: - s/Current/Basline (Thomas) v7: - Add license (CI) - Add examples for design guideline reasoning (Alistair) - Add snippet about possible livelock with concurrent

[PATCH v7 10/32] drm/xe: Add dma_addr res cursor

2025-03-05 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 v7: - Fix kernel doc (CI) Signed-off-by: Matthew Brost Signed-off-by: Thomas H

[PATCH v7 15/32] drm/xe: Add SVM garbage collector

2025-03-05 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

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

2025-03-05 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 v7 11/32] drm/xe: Nuke VM's mapping upon close

2025-03-05 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 v7 25/32] drm/xe: Add Xe SVM populate_devmem_pfn GPU SVM vfunc

2025-03-05 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) v5: - s/xe_mem_region/xe_vram_region (Rebase) Signed-off-by: Niranjana Vishwanatha

[PATCH v7 04/32] drm/pagemap: Add DRM pagemap

2025-03-05 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 v7 27/32] drm/xe: Add SVM VRAM migration

2025-03-05 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 v7 01/32] drm/xe: Retry BO allocation

2025-03-05 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 v7 26/32] drm/xe: Add Xe SVM devmem_release GPU SVM vfunc

2025-03-05 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 Reviewed-by: Himal Prasad Ghimiray --- drivers/gpu/drm/xe/

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

2025-03-05 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 v7 06/32] drm/gpusvm: Add support for GPU Shared Virtual Memory

2025-03-05 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 v7 12/32] drm/xe: Add SVM range invalidation and page fault

2025-03-05 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 v7 03/32] mm/migrate: Trylock device page in do_swap_page

2025-03-05 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 v7 00/32] Introduce GPU SVM and Xe SVM implementation

2025-03-05 Thread Matthew Brost
Version 7 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 v7 13/32] drm/gpuvm: Add DRM_GPUVA_OP_DRIVER

2025-03-05 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 v7 02/32] mm/migrate: Add migrate_device_pfns

2025-03-05 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:Re: [PATCH v5 04/16] drm/atomic: Introduce helper to lookup connector by encoder

2025-03-05 Thread Andy Yan
Hi Maxime and Dmitry: At 2025-03-06 04:13:53, "Dmitry Baryshkov" wrote: >On Wed, Mar 05, 2025 at 02:19:36PM +0100, Maxime Ripard wrote: >> Hi Andy, >> >> On Wed, Mar 05, 2025 at 07:55:19PM +0800, Andy Yan wrote: >> > At 2025-03-04 19:10:47, "Maxime Ripard" wrote: >> > >With the bridges switchi

Re: [PATCH v5 3/5] rust: firmware: add `module_firmware!` macro

2025-03-05 Thread Danilo Krummrich
On Thu, Mar 06, 2025 at 12:31:14AM +, Benno Lossin wrote: > On Tue Mar 4, 2025 at 6:34 PM CET, Danilo Krummrich wrote: > > > +#[macro_export] > > +macro_rules! module_firmware { > > +($($builder:tt)*) => { > > This should probably be `$builder:expr` instead. That doesn't work, the compil

[RFC v3 16/33] rust: drm/kms: Add OpaquePlane and OpaquePlaneState

2025-03-05 Thread Lyude Paul
Same thing as OpaqueCrtc and OpaqueCrtcState, but for plane states now. Signed-off-by: Lyude Paul --- V3: * Add safety comment to implementation of ModeObject * Add safety comments to implementation of AsRawPlane * Implement try_from_opaque() and from_opaque() using a macro * Add missing upcast

Re:Re: [PATCH 0/6] Add support for RK3588 DisplayPort Controller

2025-03-05 Thread Andy Yan
Hi Piotr, 在 2025-03-05 21:56:12,"Piotr Oniszczuk" 写道: > > >> Wiadomość napisana przez Andy Yan w dniu 5 mar 2025, o >> godz. 03:30: >> >>> >> >> I only see the HDMI connector from your dri/state ; so it appears the DP >> driver hasn't been successfully >> initialized(I think kernel dmesg c

Re: [PATCH v5 3/5] rust: firmware: add `module_firmware!` macro

2025-03-05 Thread Benno Lossin
On Tue Mar 4, 2025 at 6:34 PM CET, Danilo Krummrich wrote: > Analogous to the `module!` macro `module_firmware!` adds additional > firmware path strings to the .modinfo section. > > In contrast to `module!`, where path strings need to be string literals, > path strings can be composed with the `fir

Re: [PATCH v5 2/5] rust: firmware: introduce `firmware::ModInfoBuilder`

2025-03-05 Thread Benno Lossin
On Thu Mar 6, 2025 at 12:57 AM CET, Danilo Krummrich wrote: > On Wed, Mar 05, 2025 at 11:36:54PM +, Benno Lossin wrote: >> On Wed Mar 5, 2025 at 11:38 PM CET, Danilo Krummrich wrote: >> > On Wed, Mar 05, 2025 at 10:30:31PM +, Benno Lossin wrote: >> >> On Tue Mar 4, 2025 at 6:34 PM CET, Dani

Re: [PATCH] drm: amdkfd: Replace (un)register_chrdev() by (unregister/alloc)_chrdev_region()

2025-03-05 Thread Felix Kuehling
On 2025-03-05 16:08, Salah Triki wrote: Replace (un)register_chrdev() by (unregister/alloc)_chrdev_region() as they are deprecated since kernel 2.6. Where is that information coming from? I see __register_chrdev documented in the current kernel documentation. I see no indication that it's d

Re: [PATCH 00/14] drm/panel: Transition away from using mipi_dsi_*_write_seq()

2025-03-05 Thread Anusha Srivatsa
. > Luckily > > I bumped into this today. Thanks for the feedback. I agree with what you > > said. While the script catches the patterns , a little of manual > conversion > > and proof checking is needed. I am taking this into account while I spin > > the next version

[PATCH] drm/panel/synaptics-r63353: Use _multi variants

2025-03-05 Thread Anusha Srivatsa
return ret; - } + mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); - return 0; + return dsi_ctx.accum_err; } static int r63353_panel_unprepare(struct drm_panel *panel) --- base-commit: ced7486468ac3b38d59a69fca5d97998499c936b change-id: 20250305-mipi-synaptic-1-a2043543cd3a Best regards, -- Anusha Srivatsa

Re: [PATCH v5 0/5] Initial Nova Core series

2025-03-05 Thread Luis Chamberlain
On Thu, Mar 06, 2025 at 12:40:44AM +0100, Danilo Krummrich wrote: > On Wed, Mar 05, 2025 at 03:27:13PM -0800, Luis Chamberlain wrote: > > On Wed, Mar 05, 2025 at 08:56:42PM +0100, Danilo Krummrich wrote: > > > On Tue, Mar 04, 2025 at 06:34:47PM +0100, Danilo Krummrich wrote: > > > > Danilo Krummric

Re: [PATCH v5 2/5] rust: firmware: introduce `firmware::ModInfoBuilder`

2025-03-05 Thread Danilo Krummrich
On Wed, Mar 05, 2025 at 11:36:54PM +, Benno Lossin wrote: > On Wed Mar 5, 2025 at 11:38 PM CET, Danilo Krummrich wrote: > > On Wed, Mar 05, 2025 at 10:30:31PM +, Benno Lossin wrote: > >> On Tue Mar 4, 2025 at 6:34 PM CET, Danilo Krummrich wrote: > >> > +/// Push an additional path compo

[RFC v3 17/33] rust: drm/kms: Add OpaqueEncoder

2025-03-05 Thread Lyude Paul
Same thing as OpaquePlane, but for encoders now. Signed-off-by: Lyude Paul --- V3: * Add safety comment to ModeObject implementation * Add safety comments for AsRawEncoder * Implement try_from_opaque() and from_opaque() using a macro Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/encoder.

Re: [PATCH v5 0/5] Initial Nova Core series

2025-03-05 Thread Danilo Krummrich
On Wed, Mar 05, 2025 at 03:27:13PM -0800, Luis Chamberlain wrote: > On Wed, Mar 05, 2025 at 08:56:42PM +0100, Danilo Krummrich wrote: > > On Tue, Mar 04, 2025 at 06:34:47PM +0100, Danilo Krummrich wrote: > > > Danilo Krummrich (5): > > > rust: module: add type `LocalModule` > > > rust: firmware

Re: [PATCH v5 2/5] rust: firmware: introduce `firmware::ModInfoBuilder`

2025-03-05 Thread Benno Lossin
On Wed Mar 5, 2025 at 11:38 PM CET, Danilo Krummrich wrote: > On Wed, Mar 05, 2025 at 10:30:31PM +, Benno Lossin wrote: >> On Tue Mar 4, 2025 at 6:34 PM CET, Danilo Krummrich wrote: >> > +/// Push an additional path component. >> > +/// >> > +/// After a new [`ModInfoBuilder`] insta

Re: [PATCH v5 0/5] Initial Nova Core series

2025-03-05 Thread Luis Chamberlain
On Wed, Mar 05, 2025 at 08:56:42PM +0100, Danilo Krummrich wrote: > On Tue, Mar 04, 2025 at 06:34:47PM +0100, Danilo Krummrich wrote: > > Danilo Krummrich (5): > > rust: module: add type `LocalModule` > > rust: firmware: introduce `firmware::ModInfoBuilder` > > rust: firmware: add `module_fir

[RFC v3 05/33] rust: drm/kms: Add drm_plane bindings

2025-03-05 Thread Lyude Paul
The next step is adding a set of basic bindings to create a plane, which has to happen before we can create a CRTC (since we need to be able to at least specify a primary plane for a CRTC upon creation). This mostly follows the same general pattern as connectors (AsRawPlane, AsRawPlaneState, etc.).

[RFC v3 18/33] rust: drm/kms: Add drm_atomic_state bindings

2025-03-05 Thread Lyude Paul
Next up is introducing bindings that we can use to represent the global DRM atomic state, along with all of the various object states contained within. We do this by introducing a few new concepts: borrowed states, atomic state mutators, and atomic state composers. To understand these, we need to

[RFC v3 25/33] rust: drm/kms: Add drm_framebuffer bindings

2025-03-05 Thread Lyude Paul
This adds some very simple bindings for drm_framebuffer. We don't use them much yet, but we'll eventually be using them when rvkms eventually gets CRC and writeback support. Just like Connector objects, these use RcModeObject. Signed-off-by: Lyude Paul --- V3: * Replace Framebuffer struct with

[RFC v3 33/33] drm: Introduce RVKMS!

2025-03-05 Thread Lyude Paul
Now that we've added all of the bits that we need for the KMS API, it's time to introduce rvkms! This is a port of the VKMS driver to rust, with the intent of acting as an example usecase of the KMS bindings that we've come up with so far in preparation for writing a display driver for nova. Curre

[RFC v3 32/33] rust: drm/kms: Add Kms::atomic_commit_tail

2025-03-05 Thread Lyude Paul
A quick note: this is one of my favorite bindings so far :). It sounds way overly complicated, but so far actually writing implementations of this in rust has been a breeze. Anyway: RVKMS has a slightly different atomic_commit_tail than normal, which means we need to write up some bindings for ato

[RFC v3 31/33] rust: drm/kms: Add VblankSupport

2025-03-05 Thread Lyude Paul
This commit adds bindings for implementing vblank support for a driver's CRTCs. These bindings are optional, to account for the fact that not all drivers have dedicated hardware vblanks. In order to accomplish this, we introduce the VblankSupport trait which can be implemented on DriverCrtc by dri

[RFC v3 30/33] rust: drm/kms: Add Device::num_crtcs()

2025-03-05 Thread Lyude Paul
A binding for checking drm_device.num_crtcs. We'll need this in a moment for vblank support, since setting it up requires knowing the number of CRTCs that a driver has initialized. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git

[RFC v3 28/33] rust: drm/kms: Add DriverCrtc::atomic_enable() and atomic_disable()

2025-03-05 Thread Lyude Paul
Optional trait methods for implementing the atomic_enable and atomic_disable callbacks of a CRTC. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/crtc.rs | 88 - 1 file changed, 86 insertions(+), 2 deletions(-) diff --git a/rust/kernel/drm/kms/crtc.rs b/rus

  1   2   3   4   >