Re: [git pull] drm fixes for 6.14-rc8/final

2025-03-20 Thread pr-tracker-bot
The pull request you sent on Fri, 21 Mar 2025 14:19:05 +1000: > https://gitlab.freedesktop.org/drm/kernel.git tags/drm-fixes-2025-03-21 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/b3ee1e4609512dfff642a96b34d7e5dfcdc92d05 Thank you! -- Deet-doot-dot, I am a bot. h

Re: [PATCH v8 3/3] drm/mediatek: dsi: remove custom init part

2025-03-20 Thread 胡俊光

Re: [PATCH RFC v3 6/7] gpu: nova-core: add basic timer device

2025-03-20 Thread Alexandre Courbot
On Fri Mar 21, 2025 at 12:54 AM JST, Daniel Brooks wrote: > Alexandre Courbot writes: > >> +impl Add for Timestamp { >> +type Output = Self; >> + >> +fn add(mut self, rhs: Duration) -> Self::Output { >> +let mut nanos = rhs.as_nanos(); >> +while nanos > u64::MAX as u128 { >

[pull] amdgpu, amdkfd, radeon drm-fixes-6.14

2025-03-20 Thread Alex Deucher
Hi Dave, Simona, Fixes for 6.14. The following changes since commit 6cc30748e17ea2a64051ceaf83a8372484e597f1: drm/amdgpu: NULL-check BO's backing store when determining GFX12 PTE flags (2025-03-12 14:59:21 -0400) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f

[PATCH v2 34/59] checkpatch: dont warn about unused macro arg on empty body

2025-03-20 Thread Jim Cromie
we currently get: WARNING: Argument 'name' is not used in function-like macro on: #define DRM_CLASSMAP_USE(name) /* nothing here */ Following this advice is wrong here, and shouldn't be fixed by ignoring args altogether; the macro should properly fail if invoked with 0 or 2+ args. cc: Andy W

[PATCH v6 5/6] PCI: Allow drivers to control VF BAR size

2025-03-20 Thread Michał Winiarski
Drivers could leverage the fact that the VF BAR MMIO reservation is created for total number of VFs supported by the device by resizing the BAR to larger size when smaller number of VFs is enabled. Add a pci_iov_vf_bar_set_size() function to control the size and a pci_iov_vf_bar_get_sizes() helper

[PATCH v2 23/59] dyndbg: move .mod_name from/to structs ddebug_table/_ddebug_info

2025-03-20 Thread Jim Cromie
struct _ddebug_info already has almost all dyndbg's info for a module, so finish the encapsulation. This puts the datum closer to where its needed, improving the chance that we can obsolete the _ddebug.modame field with a desc_modname(dp) accessor fn. In static ddebug_add_module(&_ddebug_info_cur

[PATCH v2 37/59] drm-dyndbg: adapt DRM to invoke DYNAMIC_DEBUG_CLASSMAP_PARAM

2025-03-20 Thread Jim Cromie
Invoke DYNAMIC_DEBUG_CLASSMAP_PARAM to hook drm.debug (__drm_debug) to the DRM_UT_* classmap, replacing the ad-hoc wiring previously doing it. Add DRM_CLASSMAP_* adapter macros to selectively use DYNAMIC_DEBUG_CLASSMAP_* when DRM_USE_DYNAMIC_DEBUG=y is configured. Signed-off-by: Jim Cromie ---

[PATCH 3/7] drm/gpusvm: mark pages as dirty

2025-03-20 Thread Matthew Auld
If the memory is going to be accessed by the device, make sure we mark the pages accordingly such that the kernel knows this. This aligns with the xe-userptr code. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost --- drivers/gpu/drm/drm_gpusvm.c | 9 + 1 file changed,

[PATCH 12/18] drm/bridge: cdns-dsi: Drop checks that shouldn't be in .mode_valid()

2025-03-20 Thread Tomi Valkeinen
The docs say about mode_valid(): "it is not allowed to look at anything else but the passed-in mode, and validate it against configuration-invariant hardware constraints" We're doing a lot more than just looking at the mode. The main issue here is that we're doing checks based on the pixel clock,

Re: [PATCH v3] drm: Add UAPI for the Asahi driver

2025-03-20 Thread Faith Ekstrand
On Thu, 20 Mar 2025 14:29:04 -0500 Faith Ekstrand wrote --- > On Fri, 14 Mar 2025 18:23:16 -0500 Alyssa Rosenzweig wrote --- > > > This adds the UAPI for the Asahi driver targeting the GPU in the Apple > > M1 and M2 series systems on chip. The UAPI design is based on other

Re: [PATCH 1/7] drm/gpusvm: fix hmm_pfn_to_map_order() usage

2025-03-20 Thread Matthew Brost
On Thu, Mar 20, 2025 at 05:29:58PM +, Matthew Auld wrote: > Handle the case where the hmm range partially covers a huge page (like > 2M), otherwise we can potentially end up doing something nasty like > mapping memory which potentially is outside the range, and maybe not > even mapped by the mm

Re: [PATCH 6/7] drm/gpusvm: support basic_range

2025-03-20 Thread Matthew Brost
On Thu, Mar 20, 2025 at 05:30:03PM +, Matthew Auld wrote: > Idea is to use this for userptr, where we mostly just need > get/unmap/free pages, plus some kind of common notifier lock at the svm > level (provided by gpusvm). The range itself also maps to a single > notifier, covering the entire r

Re: [PATCH 7/7] drm/xe/userptr: replace xe_hmm with gpusvm

2025-03-20 Thread Matthew Brost
On Thu, Mar 20, 2025 at 05:30:04PM +, Matthew Auld wrote: > Goal here is cut over to gpusvm and remove xe_hmm, relying instead on > common code. The core facilities we need are get_pages(), unmap_pages() > and free_pages() for a given useptr range, plus a vm level notifier > lock, which is now

Re: [PATCH 4/7] drm/gpusvm: pull out drm_gpusvm_pages substructure

2025-03-20 Thread Matthew Brost
On Thu, Mar 20, 2025 at 05:30:01PM +, Matthew Auld wrote: > Pull the pages stuff from the svm range into its own substructure, with > the idea of having the main pages related routines, like get_pages(), > unmap_pages() and free_pages() all operating on some lower level > structures, which can

[PATCH v2 31/59] docs/dyndbg: explain new delimiters: comma, percent

2025-03-20 Thread Jim Cromie
Add mention of comma and percent delimiters into the respective paragraphs describing their equivalents: space and newline. cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- .../admin-guide/dynamic-debug-howto.rst | 19 +++ 1 file changed, 11 insertions(+), 8 dele

Re: [PATCH 1/2] drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO

2025-03-20 Thread Ben Skeggs
On 21/3/25 04:18, Danilo Krummrich wrote: Hi Mel, On Wed, Mar 12, 2025 at 05:36:14PM -0400, Mel Henning wrote: Userspace needs this information to set up zcull correctly. This is a very brief motivation for the commit, please also describe what the commit does using imperative form. Signed-

Re: [PATCH 1/7] drm/gpusvm: fix hmm_pfn_to_map_order() usage

2025-03-20 Thread Thomas Hellström
On Thu, 2025-03-20 at 17:29 +, Matthew Auld wrote: > Handle the case where the hmm range partially covers a huge page > (like > 2M), otherwise we can potentially end up doing something nasty like > mapping memory which potentially is outside the range, and maybe not > even mapped by the mm. Fix

[PATCH v2 19/59] dyndbg: detect class_id reservation conflicts

2025-03-20 Thread Jim Cromie
If a module _DEFINEs + _USEs 2 or more classmaps, it must devise them to share the per-module 0..62 class-id space; ie their respective base,+length reservations cannot overlap. To detect conflicts at modprobe, add ddebug_class_range_overlap(), call it from ddebug_add_module(), and WARN and return

Re: [PATCH 2/7] drm/gpusvm: use more selective dma dir in get_pages()

2025-03-20 Thread Matthew Brost
On Thu, Mar 20, 2025 at 05:29:59PM +, Matthew Auld wrote: > If we are only reading the memory then from the device pov the direction > can be DMA_TO_DEVICE. This aligns with the xe-userptr code. Using the > most restrictive data direction to represent the access is normally a > good idea. > >

Re: [PATCH 2/7] drm/gpusvm: use more selective dma dir in get_pages()

2025-03-20 Thread Thomas Hellström
On Thu, 2025-03-20 at 17:29 +, Matthew Auld wrote: > If we are only reading the memory then from the device pov the > direction > can be DMA_TO_DEVICE. This aligns with the xe-userptr code. Using the > most restrictive data direction to represent the access is normally a > good idea. > > Signe

[PATCH v2 57/59] drm-dyndbg: add DRM_CLASSMAP_USE to the drm_gem_shmem_helper driver

2025-03-20 Thread Jim Cromie
The drm_gem_shmem_helper driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/drm_gem_shmem_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driver

Re: [PATCH v3] drm: Add UAPI for the Asahi driver

2025-03-20 Thread Faith Ekstrand
On Fri, 14 Mar 2025 18:23:16 -0500 Alyssa Rosenzweig wrote --- > This adds the UAPI for the Asahi driver targeting the GPU in the Apple > M1 and M2 series systems on chip. The UAPI design is based on other > modern Vulkan-capable drivers, including Xe and Panthor. Memory > management

[PATCH v2 50/59] drm-dyndbg: add DRM_CLASSMAP_USE to radeon

2025-03-20 Thread Jim Cromie
radeon has some DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg about its use of the class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/radeon/radeon_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon

Re: [PATCH v2 9/9] drm/panthor: Add support for Mali-G710, Mali-G510, and Mali-G310

2025-03-20 Thread Liviu Dudau
On Thu, Mar 20, 2025 at 11:17:41AM +, Karunika Choo wrote: > This patch adds GPU model name and FW binary support for Mali-G710, > Mali-G510, and Mali-G310. > > Signed-off-by: Karunika Choo > --- > drivers/gpu/drm/panthor/panthor_fw.c | 2 ++ > drivers/gpu/drm/panthor/panthor_hw.c | 6 ++

[PATCH v2 18/59] selftests-dyndbg: add tools/testing/selftests/dynamic_debug/*

2025-03-20 Thread Jim Cromie
Add a selftest script for dynamic-debug. The config requires CONFIG_TEST_DYNAMIC_DEBUG=m and CONFIG_TEST_DYNAMIC_DEBUG_SUBMOD=m, which tacitly requires either CONFIG_DYNAMIC_DEBUG=y or CONFIG_DYNAMIC_DEBUG_CORE=y ATM this has just basic_tests(), which modify pr_debug() flags in the builtin params

[PATCH v2 46/59] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm

2025-03-20 Thread Jim Cromie
tiny/simpledrm has 3 DRM_UT_DRIVER debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/tiny/simpledrm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tiny/si

[PATCH v2 54/59] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver

2025-03-20 Thread Jim Cromie
The mgag200 driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mg

[PATCH v2 59/59] drm: RFC - make drm_dyndbg_user.o for drm-*_helpers, drivers

2025-03-20 Thread Jim Cromie
Add new drm_dyndbg_user.c with a single call to DYNDBG_CLASSMAP_USE(drm_debug_classes). This creates a _class_user record (and a linkage dependency). If a driver adds this object to its Makefile target, it gets the record, which authorizes dyndbg to enable the module's class'd pr_debugs, such as

[PATCH v2 58/59] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2025-03-20 Thread Jim Cromie
Time for some thorough CI. Also, the previous 18 patches could perhaps be replaced by a single invocation of DYNDBG_CLASSMAP_USE, from a C-file linked into all drm drivers & helpers. I didn't find such a file, nor a drm-client linkage item in the Makefile. Signed-off-by: Jim Cromie --- drivers

[PATCH v2 49/59] drm-dyndbg: add DRM_CLASSMAP_USE to gma500 driver

2025-03-20 Thread Jim Cromie
The gma500 has 126 DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/gma500/psb_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gma500/psb_drv

[PATCH v2 41/59] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper

2025-03-20 Thread Jim Cromie
Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f

[PATCH v2 45/59] drm-dyndbg: add DRM_CLASSMAP_USE to virtio_gpu

2025-03-20 Thread Jim Cromie
virtio_gpu has 10 DRM_UT_CORE debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/virtio/v

[PATCH v2 52/59] drm-dyndbg: add DRM_CLASSMAP_USE to vkms driver

2025-03-20 Thread Jim Cromie
The vkms driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/vkms/vkms_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_d

[PATCH v2 43/59] drm-dyndbg: DRM_CLASSMAP_USE in nouveau

2025-03-20 Thread Jim Cromie
Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with DRM_CLASSMAP_USE. This refs the defined & exported classmap, rather than re-declaring it redundantly, and error-prone-ly. This resolves the appearance of "class:_UNKNOWN_" in the control file for the driver's drm_dbg()s. Fixes: f

[PATCH v2 26/59] dyndbg: split multi-query strings with %

2025-03-20 Thread Jim Cromie
Since commit 85f7f6c0edb8 ("dynamic_debug: process multiple debug-queries on a line") Multi-query commands have been allowed: modprobe drm dyndbg="class DRM_UT_CORE +p; class DRM_UT_KMS +p" modprobe drm dyndbg=< [ 203.902703] dyndbg: query parse failed [ 203.902871] dyndbg: processed 2 quer

[PATCH v2 38/59] drm-print: fix config-dependent unused variable

2025-03-20 Thread Jim Cromie
With CONFIG_DRM_USE_DYNAMIC_DEBUG=y, __drm_printfn_dbg() gets an unused variable warning/error on 'category', even though the usage follows immediately, in drm_debug_enabled(category). For static-key optimized dyndbg, the macro doesn't actually check the category var, since the static-key patches

[PATCH v2 30/59] dyndbg: drop "protection" of class'd pr_debugs from legacy queries

2025-03-20 Thread Jim Cromie
Current classmap code protects class'd pr_debugs from unintended changes by "legacy" unclassed queries: # this doesn't disable all of DRM_UT_* categories echo "-p" > /proc/dynamic_debug/control # name the class to change it - protective but tedious echo "class DRM_UT_CORE +p" > /proc/dyna

[PATCH v2 36/59] drm-dyndbg: adapt drm core to use dyndbg classmaps-v2

2025-03-20 Thread Jim Cromie
dyndbg's CLASSMAP-v1 api was broken; DECLARE_DYNDBG_CLASSMAP tried to do too much. Its replaced by DRM_CLASSMAP_DEFINE, which creates & EXPORTs a classmap (in DRM core), and DRM_CLASSMAP_USE which refers to the classmap defined elsewhere. The drivers still use DECLARE_DYNDBG_CLASSMAP for now, so

[PATCH v2 15/59] dyndbg: hoist classmap-filter-by-modname up to ddebug_add_module

2025-03-20 Thread Jim Cromie
The body of ddebug_attach_module_classes() is dominated by a code-block that finds the contiguous subrange of classmaps matching on modname, and saves it into the ddebug_table's info record. Implement this block in a macro to accommodate different component vectors in the "box" (as named in the fo

[PATCH v2 24/59] dyndbg: treat comma as a token separator

2025-03-20 Thread Jim Cromie
Treat comma as a token terminator, just like a space. This allows a user to avoid quoting hassles when spaces are otherwise needed: :#> modprobe drm dyndbg=class,DRM_UT_CORE,+p\;class,DRM_UT_KMS,+p or as a boot arg: drm.dyndbg=class,DRM_UT_CORE,+p # todo: support multi-query here Given the

[PATCH v2 27/59] selftests-dyndbg: test_percent_splitting

2025-03-20 Thread Jim Cromie
This does basic testing of classmaps using '%' separated multi-queries. It modprobes test_dynamic_debug with several classes enabled, and counts to verify that the expected sites show the enablement in the control file. Signed-off-by: Jim Cromie --- .../dynamic_debug/dyndbg_selftest.sh

[PATCH v2 04/59] dyndbg: reword "class unknown, " to "class:_UNKNOWN_"

2025-03-20 Thread Jim Cromie
When a dyndbg classname is unknown to a kernel module (as before previous patch), the callsite is un-addressable via >control queries. The control-file displays this condition as "class unknown," currently. That spelling is sub-optimal/too-generic, so change it to "class:_UNKNOWN_" to loudly anno

[PATCH v2 32/59] docs/dyndbg: explain flags parse 1st

2025-03-20 Thread Jim Cromie
When writing queries to >control, flags are parsed 1st, since they are the only required field, and they require specific compositions. So if the flags draw an error (on those specifics), then keyword errors aren't reported. This can be mildly confusing/annoying, so explain it instead. cc: linux

[PATCH v2 29/59] dyndbg: change __dynamic_func_call_cls* macros into expressions

2025-03-20 Thread Jim Cromie
The Xe driver's XE_IOCTL_DBG macro calls drm_dbg() from inside an if (expression). This breaks when CONFIG_DRM_USE_DYNAMIC_DEBUG=y because the invoked macro has a do-while-0 wrapper. if (cond && (drm_dbg("expr-form"),1)) { ... do some more stuff } Fix for this usage by changing __dyn

[PATCH v2 11/59] dyndbg: macrofy a 2-index for-loop pattern

2025-03-20 Thread Jim Cromie
dynamic-debug has several __sections, each with , num_, and it iterates over these with a 2-index for-loop. These loops are fiddly with the 2 names. We have only 2 such loops now, but are getting more soon; lets embed/abstract the fiddlyness in the for_subvec() macro, and avoid repeating it going

[PATCH v2 13/59] dyndbg: add 2 new _DPRINTK_FLAGS_: INCL_LOOKUP, PREFIX_CACHED

2025-03-20 Thread Jim Cromie
Add _INCL_LOOKUP condition to separate +mfsl flags from +t, allowing (after refactoring) to avoid a needless call-return. Add a PREFIX_CACHED bit to remember that a pr-debug callsite is: - enabled, with +p - wants a dynamic-prefix, with _INCL_LOOKUP - was previously called - was thus saved in the

[PATCH v2 28/59] selftests-dyndbg: add test_mod_submod

2025-03-20 Thread Jim Cromie
This new test-fn runs 3 module/submodule modprobe scenarios, variously using both the generic dyndbg= modprobe arg, and the test-module's classmap-params to manipulate the test-mod*'s pr_debugs. In all cases, the current flag-settings are counted and tested vs expectations. The 3rd scenario recapi

[PATCH v2 21/59] dyndbg-test: change do_prints testpoint to accept a loopct

2025-03-20 Thread Jim Cromie
echo 1000 > /sys/module/test_dynamic_debug/parameters/do_prints This allows its use as a scriptable load generator, to generate dynamic-prefix-emits for flag combinations vs undecorated messages. This will make it easy to assess the cost of the prefixing. Reading the ./do_prints node also prints

[PATCH v2 25/59] selftests-dyndbg: add comma_terminator_tests

2025-03-20 Thread Jim Cromie
New fn validates parsing and effect of queries using combinations of commas and spaces to delimit the tokens. It manipulates pr-debugs in builtin module/params, so might have deps I havent foreseen on odd configurations. Signed-off-by: Jim Cromie --- - skip comma tests if no builtins --- .../dy

[PATCH v2 20/59] dyndbg: check DYNDBG_CLASSMAP_DEFINE args at compile-time

2025-03-20 Thread Jim Cromie
Add __DYNDBG_CLASSMAP_CHECK to implement these arg-checks at compile: 0 <= _base < 63 class_names is not empty class_names[0] is a string (class_names.length + _base) < 63 These compile-time checks will prevent several misuses; 4 such examples are added to test_dyna

[PATCH v2 03/59] test-dyndbg: fixup CLASSMAP usage error

2025-03-20 Thread Jim Cromie
commit 6ea3bf466ac6 ("dyndbg: test DECLARE_DYNDBG_CLASSMAP, sysfs nodes") A closer look at test_dynamic_debug.ko logging output reveals reveals a macro usage error: lib/test_dynamic_debug.c:105 [test_dynamic_debug]do_cats =p "LOW msg\n" class:MID lib/test_dynamic_debug.c:106 [test_dynamic_debug]

[PATCH v2 09/59] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap

2025-03-20 Thread Jim Cromie
old_bits arg is currently a pointer to the input bits, but this could allow inadvertent changes to the input by the fn. Disallow this. And constify new_bits while here. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- lib/dynamic_debug.c | 21 +++-- 1 file changed, 11 i

[PATCH v2 16/59] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code

2025-03-20 Thread Jim Cromie
Remove the DD_CLASS_TYPE_*_NAMES classmap types and code. These 2 classmap types accept class names at the PARAM interface, for example: echo +DRM_UT_CORE,-DRM_UT_KMS > /sys/module/drm/parameters/debug_names The code works, but its only used by test-dynamic-debug, and wasn't asked for by anyon

[PATCH v2 12/59] dyndbg, module: make proper substructs in _ddebug_info

2025-03-20 Thread Jim Cromie
recompose struct _ddebug_info, inserting proper sub-structs. The struct currently has 2 pairs of fields: descs, num_descs and classes, num_classes. Several for-loops operate on these field pairs, soon many more will be added. Looping over these blocks by respective field-pairs is repetitive and

[PATCH v2 06/59] dyndbg: drop NUM_TYPE_ARRAY

2025-03-20 Thread Jim Cromie
ARRAY_SIZE works here, since array decl is complete. no functional change Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- include/linux/dynamic_debug.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h

[PATCH v2 07/59] dyndbg: reduce verbose/debug clutter

2025-03-20 Thread Jim Cromie
currently, for verbose=3, these are logged (blank lines for clarity): dyndbg: query 0: "class DRM_UT_CORE +p" mod:* dyndbg: split into words: "class" "DRM_UT_CORE" "+p" dyndbg: op='+' dyndbg: flags=0x1 dyndbg: *flagsp=0x1 *maskp=0x dyndbg: parsed: func="" file="" module="" format="

[PATCH v2 14/59] dyndbg: split _emit_lookup() out of dynamic_emit_prefix()

2025-03-20 Thread Jim Cromie
Split dynamic_emit_prefix() to separate out _INCL_LOOKUPs: 1. keep dynamic_emit_prefix() static inline check _INCL_ANY flags before calling 2 2. __dynamic_emit_prefix() prints [TID] or and trailing space if +t flag check _INCL_LOOKUP flags before calling 3 3. __dynamic_emit_lookup()

[PATCH v2 02/59] docs/dyndbg: update examples \012 to \n

2025-03-20 Thread Jim Cromie
commit 47ea6f99d06e ("dyndbg: use ESCAPE_SPACE for cat control") changed the control-file to display format strings with "\n" rather than "\012". Update the docs to match the new reality. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet Tested-by: Louis Chauvet --- -v2 fix missed \012's ---

[PATCH v2 10/59] dyndbg: replace classmap list with a vector

2025-03-20 Thread Jim Cromie
Classmaps are stored in an elf section/array, but currently are individually list-linked onto dyndbg's per-module ddebug_table for operation. This is unnecessary. Just like dyndbg's descriptors, classes are packed in compile order; so even with many builtin modules employing multiple classmaps, ea

[PATCH v2 08/59] dyndbg: refactor param_set_dyndbg_classes and below

2025-03-20 Thread Jim Cromie
Refactor callchain below param_set_dyndbg_classes(1) to allow mod-name specific settings. Split (1) into upper/lower fns, adding modname param to lower, and passing NULL in from upper. Below that, add the same param to ddebug_apply_class_bitmap(), and pass it thru to _ddebug_queries(), replacing

[PATCH v2 01/59] vmlinux.lds.h: fixup HEADERED_SECTION{,_BY} macros

2025-03-20 Thread Jim Cromie
commit 1d926e259d8f ("vmlinux.lds.h: add HEADERED_SECTION_* macros") I flubbed the defn of the outer 2 macros; they missed the extra arg needed: _front/_hdr. Fix it now, before anyone notices. Signed-off-by: Jim Cromie --- include/asm-generic/vmlinux.lds.h | 7 --- 1 file changed, 4 insert

Re: [PATCH v2 2/3] misc: fastrpc: add support for gpdsp remoteproc

2025-03-20 Thread Dmitry Baryshkov
On Thu, Mar 20, 2025 at 05:11:20PM +, Srinivas Kandagatla wrote: > > > On 20/03/2025 09:14, Ling Xu wrote: > > The fastrpc driver has support for 5 types of remoteprocs. There are > > some products which support GPDSP remoteprocs. Add changes to support > > GPDSP remoteprocs. > > > > Reviewe

Re: [PATCH 2/2] drm/nouveau: DRM_NOUVEAU_SET_ZCULL_CTXSW_BUFFER

2025-03-20 Thread Danilo Krummrich
On Wed, Mar 12, 2025 at 05:36:15PM -0400, Mel Henning wrote: > diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h Same here, please split the uAPI change in a separate commit. > index 33361784eb4e..e9638f4dd7e6 100644 > --- a/include/uapi/drm/nouveau_drm.h > +++ b/includ

Re: [PATCH 1/2] drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO

2025-03-20 Thread Danilo Krummrich
On Thu, Mar 20, 2025 at 07:18:13PM +0100, Danilo Krummrich wrote: > Hi Mel, > > On Wed, Mar 12, 2025 at 05:36:14PM -0400, Mel Henning wrote: > > +int > > +nouveau_abi16_ioctl_get_zcull_info(ABI16_IOCTL_ARGS) > > +{ > > + struct nouveau_drm *drm = nouveau_drm(dev); > > + struct nvkm_device *dev

Re: [PATCH RFC v3 6/7] gpu: nova-core: add basic timer device

2025-03-20 Thread Boqun Feng
Hi Alexandre, On Thu, Mar 20, 2025 at 10:39:14PM +0900, Alexandre Courbot wrote: > Add a basic timer device and exercise it during device probing. This > first draft is probably very questionable. > > One point in particular which should IMHO receive attention: the generic > wait_on() method aims

Re: [PATCH 1/2] drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO

2025-03-20 Thread Danilo Krummrich
Hi Mel, On Wed, Mar 12, 2025 at 05:36:14PM -0400, Mel Henning wrote: > Userspace needs this information to set up zcull correctly. This is a very brief motivation for the commit, please also describe what the commit does using imperative form. > > Signed-off-by: Mel Henning > --- > .../drm/no

[PATCH 1/7] drm/gpusvm: fix hmm_pfn_to_map_order() usage

2025-03-20 Thread Matthew Auld
Handle the case where the hmm range partially covers a huge page (like 2M), otherwise we can potentially end up doing something nasty like mapping memory which potentially is outside the range, and maybe not even mapped by the mm. Fix is based on the xe userptr code, which in a future patch will di

[PATCH 5/7] drm/gpusvm: lower get/unmap pages

2025-03-20 Thread Matthew Auld
Lower get/unmap pages to facilitate operating on the lowest level pieces, without needing a full drm_gpusvm_range structure. In the next patch we want to extract get/unmap/free to operate on a different range type. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost --- drivers/

[PATCH 2/7] drm/gpusvm: use more selective dma dir in get_pages()

2025-03-20 Thread Matthew Auld
If we are only reading the memory then from the device pov the direction can be DMA_TO_DEVICE. This aligns with the xe-userptr code. Using the most restrictive data direction to represent the access is normally a good idea. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost ---

[PATCH RFC v3 5/7] gpu: nova-core: use register!() to define register layout

2025-03-20 Thread Alexandre Courbot
Use the register!() macro to define the layout for the Boot0 register and use its accessors through the use of the convenience with_bar!() macro, which uses Revocable::try_access() and converts its returned Option into the proper error as needed. Signed-off-by: Alexandre Courbot --- drivers/gpu/

[PATCH v2 3/9] drm/panthor: Add GPU specific initialization framework

2025-03-20 Thread Karunika Choo
This patch aims to lay the foundation to provide support for multiple Mali GPUs through a framework by which differences in registers, functionality, and features can be managed. It introduces the concept of the arch_id which is a 32-bit ID in the format of ((arch_major << 16) | (arch_minor << 8)

Re: DRM CI

2025-03-20 Thread Maxime Ripard
Hi, On Wed, Mar 19, 2025 at 02:39:59PM -0300, Helen Koike wrote: > Hi Maxime, > > On 19/03/2025 11:11, Maxime Ripard wrote: > > Hi, > > > > At last Plumbers, we agreed with Dave that a good first step to ramp up > > CI for DRM trees would be to enable build and kunit testing in the main > > DRM

[PATCH 17/18] drm/bridge: cdns-dsi: Drop cdns_dsi_adjust_phy_config()

2025-03-20 Thread Tomi Valkeinen
cdns_dsi_adjust_phy_config() is called from cdns_dsi_adjust_phy_config(), which is called from .atomic_check(). It checks the DSI htotal and adjusts it to align on the DSI lane boundary by changing hfp and then recalculating htotal and HS clock rate. This has a few problems. First is the fact tha

[PATCH v4 10/18] drm/imagination: Make has_fixed_data_addr a value

2025-03-20 Thread Matt Coster
This is currently a callback function which takes no parameters; there's no reason for this so let's make it a straightforward value in pvr_fw_defs. Signed-off-by: Matt Coster --- Changes in v4: - None - Link to v3: https://lore.kernel.org/r/20250310-sets-bxs-4-64-patch-v1-v3-10-143b3dbef...@img

[PATCH v10 4/5] drm/xe/xe_vm: Add per VM fault info

2025-03-20 Thread Jonathan Cavitt
Add additional information to each VM so they can report up to the first 50 seen faults. Only pagefaults are saved this way currently, though in the future, all faults should be tracked by the VM for future reporting. Additionally, of the pagefaults reported, only failed pagefaults are saved this

[PATCH 00/18] drm/bridge: cdns-dsi: Make it work a bit better

2025-03-20 Thread Tomi Valkeinen
-) --- base-commit: 10646ddac2917b31c985ceff0e4982c42a9c924b change-id: 20250320-cdns-dsi-impro-3d8fbd7848d1 prerequisite-message-id: 20250226155228.564289-1-aradhya.bha...@linux.dev prerequisite-patch-id: 46845a8d15042dd343a29a17fc0b9d0eec2605f5 prerequisite-patch-id: 7ce82c26cb9e18884492d2282a72ff2a760aefda pre

[PATCH 18/18] drm/bridge: cdns-dsi: Don't fail on MIPI_DSI_MODE_VIDEO_BURST

2025-03-20 Thread Tomi Valkeinen
While the cdns-dsi does not support DSI burst mode, the burst mode is essentially DSI event mode with more versatile clocking and timings. Thus cdns-dsi doesn't need to fail if the DSI peripheral driver requests MIPI_DSI_MODE_VIDEO_BURST. In my particular use case, this allows the use of ti-sn65ds

[PATCH 07/18] drm/bridge: cdns-dsi: Fail if HS rate changed when validating PHY config

2025-03-20 Thread Tomi Valkeinen
The phy_validate() can change the HS clock rate we passed to it in the PHY config, depending on what the HW can actually do. The driver just ignores this at the moment, but if the actual HS clock rate is different than the requested one, the pipeline will fail as all the DSI timing calculations wil

[PATCH 15/18] drm/bridge: cdns-dsi: Tune adjusted_mode->clock according to dsi needs

2025-03-20 Thread Tomi Valkeinen
The driver currently expects the pixel clock and the HS clock to be compatible, but the DPHY PLL doesn't give very finely grained rates. This often leads to the situation where the pipeline just fails, as the resulting HS clock is just too off. We could change the driver to do a better job on adju

[PATCH 05/18] phy: cdns-dphy: Remove leftover code

2025-03-20 Thread Tomi Valkeinen
The code in cdns-dphy has probably been part of a DSI driver in the past. Remove DSI defines and variables which are not used or do not actually do anything. Also rename cdns_dsi_get_dphy_pll_cfg() to cdns_get_dphy_pll_cfg(), i.e. drop the "dsi", as it's not relevant here. Signed-off-by: Tomi Valk

[PATCH 10/18] drm/bridge: cdns-dsi: Fix event mode

2025-03-20 Thread Tomi Valkeinen
The timings calculation gets it wrong for DSI event mode, resulting in too large hbp value. Fix the issue by taking into account the pulse/event mode difference. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 33 ++ 1 file changed, 23 i

[PATCH 01/18] drm/tidss: Fix missing includes and struct decls

2025-03-20 Thread Tomi Valkeinen
Fix missing includes and struct declarations. Even if these don't cause any compile issues at the moment, it's good to have them correct. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.h | 3 +++ drivers/gpu/drm/tidss/tidss_drv.h | 2 ++ drivers/gpu/drm/tidss/t

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-03-20 Thread Ekansh Gupta
On 3/20/2025 7:45 PM, Dmitry Baryshkov wrote: > On Thu, Mar 20, 2025 at 07:19:31PM +0530, Ekansh Gupta wrote: >> >> On 1/29/2025 4:10 PM, Dmitry Baryshkov wrote: >>> On Wed, Jan 29, 2025 at 11:12:16AM +0530, Ekansh Gupta wrote: On 1/29/2025 4:59 AM, Dmitry Baryshkov wrote: > On Mon

Re: [PATCH RFC v3 6/7] gpu: nova-core: add basic timer device

2025-03-20 Thread Daniel Brooks
Alexandre Courbot writes: > +impl Add for Timestamp { > +type Output = Self; > + > +fn add(mut self, rhs: Duration) -> Self::Output { > +let mut nanos = rhs.as_nanos(); > +while nanos > u64::MAX as u128 { > +self.0 = self.0.wrapping_add(nanos as u64); > +

[PATCH v8 3/5] drm/bridge: deprecate old-style bridge allocation

2025-03-20 Thread Luca Ceresoli
All DRM bridges are now supposed to be allocated using devm_drm_bridge_alloc(), which is cleaner and necessary to support refcounting. Deprecate old school allocation using kzalloc and derivatives. In the absence of a drm_bridge_init() or such initialization function, document the deprecation on t

[PATCH v8 0/5] drm/bridge: add devm_drm_bridge_alloc() with bridge refcount

2025-03-20 Thread Luca Ceresoli
This series improves the way DRM bridges are allocated and initialized and makes them reference-counted. The goal of reference counting is to avoid use-after-free by drivers which got a pointer to a bridge and keep it stored and used even after the bridge has been deallocated. The overall goal is

[PATCH v8 5/5] drm/bridge: samsung-dsim: use dynamic lifetime management

2025-03-20 Thread Luca Ceresoli
Allow this bridge to be removable without dangling pointers and use-after-free, together with proper use of drm_bridge_get() and _put() by consumers. Reviewed-by: Maxime Ripard Signed-off-by: Luca Ceresoli --- Changes in v8: none This patch was added in v7. --- drivers/gpu/drm/bridge/samsung-

[PATCH v8 2/5] drm/bridge: add support for refcounting

2025-03-20 Thread Luca Ceresoli
DRM bridges are currently considered as a fixed element of a DRM card, and thus their lifetime is assumed to extend for as long as the card exists. New use cases, such as hot-pluggable hardware with video bridges, require DRM bridges to be added to and removed from a DRM card without tearing the ca

[PATCH v8 4/5] drm/bridge: ti-sn65dsi83: use dynamic lifetime management

2025-03-20 Thread Luca Ceresoli
Allow this bridge to be removable without dangling pointers and use-after-free, together with proper use of drm_bridge_get() and _put() by consumers. Reviewed-by: Maxime Ripard Signed-off-by: Luca Ceresoli --- Changes in v8: none Changes in v7: none Changed in v6: - Update to use devm_drm_bri

[PATCH v8 1/5] drm/bridge: add devm_drm_bridge_alloc()

2025-03-20 Thread Luca Ceresoli
Add a macro to allocate and initialize a DRM bridge embedded within a private driver struct. Compared to current practice, which is based on [devm_]kzalloc() allocation followed by open-coded initialization of fields, this allows to have a common and explicit API to allocate and initialize DRM bri

Re: [PATCH] drm/panel-edp: Add panel used by T14s Gen6 Snapdragon (OLED)

2025-03-20 Thread Doug Anderson
Hi, On Thu, Mar 20, 2025 at 6:47 AM Dmitry Baryshkov wrote: > > On Thu, Mar 20, 2025 at 12:47:09PM +, Christopher Obbard wrote: > > The Lenovo Thinkpad T14s Gen6 Snapdragon OLED model has a Samsung > > panel. The kernel currently prints a warning due to not having the > > correct timings. > >

[PATCH v10 1/5] drm/xe/xe_gt_pagefault: Disallow writes to read-only VMAs

2025-03-20 Thread Jonathan Cavitt
The page fault handler should reject write/atomic access to read only VMAs. Add code to handle this in handle_pagefault after the VMA lookup. Fixes: 3d420e9fa848 ("drm/xe: Rework GPU page fault handling") Signed-off-by: Jonathan Cavitt Suggested-by: Matthew Brost --- drivers/gpu/drm/xe/xe_gt_p

[PATCH v4 01/18] dt-bindings: gpu: img: Future-proofing enhancements

2025-03-20 Thread Matt Coster
The first compatible strings added for the AXE-1-16M are not sufficient to accurately describe all the IMG Rogue GPUs. The current "img,img-axe" string refers to the entire family of Series AXE GPUs, but this is primarily a marketing term and does not denote a level of hardware similarity any great

[PATCH v2 1/3] arm64: dts: qcom: sa8775p: add GPDSP fastrpc-compute-cb nodes

2025-03-20 Thread Ling Xu
Add GPDSP0 and GPDSP1 fastrpc compute-cb nodes for sa8775p SoC. Signed-off-by: Ling Xu --- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 58 +++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi index 5

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-03-20 Thread Dmitry Baryshkov
On Thu, Mar 20, 2025 at 07:19:31PM +0530, Ekansh Gupta wrote: > > > On 1/29/2025 4:10 PM, Dmitry Baryshkov wrote: > > On Wed, Jan 29, 2025 at 11:12:16AM +0530, Ekansh Gupta wrote: > >> > >> > >> On 1/29/2025 4:59 AM, Dmitry Baryshkov wrote: > >>> On Mon, Jan 27, 2025 at 10:12:38AM +0530, Ekansh G

RE: [PATCH v8 6/6] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl

2025-03-20 Thread Cavitt, Jonathan
-Original Message- From: Zhang, Jianxun Sent: Wednesday, March 19, 2025 4:58 PM To: Cavitt, Jonathan ; intel...@lists.freedesktop.org Cc: Gupta, saurabhg ; Zuo, Alex ; joonas.lahti...@linux.intel.com; Brost, Matthew ; Lin, Shuicheng ; dri-devel@lists.freedesktop.org; Wajdeczko, Michal

Re: [PATCH] drm/amd/pm/smu11: Prevent division by zero

2025-03-20 Thread Alex Deucher
On Thu, Mar 20, 2025 at 9:11 AM Denis Arefev wrote: > > The user can set any speed value. > If speed is greater than UINT_MAX/8, division by zero is possible. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: 1e866f1fe528 ("drm/amd/pm: Prevent divide by zero") > Sign

[PATCH RFC v3 3/7] gpu: nova-core: derive useful traits for Chipset

2025-03-20 Thread Alexandre Courbot
We will commonly need to compare chipset versions, so derive the ordering traits to make that possible. Also derive Copy and Clone since Chipsets are as cheap as an integer. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/gpu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver

2025-03-20 Thread Ekansh Gupta
On 1/29/2025 4:10 PM, Dmitry Baryshkov wrote: > On Wed, Jan 29, 2025 at 11:12:16AM +0530, Ekansh Gupta wrote: >> >> >> On 1/29/2025 4:59 AM, Dmitry Baryshkov wrote: >>> On Mon, Jan 27, 2025 at 10:12:38AM +0530, Ekansh Gupta wrote: For any remote call to DSP, after sending an invocation mess

  1   2   >