Re: [PATCH] dyndbg: add special aux_print framework

2021-07-31 Thread kernel test robot
Hi Jim, I love your patch! Yet something to improve: [auto build test ERROR on tegra-drm/drm/tegra/for-next] [also build test ERROR on linux/master linus/master v5.14-rc3 next-20210730] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest t

Re: [PATCH] dyndbg: add special aux_print framework

2021-07-31 Thread kernel test robot
Hi Jim, I love your patch! Yet something to improve: [auto build test ERROR on tegra-drm/drm/tegra/for-next] [also build test ERROR on linux/master linus/master v5.14-rc3 next-20210730] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest t

[PATCH] dyndbg: add special aux_print framework

2021-07-31 Thread Jim Cromie
Sean Paul seanp...@chromium.org proposed, in https://patchwork.freedesktop.org/series/78133/ drm/trace: Mirror DRM debug logs to tracefs The problem with the approach is that its built upon splitting drm_debug_enabled() into syslog & trace flavors, which clashes rather profoundly with the strategy

[PATCH] dyndbg: add special aux_print framework

2021-07-31 Thread Jim Cromie
Sean Paul seanp...@chromium.org proposed, in https://patchwork.freedesktop.org/series/78133/ drm/trace: Mirror DRM debug logs to tracefs The problem with the approach is that its built upon splitting drm_debug_enabled() into syslog & trace flavors, which clashes rather profoundly with the strategy

[PATCH v4 7/7] amdgpu: define a dydbg-bitmap to control categorized pr_debugs

2021-07-31 Thread Jim Cromie
logger_types.h defines many DC_LOG_*() categorized debug wrappers. Many of these use DRM_DEBUG_*, so are controllable using drm.debug, but others use bare pr_debug()s, each with a different class-prefix matching "^[\w+]:" Use DYNDBG_BITMAP_DESC() to create a parameter/debug_dc, and to define bits

[PATCH v4 6/7] drm/print: add choice to use dynamic debug in drm-debug

2021-07-31 Thread Jim Cromie
drm's debug system writes 10 distinct categories of messages to syslog using a small API[1]: drm_dbg*(10 names), DRM_DEBUG*(8 names), DRM_DEV_DEBUG*(3 names). There are thousands of these callsites, each categorized by their authors. ~2100 are on my laptop. These callsites are enabled at runtime

[PATCH v4 5/7] i915/gvt: control pr_debug("gvt:")s with bits in parameters/debug_gvt

2021-07-31 Thread Jim Cromie
The gvt component of this driver has ~120 pr_debugs, in 9 "classes". Following the interface model of drm.debug, add a parameter to map bits to these classes. If CONFIG_DRM_USE_DYNAMIC_DEBUG=y (and CONFIG_DYNAMIC_DEBUG_CORE), add -DDYNAMIC_DEBUG_MODULE into Makefile. TBD: maybe add a separate CON

[PATCH v4 4/7] i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes

2021-07-31 Thread Jim Cromie
Collapsing "gvt: core: " to "gvt:core: " is a better class-prefix; dropping the internal spaces means a trailing space in a query will more clearly terminate the prefix. Consider a generic drm-debug example: # turn off most ATOMIC reports echo format "^drm:atomic: " -p > control # turn off

[PATCH v4 3/7] dyndbg: add dyndbg-bitmap definer and callbacks

2021-07-31 Thread Jim Cromie
Add DEFINE_DYNDBG_BITMAP(name, var, bitmap_desc, @bit_descs) to allow users to define a /sys/module/*/parameter/name, and a mapping from bits[0-N] to the debug-class-prefixes that the author wishes to control. DEFINE_DYNDBG_BITMAP(debug_gvt, __gvt_debug, "dyndbg bitmap desc", { "gv

[PATCH v4 2/7] moduleparam: add data member to struct kernel_param

2021-07-31 Thread Jim Cromie
Add a void* data member to the struct, to allow attaching private data that will be used soon by a setter method (via kp->data) to perform more elaborate actions. To attach the data at compile time, add new macros: module_param_cbd() derives from module_param_cb(), adding data param. It calls __mo

[PATCH v4 1/7] drm/print: fixup spelling in a comment

2021-07-31 Thread Jim Cromie
s/prink/printk/ - no functional changes Signed-off-by: Jim Cromie --- include/drm/drm_print.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index 9b66be54dd16..15a089a87c22 100644 --- a/include/drm/drm_print.h +++ b/include/

[PATCH v4 0/7] drm: use dyndbg in drm_print

2021-07-31 Thread Jim Cromie
hi all, Apologies for broad --to, but it touches a wide range, if casually. In order to avoid runtime costs of drm_debug_enabled(), this patchset re-implements drm.debug to use dyndbg, after extending dyndbg with kernel_param_ops to implement the bitmap->dydnbg-query and expose it for use. To de

Re: [PATCH 00/14] drm: Make DRM's IRQ helpers legacy

2021-07-31 Thread Sam Ravnborg
Hi Thomas, On Tue, Jul 27, 2021 at 08:27:07PM +0200, Thomas Zimmermann wrote: > DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move > the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux > IRQ interfaces. > > DRM provides IRQ helpers for setting up, receiving and removing

Re: Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-31 Thread Dan.Sneddon
On 7/30/21 1:31 AM, Thomas Zimmermann wrote: > Hi Dan and Sam > > Am 29.07.21 um 21:55 schrieb dan.sned...@microchip.com: >> Hi Thomas and Sam, >> On 7/29/21 12:48 PM, Sam Ravnborg wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you >>> know the content is safe >>> >>> Hi

[PATCH] drm/amdgpu: fix possible null-pointer dereference in amdgpu_ttm_tt_populate()

2021-07-31 Thread Tuo Li
The variable ttm is assigned to the variable gtt, and the variable gtt is checked in: if (gtt && gtt->userptr) This indicates that both ttm and gtt can be NULL. If so, a null-pointer dereference will occur: if (ttm->page_flags & TTM_PAGE_FLAG_SG) Also, some null-pointer dereferences will occu

[PATCH] drm/amdgpu: fix possible null-pointer dereference in amdgpu_ttm_tt_unpopulate()

2021-07-31 Thread Tuo Li
The variable ttm is assigned to the variable gtt, and the variable gtt is checked in: if (gtt && gtt->userptr) This indicates that both ttm and gtt can be NULL. If so, a null-pointer dereference will occur: if (ttm->page_flags & TTM_PAGE_FLAG_SG) Also, some null-pointer dereferences will occu