RE: [PATCH 3/3] drm/amdgpu/vcn: Use offsets local to VCN/JPEG in VF

2024-07-17 Thread Jian, Jane
[AMD Official Use Only - AMD Internal Distribution Only] Ping for this series... Thanks, Jane -Original Message- From: Jane Jian Sent: Tuesday, July 16, 2024 4:47 PM To: Lazar, Lijo ; Chang, HaiJun ; Zhao, Victor Cc: amd-gfx@lists.freedesktop.org; Jian, Jane Subject: [PATCH 3/3] drm/a

[PATCH v9-resend 17/54] dyndbg-API: promote DYNDBG_CLASSMAP_PARAM to API

2024-07-17 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 v9-resend 30/54] drm-dyndbg: adapt drm core to use dyndbg classmaps-v2

2024-07-17 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 the classmap when CONFIG_DRM_USE_DYNAMIC_DEBUG=y, for direct reference by drivers. The drivers still use DECLARE_DYNDBG_CLASSMAP for now, so they still r

[PATCH v9-resend 41/54] drm-dyndbg: add DRM_CLASSMAP_USE to bochs

2024-07-17 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 v9-resend 01/54] docs/dyndbg: update examples \012 to \n

2024-07-17 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 v9-resend 49/54] drm-dyndbg: add DRM_CLASSMAP_USE to the gud driver

2024-07-17 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 v9-resend 53/54] dyndbg: tighten up kdoc about DYNDBG_CLASSMAP_* macros

2024-07-17 Thread Jim Cromie
The DYNDBG_CLASSMAP_DEFINE expects a list of classnames, and maps them to consecutive classids starting at _base. That 1- list-of-classnames can be syntactically replaced by a 2- designated-initializers-list/map. But this creates ambiguity. The 1st thing the macro does: static const char *_va

[PATCH v9-resend 11/54] dyndbg: tighten ddebug_class_name() 1st arg type

2024-07-17 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 v9-resend 32/54] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver

2024-07-17 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 v9-resend 50/54] drm-dyndbg: add DRM_CLASSMAP_USE to the qxl driver

2024-07-17 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 v9-resend 48/54] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver

2024-07-17 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 v9-resend 42/54] drm-dyndbg: add DRM_CLASSMAP_USE to etnaviv

2024-07-17 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 v9-resend 00/54] fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2024-07-17 Thread Jim Cromie
resending to fix double-copies of a dozen patches. added 2 squash-ins to address Ville's designated-initializer comment. This fixes dynamic-debug support for DRM.debug, added via classmaps. commit bb2ff6c27bc9 (drm: Disable dynamic debug as broken) CONFIG_DRM_USE_DYNAMIC_DEBUG=y was marked broken

[PATCH v9-resend 43/54] drm-dyndbg: add DRM_CLASSMAP_USE to gma500 driver

2024-07-17 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 v9-resend 12/54] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap

2024-07-17 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(-

[PATCH v9-resend 04/54] dyndbg: make ddebug_class_param union members same size

2024-07-17 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 v9-resend 35/54] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper

2024-07-17 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 v9-resend 13/54] dyndbg: reduce verbose=3 messages in ddebug_add_module

2024-07-17 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 v9-resend 36/54] drm-dyndbg: DRM_CLASSMAP_USE in nouveau

2024-07-17 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 v9-resend 20/54] selftests-dyndbg: add comma_terminator_tests

2024-07-17 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 --- .../selftests/dynamic_debug/dyndbg_selftest.

[PATCH v9-resend 02/54] test-dyndbg: fixup CLASSMAP usage error

2024-07-17 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 v9-resend 06/54] dyndbg: ddebug_apply_class_bitmap - add module arg, select on it

2024-07-17 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 v9-resend 47/54] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver

2024-07-17 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 v9-resend 18/54] dyndbg-doc: add classmap info to howto

2024-07-17 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 v9-resend 26/54] dyndbg: change __dynamic_func_call_cls* macros into expressions

2024-07-17 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 it by changing __dynamic_func_ca

[PATCH v9-resend 27/54] selftests-dyndbg: check KCONFIG_CONFIG to avoid silly fails

2024-07-17 Thread Jim Cromie
Several tests are dependent upon config choices. Lets avoid failing where that is noise. The KCONFIG_CONFIG var exists to convey the config-file around. If the var names a file, read it and extract the relevant CONFIG items, and use them to skip the dependent tests, thus avoiding the fails that w

[PATCH v9-resend 05/54] dyndbg: replace classmap list with a vector

2024-07-17 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 v9-resend 08/54] dyndbg: drop NUM_TYPE_ARRAY

2024-07-17 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 v9-resend 22/54] selftests-dyndbg: test_percent_splitting

2024-07-17 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 v9-resend 34/54] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper

2024-07-17 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 v9-resend 29/54] drm: use correct ccflags-y spelling

2024-07-17 Thread Jim Cromie
Incorrectly spelled CFLAGS- failed to add -DDYNAMIC_DEBUG_MODULE, which broke builds with: CONFIG_DRM_USE_DYNAMIC_DEBUG=y CONFIG_DYNAMIC_DEBUG_CORE=y CONFIG_DYNAMIC_DEBUG=n Also add subdir-ccflags so that all drivers pick up the addition. Fixes: 84ec67288c10 ("drm_print: wrap drm_*_dbg in dyndbg

[PATCH v9-resend 09/54] dyndbg: reduce verbose/debug clutter

2024-07-17 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 v9-resend 33/54] drm-dyndbg: DRM_CLASSMAP_USE in i915 driver

2024-07-17 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 v9-resend 37/54] drm-print: workaround unused variable compiler meh

2024-07-17 Thread Jim Cromie
With CONFIG_DRM_USE_DYNAMIC_DEBUG=y, I'm getting an unused variable warning/error on 'category', though the usage follows immediately, in drm_debug_enabled(). This drops the local var and refs the field directly in the macro-call, which avoids the warning. For static-key optimized dyndbg, the mac

[PATCH v9-resend 07/54] dyndbg: split param_set_dyndbg_classes to _module & wrapper fns

2024-07-17 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 v9-resend 40/54] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm

2024-07-17 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 v9-resend 39/54] drm-dyndbg: add DRM_CLASSMAP_USE to virtio_gpu

2024-07-17 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 v9-resend 51/54] drm-dyndbg: add DRM_CLASSMAP_USE to the drm_gem_shmem_helper driver

2024-07-17 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/driv

[PATCH v9-resend 45/54] drm-dyndbg: add DRM_CLASSMAP_USE to vmwgfx driver

2024-07-17 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 v9-resend 52/54] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2024-07-17 Thread Jim Cromie
end of official submission. Time for some quality CI Signed-off-by: Jim Cromie --- drivers/gpu/drm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index d0aa277fc3bf..c508c0834641 100644 --- a/drivers/gpu/drm/Kconfi

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

2024-07-17 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 v9-resend 16/54] selftests-dyndbg: add tools/testing/selftests/dynamic_debug/*

2024-07-17 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(), it modifies pr_debug flags in a few builtins (ini

[PATCH v9-resend 54/54] docs-dyndbg: improve howto classmaps api section

2024-07-17 Thread Jim Cromie
reword the classmaps-api section to better explain how it supports DRM, and (a little bit) to steer clear of designated-inits in the _DEFINE description. probably just squash this back in Signed-off-by: Jim Cromie --- .../admin-guide/dynamic-debug-howto.rst | 64 +++ 1 fil

[PATCH] drm/amdgpu: fix unbalanced parentheses in a #if0 region

2024-07-17 Thread Masatake YAMATO
Signed-off-by: Masatake YAMATO --- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c index 06d787385ad4..27188dadfbcf 100644 --- a/drivers/gpu/drm/am

[PATCH v9-resend 15/54] dyndbg-API: fix DECLARE_DYNDBG_CLASSMAP

2024-07-17 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 v9-resend 23/54] docs/dyndbg: explain new delimiters: comma, percent

2024-07-17 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| 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Documen

[PATCH v9-resend 25/54] dyndbg-doc: explain flags parse 1st

2024-07-17 Thread Jim Cromie
When writing queries to >control, flags are parsed 1st, since they are the only required field. So if the flags draw an error, then keyword errors aren't reported. This can be mildly confusing/annoying, so explain it instead. This note could be moved up to just after the grammar id's the flags,

[PATCH v9-resend 44/54] drm-dyndbg: add DRM_CLASSMAP_USE to radeon

2024-07-17 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 v9-resend 10/54] dyndbg: silence debugs with no-change updates

2024-07-17 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 v9-resend 19/54] dyndbg: treat comma as a token separator

2024-07-17 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 v9-resend 28/54] dyndbg-selftest: reduce default verbosity

2024-07-17 Thread Jim Cromie
Remove the '-v' arg from the tests in test_mod_submod(). Setting V=1 in the environment turns it back on, for all tests. Signed-off-by: Jim Cromie --- .../dynamic_debug/dyndbg_selftest.sh | 23 +-- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/tes

[PATCH v9-resend 21/54] dyndbg: split multi-query strings with %

2024-07-17 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 v9-resend 24/54] selftests-dyndbg: add test_mod_submod

2024-07-17 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 v9-resend 31/54] drm-dyndbg: adapt DRM to invoke DYNDBG_CLASSMAP_PARAM

2024-07-17 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. Signed-off-by: Jim Cromie --- drivers/gpu/drm/drm_print.c | 8 ++-- include/drm/drm_print.h | 6 -- 2 files changed, 6 insertions(+), 8 deletions(-)

[PATCH v9-resend 03/54] dyndbg: reword "class unknown, " to "class:_UNKNOWN_"

2024-07-17 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 v9-resend 38/54] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver

2024-07-17 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 v9-resend 46/54] drm-dyndbg: add DRM_CLASSMAP_USE to vkms driver

2024-07-17 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 2/3] drm/amdgpu: optimize logging deferred error info

2024-07-17 Thread YiPeng Chai
1. Use pa_pfn as the radix-tree key index to log deferred error info. 2. Use local array to store expanded bad pages. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 14 ++ drivers/gpu/drm/amd/amdgpu/umc_v12_0.c |

[PATCH 3/3] drm/amdgpu: Remove unused code

2024-07-17 Thread YiPeng Chai
Remove unused code. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 29 - drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 10 --- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 86 - drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 5 -- 4 files changed, 1

[PATCH 1/3] drm/amdgpu: optimize umc v12 address conversion function

2024-07-17 Thread YiPeng Chai
Split into 3 parts: 1. Convert soc physical address via ras ta. 2. Expand bad pages from soc physical address. 3. Dump bad address info. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 116 - 1 file changed, 77 insertions(+), 39 deletions(-) diff

Re: [PATCH v5 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-17 Thread Christian König
Well that approach was discussed before and seemed to be to complicated. But I totally agree that the AMDGPU_GEM_CREATE_GFX12_DCC flag is a bad idea. This isn't anything userspace should need to specify in the first place. All we need is a hardware workaround which kicks in all the time while

Re: [PATCH 3/3] drm/amdgpu/vcn: Use offsets local to VCN/JPEG in VF

2024-07-17 Thread Lazar, Lijo
On 7/16/2024 2:17 PM, Jane Jian wrote: > For VCN/JPEG 4.0.3, use only the local addressing scheme. > > - Mask bit higher than AID0 range > > v2 > remain the case for mmhub use master XCC > > Signed-off-by: Jane Jian This patch is Reviewed-by: Lijo Lazar Thanks, Lijo > --- > dri

[PATCH Review 1/1] drm/amdgpu: Fix eeprom max record count

2024-07-17 Thread Stanley . Yang
The eeprom table is empty before initializing, add get eeprom table version function according UMC HWIP version before initializing eeprom table. Signed-off-by: Stanley.Yang --- .../gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c| 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-

RE: [PATCH Review 1/1] drm/amdgpu: Fix eeprom max record count

2024-07-17 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] Shall we reuse amdgpu_ras_set_eeprom_table_version? We need to move the function to the beginning of amdgpu_ras_recovery_init, something like this. Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Stanley.Yang Sent:

RE: [PATCH 1/3] drm/amdgpu: optimize umc v12 address conversion function

2024-07-17 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] +static int umc_v12_0_expand_addr_to_bad_pages(struct amdgpu_device *adev, + uint64_t pa_addr, uint64_t *pfns, int len) I would call this function as lookup_bad_pages_in_a_row, or something like that. Anyway, the seri

Re: [PATCH v2] drm/amd/display: Add null check for dm_state in create_validate_stream_for_sink

2024-07-17 Thread SRINIVASAN SHANMUGAM
I think we can ignore this change, as it already exists in the below commit of asdn. commit b90c2f233397f40c757995b9c00f8c6e380c6913 Author: Alex Hung Date:   Thu Jun 27 17:38:16 2024 -0600 drm/amd/display: Check null pointers before using them On 7/17/2024 8:10 AM, Srinivasan Shanmugam

Re: [PATCH v5 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-17 Thread Paneer Selvam, Arunpravin
Hi Christian, Can we use the below combination flags to kick in hardware workaround while pinning BO's for this specific hw generation. if (place->flags & TTM_PL_FLAG_CONTIGUOUS) && (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(12, 0, 0) || amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSIO

Re: [PATCH v5 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-17 Thread Christian König
As far as I know, yes. Regards, Christian. Am 17.07.24 um 16:38 schrieb Paneer Selvam, Arunpravin: Hi Christian, Can we use the below combination flags to kick in hardware workaround while pinning BO's for this specific hw generation. if (place->flags & TTM_PL_FLAG_CONTIGUOUS) && (amdgpu_ip

Re: [PATCH] drm/buddy: Add start address support to trim function

2024-07-17 Thread Paneer Selvam, Arunpravin
On 7/16/2024 3:34 PM, Matthew Auld wrote: On 16/07/2024 10:50, Paneer Selvam, Arunpravin wrote: Hi Matthew, On 7/10/2024 6:20 PM, Matthew Auld wrote: On 10/07/2024 07:03, Paneer Selvam, Arunpravin wrote: Thanks Alex. Hi Matthew, Any comments? Do we not pass the required address alignmen

Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-17 Thread Felix Kuehling
On 2024-07-15 08:39, Christian König wrote: Hi Felix, yes that is a perfectly expected consequence. The last time we talked about it the problem to solve this was that amdgpu_vm_sdma_prepare() couldn't read the fences from a resv object which wasn't locked. Why only amdgpu_vm_sdma_prepare

Re: [PATCH] drm/edid: add a quirk for two 240Hz Samsung monitors

2024-07-17 Thread Karol Herbst
On Thu, Nov 2, 2023 at 8:06 PM Alex Deucher wrote: > > On Thu, Nov 2, 2023 at 3:00 PM Hamza Mahfooz wrote: > > > > On 11/1/23 17:36, Alex Deucher wrote: > > > On Wed, Nov 1, 2023 at 5:01 PM Hamza Mahfooz > > > wrote: > > >> > > >> Without this fix the 5120x1440@240 timing of these monitors > >

[PATCH 00/22] DC Patches for 15 July, 2024

2024-07-17 Thread Aurabindo Pillai
This DC patchset brings improvements in multiple areas. In summary, we have: * bug fixes for SubVP, DML, SPL, DCCG, and various stability fixes * more reorganization of code into corresponding sub components * renaming certain variables in DML to better reflect their relevance. Cc: Daniel Wheeler

[PATCH 01/22] drm/amd/display: Remove hardmax usage for dcn401

2024-07-17 Thread Aurabindo Pillai
From: Dillon Varone [WHY&HOW] Hardmax message will be retired for dcn4, so this removes it. Reviewed-by: Alvin Lee Signed-off-by: Aurabindo Pillai Signed-off-by: Dillon Varone --- .../dc/clk_mgr/dcn401/dcn401_clk_mgr.c| 44 ++- drivers/gpu/drm/amd/display/dc/core/dc.c

[PATCH 02/22] drm/amd/display: Check for NULL pointer

2024-07-17 Thread Aurabindo Pillai
From: Sung Joon Kim [why & how] Need to make sure plane_state is initialized before accessing its members. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Xi (Alex) Liu Signed-off-by: Aurabindo Pillai Signed-off-by: Sung Joon Kim --- drivers/gpu/drm/amd/displ

[PATCH 03/22] drm/amd/display: Add private data type for RCG

2024-07-17 Thread Aurabindo Pillai
From: Hansen Dsouza [why & how] Add private data types for better RCG control Reviewed-by: Chris Park Reviewed-by: Yihan Zhu Signed-off-by: Aurabindo Pillai Signed-off-by: Hansen Dsouza --- .../amd/display/dc/dccg/dcn35/dcn35_dccg.c| 81 +++ 1 file changed, 81 insertions

[PATCH 04/22] drm/amd/display: Refactoring HPO

2024-07-17 Thread Aurabindo Pillai
From: Revalla Hari Krishna [Why] To refactor HPO files [How] Moved hpo related files to specific hpo folder and update Makefiles. Reviewed-by: Martin Leung Signed-off-by: Aurabindo Pillai Signed-off-by: Revalla Hari Krishna --- drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 2 -- driv

[PATCH 05/22] drm/amd/display: Remove ASSERT if significance is zero in math_ceil2

2024-07-17 Thread Aurabindo Pillai
From: Rodrigo Siqueira In the DML math_ceil2 function, there is one ASSERT if the significance is equal to zero. However, significance might be equal to zero sometimes, and this is not an issue for a ceil function, but the current ASSERT will trigger warnings in those cases. This commit removes t

[PATCH 06/22] drm/amd/display: Add RCG helper functions

2024-07-17 Thread Aurabindo Pillai
From: Hansen Dsouza [why & how] Add standard RCG helpers based on DCCG spec Reviewed-by: Daniel Miess Reviewed-by: Muhammad Ahmed Signed-off-by: Aurabindo Pillai Signed-off-by: Hansen Dsouza --- .../amd/display/dc/dccg/dcn35/dcn35_dccg.c| 307 ++ 1 file changed, 307 inse

[PATCH 08/22] drm/amd/display: ensure EASF and ISHARP coefficients are programmed together

2024-07-17 Thread Aurabindo Pillai
From: Samson Tam [Why] EASF coefficients are programmed to RAM and then RAM selector is toggled. ISHARP coefficients are programmed after so they will not be in the same RAM block [How] Move ISHARP programming before EASF programming Add flag if ISHARP coefficients are updated. If so, then f

[PATCH 07/22] drm/amd/display: Fix visual confirm bug for SubVP

2024-07-17 Thread Aurabindo Pillai
From: Ryan Seto [Why] Visual confirm was incorrect on dual monitor SubVP setup [How] Adjusted p_state assignment for dual monitor SubVP setup Signed-off-by: Ryan Seto Reviewed-by: Chaitanya Dhere Signed-off-by: Aurabindo Pillai --- .../dc/dml2/dml21/dml21_translation_helper.c | 13

[PATCH 09/22] drm/amd/display: Check if Mode is Supported Before Returning Result

2024-07-17 Thread Aurabindo Pillai
From: Austin Zheng [Why] Even if the mode is not supported dml2_check_mode_supported() would still return true. This causes an unsupported mode to be programmed. [How] Check if the mode is supported or not and return the proper result. Reviewed-by: Chaitanya Dhere Signed-off-by: Aurabindo Pil

[PATCH 10/22] drm/amd/display: Add source select helper functions

2024-07-17 Thread Aurabindo Pillai
From: Hansen Dsouza [why & how] Add source select helpers based on DCCG spec Reviewed-by: Daniel Miess Signed-off-by: Aurabindo Pillai Signed-off-by: Hansen Dsouza --- .../amd/display/dc/dccg/dcn35/dcn35_dccg.c| 324 ++ 1 file changed, 324 insertions(+) diff --git a/driv

[PATCH 11/22] drm/amd/display: rename dcn3/dcn4 to more sound terms

2024-07-17 Thread Aurabindo Pillai
Use more accurate names to refer to the asic architecture. dcn3 in DML actually refers to DCN32 and DCN321, so rename it to dcn32x dcn4 refers to any DCN4x soc., and hence rename dcn4 to dcn4x Reviewed-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai --- ...

[PATCH 12/22] drm/amd/display: rename dcn401_soc to dcn4_variant_a_soc

2024-07-17 Thread Aurabindo Pillai
To distinguish between different soc with same DCN IP, use variants starting with alphabets Reviewed-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai --- .../drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c| 2 +- .../amd/display/dc/dml2/dml21/in

[PATCH 13/22] drm/amd/display: Add helper function to check for non-address fast updates

2024-07-17 Thread Aurabindo Pillai
From: Ilya Bakoulin [Why/How] Need to identify which fast updates will update more than just the address. Reviewed-by: Alvin Lee Signed-off-by: Aurabindo Pillai Signed-off-by: Ilya Bakoulin --- drivers/gpu/drm/amd/display/dc/core/dc.c | 25 +++- drivers/gpu/drm/amd/displa

[PATCH 14/22] drm/amd/display: Fix Potential Null Dereference

2024-07-17 Thread Aurabindo Pillai
From: Gabe Teeger [what & why] System hang after s4 regression points to code change here. Removing possible NULL dereference. Cc: Mario Limonciello Cc: Alex Deucher Cc: sta...@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Signed-off-by: Aurabindo Pillai Signed-off-by: Gabe Teeger --- .

[PATCH 15/22] drm/amd/display: Check top sink only when multiple streams for DP2

2024-07-17 Thread Aurabindo Pillai
From: Sung Joon Kim [why] When switching from extended to second display only mode, the top remote sink is not removed while the top stream itself is released. This causes DML to think there is no DP2 output encoder because top remote sink does not match with the second stream and disables DTBCLK

[PATCH 16/22] drm/amd/display: Add MST debug message when link detection fails

2024-07-17 Thread Aurabindo Pillai
From: Alex Hung [WHY & HOW] dc_link_detect returns a boolean value which can be used to print debug messages when it fails. This fixes 1 CHECKED_RETURN issue reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/

[PATCH 17/22] drm/amd/display: Check link_res->hpo_dp_link_enc before using it

2024-07-17 Thread Aurabindo Pillai
From: Alex Hung [WHAT & HOW] Functions dp_enable_link_phy and dp_disable_link_phy can pass link_res without initializing hpo_dp_link_enc and it is necessary to check for null before dereferencing. This fixes 1 FORWARD_NULL issue reported by Coverity. Fixes: abdcd93214 ("drm/amd/display: Check l

[PATCH 18/22] drm/amd/display: Remove old comments

2024-07-17 Thread Aurabindo Pillai
From: Rodrigo Siqueira Remove some old comments from DCN32/321. Signed-off-by: Rodrigo Siqueira Reviewed-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 4 ++-- 2 files changed, 4 insertions(+),

[PATCH 19/22] drm/amd/display: Various DML2 fixes for FAMS2

2024-07-17 Thread Aurabindo Pillai
From: Dillon Varone The disable fams2 operation was reworked, but some of the old code remained. This commit removes the disable_fams2_drr from the dml2_stream_parameters. Reviewed-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Aurabindo Pillai --- .../amd/display/dc/dml2/d

[PATCH 20/22] drm/amd/display: Remove duplicate HWSS interfaces

2024-07-17 Thread Aurabindo Pillai
From: Joshua Aberback [Why] Some interface functions are defined in both the public and private HWSS interfaces, which can lead to confusion and runtime issues, therefore the duplicates should be eliminated. [How] - power_down should only be private, because it's only used within HWSS. - update_

[PATCH 21/22] drm/amd/display: remove unused folder

2024-07-17 Thread Aurabindo Pillai
dc/{dcn401,dcn303} are unused since the files in it got moved under their respective new components location. Hence they are no longer necessary Fixes: fb17441f8ce4 ("drm/amd/display: Refactor DCN3X into component folder") Signed-off-by: Aurabindo Pillai Reviewed-by: Leo Li --- drivers/gpu/drm/

[PATCH 22/22] drm/amd/display: 3.2.293

2024-07-17 Thread Aurabindo Pillai
From: Aric Cyr Signed-off-by: Aurabindo Pillai Signed-off-by: Aric Cyr --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 272ae1bdc57f..4077c1ddb9c1 100644

Re: [PATCH 2/9] drm/amdkfd: amdkfd_free_gtt_mem clear the correct pointer

2024-07-17 Thread Felix Kuehling
On 2024-07-15 08:34, Philip Yang wrote: Pass pointer reference to amdgpu_bo_unref to clear the correct pointer, otherwise amdgpu_bo_unref clear the local variable, the original pointer not set to NULL, this could cause use-after-free bug. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehli

Re: [PATCH 3/9] drm/amdkfd: Refactor queue wptr_bo GART mapping

2024-07-17 Thread Felix Kuehling
On 2024-07-15 08:34, Philip Yang wrote: Add helper function kfd_queue_acquire_buffers to get queue wptr_bo reference from queue write_ptr if it is mapped to the KFD node with expected size. Move wptr_bo to structure queue_properties from struct queue as queue is allocated after queue buffers a

Re: [PATCH 3/9] drm/amdkfd: Refactor queue wptr_bo GART mapping

2024-07-17 Thread Felix Kuehling
Sorry, I see that this patch still doesn't propagate errors returned from kfd_queue_releasre_buffers correctly. And the later patches in the series don't seem to fix it either. See inline. On 2024-07-15 08:34, Philip Yang wrote: Add helper function kfd_queue_acquire_buffers to get queue wptr_b

Re: [PATCH 6/9] drm/amdkfd: Validate user queue svm memory residency

2024-07-17 Thread Felix Kuehling
On 2024-07-15 08:34, Philip Yang wrote: Queue CWSR area maybe registered to GPU as svm memory, create queue to ensure svm mapped to GPU with KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED flag. Add queue_refcount to struct svm_range, to track queue CWSR area usage. Because unmap mmu notifier callback r

Re: [PATCH 5/9] drm/amdkfd: Ensure user queue buffers residency

2024-07-17 Thread Felix Kuehling
On 2024-07-15 08:34, Philip Yang wrote: Add atomic queue_refcount to struct bo_va, return -EBUSY to fail unmap BO from the GPU if the bo_va queue_refcount is not zero. Create queue to increase the bo_va queue_refcount, destroy queue to decrease the bo_va queue_refcount, to ensure the queue buffe

[PATCH 2/7] drm/amdgpu/gfx8: enable wave kill for compute queues

2024-07-17 Thread Alex Deucher
It should work the same for compute as well as gfx. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index b4658c7db0e1..a1963e6c5cab 100644 ---

  1   2   >