Re: [PATCH 0/5] drm/amd/display: Reduce stack usage for clang

2022-09-11 Thread Maíra Canal
Hi Nathan, I have built-tested the whole series with clang 14.0.5 (Fedora 14.0.5-1.fc36), using: $ make -kj"$(nproc)" ARCH=x86_64 LLVM=1 mrproper allmodconfig drivers/gpu/drm/amd/amdgpu/ Great to see this patchset coming for DML! To the whole series: Tested-by: Maíra Canal Best Regards, - Ma

Re: [PATCH 1/7] drm/amdgpu: move nbio remap_hdp_registers() to gmc9 code

2022-09-11 Thread Lazar, Lijo
On 9/9/2022 11:05 PM, Alex Deucher wrote: On Fri, Sep 9, 2022 at 1:17 PM Lazar, Lijo wrote: On 9/9/2022 10:17 PM, Alex Deucher wrote: This is where it is used, so move it into gmc init so It's only the *side effect* of GMC IP init process, but that doesn't mean these IPs are interlinke

[PATCH v7 0/9] dyndbg: drm.debug adaptation

2022-09-11 Thread Jim Cromie
hi Greg, Dan, Jason, DRM-folk, heres follow-up to V6: rebased on driver-core/driver-core-next for -v6 applied bits (thanks) rework drm_debug_enabled{_raw,_instrumented,} per Dan. It excludes: nouveau parts (immature) tracefs parts (I missed --to=Steve on v6) split _ddebug_site and de-du

[PATCH v7 2/9] drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.

2022-09-11 Thread Jim Cromie
Use DECLARE_DYNDBG_CLASSMAP across DRM: - in .c files, since macro defines/initializes a record - in drivers, $mod_{drv,drm,param}.c ie where param setup is done, since a classmap is param related - in drm/drm_print.c since existing __drm_debug param is defined there, and we ifdef it

[PATCH v7 3/9] drm_print: interpose drm_*dbg with forwarding macros

2022-09-11 Thread Jim Cromie
change drm_dev_dbg & drm_dbg to macros, which forward to the renamed functions (with __ prefix added). Those functions sit below the categorized layer of macros implementing the DRM debug.category API, and implement most of it. These are good places to insert dynamic-debug jump-label mechanics, w

[PATCH v7 4/9] drm_print: wrap drm_*_dbg in dyndbg descriptor factory macro

2022-09-11 Thread Jim Cromie
For CONFIG_DRM_USE_DYNAMIC_DEBUG=y, wrap __drm_dbg() & __drm_dev_dbg() in one of dyndbg's Factory macros: _dynamic_func_call_no_desc(). This adds the callsite descriptor into the code, and an entry for each into /proc/dynamic_debug/control. #> echo class DRM_UT_ATOMIC +p > /proc/dynamic_debug/c

[PATCH v7 5/9] drm-print.h: include dyndbg header

2022-09-11 Thread Jim Cromie
lkp robot told me: >> drivers/gpu/drm/drm_ioc32.c:989:2: error: call to undeclared function '_dynamic_func_call_cls'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] DRM_DEBUG("comm=\"%s\", pid=%d, dev=0x%lx, auth=%d, %s\n", Si

[PATCH v7 1/9] drm_print: condense enum drm_debug_category

2022-09-11 Thread Jim Cromie
enum drm_debug_category has 10 categories, but is initialized with bitmasks which require 10 bits of underlying storage. By using natural enumeration, and moving the BIT(cat) into drm_debug_enabled(), the enum fits in 4 bits, allowing the category to be represented directly in pr_debug callsites,

[PATCH v7 6/9] drm-print: add drm_dbg_driver to improve namespace symmetry

2022-09-11 Thread Jim Cromie
drm_print defines all of these: drm_dbg_{core,kms,prime,atomic,vbl,lease,_dp,_drmres} but not drm_dbg_driver itself, since it was the original drm_dbg. To improve namespace symmetry, change the drm_dbg defn to drm_dbg_driver, and redef grandfathered name to symmetric one. This will help with

[PATCH v7 9/9] drm_print: add _ddebug descriptor to drm_*dbg prototypes

2022-09-11 Thread Jim Cromie
upgrade the callchain to drm_dbg() and drm_dev_dbg(); add a struct _ddebug ptr parameter to them, and supply that additional param by replacing the '_no_desc' flavor of dyndbg Factory macro currently used with the flavor that supplies the descriptor. NOTES: The descriptor gives these fns access t

[PATCH v7 8/9] drm_print: prefer bare printk KERN_DEBUG on generic fn

2022-09-11 Thread Jim Cromie
drm_print.c calls pr_debug() just once, from __drm_printfn_debug(), which is a generic/service fn. The callsite is compile-time enabled by DEBUG in both DYNAMIC_DEBUG=y/n builds. For dyndbg builds, reverting this callsite back to bare printk is correcting a few anti-features: 1- callsite is gene

[PATCH v7 7/9] drm_print: optimize drm_debug_enabled for jump-label

2022-09-11 Thread Jim Cromie
When CONFIG_DRM_USE_DYNAMIC_DEBUG=y, the drm.debug API (a macro stack, calling _+drm_*dbg() eventually) invokes a dyndbg Factory macro to create a descriptor for each callsite, thus making them individually >control-able. In this case, the calls to _drm_*dbg are unreachable unless the callsite is