Re: [PATCH v3 09/16] platform/x86/amd/pmf: Add facility to dump TA inputs

2023-10-13 Thread kernel test robot
Hi Shyam, kernel test robot noticed the following build warnings: [auto build test WARNING on hid/for-next] [also build test WARNING on drm-misc/drm-misc-next linus/master v6.6-rc5 next-20231013] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

[PATCH v7b 25/25] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2023-10-13 Thread Jim Cromie
Lots of burn-in testing needed before signing, upstreaming. NOTE: I set default Y to maximize testing by default. Is there a better way to do this ? Signed-off-by: Jim Cromie --- drivers/gpu/drm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH v7b 24/25] drm-drivers: DRM_CLASSMAP_USE in 2nd batch of drivers, helpers

2023-10-13 Thread Jim Cromie
Add a DRM_CLASSMAP_USE declaration to 2nd batch of helpers and *_drv.c files. For drivers, add the decl just above the module's PARAMs, since it identifies the "inherited" drm.debug param. Note: with CONFIG_DRM_USE_DYNAMIC_DEBUG=y, a module not also declaring DRM_CLASSMAP_USE will have its

[PATCH v7b 17/25] dyndbg-API: promote DYNDBG_CLASSMAP_PARAM to API

2023-10-13 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 v7b 23/25] drm: use correct ccflags-y spelling

2023-10-13 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

[PATCH v7b 21/25] dyndbg: refactor *dynamic_emit_prefix

2023-10-13 Thread Jim Cromie
Refactor the split of duties between outer & inner fns. The outer fn was previously just an inline unlikely forward to inner, which did all the work. Now, outer handles +t and +l flags itself, and calls inner only when _DPRINTK_FLAGS_INCL_LOOKUP is needed. No functional change. But it does

[PATCH v7b 20/25] dyndbg: add _DPRINTK_FLAGS_INCL_LOOKUP

2023-10-13 Thread Jim Cromie
dyndbg's dynamic prefixing (by +tmfsl flags) is needlessly expensive. When an enabled (with +p) pr_debug is called, _DPRINTK_FLAGS_INCL_ANY prefix decorations are sprintf'd into stack-mem for every call. This string (or part of it) could be cached once its 1st generated, and retrieved

[PATCH v7b 16/25] dyndbg: refactor ddebug_classparam_clamp_input

2023-10-13 Thread Jim Cromie
Extract input validation code, from param_set_dyndbg_module_classes() (the sys-node >handler) to new: ddebug_classparam_clamp_input(kp), call it from former. It takes kernel-param arg, so it can complain about "foo: bad input". Reuse ddparam_clamp_input(kp) in ddebug_sync_classbits(), to

[PATCH v7b 22/25] dyndbg: change WARN_ON to WARN_ON_ONCE

2023-10-13 Thread Jim Cromie
This shouldn't ever happen, and 1st 2 conditions never have. The 3rd condition did happen, due to corrupt linkage due to a missing align(8) in DYNDBG_CLASSMAP_USE, on the static struct allocation into the __dyndbg_class_users section. Not sure whether changing to _ONCE is appropriate - this is a

[PATCH v7b 19/25] dyndbg: reserve flag bit _DPRINTK_FLAGS_PREFIX_CACHED

2023-10-13 Thread Jim Cromie
Reserve bit 7 to remember that a pr-debug callsite is/was: - enabled, with +p - wants a dynamic-prefix, with one+ of module:function:sourcfile - was previously called - was thus saved in the cache. NOT YET. Its unclear whether any cache fetch would be faster than 2-3 field fetches, but theres

[PATCH v7b 18/25] dyndbg-doc: add classmap info to howto

2023-10-13 Thread Jim Cromie
Add some basic info on classmap usage and api cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- v5- adjustments per Randy Dunlap, me v7b- checkpatch fixes --- .../admin-guide/dynamic-debug-howto.rst | 60 ++- 1 file changed, 59 insertions(+), 1 deletion(-) diff

[PATCH v7b 13/25] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code

2023-10-13 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 simplify things

[PATCH v7b 15/25] dyndbg: add for_each_boxed_vector

2023-10-13 Thread Jim Cromie
Add a for_each iterator to walk a counted vector member in a struct (ie the box), and use it to replace 8 open-coded loops. Signed-off-by: Jim Cromie --- v5- parens-on-box-force-precedence --- lib/dynamic_debug.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff

[PATCH v7b 14/25] dyndbg-API: fix CONFIG_DRM_USE_DYNAMIC_DEBUG regression

2023-10-13 Thread Jim Cromie
DECLARE_DYNDBG_CLASSMAP() has a design error; it fails a basic K rule: "define once, refer many times". When DRM_USE_DYNAMIC_DEBUG=y, DECLARE_DYNDBG_CLASSMAP() is used across DRM core & drivers; they all repeat the same classmap-defn args, which must match for the modules to respond together when

[PATCH v7b 12/25] dyndbg: reduce verbose=3 messages in ddebug_add_module

2023-10-13 Thread Jim Cromie
The fn currently says "add-module", then "skipping" if the module has no prdbgs. 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(-) diff --git a/lib/dynamic_debug.c

[PATCH v7b 10/25] dyndbg: tighten ddebug_class_name() 1st arg type

2023-10-13 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

[PATCH v7b 11/25] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap

2023-10-13 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

[PATCH v7b 09/25] dyndbg: silence debugs with no-change updates

2023-10-13 Thread Jim Cromie
check for actual changes before announcing them, declutter logs. 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/dynamic_debug.c index b0e11f6bfaa2..b07aab422604 100644 ---

[PATCH v7b 08/25] dyndbg: reduce verbose/debug clutter

2023-10-13 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=""

[PATCH v7b 05/25] dyndbg: ddebug_apply_class_bitmap - add module arg, select on it

2023-10-13 Thread Jim Cromie
Add query_module param to ddebug_apply_class_bitmap(). 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 change. Signed-off-by: Jim Cromie --- after `modprobe i915`, heres the

[PATCH v7b 06/25] dyndbg: split param_set_dyndbg_classes to module/wrapper fns

2023-10-13 Thread Jim Cromie
rename param_set_dyndbg_classes: add _module_ name & arg, old name is wrapper to new. New arg allows caller to specify that only one module is affected by a prdbgs update. Outer fn preserves kernel_param interface, passing NULL to inner fn. This selectivity will be used later to narrow the scope

[PATCH v7b 07/25] dyndbg: drop NUM_TYPE_ARRAY

2023-10-13 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

[PATCH v7b 04/25] dyndbg: replace classmap list with a vector

2023-10-13 Thread Jim Cromie
Classmaps are stored/linked in a section/array, but are each added to the module's ddebug_table.maps list-head. 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 module's possibly

[PATCH v7b 03/25] dyndbg: make ddebug_class_param union members same size

2023-10-13 Thread Jim Cromie
struct ddebug_class_param keeps a ref to the state-storage of the param, make both flavors use the same unsigned long under-type. ISTM this is simpler and safer. Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 2 +- lib/dynamic_debug.c | 2 +- 2 files changed, 2

[PATCH v7b 02/25] dyndbg: reword "class unknown, " to "class:_UNKNOWN_"

2023-10-13 Thread Jim Cromie
This appears in the control-file to report an unknown class-name, which indicates that the class_id is not authorized, and dyndbg will ignore changes to it. Generally, this means that a DYNDBG_CLASSMAP_DEFINE or DYNDBG_CLASSMAP_USE is missing. But the word "unknown" appears in quite a few prdbg

[PATCH v7b 00/25] fix DRM_USE_DYNAMIC_DEBUG=y regression

2023-10-13 Thread Jim Cromie
hi Jason, DRM-folk (now with checkpatch fixes) This patchest fixes the chicken-egg initialization problem in the 1st version of ddebug-class-maps, that DRM-CI uncovered. The root-problem was DECLARE_DYNDBG_CLASSMAP, which broke the K rule: "define once, refer many". In patch 14 it is replaced

[PATCH v7b 01/25] test-dyndbg: fixup CLASSMAP usage error

2023-10-13 Thread Jim Cromie
more careful reading of test output 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_cats =p "MID msg\n" class:HI

Re: [PATCH 3/3] drm/amd: Read IMU FW version from scratch register during hw_init

2023-10-13 Thread Deucher, Alexander
[AMD Official Use Only - General] Series is: Reviewed-by: Alex Deucher From: amd-gfx on behalf of Mario Limonciello Sent: Friday, October 13, 2023 3:26 PM To: amd-gfx@lists.freedesktop.org Cc: Limonciello, Mario Subject: [PATCH 3/3] drm/amd: Read IMU FW

[PATCH 2/3] drm/amd: Don't parse IMU ucode version if it won't be loaded

2023-10-13 Thread Mario Limonciello
When the IMU ucode is loaded by the PSP parsing the version that comes from Linux will vary. Rather than showing the wrong data to kernel interface consumers, avoid populating it in this case. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 4 ++-- 1 file changed,

[PATCH 3/3] drm/amd: Read IMU FW version from scratch register during hw_init

2023-10-13 Thread Mario Limonciello
If the IMU version wasn't discovered from the header, such as when the firmware was directly loaded by PSP then there is no firmware version to show to userspace from sysfs or IOCTL. The IMU F/W stores the version in the first scratch register though, so fetch it in these cases to let the driver

[PATCH 1/3] drm/amd: Move microcode init step to early_init()

2023-10-13 Thread Mario Limonciello
The intention for early init is to find any missing microcode early and fail the driver load if it's missing. Move this step to earlier in driver init to match other IP blocks. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 16 1 file changed, 8

[PATCH 0/3] Show correct IMU version on APUs

2023-10-13 Thread Mario Limonciello
On APUs the active IMU firmware is distributed with the BIOS. Parsing the header for the microcode loaded by the Linux kernel will show the wrong version. This series adjusts it so that the correct version is exported. Mario Limonciello (3): drm/amd: Move microcode init step to early_init()

[pull] amdgpu, amdkfd, radeon, UAPI drm-next-6.7

2023-10-13 Thread Alex Deucher
Hi Dave, Daniel, New stuff for 6.7. The following changes since commit 3698a75f5a98d0a6599e2878ab25d30a82dd836a: Merge tag 'drm-intel-next-fixes-2023-08-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-next (2023-08-25 12:55:55 +1000) are available in the Git repository at:

[PATCH v3] drm/amd/amdgpu/vcn: Add RB decouple feature under SRIOV

2023-10-13 Thread Bokun Zhang
- Add code to enable RB decouple feature. This feature is controlled by SRIOV host. Once enabled, it allows VCN0's job to be remapped to VCN1 at hardware level and improves VCN availability Signed-off-by: Bokun Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 3 +

RE: [PATCH] drm/amdgpu/umsch: add suspend and resume callback

2023-10-13 Thread Gopalakrishnan, Veerabadhran (Veera)
[Public] Reviewed-by: Veerabadhran Gopalakrishnan veerabadhran.gopalakrish...@amd.com -Veera From: Deucher, Alexander Sent: Friday, October 13, 2023 7:04 PM To: Yu, Lang ; amd-gfx@lists.freedesktop.org Cc: Gopalakrishnan, Veerabadhran (Veera)

[PATCH v2] drm/amd/amdgpu/vcn: Add RB decouple feature under SRIOV

2023-10-13 Thread Bokun Zhang
- Add code to enable RB decouple feature. This feature is controlled by SRIOV host. Once enabled, it allows VCN0's job to be remapped to VCN1 at hardware level and improves VCN availability Signed-off-by: Bokun Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 3 +

[PATCH] drm/amd/amdgpu/vcn: Add RB decouple feature under SRIOV

2023-10-13 Thread Bokun Zhang
- Add code to enable RB decouple feature. This feature is controlled by SRIOV host. Once enabled, it allows VCN0's job to be remapped to VCN1 at hardware level and improves VCN availability Signed-off-by: Bokun Zhang Change-Id: I3af7e126308e8fe4d2dc207c74e7671520037e65 Signed-off-by: Bokun

Re: [PATCH] drm/amdgpu/mes11: remove aggregated doorbell code

2023-10-13 Thread Alex Deucher
Ping? On Wed, Oct 11, 2023 at 2:27 PM Alex Deucher wrote: > > It's not enabled in hardware so the code is dead. > Remove it. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 86 +- > drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 56

Re: [PATCH] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-10-13 Thread Alex Deucher
On Thu, Oct 12, 2023 at 10:32 PM Ma Ke wrote: > > In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() > is assigned to mode, which will lead to a NULL pointer dereference > on failure of drm_cvt_mode(). Add a check to avoid null pointer > dereference. > > Signed-off-by: Ma Ke

Re: [PATCH] drm/amdgpu/umsch: add suspend and resume callback

2023-10-13 Thread Deucher, Alexander
[Public] Acked-by: Alex Deucher From: amd-gfx on behalf of Lang Yu Sent: Friday, October 13, 2023 1:58 AM To: amd-gfx@lists.freedesktop.org Cc: Gopalakrishnan, Veerabadhran (Veera) ; Yu, Lang Subject: [PATCH] drm/amdgpu/umsch: add suspend and resume

Re: [PATCH v3 06/16] platform/x86/amd/pmf: Add support to get inputs from other subsystems

2023-10-13 Thread Ilpo Järvinen
On Tue, 10 Oct 2023, Shyam Sundar S K wrote: > PMF driver sends changing inputs from each subystem to TA for evaluating > the conditions in the policy binary. > > Add initial support of plumbing in the PMF driver for Smart PC to get > information from other subsystems in the kernel. > >

Re: [PATCH] drm/edid: add 8 bpc quirk to the BenQ GW2765

2023-10-13 Thread Hamza Mahfooz
On 10/13/23 06:30, Ville Syrjälä wrote: On Thu, Oct 12, 2023 at 02:49:27PM -0400, Hamza Mahfooz wrote: The BenQ GW2765 reports that it supports higher (> 8) bpc modes, but when trying to set them we end up with a black screen. So, limit it to 8 bpc modes. Bad cable/etc was ruled out as the

Re: [PATCH] drm/edid: add 8 bpc quirk to the BenQ GW2765

2023-10-13 Thread Ville Syrjälä
On Thu, Oct 12, 2023 at 02:49:27PM -0400, Hamza Mahfooz wrote: > The BenQ GW2765 reports that it supports higher (> 8) bpc modes, but > when trying to set them we end up with a black screen. So, limit it to 8 > bpc modes. Bad cable/etc was ruled out as the cause? > > Cc: sta...@vger.kernel.org

Re: [PATCH 4/5] drm/amdgpu: bypass RAS error reset in some conditions

2023-10-13 Thread Zhou1, Tao
[AMD Official Use Only - General] How about this condition: if ((amdgpu_in_reset(adev) || amdgpu_ras_intr_triggered()) && mca_funcs && mca_funcs->mca_set_debug_mode) I use amdgpu_in_reset to skip touching it in all gpu resets, not only for the resets triggered by ras fatal error.

[PATCH] drm/amd/display: Add missing lines of code in dc.c

2023-10-13 Thread Stylon Wang
[Why & How] A critial part of "drm/amd/display: Fix windowed MPO video with ODM combine for DCN32" is lost during promotion to upstream. This patch addes the code back to dc.c. Signed-off-by: Stylon Wang Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++-- 1 file

[PATCH] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-10-13 Thread Ma Ke
In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null pointer dereference. Signed-off-by: Ma Ke --- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 ++ 1 file

[PATCH] drm/amdkfd: clean up some inconsistent indenting

2023-10-13 Thread Jiapeng Chong
No functional modification involved. drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:305 svm_range_free() warn: inconsistent indenting. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6804 Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c |

[PATCH] drm/radeon: fix a possible null pointer dereference

2023-10-13 Thread Ma Ke
In radeon_add_common_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null pointer dereference. Signed-off-by: Ma Ke --- drivers/gpu/drm/radeon/radeon_connectors.c | 2 ++ 1 file

Re: [PATCH v3 04/16] platform/x86/amd/pmf: Add support for PMF Policy Binary

2023-10-13 Thread Shyam Sundar S K
On 10/11/2023 8:47 AM, Shyam Sundar S K wrote: > > > On 10/10/2023 9:56 PM, Mario Limonciello wrote: >> On 10/10/2023 07:59, Shyam Sundar S K wrote: >>> PMF Policy binary is a encrypted and signed binary that will be part >>> of the BIOS. PMF driver via the ACPI interface checks the existence