[PATCH 14/18] drm/amdgpu: move si_dma.c away from sid.h and si_enums.h

2025-03-21 Thread Alexandre Demers
Replace defines for the ones in oss_1_0_d.h and oss_1_0_sh_mask.h Taking the opportunity to add some comments taken from cik_sdma.c Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 108 drivers/gpu/drm/amd/amdgpu/sid.h| 36 -- 2

[PATCH 17/18] drm/amdgpu: cleanup DCE6 a bit more

2025-03-21 Thread Alexandre Demers
Use shifts already available in DCE6's defines, masks and shifts. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sid.h | 8 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce

[PATCH 08/18] drm/amdgpu: add missing DMA defines, shifts and masks

2025-03-21 Thread Alexandre Demers
They will be used later when switching away from sid.h/si_enums.h. Signed-off-by: Alexandre Demers --- .../drm/amd/include/asic_reg/oss/oss_1_0_d.h | 21 +++-- .../include/asic_reg/oss/oss_1_0_sh_mask.h| 43 +++ 2 files changed, 61 insertions(+), 3 deletions(-) diff --g

RE: [PATCH] drm/amdkfd: Fix some kfd related recover issues

2025-03-21 Thread Deng, Emily
[AMD Official Use Only - AMD Internal Distribution Only] >-Original Message- >From: Lazar, Lijo >Sent: Friday, March 21, 2025 7:06 PM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdkfd: Fix some kfd related recover issues > > > >On 3/21/2025 4:22 PM, Emily D

[PATCH 09/18] drm/amdgpu: add missing GFX6 defines

2025-03-21 Thread Alexandre Demers
They will be used later when switching away from sid.h/si_enums.h. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h b/drivers/gpu/drm/amd/include/as

[PATCH 13/18] drm/amdgpu: move si.c away from sid.h

2025-03-21 Thread Alexandre Demers
Replace defines by the ones added earlier to GFX6, SMU6 and DCE6 Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si.c | 369 1 file changed, 185 insertions(+), 184 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amd

Re: commit 7ffb791423c7 breaks steam game

2025-03-21 Thread Balbir Singh
On 3/21/25 23:26, Bert Karwatzki wrote: >>> >> >> I am not an expert in amdgpu or gtt_mgr, but I wonder if some of the deletes >> are coming >> from forceful eviction of memory during allocation? >> >> Have you filed a bug report for the nokaslr case? >> >> Balbir Singh > > I did some more monit

[PATCH 02/18] drm/amdgpu: wire up defines, shifts and masks through SI code

2025-03-21 Thread Alexandre Demers
To be able to remove as much duplicated defines, the different files containing definitions, shifts and masks must be properly included. Once done, the code will be migrated where needed to shifts and masks and proper defines, before removing useless defines in the end. Signed-off-by: Alexandre D

[PATCH 00/18] Properly wire defines, shifts and masks in SI and cleanup

2025-03-21 Thread Alexandre Demers
The following series is intented to remove duplicated defines, shifts and masks or to classify them where they belong. si_enums.h has been used as a garbage can for anything and everything when moving SI code from radeon to amdgpu. Where needed, the defines found under sid.h and si_enums.h were

[PATCH 03/18] drm/amdgpu: use proper defines, shifts and masks in DCE6 code

2025-03-21 Thread Alexandre Demers
By replacing VGA_VSTATUS_CNTL by VGA_RENDER_CONTROL__VGA_VSTATUS_CNTL_MASK, we also need to fix its usage in GMC6. Note: VGA_VSTATUS_CNTL's binary value was inverted in dce_6_0_sh_mask.h, so we need to invert its value where it was used. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/a

[PATCH 10/18] drm/amdgpu: add missing SMU6 defines, shifts and masks

2025-03-21 Thread Alexandre Demers
They will be used later when switching away from sid.h/si_enums.h. To prevent redefinition clashes, comment out the ones in sid.h. They will be removed later. Signed-off-by: Alexandre Demers --- .../drm/amd/include/asic_reg/smu/smu_6_0_d.h | 44 .../include/asic_reg/smu/smu_6_0_sh_mask.h

[PATCH 11/18] drm/pm/legacy-dpm: move SI away from sid.h and si_enums.h

2025-03-21 Thread Alexandre Demers
Replace defines for the ones under smu_6_0_d.h and smu_6_0_sh_mask.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 338 +++-- drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 36 +-- 2 files changed, 190 insertions(+), 184 deletions(-) diff --git

[PATCH 05/18] drm/admgpu: move si_ih.c away from sid.h defines

2025-03-21 Thread Alexandre Demers
They are properly defined under oss_1_0_d.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_ih.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c b/drivers/gpu/drm/amd/amdgpu/si_ih.c index 94468c87122a..234

[PATCH 01/18] drm/amdgpu: move GFX6 defines into gfx_v6_0.c

2025-03-21 Thread Alexandre Demers
Send a few GFX6 defines where it's used in GFX6. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/si_enums.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/dr

Re: [PATCH] drm/amdgpu: add UAPI to query if user queues are supported

2025-03-21 Thread Marek Olšák
This is not in device_info, but it'll do. Reviewed-by: Marek Olšák Marek On Mon, Mar 17, 2025 at 5:38 PM Alex Deucher wrote: > Add an INFO query to check if user queues are supported. > > v2: switch to a mask of IPs (Marek) > > Cc: marek.ol...@amd.com > Cc: prike.li...@amd.com > Cc: sunil.kha

[pull] amdgpu, amdkfd, radeon drm-next-6.15

2025-03-21 Thread Alex Deucher
Hi Dave, Simona, Fixes for 6.15. The following changes since commit eb6cdfb807d038d9b9986b5c87188f28a4071eae: drm/amdgpu: Restore uncached behaviour on GFX12 (2025-03-13 23:18:02 -0400) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-nex

Re: [PATCH] drm/amdgpu: add UAPI to query if user queues are supported

2025-03-21 Thread Alex Deucher
I can move it into device_info if that's better. Alex On Fri, Mar 21, 2025 at 3:42 PM Marek Olšák wrote: > > This is not in device_info, but it'll do. > > Reviewed-by: Marek Olšák > > Marek > > On Mon, Mar 17, 2025 at 5:38 PM Alex Deucher > wrote: >> >> Add an INFO query to check if user queu

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

2025-03-21 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]

Re: [PATCH] drm/amdgpu: Increase KIQ invalidate_tlbs timeout

2025-03-21 Thread Jay Cornwall
On 3/21/2025 14:36, Russell, Kent wrote: Do we want to actually do a fence_wait_polling before the loop begins like in all of the other functions? I know 5ms isn't a big deal, but the other ones we have are all after a single fence_wait_polling first. I think the intent of that is to exit ea

[PATCH v2] drm/amd/display: add proper error message for vblank init

2025-03-21 Thread Saleemkhan Jamadar
v1 - DRM_ERROR to dev_err (Mario) Update message to identifiy the vblank initialization fail case Signed-off-by: Saleemkhan Jamadar Reviewed-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver

Re: [PATCH] drm/amd/pm: Update feature list for smu_v13_0_6

2025-03-21 Thread Lazar, Lijo
On 3/21/2025 4:03 PM, Asad Kamal wrote: > Update feature list for smu_v13_0_6 to show vcn & smu deep > sleep feature enable status > > Signed-off-by: Asad Kamal > Reviewed-by: Yang Wang Reviewed-by: Lijo Lazar Thanks, Lijo > --- > drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 6

[PATCH 2/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
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: b64625a303de ("drm/amd/pm: correct the address of Arcturus fan related registers") Signed-off-by: Denis Arefev --- drive

[PATCH] drm/amdgpu: Increase KIQ invalidate_tlbs timeout

2025-03-21 Thread Jay Cornwall
KIQ invalidate_tlbs request has been seen to marginally exceed the configured 100 ms timeout on systems under load. All other KIQ requests in the driver use a 10 second timeout. Use a similar timeout implementation on the invalidate_tlbs path. Signed-off-by: Jay Cornwall Cc: Kent Russell --- d

Re: [PATCH v1 1/3] drm/ci: uprev mesa

2025-03-21 Thread Daniel Stone
Hi Vignesh, On Fri, 14 Mar 2025 at 08:59, Vignesh Raman wrote: > LAVA was recently patched [1] with a fix on how parameters are parsed in > `lava-test-case`, so we don't need to repeat quotes to send the > arguments properly to it. Uprev mesa to fix this issue. Thanks a lot; the series is: Acked

[PATCH 1/5] drm/amdgpu/gfx9: dump full CP packet header FIFOs

2025-03-21 Thread Alex Deucher
In dev core dump, dump the full header fifo for each queue. Each FIFO has 8 entries. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 62 +-- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/dr

[PATCH 1/2] drm/sched: add drm_sched_prealloc_dependency_slots v2

2025-03-21 Thread Christian König
Sometimes drivers need to be able to submit multiple jobs which depend on each other to different schedulers at the same time, but using drm_sched_job_add_dependency() can't fail any more after the first job is initialized. This function preallocate memory for dependency slots so that no ENOMEM ca

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

2025-03-21 Thread Alex Deucher
On Fri, Mar 21, 2025 at 6:53 AM Denis Arefev wrote: > > This series of patches prevents possible division by zero. > > 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. Appli

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

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

Re: commit 7ffb791423c7 breaks steam game

2025-03-21 Thread Bert Karwatzki
> > > > I am not an expert in amdgpu or gtt_mgr, but I wonder if some of the deletes > are coming > from forceful eviction of memory during allocation? > > Have you filed a bug report for the nokaslr case? > > Balbir Singh I did some more monitoring and in the BAD case ttm_global_swapout() is ca

[PATCH 1/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
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: c05d1c401572 ("drm/amd/swsmu: add aldebaran smu13 ip support (v3)") Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/p

[PATCH 0/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
This series of patches prevents possible division by zero. 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. Denis Arefev (5): drm/amd/pm: Prevent division by zero drm/amd/pm

[PATCH 4/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
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: c52dcf49195d ("drm/amd/pp: Avoid divide-by-zero in fan_ctrl_set_fan_speed_rpm") Signed-off-by: Denis Arefev --- drivers/

[PATCH 3/5] drm/amd/pm: Prevent division by zero

2025-03-21 Thread Denis Arefev
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: 031db09017da ("drm/amd/powerplay/vega20: enable fan RPM and pwm settings V2") Signed-off-by: Denis Arefev --- drivers/gp

Re: [PATCH] drm/amd/display: add proper error message for vblank init

2025-03-21 Thread Rodrigo Siqueira
On 03/21, Saleemkhan Jamadar wrote: > Update message to identifiy the vblank initialization fail case > > Signed-off-by: Saleemkhan Jamadar > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/disp

[PATCH] drm/amdgpu: Use correct gfx deferred error count

2025-03-21 Thread Xiang Liu
In the case of parsing GFX deferred error from SMU corrected error channel, the error count should be set to 1 instead of parsing from MISC0 register, which is 0. Signed-off-by: Xiang Liu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) di

Re: [PATCH] drm/amdkfd: Fix some kfd related recover issues

2025-03-21 Thread Lazar, Lijo
On 3/21/2025 4:22 PM, Emily Deng wrote: > It need to check whether kq has been initialized correctly in > kq_acquire_packet_buffer. > Or it will hit memory corruption during recover, as for recover, it will > uninitialize > kq first. > > Need to flush tlb after recover successully, as it mayb

Re: commit 7ffb791423c7 breaks steam game

2025-03-21 Thread Balbir Singh
On 3/21/25 21:24, Ingo Molnar wrote: > > * Balbir Singh wrote: > >> On 3/20/25 20:01, Ingo Molnar wrote: >>> >>> * Balbir Singh wrote: >>> On 3/17/25 00:09, Bert Karwatzki wrote: > This is related to the admgpu.gttsize. My laptop has the maximum amount  > of memory (64G) and usuall

[PATCH] drm/amdkfd: Fix some kfd related recover issues

2025-03-21 Thread Emily Deng
It need to check whether kq has been initialized correctly in kq_acquire_packet_buffer. Or it will hit memory corruption during recover, as for recover, it will uninitialize kq first. Need to flush tlb after recover successully, as it maybe has create bo and map bo during recover. Signed-off-by

[PATCH v2 17/59] dyndbg-API: replace DECLARE_DYNDBG_CLASSMAP

2025-03-21 Thread Jim Cromie
DECLARE_DYNDBG_CLASSMAP() has a design error; its usage fails a basic K&R rule: "define once, refer many times". When DRM_USE_DYNAMIC_DEBUG=y, it is used across DRM core & drivers; each invocation allocates/inits the classmap understood by that module. All must match for the modules to respond to

[PATCH] drm/amd/pm: Update feature list for smu_v13_0_6

2025-03-21 Thread Asad Kamal
Update feature list for smu_v13_0_6 to show vcn & smu deep sleep feature enable status Signed-off-by: Asad Kamal Reviewed-by: Yang Wang --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/

Re: commit 7ffb791423c7 breaks steam game

2025-03-21 Thread Ingo Molnar
* Balbir Singh wrote: > On 3/20/25 20:01, Ingo Molnar wrote: > > > > * Balbir Singh wrote: > > > >> On 3/17/25 00:09, Bert Karwatzki wrote: > >>> This is related to the admgpu.gttsize. My laptop has the maximum amount  > >>> of memory (64G) and usually gttsize is half of main memory size. I

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

2025-03-21 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 18/59] selftests-dyndbg: add tools/testing/selftests/dynamic_debug/*

2025-03-21 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 34/59] checkpatch: dont warn about unused macro arg on empty body

2025-03-21 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 v2 30/59] dyndbg: drop "protection" of class'd pr_debugs from legacy queries

2025-03-21 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 42/59] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper

2025-03-21 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 13/59] dyndbg: add 2 new _DPRINTK_FLAGS_: INCL_LOOKUP, PREFIX_CACHED

2025-03-21 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 56/59] drm-dyndbg: add DRM_CLASSMAP_USE to the qxl driver

2025-03-21 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 v2 00/59] Fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2025-03-21 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 Then DRM-CI found a regression when booting with drm.debug=; the

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

2025-03-21 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 41/59] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper

2025-03-21 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 04/59] dyndbg: reword "class unknown, " to "class:_UNKNOWN_"

2025-03-21 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 26/59] dyndbg: split multi-query strings with %

2025-03-21 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 27/59] selftests-dyndbg: test_percent_splitting

2025-03-21 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 19/59] dyndbg: detect class_id reservation conflicts

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

[PATCH v2 22/59] dyndbg-API: promote DYNAMIC_DEBUG_CLASSMAP_PARAM to API

2025-03-21 Thread Jim Cromie
move the DYNAMIC_DEBUG_CLASSMAP_PARAM macro from test-dynamic-debug.c into the header, and refine it, by distinguishing the 2 use cases: 1.DYNAMIC_DEBUG_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.DYNAMIC_

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

2025-03-21 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 50/59] drm-dyndbg: add DRM_CLASSMAP_USE to radeon

2025-03-21 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 v2 01/59] vmlinux.lds.h: fixup HEADERED_SECTION{,_BY} macros

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

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

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

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

2025-03-21 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 33/59] docs/dyndbg: add classmap info to howto (TBD)

2025-03-21 Thread Jim Cromie
Describe the 3 API macros providing dynamic_debug's classmaps DYNDBG_CLASSMAP_DEFINE - create & export a 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 TBD: some of

Re: [PATCH] drm/amdgpu: Add parameter documentation for amdgpu_sync_fence

2025-03-21 Thread Christian König
Am 21.03.25 um 02:25 schrieb Srinivasan Shanmugam: > The 'flags' parameter, which specifies memory allocation behavior while > creating a sync entry, > > Fixes the below with gcc W=1: > drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c:162: warning: Function parameter or > struct member 'flags' not describ