Re: [PATCH v12 0/9] Enable Wifi RFI interference mitigation feature support

2023-10-18 Thread Ma, Jun
ping... Any other comments? Regards, Ma Jun On 10/17/2023 10:53 AM, Ma Jun wrote: > Due to electrical and mechanical constraints in certain platform designs there > may be likely interference of relatively high-powered harmonics of the (G-)DDR > memory clocks with local radio module frequency ban

Re: [PATCH] drm/amd/pm: drop unneeded dpm features disablement for SMU 14.0.0

2023-10-18 Thread Zhang, Yifan
[AMD Official Use Only - General] This patch is: Reviewed-by: Yifan Zhang 发件人: amd-gfx 代表 jiadong@amd.com 发送时间: Thursday, October 19, 2023 11:38:45 AM 收件人: amd-gfx@lists.freedesktop.org 抄送: Zhu, Jiadong 主题: [PATCH] drm/amd/pm: drop unneeded dpm features d

Re: [PATCH] drm/amdgpu: add tmz support for GC IP v11.5.0

2023-10-18 Thread Zhang, Yifan
[AMD Official Use Only - General] Reviewed-by: Yifan Zhang 发件人: amd-gfx 代表 jiadong@amd.com 发送时间: Thursday, October 19, 2023 11:40:25 AM 收件人: amd-gfx@lists.freedesktop.org 抄送: Zhu, Jiadong 主题: [PATCH] drm/amdgpu: add tmz support for GC IP v11.5.0 From: Ji

RE: [PATCH] drm/amdkfd: Fix shift out-of-bounds issue and remove unused code.

2023-10-18 Thread Zhang, Yifan
[AMD Official Use Only - General] I think it is better to separate it to two patches since it addresses different issues. With or without the change, this patch is Reviewed-by: Yifan Zhang -Original Message- From: Jesse Zhang Sent: Thursday, October 19, 2023 9:56 AM To: amd-gfx@lists.

[PATCH 2/2] drm/amdgpu: Use discovery table's subrevision

2023-10-18 Thread Lijo Lazar
Use subrevision of IP version in discovery table to identify SOC revision id for NBIO v7.9 SOCs. Only newer bootloaders update subrevision field. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Le Ma --- drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c | 9 - 1 file changed, 8

[PATCH 1/2] drm/amdgpu: Add API to get full IP version

2023-10-18 Thread Lijo Lazar
Fetch the full version of IP including variant and subrevision. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Le Ma --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/

[PATCH] drm/amdgpu: add tmz support for GC IP v11.5.0

2023-10-18 Thread jiadong.zhu
From: Jiadong Zhu Add tmz support for GC 11.5.0. Signed-off-by: Jiadong Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index a02992bff6af..2dce338b0f1e 100644

[PATCH] drm/amd/pm: drop unneeded dpm features disablement for SMU 14.0.0

2023-10-18 Thread jiadong.zhu
From: Jiadong Zhu PMFW will handle the features disablement properly for gpu reset case, driver involvement may cause some unexpected issues. Signed-off-by: Jiadong Zhu --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/g

RE: [PATCH] drm/amdgpu: Log UE corrected by replay as correctable error

2023-10-18 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Candice Li Sent: Thursday, October 19, 2023 09:43 To: amd-gfx@lists.freedesktop.org Cc: Zhou1, Tao ; Li, Candice Subject: [PATCH] drm/amdgpu: Log UE corrected by

RE: [PATCH] drm/amd/pm: Fix the return value in default case

2023-10-18 Thread Feng, Kenneth
[AMD Official Use Only - General] Reviewed-by: Kenneth Feng -Original Message- From: Ma, Jun Sent: Thursday, October 19, 2023 10:29 AM To: amd-gfx@lists.freedesktop.org; Feng, Kenneth ; Deucher, Alexander Cc: Ma, Jun ; Ma, Jun Subject: [PATCH] drm/amd/pm: Fix the return value in def

[PATCH] drm/amd/pm: Fix the return value in default case

2023-10-18 Thread Ma Jun
Fix the return value in default case and drop redundant 'break'. Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index

[PATCH] drm/amdkfd: Fix shift out-of-bounds issue and remove unused code.

2023-10-18 Thread Jesse Zhang
[ 567.613292] shift exponent 255 is too large for 64-bit type 'long unsigned int' [ 567.614498] CPU: 5 PID: 238 Comm: kworker/5:1 Tainted: G OE 6.2.0-34-generic #34~22.04.1-Ubuntu [ 567.614502] Hardware name: AMD Splinter/Splinter-RPL, BIOS WS43927N_871 09/25/2023 [ 567.614504

[PATCH] drm/amdgpu: Log UE corrected by replay as correctable error

2023-10-18 Thread Candice Li
Support replay mode where UE could be converted to CE. Signed-off-by: Candice Li Reviewed-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/umc_v

RE: [PATCH] drm/amdkfd: Fix shift out-of-bounds issue

2023-10-18 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - General] -Original Message- From: Chen, Xiaogang Sent: Thursday, October 19, 2023 12:57 AM To: Yang, Philip ; Zhang, Yifan ; Zhang, Jesse(Jie) ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Yang, Philip ; Kuehling, Felix Subject: Re: [PATCH] drm/amdkf

[PATCH] drm/amdkfd: remap unaligned svm ranges that have split

2023-10-18 Thread Alex Sierra
Split SVM ranges that have been mapped into 2MB page table entries, require to be remap in case the split has happened in a non-aligned VA. [WHY]: This condition causes the 2MB page table entries be split into 4KB PTEs. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 45 +++

Re: [linux-next:master] BUILD REGRESSION 2dac75696c6da3c848daa118a729827541c89d33

2023-10-18 Thread Steven Rostedt
On Thu, 19 Oct 2023 04:07:35 +0800 kernel test robot wrote: > Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml: > Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml: > fs/tracefs/event_inode.c:782:11-21: ERROR: ei is NULL but dereferenced. This was already reported and I'm currently test

[linux-next:master] BUILD REGRESSION 2dac75696c6da3c848daa118a729827541c89d33

2023-10-18 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 2dac75696c6da3c848daa118a729827541c89d33 Add linux-next specific files for 20231018 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202309200103.grxwdktx-...@intel.com https

Re: [PATCH v4 13/17] platform/x86/amd/pmf: Add PMF-AMDGPU get interface

2023-10-18 Thread Hans de Goede
Hi, I was not following this at first, so my apologies for jumping in in the middle of the thread: > +static int amd_pmf_gpu_get_cur_state(struct thermal_cooling_device > *cooling_dev, > + unsigned long *state) > +{ > +    struct backlight_device *bd; >

Re: [PATCH] drm/amd/display: Respect CONFIG_FRAME_WARN=0 in DML2

2023-10-18 Thread Hamza Mahfooz
AGS_$(AMDDALPATH)/dc/dml2/display_mode_util.o := $(dml2_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml2/dml2_wrapper.o := $(dml2_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml2/dml2_utils.o := $(dml2_ccflags) --- base-commit: cd90511557fdfb394bb4ac4c3b539b007383914c change-id: 20231018-amdgpu-dml2-respect-fra

[PATCH] drm/amd/display: Respect CONFIG_FRAME_WARN=0 in DML2

2023-10-18 Thread Nathan Chancellor
AGS_$(AMDDALPATH)/dc/dml2/dml2_wrapper.o := $(dml2_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml2/dml2_utils.o := $(dml2_ccflags) --- base-commit: cd90511557fdfb394bb4ac4c3b539b007383914c change-id: 20231018-amdgpu-dml2-respect-frame_warn-536e19b69ce0 Best regards, -- Nathan Chancellor

Re: [PATCH 03/26] drm/amd/display: Remove power sequencing check

2023-10-18 Thread Hamza Mahfooz
On 10/18/23 13:41, roman...@amd.com wrote: From: Agustin Gutierrez [Why] Some ASICs keep backlight powered on after dpms off command has been issued. [How] The check for no edp power sequencing was never going to pass. The value is never changed from what it is

Re: [PATCH 25/26] drm/amd/display: fix compilation warning in dml2

2023-10-18 Thread Hamza Mahfooz
On 10/18/23 13:41, roman...@amd.com wrote: From: Qingqing Zhuo [Why] dml2_dc_resource_mgmt.c:792:3: error: enumeration value ‘dml_odm_mode_split_1to2’ not handled in switch [-Werror=switch] 792 | switch (disp_cfg->hw.ODMMode[cfg_idx]) { | ^~ [How] Add default case for switch.

[PATCH 23/26] drm/amd/display: Disable SYMCLK32_SE RCO on DCN314

2023-10-18 Thread Roman.Li
From: Michael Strauss [WHY] Currently causes some DP link layer failures, backing out until the failures are root caused. Reviewed-by: Nicholas Kazlauskas Acked-by: Roman Li Signed-off-by: Michael Strauss --- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 +- 1 file changed, 1 i

[PATCH 25/26] drm/amd/display: fix compilation warning in dml2

2023-10-18 Thread Roman.Li
From: Qingqing Zhuo [Why] dml2_dc_resource_mgmt.c:792:3: error: enumeration value ‘dml_odm_mode_split_1to2’ not handled in switch [-Werror=switch] 792 | switch (disp_cfg->hw.ODMMode[cfg_idx]) { | ^~ [How] Add default case for switch. Reviewed-by: Rodrigo Siqueira Reviewed-by: J

[PATCH 19/26] drm/amd/display: Update FAMS sequence for DCN30 & DCN32

2023-10-18 Thread Roman.Li
From: Alvin Lee Provide DCN32 specific sequence and update DCN30 sequence Reviewed-by: Samson Tam Acked-by: Roman Li Signed-off-by: Alvin Lee --- .../gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 2 +- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 21 ++--- .../amd/display/dc/hwss/d

[PATCH 18/26] drm/amd/display: fix num_ways overflow error

2023-10-18 Thread Roman.Li
From: Samson Tam [Why] Helper function calculates num_ways using 32-bit. But is returned as 8-bit. If num_ways exceeds 8-bit, then it reports back the incorrect num_ways and erroneously uses MALL when it should not [How] Make returned value 32-bit and convert after it checks against caps.c

[PATCH 22/26] drm/amd/display: 3.2.256

2023-10-18 Thread Roman.Li
From: Aric Cyr DC v3.2.256 Summary: * Fixes null-deref regression after "drm/amd/display: Update OPP counter from new interface" * Fixes display flashing when VSR and HDR enabled on dcn32 * Fixes dcn3x intermittent hangs due to FPO * Fixes MST Multi-Stream light up on dcn35 * Fixes green screen

[PATCH 26/26] drm/amd/display: add interface to query SubVP status

2023-10-18 Thread Roman.Li
From: Aurabindo Pillai [Why&How] To enable automated testing through IGT, expose an API that is accessible through debugfs to query current status of SubVP feature. Reviewed-by: Alvin Lee Acked-by: Roman Li Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_d

[PATCH 24/26] drm/amd/display: Read before writing Backlight Mode Set Register

2023-10-18 Thread Roman.Li
From: Iswara Nagulendran [HOW&WHY] Reading the value from DP_EDP_BACKLIGHT_MODE_SET_REGISTER, DPCD 0x721 before setting the BP_EDP_PANEL_LUMINANC_CONTROL_ENABLE bit to ensure there are no accidental overwrites. Reviewed-by: Sreeja Golui Reviewed-by: Harry Vanzylldejong Acked-by: Roman Li Sign

[PATCH 21/26] drm/amd/display: Fix shaper using bad LUT params

2023-10-18 Thread Roman.Li
From: Ilya Bakoulin [Why] LUT params are not cleared after setting blend TF, which can lead to same params being used for the shaper, if the shaper func is bypassed. [How] Set lut_params to NULL after program_1dlut. Reviewed-by: Krunoslav Kovac Acked-by: Roman Li Signed-off-by: Ilya Bakoulin

[PATCH 17/26] drm/amd/display: Add prefix for plane functions

2023-10-18 Thread Roman.Li
From: Rodrigo Siqueira This commit adds the amdgpu_dm_plane_ prefix for all functions in the amdgpu_dm_plane.c. This change enables an easy way to filter code paths via ftrace. Reviewed-by: Aurabindo Pillai Acked-by: Roman Li Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/amdgpu

[PATCH 16/26] drm/amd/display: Add prefix to amdgpu crtc functions

2023-10-18 Thread Roman.Li
From: Rodrigo Siqueira The ftrace debug feature allows filtering functions based on a prefix, which can be helpful in some complex debug scenarios. The driver can benefit more from this feature if the function name follows some patterns; for this reason, this commit adds the prefix amdgpu_dm_crtc

[PATCH 20/26] drm/amd/display: add null check for invalid opps

2023-10-18 Thread Roman.Li
From: Samson Tam [Why] In cases where number of pipes available is less than num_opp, there will opp instances that are null [How] Add null check to skip over these opp instances Fixes: 9e241124fe13 ("drm/amd/display: Update OPP counter from new interface") Reviewed-by: Alvin Lee Acked-by:

[PATCH 15/26] drm/amd/display: Correct enum typo

2023-10-18 Thread Roman.Li
From: Rodrigo Siqueira This commit just replaces dc_interrupt_po*r*larity with its correct name, which is dc_interrupt_polarity. Reviewed-by: Aurabindo Pillai Acked-by: Roman Li Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/irq_types.h | 6 +++--- 1 file changed, 3 inser

[PATCH 13/26] drm/amd/display: Revert "drm/amd/display: allow edp updates for virtual signal"

2023-10-18 Thread Roman.Li
From: Alex Hung This reverts commit 4ad3ee5ccc77aa3f9d702f7b9ad4d9cfeca6c443. [WHY & HOW] Virtual signal is not supported as audio capable by DC. Reviewed-by: Chao-kai Wang Acked-by: Roman Li Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/include/signal_types.h | 1 - 1 file chang

[PATCH 14/26] drm/amd/display: Set emulated sink type to HDMI accordingly.

2023-10-18 Thread Roman.Li
From: Alex Hung [WHY & HOW] Virtual sink is not audio-capable and this causes kms_hdmi_inject's inject-audio to fail. Set it to HDMI according to EDID. Reviewed-by: Chao-kai Wang Acked-by: Roman Li Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file

[PATCH 11/26] drm/amd/display: Fix IPS handshake for idle optimizations

2023-10-18 Thread Roman.Li
From: Nicholas Kazlauskas [Why] Intermittent reboot hangs are observed introduced by "Improve x86 and dmub ips handshake". [How] Bring back the commit but fix the polling. Avoid hanging in place forever by bounding the delay and ensure that we still message DMCUB on IPS2 exit to notify driver i

[PATCH 10/26] drm/amd/display: implement map dc pipe with callback in DML2

2023-10-18 Thread Roman.Li
From: Wenjing Liu [why] Unify pipe resource management logic in dc resource layer. Reviewed-by: Chaitanya Dhere Acked-by: Roman Li Signed-off-by: Wenjing Liu --- .../drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + .../display/dc/dml2/dml2_dc_resource_mgmt.c | 144 ++ ...

[PATCH 12/26] drm/amd/display: Fix HDMI framepack 3D test issue

2023-10-18 Thread Roman.Li
From: Sung Joon Kim [why] Bandwidth validation failure on framepack tests. Need to double pixel clock when 3D format is framepack. Also for HDMI displays, we need to keep the ITC flag to 1 by default. [how] Double the pixel clock when using framepack 3D format. Set hdmi ITC bit to 1. Reviewed-b

[PATCH 08/26] drm/amd/display: Reduce default backlight min from 5 nits to 1 nits

2023-10-18 Thread Roman.Li
From: Swapnil Patel [Why & How] Currently set_default_brightness_aux function uses 5 nits as lower limit to check for valid default_backlight setting. However some newer panels can support even lower default settings Reviewed-by: Agustin Gutierrez Acked-by: Roman Li Signed-off-by: Swapnil Pate

[PATCH 05/26] drm/amd/display: Revert "Improve x86 and dmub ips handshake"

2023-10-18 Thread Roman.Li
From: Nicholas Kazlauskas This reverts commit 8316378d272ed96f60177cc9a8beaadb8640f745. Causes intermittent hangs during reboot stress testing. Reviewed-by: Duncan Ma Acked-by: Roman Li Signed-off-by: Nicholas Kazlauskas --- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 37 .

[PATCH 06/26] drm/amd/display: Add a check for idle power optimization

2023-10-18 Thread Roman.Li
From: Sung Joon Kim [why] Need a helper function to check idle power is allowed so that dc doesn't access any registers that are power-gated. [how] Implement helper function to check idle power optimization. Enable a hook to check if detection is allowed. V2: Add function hooks for set and get

[PATCH 04/26] drm/amd/display: Fix MST Multi-Stream Not Lighting Up on dcn35

2023-10-18 Thread Roman.Li
From: Fangzhi Zuo dcn35 misses .enable_symclk_se hook that makes MST DSC not functional when having multiple FE clk to be enabled. Reviewed-by: Rodrigo Siqueira Acked-by: Roman Li Signed-off-by: Fangzhi Zuo --- drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 6 ++ 1 file change

[PATCH 09/26] drm/amd/display: add pipe resource management callbacks to DML2

2023-10-18 Thread Roman.Li
From: Wenjing Liu [why] Need DML2 to support new pipe resource management APIs. Reviewed-by: Chaitanya Dhere Acked-by: Roman Li Signed-off-by: Wenjing Liu --- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 5 + .../drm/amd/display/dc/dcn321/dcn321_resource.c | 5 + .../gpu/d

[PATCH 07/26] drm/amd/display: Update SDP VSC colorimetry from DP test automation request

2023-10-18 Thread Roman.Li
From: George Shen [Why] Certain test equipment vendors check the SDP VSC for colorimetry against the value from the test request during certain DP link layer tests for YCbCr test cases. [How] Update SDP VSC with colorimetry from test automation request. Reviewed-by: Wenjing Liu Acked-by: Roman

[PATCH 03/26] drm/amd/display: Remove power sequencing check

2023-10-18 Thread Roman.Li
From: Agustin Gutierrez [Why] Some ASICs keep backlight powered on after dpms off command has been issued. [How] The check for no edp power sequencing was never going to pass. The value is never changed from what it is set by design. Reviewed-by: Swapnil Patel A

[PATCH 02/26] drm/amd/display: reprogram det size while seamless boot

2023-10-18 Thread Roman.Li
From: Hugo Hu [Why] During system boot in second screen only mode on a seamless boot system, there is a chance that the pipe's det size might not be reset. [How] Reset the det size while resetting the pipe during seamless boot. Reviewed-by: Dmytro Laktyushkin Acked-by: Roman Li Signed-off-by:

[PATCH 01/26] drm/amd/display: remove duplicated edp relink to fastboot

2023-10-18 Thread Roman.Li
From: Chiawen Huang [Why&How] enable_accelerated_mode function is fully to check whether fastboot support or not. It is no longer to disable_vbios_mode_if_required. enable_stream_timing is allowed when seamless/fast boot are disabled. Reviewed-by: Charlene Liu Acked-by: Roman Li Signed-off-by:

[PATCH 00/26] DC Patches October 18, 2023

2023-10-18 Thread Roman.Li
From: Roman Li This DC patchset brings improvements in multiple areas. In summary, we highlight: * Fixes null-deref regression after "drm/amd/display: Update OPP counter from new interface" * Fixes display flashing when VSR and HDR enabled on dcn32 * Fixes dcn3x intermittent hangs due to FPO *

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

2023-10-18 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 class'

[PATCH v7c 24/24] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2023-10-18 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 a/drivers/gpu/drm/Kconfi

[PATCH v7c 17/24] dyndbg-doc: add classmap info to howto

2023-10-18 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 v7c 15/24] dyndbg: refactor ddebug_classparam_clamp_input

2023-10-18 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 validate

[PATCH v7c 20/24] dyndbg: refactor *dynamic_emit_prefix

2023-10-18 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 make

[PATCH v7c 11/24] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap

2023-10-18 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 v7c 21/24] dyndbg: change WARN_ON to WARN_ON_ONCE

2023-10-18 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 v7c 22/24] drm: use correct ccflags-y spelling

2023-10-18 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 v7c 13/24] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code

2023-10-18 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 fo

[PATCH v7c 19/24] dyndbg: add _DPRINTK_FLAGS_INCL_LOOKUP

2023-10-18 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 thereafter,

[PATCH v7c 18/24] dyndbg: reserve flag bit _DPRINTK_FLAGS_PREFIX_CACHED

2023-10-18 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 anot

[PATCH v7c 14/24] dyndbg-API: fix CONFIG_DRM_USE_DYNAMIC_DEBUG regression

2023-10-18 Thread Jim Cromie
DECLARE_DYNDBG_CLASSMAP() has a design error; it fails a basic K&R 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 whe

[PATCH v7c 16/24] dyndbg-API: promote DYNDBG_CLASSMAP_PARAM to API

2023-10-18 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 v7c 09/24] dyndbg: silence debugs with no-change updates

2023-10-18 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 --- a/lib/dynamic_

[PATCH v7c 12/24] dyndbg: reduce verbose=3 messages in ddebug_add_module

2023-10-18 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 b/lib/dynami

[PATCH v7c 10/24] dyndbg: tighten ddebug_class_name() 1st arg type

2023-10-18 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 v7c 07/24] dyndbg: drop NUM_TYPE_ARRAY

2023-10-18 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 b53217e4b711..8116d0a0

[PATCH v7c 08/24] dyndbg: reduce verbose/debug clutter

2023-10-18 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 v7c 06/24] dyndbg: split param_set_dyndbg_classes to module/wrapper fns

2023-10-18 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 v7c 05/24] dyndbg: ddebug_apply_class_bitmap - add module arg, select on it

2023-10-18 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 m

[PATCH v7c 04/24] dyndbg: replace classmap list with a vector

2023-10-18 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 mu

[PATCH v7c 03/24] dyndbg: make ddebug_class_param union members same size

2023-10-18 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 insertion

[PATCH v7c 02/24] dyndbg: reword "class unknown, " to "class:_UNKNOWN_"

2023-10-18 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 f

[PATCH v7c 01/24] test-dyndbg: fixup CLASSMAP usage error

2023-10-18 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 lib/t

[PATCH v7c 00/24] fix DRM_USE_DYNAMIC_DEBUG=y regression

2023-10-18 Thread Jim Cromie
hi Jason, DRM-folk (v7c now with all 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&R rule: "define once, refer many". In patch 14 it i

Re: [PATCH v4 13/17] platform/x86/amd/pmf: Add PMF-AMDGPU get interface

2023-10-18 Thread Shyam Sundar S K
On 10/18/2023 9:37 PM, Christian König wrote: > Am 18.10.23 um 17:47 schrieb Mario Limonciello: >> On 10/18/2023 08:40, Christian König wrote: >>> >>> >>> Am 18.10.23 um 11:28 schrieb Shyam Sundar S K: On 10/18/2023 2:50 PM, Ilpo Järvinen wrote: > On Wed, 18 Oct 2023, Shyam Sundar

Re: [PATCH] drm/amdkfd: Fix shift out-of-bounds issue

2023-10-18 Thread Chen, Xiaogang
On 10/18/2023 9:53 AM, Philip Yang wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. The 255 granularity is from recent Thunk change to increase CWSR area granularity. I think we also nee

Re: [PATCH v4 13/17] platform/x86/amd/pmf: Add PMF-AMDGPU get interface

2023-10-18 Thread Christian König
Am 18.10.23 um 17:47 schrieb Mario Limonciello: On 10/18/2023 08:40, Christian König wrote: Am 18.10.23 um 11:28 schrieb Shyam Sundar S K: On 10/18/2023 2:50 PM, Ilpo Järvinen wrote: On Wed, 18 Oct 2023, Shyam Sundar S K wrote: In order to provide GPU inputs to TA for the Smart PC solution

Re: [PATCH v4 13/17] platform/x86/amd/pmf: Add PMF-AMDGPU get interface

2023-10-18 Thread Mario Limonciello
On 10/18/2023 08:40, Christian König wrote: Am 18.10.23 um 11:28 schrieb Shyam Sundar S K: On 10/18/2023 2:50 PM, Ilpo Järvinen wrote: On Wed, 18 Oct 2023, Shyam Sundar S K wrote: In order to provide GPU inputs to TA for the Smart PC solution to work, we need to have interface between the

Re: [PATCH v2] drm/amdgpu: fix missing stuff in NBIO v7.11

2023-10-18 Thread Alex Deucher
On Wed, Oct 18, 2023 at 6:17 AM Li Ma wrote: > > add get_clockgating_state, update_medium_grain_light_sleep and > update_medium_grain_clock_gating in nbio_v7_11_funcs > v1: > add missing funcs in nbio_v7_11.c > v2: > modify the if condition and add spport for nbio v7.11 clockgating. > > Signed-off

Re: [PATCH] drm/amdkfd: Fix shift out-of-bounds issue

2023-10-18 Thread Philip Yang
The 255 granularity is from recent Thunk change to increase CWSR area granularity. Thanks for catching this with kernel debug option CC_HAS_UBSAN_ARRAY_BOUNDS enabled. Because 1

Re: [PATCH -next] drm/amd/display: Simplify bool conversion

2023-10-18 Thread Alex Deucher
Applied. Thanks! On Tue, Oct 17, 2023 at 9:22 PM Yang Li wrote: > > ./drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c:4802:84-89: > WARNING: conversion to bool not needed here > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6901 > Signed-off-by: Ya

Re: [PATCH -next] drm/amd/display: Remove unneeded semicolon

2023-10-18 Thread Alex Deucher
Applied. Thanks! On Tue, Oct 17, 2023 at 9:16 PM Yang Li wrote: > > ./drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c:464:3-4: > Unneeded semicolon > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6900 > Signed-off-by: Yang Li > --- > drivers/

Re: [PATCH -next] drm/amd/display: Remove duplicated include in dce110_hwseq.c

2023-10-18 Thread Alex Deucher
Applied. Thanks! On Tue, Oct 17, 2023 at 9:02 PM Yang Li wrote: > > ./drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c: dce110_hwseq.h > is included more than once. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6897 > Signed-off-by: Yang Li > -

Re: [PATCH -next] drm/amd/display: clean up some inconsistent indentings

2023-10-18 Thread Alex Deucher
Applied. Thanks! On Wed, Sep 27, 2023 at 9:14 PM Yang Li wrote: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn35/dcn35_fpu.c:261 > dcn35_update_bw_bounding_box_fpu() warn: inconsistent indenting > > Signed-off-by: Yang Li > --- > .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 144 +

Re: [PATCH v4 13/17] platform/x86/amd/pmf: Add PMF-AMDGPU get interface

2023-10-18 Thread Christian König
Am 18.10.23 um 11:28 schrieb Shyam Sundar S K: On 10/18/2023 2:50 PM, Ilpo Järvinen wrote: On Wed, 18 Oct 2023, Shyam Sundar S K wrote: In order to provide GPU inputs to TA for the Smart PC solution to work, we need to have interface between the PMF driver and the AMDGPU driver. Add the i

RE: [PATCH] drm/amdkfd: Fix shift out-of-bounds issue

2023-10-18 Thread Zhang, Yifan
[AMD Official Use Only - General] Hi Jesse, This patch is only a WA for the error log. How is this issue reproduced ? 255 looks like an invalid value for a prange->granularity, it is better to root cause who set it in the first place. BRs, Yifan -Original Message- From: Jesse Zhang S

[PATCH 2/2] drm/amdgpu: don't use pci_is_thunderbolt_attached()

2023-10-18 Thread Alex Deucher
It's only valid on Intel systems with the Intel VSEC. Use dev_is_removable() instead. This should do the right thing regardless of the platform. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2925 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 dr

RE: [PATCH Review V2 1/1] drm/amdgpu: Enable mca debug mode mode when ras enabled

2023-10-18 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Stanley.Yang Sent: Wednesday, October 18, 2023 21:10 To: amd-gfx@lists.freedesktop.org Cc: Yang, Stanley Subject: [PATCH Review V2 1/1] drm/amdgpu: Enable mca deb

[PATCH 1/2] drm/amdgpu: don't use ATRM for external devices

2023-10-18 Thread Alex Deucher
The ATRM ACPI method is for fetching the dGPU vbios rom image on laptops and all-in-one systems. It should not be used for external add in cards. If the dGPU is thunderbolt connected, don't try ATRM. v2: pci_is_thunderbolt_attached only works for Intel. Use pdev->external_facing instead. v3

[PATCH Review V2 1/1] drm/amdgpu: Enable mca debug mode mode when ras enabled

2023-10-18 Thread Stanley . Yang
Enable smu_v13_0_6 mca debug mode if ras is enabled. Changed from V1: enable mca debug mode if ras enabled. Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/sws

Re: [PATCH v4 15/17] HID: amd_sfh: rename float_to_int() to amd_sfh_float_to_int()

2023-10-18 Thread Ilpo Järvinen
On Wed, 18 Oct 2023, Shyam Sundar S K wrote: > From: Basavaraj Natikar > > Current amd_sfh driver has float_to_int() to convert units from > float to int. This is fine until this function gets called outside of > the current scope of file. > > Add a prefix "amd_sfh" to float_to_int() so that fu

[PATCH] drm/amd/display: Use swap() instead of open coding it

2023-10-18 Thread Jiapeng Chong
Swap is a function interface that provides exchange function. To avoid code duplication, we can use swap function. ./drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c:445:127-128: WARNING opportunity for swap(). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.

Re: [PATCH v4 13/17] platform/x86/amd/pmf: Add PMF-AMDGPU get interface

2023-10-18 Thread Ilpo Järvinen
On Wed, 18 Oct 2023, Shyam Sundar S K wrote: > In order to provide GPU inputs to TA for the Smart PC solution to work, we > need to have interface between the PMF driver and the AMDGPU driver. > > Add the initial code path for get interface from AMDGPU. > > Co-developed-by: Mario Limonciello >

Re: [PATCH v4 16/17] platform/x86/amd/pmf: Add PMF-AMDSFH interface for HPD

2023-10-18 Thread Ilpo Järvinen
On Wed, 18 Oct 2023, Shyam Sundar S K wrote: > From: Basavaraj Natikar > > AMDSFH has information about the User presence information via the Human > Presence Detection (HPD) sensor which is part of the AMD sensor fusion hub. > Add PMF and AMDSFH interface to get this information. > > Co-develo

Re: [PATCH v4 10/17] platform/x86/amd/pmf: Add facility to dump TA inputs

2023-10-18 Thread Ilpo Järvinen
On Wed, 18 Oct 2023, Shyam Sundar S K wrote: > PMF driver sends constant inputs to TA which its gets via the other > subsystems in the kernel. To debug certain TA issues knowing what inputs > being sent to TA becomes critical. Add debug facility to the driver which > can isolate Smart PC and TA re

Re: [PATCH v4 12/17] platform/x86/amd/pmf: dump policy binary data

2023-10-18 Thread Ilpo Järvinen
On Wed, 18 Oct 2023, Shyam Sundar S K wrote: > Sometimes policy binary retrieved from the BIOS maybe incorrect that can > end up in failing to enable the Smart PC solution feature. > > Use print_hex_dump_debug() to dump the policy binary in hex, so that we > debug the issues related to the binary

[PATCH -next] drm/amd/display: Remove unneeded semicolon

2023-10-18 Thread Yang Li
./drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c:464:3-4: Unneeded semicolon Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6900 Signed-off-by: Yang Li --- drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c | 2 +- 1 file changed, 1 insert

Re: [PATCH v4 11/17] platform/x86/amd/pmf: Add capability to sideload of policy binary

2023-10-18 Thread Ilpo Järvinen
On Wed, 18 Oct 2023, Shyam Sundar S K wrote: > A policy binary is OS agnostic, and the same policies are expected to work > across the OSes. At times it becomes difficult to debug when the policies > inside the policy binaries starts to misbehave. Add a way to sideload such > policies independent

[PATCH -next] drm/amd/display: Simplify bool conversion

2023-10-18 Thread Yang Li
./drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c:4802:84-89: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6901 Signed-off-by: Yang Li --- drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 2 +- 1 fi

[PATCH -next] drm/amd/display: Remove duplicated include in dce110_hwseq.c

2023-10-18 Thread Yang Li
./drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c: dce110_hwseq.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6897 Signed-off-by: Yang Li --- drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 2 -- 1 file chang

  1   2   >