[PATCH 2/2] drm/amdgpu: don't use legacy invalidation on MMHUB v3.3

2023-10-12 Thread Lang Yu
Legacy invalidation is not supported. This is missed during rebase. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c index 76b1

[PATCH 1/2] drm/amdgpu: correct NBIO v7.11 programing

2023-10-12 Thread Lang Yu
Use v7.7 before, switch to v7.11 now. Fix incorrect programing. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c | 56 +-- .../asic_reg/nbio/nbio_7_11_0_offset.h| 9 ++- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/

[PATCH 1/2] drm/amdgpu/umsch: correct IP version format

2023-10-12 Thread Lang Yu
FW uses IP_VERSION_MAJ_MIN_REV format. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c b/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c index 63917e2b51b4

Re: [PATCH] Find bo_va before create it when map bo into compute VM

2023-10-12 Thread Christian König
The subject line somehow got messed up. There should be an drm/amdgpu: or drm/amdkfd: prefix. Regards, Christian. Am 12.10.23 um 01:36 schrieb Xiaogang.Chen: From: Xiaogang Chen This is needed to correctly handle BOs imported into compute VM from gfx. Both kfd and gfx should use same bo_va w

[PATCH 2/2] drm/amdgpu/umsch: fix missing stuff during rebase

2023-10-12 Thread Lang Yu
These are missed during rebase. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index 771ef8017a98..3713d0749813 100644 --- a/drivers

[PATCH] drm/amdgpu: Avoid FRU EEPROM access on APU

2023-10-12 Thread Lijo Lazar
FRU EEPROM access is not valid for APU devices. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c inde

[PATCH] drm/amdgpu: flush the correct vmid tlb for specific pasid

2023-10-12 Thread Yifan Zhang
flush the correct vmid tlb for specific pasid on gmc 11. Signed-off-by: Yifan Zhang --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c index f4bb3886d1bc..

Re: [PATCH] drm/amdgpu: Avoid FRU EEPROM access on APU

2023-10-12 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Reviewed-by: Yang Wang Best Regards Kevin 发件人: Lazar, Lijo 发送时间: 星期四, 十月 12, 2023 15:36 收件人: amd-gfx@lists.freedesktop.org 抄送: Zhang, Hawking ; Deucher, Alexander ; Wang, Yang(Kevin) 主题: [PATCH] drm/amdgpu: Avoid FRU EEPROM a

RE: [PATCH 2/2] drm/amdgpu: don't use legacy invalidation on MMHUB v3.3

2023-10-12 Thread Zhang, Yifan
[AMD Official Use Only - General] This series is: Reviewed-by: Yifan Zhang -Original Message- From: Yu, Lang Sent: Thursday, October 12, 2023 3:32 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Yu, Lang Subject: [PATCH 2/2] drm/amdgpu: don't use legacy i

Re: [PATCH] drm/amdgpu: flush the correct vmid tlb for specific pasid

2023-10-12 Thread Christian König
Am 12.10.23 um 09:41 schrieb Yifan Zhang: flush the correct vmid tlb for specific pasid on gmc 11. Signed-off-by: Yifan Zhang Good catch, Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/g

[PATCH 1/5] drm/amdgpu: define ras_reset_error_count function

2023-10-12 Thread Tao Zhou
Make the code architecture more simple. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c| 17 + drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 ++-

[PATCH 2/5] drm/amdgpu: add set/get mca debug mode operations

2023-10-12 Thread Tao Zhou
Record the debug mode status in RAS. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 21 + drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 5 + 2 files changed, 26 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/

[PATCH 3/5] drm/amd/pm: record mca debug mode in RAS

2023-10-12 Thread Tao Zhou
Call amdgpu_ras_set_mca_debug_mode when we set mca debug mode in smu v13_0_6. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/

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

2023-10-12 Thread Tao Zhou
PMFW is responsible for RAS error reset in some conditions, driver can skip the operation. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/driver

[PATCH 5/5] drm/amdgpu: reuse amdgpu_ras_reset_error_count code

2023-10-12 Thread Tao Zhou
To simplify the code of amdgpu_ras_reset_error_status without logical change. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 29 +++-- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/

RE: [PATCH 2/2] drm/amdgpu/umsch: fix missing stuff during rebase

2023-10-12 Thread Gopalakrishnan, Veerabadhran (Veera)
[AMD Official Use Only - General] The series is Reviewed-by: Veerabadhran Gopalakrishnan -Veera -Original Message- From: Yu, Lang Sent: Thursday, October 12, 2023 1:05 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Gopalakrishnan, Veerabadhran (Veera) ; Yu, Lang Subj

RE: [PATCH v2] drm/amdgpu: Expose ras version & schema info

2023-10-12 Thread Wang, Yang(Kevin)
Tip: ffs(AMDGPU_RAS_ERROR__POISON) - 1) == __ffs(AMDGPU_RAS_ERROR__POISON) if you want to get a value which start from 0, you can use __ffs() directly. Best Regards, Kevin -Original Message- From: amd-gfx On Behalf Of Lazar, Lijo Sent: Wednesday, October 11, 2023 5:58 PM To: Kamal, Asa

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

2023-10-12 Thread Zhang, Hawking
[AMD Official Use Only - General] - if (!amdgpu_ras_is_supported(adev, block)) + /* skip ras error reset in gpu reset */ + if (amdgpu_in_reset(adev) && + mca_funcs && mca_funcs->mca_set_debug_mode) + return 0; We should check RAS in_recovery flag in such

[PATCH 1/6] drm/amdgpu: make err_data structure built-in for ras_manager

2023-10-12 Thread Yang Wang
(No effect outside the ras_mgr data structure) Since a new member was added to the ras_err_data data structure, it becomes unreasonable for the ras_mgr instance to contain this data, because ras mgr only uses the 2 member information of ue_count/ce_count in err_data. This patch changes the code

[PATCH 4/6] drm/amdgpu: add RAS error info support for sdma_v4_4_2.

2023-10-12 Thread Yang Wang
add RAS error info support for sdma_v4_4_2. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.

[PATCH 2/6] drm/amdgpu: add ras_err_info to identify RAS error source

2023-10-12 Thread Yang Wang
introduced "ras_err_info" to better identify a RAS ERROR source. NOTE: For legacy chips, keep the original RAS error print format. v1: RAS errors may come from different dies during a RAS error query, therefore, need a new data structure to identify the source of RAS ERROR. v2: - use new data st

[PATCH 3/6] drm/amdgpu: add RAS error info support for umc_v12_0

2023-10-12 Thread Yang Wang
add RAS error info support for umc_v12_0. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/umc_v12_

[PATCH 6/6] drm/amdgpu: add RAS error info support for mmhub_v1_8

2023-10-12 Thread Yang Wang
add RAS error info support for mmhub_v1_8. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c b/drivers/gpu/drm/amd/amdgpu/mmhub_

[PATCH 5/6] drm/amdgpu: add RAS error info support for gfx_v9_4_3

2023-10-12 Thread Yang Wang
add RAS error info support for gfx_v9_4_3. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

RE: [PATCH 2/6] drm/amdgpu: add ras_err_info to identify RAS error source

2023-10-12 Thread Zhang, Hawking
[AMD Official Use Only - General] + dev_info(adev->dev, "Total %ld uncorrectable hardware errors detected in %s block\n", +ras_mgr->err_data.ue_count, blk_name); Please remove "Total" from the kernel message. With that addressed, the series is Reviewed-by:

Re: [PATCH] drm/amdgpu: disable GFXOFF and PG during compute for GFX9

2023-10-12 Thread Alex Deucher
On Wed, Oct 11, 2023 at 9:49 PM Zhang, Jesse(Jie) wrote: > > [AMD Official Use Only - General] > > -Original Message- > From: Alex Deucher > Sent: Wednesday, October 11, 2023 10:20 PM > To: Zhang, Jesse(Jie) > Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander > ; Yang, Philip ; Kueh

Re: [PATCH] Find bo_va before create it when map bo into compute VM

2023-10-12 Thread Chen, Xiaogang
On 10/12/2023 2:35 AM, Christian König wrote: The subject line somehow got messed up. There should be an drm/amdgpu: or drm/amdkfd: prefix. yes, will resend it. Regards Xiaogang. Regards, Christian. Am 12.10.23 um 01:36 schrieb Xiaogang.Chen: From: Xiaogang Chen This is needed to cor

Re: [PATCH] Find bo_va before create it when map bo into compute VM

2023-10-12 Thread Felix Kuehling
On 2023-10-11 19:36, Xiaogang.Chen wrote: From: Xiaogang Chen Since you are the author of this updated patch, you should also add your Signed-off-by below. This is needed to correctly handle BOs imported into compute VM from gfx. Both kfd and gfx should use same bo_va when map the Bos in

Re: [PATCH] Find bo_va before create it when map bo into compute VM

2023-10-12 Thread Chen, Xiaogang
On 10/12/2023 10:20 AM, Felix Kuehling wrote: On 2023-10-11 19:36, Xiaogang.Chen wrote: From: Xiaogang Chen Since you are the author of this updated patch, you should also add your Signed-off-by below. ok, thanks. This is needed to correctly handle BOs imported into compute VM from

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

2023-10-12 Thread Alex Deucher
On Tue, Oct 10, 2023 at 9:32 PM Ma Ke wrote: > > In radeon_tv_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 point dereference. > > Signed-off-by: Ma Ke Applied. Tha

[PATCH v2] drm/amdgpu: Correctly use bo_va->ref_count in compute VMs

2023-10-12 Thread Xiaogang . Chen
From: Xiaogang Chen This is needed to correctly handle BOs imported into compute VM from gfx. Both kfd and gfx should use same bo_va and set bo_va->ref_count correctly when map the Bos into same VM, otherwise we may trigger kernel general protection when iterate mappings over bo_va's valids or in

[PATCH] drm/amdgpu: Add EXT_COHERENT override for NUMA local nodes

2023-10-12 Thread David Francis
On NUMA systems, local memory gets the local mtype, set by an override callback. If EXT_COHERENT is set, memory will be set as MTYPE_UC by default, with local memory MTYPE_CC. Add an option in the override function for this case, and add a check to ensure it is not used on UNCACHED memory. Signed

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

2023-10-12 Thread Jim Cromie
hi Jason, DRM-folk 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 is replaced by: DYNDBG_CLASSMAP_DEFINE

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

2023-10-12 Thread Jim Cromie
hi Jason, DRM-folk 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 is replaced by: DYNDBG_CLASSMAP_DEFINE

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

2023-10-12 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 v7 01/25] test-dyndbg: fixup CLASSMAP usage error

2023-10-12 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 v7 04/25] dyndbg: replace classmap list with a vector

2023-10-12 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 v7 03/25] dyndbg: make ddebug_class_param union members same size

2023-10-12 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 v7 08/25] dyndbg: reduce verbose/debug clutter

2023-10-12 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 v7 06/25] dyndbg: split param_set_dyndbg_classes to module/wrapper fns

2023-10-12 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 v7 05/25] dyndbg: ddebug_apply_class_bitmap - add module arg, select on it

2023-10-12 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 v7 10/25] dyndbg: tighten ddebug_class_name() 1st arg type

2023-10-12 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 v7 12/25] dyndbg: reduce verbose=3 messages in ddebug_add_module

2023-10-12 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 v7 09/25] dyndbg: silence debugs with no-change updates

2023-10-12 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 v7 15/25] dyndbg: add for_each_boxed_vector

2023-10-12 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 v7 14/25] dyndbg-API: fix CONFIG_DRM_USE_DYNAMIC_DEBUG regression

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

2023-10-12 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 v7 16/25] dyndbg: refactor ddebug_classparam_clamp_input

2023-10-12 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 v7 07/25] dyndbg: drop NUM_TYPE_ARRAY

2023-10-12 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 v7 11/25] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap

2023-10-12 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 v7 19/25] dyndbg: reserve flag bit _DPRINTK_FLAGS_PREFIX_CACHED

2023-10-12 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 v7 17/25] dyndbg-API: promote DYNDBG_CLASSMAP_PARAM to API

2023-10-12 Thread Jim Cromie
move macro from test-dynamic-debug.c into header, and refine it. Distinguish the 2 use cases of DYNDBG_CLASSMAP_PARAM* 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 new us

[PATCH v7 20/25] dyndbg: add _DPRINTK_FLAGS_INCL_LOOKUP

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

[PATCH v7 22/25] dyndbg: improve err report in attach_user_module_classes

2023-10-12 Thread Jim Cromie
convert a WARN on 3 conditions, into BUG_ON 2 of them (which don't happen), and an early return on (!cli->user_mod_name), which *was* happening, so should be seen going forward. Maybe this should be a WARN. NB: The underlying problem was a missing __align(8) in the DYNDBG_CLASSMAP_USE, which mani

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

2023-10-12 Thread Jim Cromie
Add some basic info on classmap usage and api Signed-off-by: Jim Cromie --- v5- adjustments per Randy Dunlap, me --- .../admin-guide/dynamic-debug-howto.rst | 59 ++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/dynamic-debug-howto

[PATCH v7 23/25] drm: use correct ccflags-y spelling

2023-10-12 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 v7 21/25] dyndbg: refactor *dynamic_emit_prefix

2023-10-12 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 v7 25/25] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2023-10-12 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 v7 24/25] drm-drivers: DRM_CLASSMAP_USE in 2nd batch of drivers, helpers

2023-10-12 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'

Re: [PATCH] drm/amdgpu: Add EXT_COHERENT override for NUMA local nodes

2023-10-12 Thread Felix Kuehling
On 2023-10-12 12:39, David Francis wrote: On NUMA systems This is not applicable to all NUMA systems. It's specific to big APU systems with multiple NUMA nodes. , local memory gets the local mtype, set by an override callback. If EXT_COHERENT is set, memory will be set as MTYPE_UC by defau

Re: [PATCH v2] drm/amdgpu: Correctly use bo_va->ref_count in compute VMs

2023-10-12 Thread Felix Kuehling
On 2023-10-12 12:34, Xiaogang.Chen wrote: From: Xiaogang Chen This is needed to correctly handle BOs imported into compute VM from gfx. Both kfd and gfx should use same bo_va and set bo_va->ref_count correctly when map the Bos into same VM, otherwise we may trigger kernel general protection whe

Re: [PATCH v2] drm/amdgpu: Correctly use bo_va->ref_count in compute VMs

2023-10-12 Thread Chen, Xiaogang
On 10/12/2023 12:48 PM, Felix Kuehling wrote: On 2023-10-12 12:34, Xiaogang.Chen wrote: From: Xiaogang Chen This is needed to correctly handle BOs imported into compute VM from gfx. Both kfd and gfx should use same bo_va and set bo_va->ref_count correctly when map the Bos into same VM, ot

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

2023-10-12 Thread Hamza Mahfooz
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. Cc: sta...@vger.kernel.org # 6.5+ Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2610 Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/d

[PATCH] drm/amdgpu/pm: update SMU 13.0.0 PMFW version check

2023-10-12 Thread Alex Deucher
Update the PMFW version check the the ROCm optimizations. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/

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

2023-10-12 Thread Harry Wentland
On 2023-10-12 14:49, 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. > > Cc: sta...@vger.kernel.org # 6.5+ > Link: https://gitlab.freedesktop.org/drm/amd/-/issues/

Re: [PATCH 1/2] drm/amdgpu: correct NBIO v7.11 programing

2023-10-12 Thread Deucher, Alexander
[Public] Acked-by: Alex Deucher From: Yu, Lang Sent: Thursday, October 12, 2023 3:31 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Yu, Lang Subject: [PATCH 1/2] drm/amdgpu: correct NBIO v7.11 programing Use v7.7 before, switch t

Re: [PATCH] drm/amdgpu: Add EXT_COHERENT override for NUMA local nodes

2023-10-12 Thread Philip Yang
On 2023-10-12 12:39, David Francis wrote: On NUMA systems, local memory gets the local mtype, set by an override callback. If EXT_COHERENT is set, memory will be set as MTYPE_UC by default, with local memory MTYPE_CC. Add an option in the override function f

Re: [PATCH] drm/amdgpu/pm: update SMU 13.0.0 PMFW version check

2023-10-12 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking Get Outlook for iOS From: amd-gfx on behalf of Alex Deucher Sent: Friday, October 13, 2023 3:12:47 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexande

[PATCH v2] drm/amd/swsmu: update smu v14_0_0 header files and metrics table

2023-10-12 Thread Li Ma
Update driver if, pmfw and ppsmc header files. Add new gpu_metrics_v3_0 for metrics table updated in driver if and reserve legacy metrics table to maintain backward compatibility. --- v1: Update header files and add gpu_metrics_v3_0. v2: Update smu_types.h, smu headers and drop smu_cmn_get_smc_vers

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

2023-10-12 Thread Lang Yu
Add missing IP callbacks. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c index 4bd076e9e367..f5fdde5181f7 10

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

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