[PATCH 17/63] dyndbg: check DYNDBG_CLASSMAP_DEFINE args at compile-time

2025-01-24 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 12/63] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap

2025-01-24 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 --- lib/dynamic_debug.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-

RE: [PATCH v3 2/5] drm/plane: Expose function to create format/modifier blob

2025-01-24 Thread Murthy, Arun R
> On Thu, Jan 23, 2025 at 07:47:14AM +, Murthy, Arun R wrote: > > > > On Wed, Jan 08, 2025 at 11:09:00AM +0530, Arun R Murthy wrote: > > > > > Expose drm plane function to create formats/modifiers blob. This > > > > > function can be used to expose list of supported > > > > > formats/modifiers

[PATCH 16/63] dyndbg-API: replace DECLARE_DYNDBG_CLASSMAP

2025-01-24 Thread Jim Cromie
DECLARE_DYNDBG_CLASSMAP() has a design error; its usage fails a basic K&R rule: "define once, refer many times". It is used across DRM core & drivers, each use re-defines the classmap understood by that module; and all must match for the modules to respond together when DRM.debug categories are en

[PATCH 43/63] drm-print: fix config-dependent unused variable

2025-01-24 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 18/63] dyndbg: add/use for_subvec() to reduce boilerplate

2025-01-24 Thread Jim Cromie
add for_subvec() macro to encapsulate a for-loop pattern thats used repeatedly to iterate over a boxed.vector of N elements. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/lib/dynamic_debug.c b

[PATCH 58/63] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver

2025-01-24 Thread Jim Cromie
The udl 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/udl/udl_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/udl/udl_main.

[PATCH 60/63] drm-dyndbg: add DRM_CLASSMAP_USE to the gud driver

2025-01-24 Thread Jim Cromie
The gud 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/gud/gud_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gud/gud_drv.c

[PATCH 62/63] drm-dyndbg: add DRM_CLASSMAP_USE to the drm_gem_shmem_helper driver

2025-01-24 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

[PATCH 56/63] drm-dyndbg: add DRM_CLASSMAP_USE to vmwgfx driver

2025-01-24 Thread Jim Cromie
The vmwgfx 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/vmwgfx/vmwgfx_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vmwgf

[PATCH 22/63] dyndbg: rework ddebug_attach_*module_classes()

2025-01-24 Thread Jim Cromie
These 2 fns both start with a codeblock which cleans up the classmaps arrays, finding the few that pertain to the module being added. Reduce this repetition to a macro: dd_mark_vector_subrange() and call it 2x. This macro finds the matching-on-modname subrange of a linker ordered array of builtin

[PATCH 54/63] drm-dyndbg: add DRM_CLASSMAP_USE to gma500 driver

2025-01-24 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 64/64] This series fixes dyndbg (dynamic debug) classmap support for DRM.

2025-01-24 Thread Jim Cromie
Despite a few latent flaws (1-3 below), classmaps-v1 went in with: ee7d633f2dfb drm-print.h: include dyndbg header 84ec67288c10 drm_print: wrap drm_*_dbg in dyndbg descriptor factory macro e820f52577b1 drm_print: interpose drm_*dbg with forwarding macros f158936b60a7 drm: POC drm on dyndbg - use i

[PATCH 57/63] drm-dyndbg: add DRM_CLASSMAP_USE to vkms driver

2025-01-24 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 53/63] drm-dyndbg: add DRM_CLASSMAP_USE to etnaviv

2025-01-24 Thread Jim Cromie
etnaviv has 5 DRM_UT_CORE debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs as well as plain-old pr_debug()s Signed-off-by: Jim Cromie --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --g

[PATCH 63/63] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2025-01-24 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 45/63] drm-dyndbg: DRM_CLASSMAP_USE in i915 driver

2025-01-24 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 59/63] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver

2025-01-24 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 55/63] drm-dyndbg: add DRM_CLASSMAP_USE to radeon

2025-01-24 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

[PATCH 61/63] drm-dyndbg: add DRM_CLASSMAP_USE to the qxl driver

2025-01-24 Thread Jim Cromie
The qxl 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/qxl/qxl_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c

[PATCH 48/63] drm-dyndbg: DRM_CLASSMAP_USE in nouveau

2025-01-24 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 50/63] drm-dyndbg: add DRM_CLASSMAP_USE to virtio_gpu

2025-01-24 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 46/63] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper

2025-01-24 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 49/63] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver

2025-01-24 Thread Jim Cromie
Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this tells dydnbg that Xe uses has drm.debug calls. Signed-off-by: Jim Cromie --- drivers/gpu/drm/xe/xe_drm_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_drm_clie

[PATCH 35/63] selftests-dyndbg: add test_mod_submod

2025-01-24 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 42/63] drm-dyndbg: adapt DRM to invoke DYNDBG_CLASSMAP_PARAM

2025-01-24 Thread Jim Cromie
Invoke DYNDBG_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 DYNDBG_CLASSMAP_* when DRM_USE_DYNAMIC_DEBUG=y is configured. Signed-off-by: Jim Cromie --- drivers/gpu/dr

[PATCH 52/63] drm-dyndbg: add DRM_CLASSMAP_USE to bochs

2025-01-24 Thread Jim Cromie
tiny/bochs has 5 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/tiny/bochs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tiny/bochs.c b/drive

[PATCH 51/63] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm

2025-01-24 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 20/63] dyndbg: drop premature optimization in ddebug_add_module

2025-01-24 Thread Jim Cromie
The class_ct var was added to avoid 2 function calls, but to do this it loops over all the module's debug callsites to determine the count. But it doesn't really help, so remove it. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-)

[PATCH 44/63] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver

2025-01-24 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 28/63] dyndbg-API: promote DYNDBG_CLASSMAP_PARAM to API

2025-01-24 Thread Jim Cromie
move the DYNDBG_CLASSMAP_PARAM macro from test-dynamic-debug.c into the header, and refine it, by distinguishing the 2 use cases: 1.DYNDBG_CLASSMAP_PARAM_REF for DRM, to pass in extern __drm_debug by name. dyndbg keeps bits in it, so drm can still use it as before 2.DYNDBG_CLASSMAP_PARAM

[PATCH 31/63] selftests-dyndbg: add comma_terminator_tests

2025-01-24 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 47/63] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper

2025-01-24 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 41/63] drm-dyndbg: adapt drm core to use dyndbg classmaps-v2

2025-01-24 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 40/63] checkpatch: dont warn about unused macro arg on empty body

2025-01-24 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 25/63] ddebug: cleanup-range-overlap fails

2025-01-24 Thread Jim Cromie
add cleanup block, to handle kfree before dt is added to list. Once dt is on-list, do ddebug_remove_module to cleanup. tbd. review some more. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/li

[PATCH 36/63] docs/dyndbg: explain flags parse 1st

2025-01-24 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. Signed-of

[PATCH 32/63] dyndbg: split multi-query strings with %

2025-01-24 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 39/63] drm: use correct ccflags-y spelling

2025-01-24 Thread Jim Cromie
Incorrectly spelled CFLAGS- failed to add -DDYNAMIC_DEBUG_MODULE, which disabled dynamic-debug in modules built with: CONFIG_DYNAMIC_DEBUG=n # 1 CONFIG_DYNAMIC_DEBUG_CORE=y # 2 CONFIG_DRM_USE_DYNAMIC_DEBUG=y # 3 NB: this adds the flag (when 3) more often than strictly needed; module

[PATCH 37/63] dyndbg: change __dynamic_func_call_cls* macros into expressions

2025-01-24 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 33/63] selftests-dyndbg: test_percent_splitting

2025-01-24 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 38/63] dyndbg: drop "protection" of class'd pr_debugs from legacy queries

2025-01-24 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 34/63] docs/dyndbg: explain new delimiters: comma, percent

2025-01-24 Thread Jim Cromie
Add mention of comma and percent delimiters into the respective paragraphs describing their equivalents: space and newline. Signed-off-by: Jim Cromie --- .../admin-guide/dynamic-debug-howto.rst | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Documen

[PATCH 30/63] dyndbg: treat comma as a token separator

2025-01-24 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 26/63] dyndbg-test: change do_prints testpoint to accept a loopct

2025-01-24 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 printks. This will make it easy to assess the cost of the prefixing. NB: the count is an unsigned int, and is *

[PATCH 27/63] selftests-dyndbg: add tools/testing/selftests/dynamic_debug/*

2025-01-24 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 modifies pr_debug flags in module params, w

[PATCH 29/63] dyndbg-doc: add classmap info to howto

2025-01-24 Thread Jim Cromie
Describe the 3 API macros providing dynamic_debug's classmaps DYNDBG_CLASSMAP_DEFINE - create, exports a module's classmap DYNDBG_CLASSMAP_USE- refer to exported map DYNDBG_CLASSMAP_PARAM - bind control param to the classmap DYNDBG_CLASSMAP_PARAM_REF + use module's storage - __drm_debug cc:

[PATCH 23/63] dyndbg: fail modprobe on ddebug_class_range_overlap()

2025-01-24 Thread Jim Cromie
1. All classes used by a module (declared DYNDBG_CLASSMAP_{DEFINE,USE} by module code) must share 0..62 class-id space; ie their respective base,+length reservations shouldn't overlap. Overlaps would lead to unintended changes in ddebug enablements. Detecting these class-id range overlaps at comp

[PATCH 11/63] dyndbg: tighten ddebug_class_name() 1st arg type

2025-01-24 Thread Jim Cromie
Change function's 1st arg-type, and deref in the caller. The fn doesn't need any other fields in the struct. no functional change. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_d

[PATCH 21/63] dyndbg: allow ddebug_add_module to fail

2025-01-24 Thread Jim Cromie
To prep for failing modprobe on classid conflicts, upgrade the call-chain around ddebug_add_module(), in 2 ways: 1. in ddebug_add_module() add local reserved_ids to accumulate reservations, pass it by ref to ddebug_attach_{,user_}module_classes() so they can examine the reservations as they work.

[PATCH 24/63] dyndbg: hoist the range-overlap checks

2025-01-24 Thread Jim Cromie
hoist the classmaps range-check up to ddebug_add_module() from ddebug_module_apply_class*(). THis puts both copies of the task together, with the other semi-init work. this allows ddebug_module_apply_class*() to revert back to void return, but doesn't do that yet. this is a candidate for squashi

[PATCH 19/63] dyndbg: make proper substructs in _ddebug_info

2025-01-24 Thread Jim Cromie
struct _ddebug_info's jobs is to enapsulate the __sections of dyndbg data from the linker. The data started as a single pair of fields: descs - ref'g an array of descriptors & num_descs - counting the "pertinent" descriptors. Then classes & num_classes were added, and _ddebug_info was invented to

[PATCH 10/63] dyndbg: silence debugs with no-change updates

2025-01-24 Thread Jim Cromie
In ddebug_apply_class_bitmap(), check for actual changes to the bits before announcing them, to declutter logs. no functional change. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dyna

[PATCH 13/63] dyndbg: reduce verbose=3 messages in ddebug_add_module

2025-01-24 Thread Jim Cromie
When modprobing a module, dyndbg currently logs/says "add-module", and then "skipping" if the module has no prdbgs. Instead just check 1st and return quietly. no functional change Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) di

[PATCH 15/63] checkpatch: add an exception to the do-while wrapper advice

2025-01-24 Thread Jim Cromie
Several new DYNDBG_CLASSMAP_* macros (added in following commits) expand to multi-statement declarations, like module_param_named does. They are invoked in file-scope, not in function scope, and cannot be wrapped by a do-while, so add an exception by name for them. cc: Andy Whitcroft cc: Joe Perc

[PATCH 14/63] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code

2025-01-24 Thread Jim Cromie
Remove the NAMED class types; 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 anyone else, so reduce test-surfac

[PATCH 05/63] dyndbg: replace classmap list with a vector

2025-01-24 Thread Jim Cromie
Classmaps are stored in an elf section/array, but are individually list-linked onto dyndbg's per-module ddebug_table for operation. This is unnecessary; even when ddebug_attach_classmap() is handling the builtin section (with classmaps for multiple builtin modules), its contents are ordered, so a

[PATCH 02/63] test-dyndbg: fixup CLASSMAP usage error

2025-01-24 Thread Jim Cromie
A more careful reading of logging output from test_dynamic_debug.ko reveals: lib/test_dynamic_debug.c:103 [test_dynamic_debug]do_cats =pmf "doing categories\n" 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]do_ca

[PATCH 03/63] dyndbg: reword "class unknown," to "class:_UNKNOWN_"

2025-01-24 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 06/63] dyndbg: ddebug_apply_class_bitmap - add module arg, select on it

2025-01-24 Thread Jim Cromie
Add param: query_module to ddebug_apply_class_bitmap(), and pass it thru to _ddebug_queries(), replacing NULL with query_module. This allows its caller to update just one module, or all (as currently). We'll use this later to propagate drm.debug to each USEr as they're modprobed. No functional c

[PATCH 07/63] dyndbg: split param_set_dyndbg_classes to _module & wrapper fns

2025-01-24 Thread Jim Cromie
Split api-fn: param_set_dyndbg_classes(), adding modname param and passing NULL in from api-fn. The new arg allows caller to specify that only one module is affected by a prdbgs update. This selectivity will be used later to narrow the scope of changes made. no functional change. Signed-off-by:

[PATCH 08/63] dyndbg: drop NUM_TYPE_ARRAY

2025-01-24 Thread Jim Cromie
ARRAY_SIZE works here, since array decl is complete. no functional change Signed-off-by: Jim Cromie --- 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 index 2b0057058ecf..e458d4b8

[PATCH 09/63] dyndbg: reduce verbose/debug clutter

2025-01-24 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 01/63] docs/dyndbg: update examples \012 to \n

2025-01-24 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 --- Documentation/admin-guide/dynamic-debug-howto.rst | 10 +- 1 file ch

[PATCH 04/63] dyndbg: make ddebug_class_param union members same size

2025-01-24 Thread Jim Cromie
struct ddebug_class_param keeps a ref to the state-storage of the param; make both class-types use the same unsigned long storage type. ISTM this is simpler and safer; it avoids an irrelevant difference, and if 2 users somehow get class-type mixed up (or refer to the wrong union member), at least

[PATCH 00/63] Fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2025-01-24 Thread Jim Cromie
This series fixes dynamic-debug's support for DRM debug-categories. Classmaps-v1 evaded full review, and got committed in 2 chunks: b7b4eebdba7b..6ea3bf466ac6# core dyndbg changes 0406faf25fb1..ee7d633f2dfb# drm adoption DRM-CI found a regression during init with drm.debug=; the stati

Re: [PATCH v6 12/14] drm/edp-panel: Add LG Display panel model LP079QX1-SP0V

2025-01-24 Thread Damon Ding
Hi Doug, On 2025/1/24 8:30, Doug Anderson wrote: Hi, On Thu, Jan 23, 2025 at 3:31 AM Dmitry Baryshkov wrote: On Thu, Jan 23, 2025 at 06:07:45PM +0800, Damon Ding wrote: The raw edid for LP079QX1-SP0V panel model is: 00 ff ff ff ff ff ff 00 16 83 00 00 00 00 00 00 04 17 01 00 a5 10 0c 78 06

Re:Re:[PATCH 2/5] drm/rockchip: stop passing non struct drm_device to drm_err() and friends

2025-01-24 Thread Andy Yan
在 2025-01-24 19:43:07,"Jani Nikula" 写道: >On Fri, 24 Jan 2025, "Andy Yan" wrote: >> Hi, >> >> At 2025-01-23 23:09:09, "Jani Nikula" wrote: >>>The expectation is that the struct drm_device based logging helpers get >>>passed an actual struct drm_device pointer rather than some random >>>struct p

Re: [PATCH v6 14/14] arm64: dts: rockchip: Enable eDP0 display on RK3588S EVB1 board

2025-01-24 Thread Damon Ding
Hi Dmitry, On 2025/1/23 19:32, Dmitry Baryshkov wrote: On Thu, Jan 23, 2025 at 06:07:47PM +0800, Damon Ding wrote: Add the necessary DT changes to enable eDP0 on RK3588S EVB1 board: - Set pinctrl of pwm12 for backlight - Enable edp0/hdptxphy0/vp2 - Assign the parent of DCLK_VOP2_SRC to PLL_V0PL

Re: [PATCH v6 12/14] drm/edp-panel: Add LG Display panel model LP079QX1-SP0V

2025-01-24 Thread Damon Ding
Hi Dmitry, On 2025/1/23 19:31, Dmitry Baryshkov wrote: On Thu, Jan 23, 2025 at 06:07:45PM +0800, Damon Ding wrote: The raw edid for LP079QX1-SP0V panel model is: 00 ff ff ff ff ff ff 00 16 83 00 00 00 00 00 00 04 17 01 00 a5 10 0c 78 06 ef 05 a3 54 4c 99 26 0f 50 54 00 00 00 01 01 01 01 01 01

Re: [PATCH 18/35] drm/msm/dpu: get rid of DPU_PINGPONG_DSC

2025-01-24 Thread Dmitry Baryshkov
On Fri, Jan 24, 2025 at 04:08:17PM -0800, Abhinav Kumar wrote: > > > On 1/23/2025 9:19 PM, Dmitry Baryshkov wrote: > > On Thu, Jan 23, 2025 at 01:41:14PM -0800, Abhinav Kumar wrote: > > > > > > > > > On 1/23/2025 1:32 PM, Abhinav Kumar wrote: > > > > > > > > > > > > On 12/13/2024 2:14 PM, Dmi

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

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

[PATCH] drm/i915: Remove unused live_context_for_engine

2025-01-24 Thread linux
From: "Dr. David Alan Gilbert" The last use of live_context_for_engine() was removed in 2021 by commit 99919be74aa3 ("drm/i915/gem: Zap the i915_gem_object_blt code") Remove it. Signed-off-by: Dr. David Alan Gilbert --- .../gpu/drm/i915/gem/selftests/mock_context.c | 38 --- .

Re: [PATCH] drm/kmb: Remove unused const and defines

2025-01-24 Thread Dr. David Alan Gilbert
Note Edmund's address doesn't work: ---> A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: edmund.j@intel.com host mgamail.eglb.intel.com [192.198.163.19] SMTP error from remote mail server a

[PATCH] drm/kmb: Remove unused const and defines

2025-01-24 Thread linux
From: "Dr. David Alan Gilbert" layer_irqs[] was added in 2020 as part of commit 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") but isn't used. Remove it. It was the only user of the LCD_INT_VL0, LCD_INT_VL1, LCD_INT_GL0 and LCD_INT_GL1 defines. Remove them. commit c026565fe9be ("dr

Re: [PATCH 18/35] drm/msm/dpu: get rid of DPU_PINGPONG_DSC

2025-01-24 Thread Abhinav Kumar
On 1/23/2025 9:19 PM, Dmitry Baryshkov wrote: On Thu, Jan 23, 2025 at 01:41:14PM -0800, Abhinav Kumar wrote: On 1/23/2025 1:32 PM, Abhinav Kumar wrote: On 12/13/2024 2:14 PM, Dmitry Baryshkov wrote: Continue migration to the MDSS-revision based checks and replace DPU_PINGPONG_DSC featur

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

2025-01-24 Thread Dmitry Osipenko
On 1/25/25 01:58, Sasha Finkelstein wrote: > On Fri, 24 Jan 2025 at 23:52, Dmitry Osipenko > wrote: >>> - ret = drm_mm_insert_node(&vgdev->host_visible_mm, &vram->vram_node, >>> - bo->base.base.size); >>> + ret = drm_mm_insert_node_generic(&vgdev->host_visible_

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

2025-01-24 Thread Sasha Finkelstein
On Fri, 24 Jan 2025 at 23:52, Dmitry Osipenko wrote: > > - ret = drm_mm_insert_node(&vgdev->host_visible_mm, &vram->vram_node, > > - bo->base.base.size); > > + ret = drm_mm_insert_node_generic(&vgdev->host_visible_mm, > > &vram->vram_node, > > +

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

2025-01-24 Thread Dmitry Osipenko
On 1/25/25 01:01, Sasha Finkelstein via B4 Relay wrote: > From: Sasha Finkelstein > > This allows running different page sizes between host and guest on > platforms that support mixed page sizes. > > Signed-off-by: Sasha Finkelstein > --- > drivers/gpu/drm/virtio/virtgpu_vram.c | 10 --

[PATCH v6 3/7] drm/msm/hdmi: make use of the drm_connector_hdmi framework

2025-01-24 Thread Dmitry Baryshkov
Setup the HDMI connector on the MSM HDMI outputs. Make use of atomic_check hook and of the provided Infoframe infrastructure. Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Kconfig| 2 + drivers/gpu/drm/msm/hdmi/hdmi.c| 45 ++--- drive

[PATCH v6 0/7] drm/msm: make use of the HDMI connector infrastructure

2025-01-24 Thread Dmitry Baryshkov
This patchset sits on top Maxime's HDMI connector patchset ([1]). Currently this is an RFC exploring the interface between HDMI bridges and HDMI connector code. This has been lightly verified on the Qualcomm DB820c, which has native HDMI output. If this approach is considered to be acceptable, I'l

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

2025-01-24 Thread Sasha Finkelstein via B4 Relay
From: Sasha Finkelstein This allows running different page sizes between host and guest on platforms that support mixed page sizes. Signed-off-by: Sasha Finkelstein --- drivers/gpu/drm/virtio/virtgpu_vram.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH v6 6/7] drm/msm/hdmi: also send the SPD and HDMI Vendor Specific InfoFrames

2025-01-24 Thread Dmitry Baryshkov
Extend the driver to send SPD and HDMI Vendor Specific InfoFrames. While the HDMI block has special block to send HVS InfoFrame, use GENERIC0 block instead. VENSPEC_INFO registers pack frame data in a way that requires manual repacking in the driver, while GENERIC0 doesn't have such format require

[PATCH v6 7/7] drm/msm/hdmi: use DRM HDMI Audio framework

2025-01-24 Thread Dmitry Baryshkov
In order to simplify the driver even further and to remove the boilerplate code, rewrite the audio interface to use the DRM HDMI Audio framework. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c| 91 -- drivers/gpu/drm/msm/hdmi/hdmi.h

[PATCH v6 4/7] drm/msm/hdmi: get rid of hdmi_mode

2025-01-24 Thread Dmitry Baryshkov
Use connector->display_info.is_hdmi instead of manually using drm_detect_hdmi_monitor(). Acked-by: Maxime Ripard Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c| 2 +- drivers/gpu/drm/msm/hdmi/hdmi.h| 2 -- drivers/gpu/drm/msm/hd

[PATCH v6 5/7] drm/msm/hdmi: update HDMI_GEN_PKT_CTRL_GENERIC0_UPDATE definition

2025-01-24 Thread Dmitry Baryshkov
The GENERIC0_UPDATE field is a single bit. Redefine it as boolean to simplify its usage in the driver. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/registers/display/hdmi.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/dr

[PATCH v6 2/7] drm/msm/hdmi: program HDMI timings during atomic_pre_enable

2025-01-24 Thread Dmitry Baryshkov
The mode_set callback is deprecated, it doesn't get the drm_bridge_state, just mode-related argumetns. Also Abhinav pointed out that HDMI timings should be programmed after setting up HDMI PHY and PLL. Rework the code to program HDMI timings at the end of atomic_pre_enable(). Signed-off-by: Dmitry

[PATCH v6 1/7] drm/msm/hdmi: switch to atomic bridge callbacks

2025-01-24 Thread Dmitry Baryshkov
Change MSM HDMI bridge to use atomic_* callbacks in preparation to enablign the HDMI connector support. Acked-by: Maxime Ripard Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 13 + 1 file changed, 9 insertions(+), 4 deletions

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

2025-01-24 Thread Zack Rusin
On Fri, Jan 24, 2025 at 11:48 AM Ian Forbes wrote: > > On Tue, Jan 14, 2025 at 10:50 PM Zack Rusin wrote: > > > > +int vmw_cursor_plane_prepare_fb(struct drm_plane *plane, > > + struct drm_plane_state *new_state) > > +{ > > + struct drm_framebuffer *fb = new_st

Re: [PATCH v2] drm/panel: samsung-s6e88a0-ams452ef01: transition to mipi_dsi wrapped functions

2025-01-24 Thread Doug Anderson
Hi, On Tue, Jan 21, 2025 at 7:11 PM Tejas Vipin wrote: > > Changes the samsung-s6e88a0-ams452ef01 panel to use multi style functions > for improved error handling. > > Reviewed-by: Douglas Anderson > Signed-off-by: Tejas Vipin > --- > Changes in v2: > - changed s6e88a0_ams452ef01_off to ret

Re: [PATCH] drm/virtio: Support partial maps of GEM objects

2025-01-24 Thread Dmitry Osipenko
On 1/19/25 23:23, Dmitry Osipenko wrote: > On 1/19/25 23:02, Dmitry Osipenko wrote: >> On 1/19/25 19:18, Sasha Finkelstein wrote: >>> On Sun, 19 Jan 2025 at 12:50, Dmitry Osipenko >>> wrote: > ret = io_remap_pfn_range(vma, vma->vm_start, > - vram->vram_no

Re: [PATCH v2 0/5] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2025-01-24 Thread Leonardo Brás
On Fri, 2025-01-24 at 10:45 -0500, Nicolas Dufresne wrote: > Le vendredi 24 janvier 2025 à 15:00 +0200, Laurent Pinchart a écrit : > > On Fri, Jan 24, 2025 at 01:52:03PM +0100, Mauro Carvalho Chehab wrote: > > > Em Fri, 24 Jan 2025 10:12:50 +0200 Laurent Pinchart escreveu: > > > > > > > > It's bee

Re: [PATCH v2 0/5] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2025-01-24 Thread Leonardo Brás
On Fri, 2025-01-24 at 13:52 +0100, Mauro Carvalho Chehab wrote: > Em Fri, 24 Jan 2025 10:12:50 +0200 > Laurent Pinchart escreveu: > > > > It's been a few years since I first thought on finding a good way of > > > helping > > > kernel developers testing their patches, while making use of the free

Re: [GIT PULL] fbdev fixes and cleanups for v6.14-rc1

2025-01-24 Thread pr-tracker-bot
The pull request you sent on Thu, 23 Jan 2025 17:36:17 +0100: > http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git > tags/fbdev-for-6.14-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/ac0761d8d8315759562a3b85120d482cedf44328 Thank you! -- Dee

RE: [PATCH v2 0/5] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2025-01-24 Thread Bird, Tim
> -Original Message- > From: Helen Mae Koike Fornazier > Hi Mauro, > > On Fri, 24 Jan 2025 12:29:16 -0300 Mauro Carvalho Chehab wrote --- > > > Em Fri, 24 Jan 2025 09:26:33 -0500 > > Nicolas Dufresne nicolas.dufre...@collabora.com> escreveu: > > > > > Hi, > > > > > > Le ve

Re: [PATCH v2 0/5] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2025-01-24 Thread Helen Mae Koike Fornazier
Hi Mauro, On Fri, 24 Jan 2025 12:29:16 -0300 Mauro Carvalho Chehab wrote --- > Em Fri, 24 Jan 2025 09:26:33 -0500 > Nicolas Dufresne nicolas.dufre...@collabora.com> escreveu: > > > Hi, > > > > Le vendredi 24 janvier 2025 à 15:00 +0200, Nikolai Kondrashov a écrit : > > > On 1

[PATCH v1 2/2] nouveau/svm: don't initialize ret in nouveau_atomic_range_fault()

2025-01-24 Thread David Hildenbrand
ret will be modified immediately afterwards. Signed-off-by: David Hildenbrand --- drivers/gpu/drm/nouveau/nouveau_svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c index 8ea98f06d39af..2f8b8b97

[PATCH v1 1/2] nouveau/svm: fix missing folio unlock + put after make_device_exclusive_range()

2025-01-24 Thread David Hildenbrand
In case we have to retry the loop, we are missing to unlock+put the folio. In that case, we will keep failing make_device_exclusive_range() because we cannot grab the folio lock, and even return from the function with the folio locked and referenced, effectively never succeeding the make_device_exc

[PATCH v1 0/2] nouveau/svm: fix + cleanup for nouveau_atomic_range_fault()

2025-01-24 Thread David Hildenbrand
One fix and a minor cleanup. Only compile-tested due to lack of HW, so I'd be happy if someone with access to HW could test. But not sure how easy this is to trigger. Likely some concurrent MADV_DONTNEED on the PTE we just converted might be able to trigger it. Cc: Karol Herbst Cc: Lyude Paul C

Re: [PATCH v5 00/15] drm/msm/dpu: Support quad pipe with dual-DSI

2025-01-24 Thread Jun Nie
Jessica Zhang 于2025年1月23日周四 15:32写道: > > > > On 1/17/2025 8:00 AM, Jun Nie wrote: > > 2 or more SSPPs and dual-DSI interface are need for super wide panel. > > And 4 DSC are preferred for power optimal in this case due to width > > limitation of SSPP and MDP clock rate constrain. This patch set >

  1   2   >