RE: [PATCH] drm/amdkfd: fix warning in SVM debug statement

2023-03-06 Thread Quan, Evan
[AMD Official Use Only - General] Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Tuesday, March 7, 2023 6:43 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH] drm/amdkfd: fix warning in SVM debug statemen

Re: [PATCH] drm/amdgpu: Force signal hw_fences that are embedded in non-sched jobs

2023-03-06 Thread Christian König
Am 07.03.23 um 08:02 schrieb YuBiao Wang: [Why] For engines not supporting soft reset, i.e. VCN, there will be a failed ib test before mode 1 reset during asic reset. The fences in this case are never signaled and next time when we try to free the sa_bo, kernel will hang. [How] During pre_asic_r

Re: [PATCH] drm/amdkfd: Fixed kfd_process cleanup on module exit.

2023-03-06 Thread Christian König
Am 06.03.23 um 22:58 schrieb David Belanger: Handle case when module is unloaded (kfd_exit) before a process space (mm_struct) is released. Well that should never ever happen in the first place. It sounds like we are missing grabbing module references. Regards, Christian. Signed-off-by: D

[PATCH] drm/amdgpu: Force signal hw_fences that are embedded in non-sched jobs

2023-03-06 Thread YuBiao Wang
[Why] For engines not supporting soft reset, i.e. VCN, there will be a failed ib test before mode 1 reset during asic reset. The fences in this case are never signaled and next time when we try to free the sa_bo, kernel will hang. [How] During pre_asic_reset, driver will clear job fences and after

RE: [PATCH] drm/amdgpu: Fix the warning info when removing amdgpu device

2023-03-06 Thread Li, Lyndon
[AMD Official Use Only - General] Thanks, will update it. Regards, Lyndon > -Original Message- > From: Christian König > Sent: Tuesday, March 7, 2023 2:22 PM > To: Chen, Guchun ; Li, Lyndon > ; amd-gfx@lists.freedesktop.org > Cc: Xu, Feifei ; Ma, Jun ; > Prosyak, Vitaly ; Deucher, Alexa

Re: [PATCH] drm/amdgpu: Fix the warning info when removing amdgpu device

2023-03-06 Thread Christian König
The commit message reads a bit bumpy. Generally best practice are: Short (72 chars or less) summary More detailed explanatory text. Wrap it to 72 characters. The blank line separating the summary from the body is critical (unless you omit the body entirely). Write your commit message in the imp

Re: [PATCH v6 32/57] nouveau: adapt NV_DEBUG, NV_ATOMIC to use DRM.debug

2023-03-06 Thread jim . cromie
On Mon, Mar 6, 2023 at 11:50 AM Timur Tabi wrote: > > On Sun, Sep 4, 2022 at 4:48 PM Jim Cromie wrote: > > > > These 2 macros used drm_debug_enabled() on DRM_UT_{DRIVER,ATOMIC} > > respectively, replace those with drm_dbg_##cat invocations. > > > > this results in new class'd prdbg callsites: > >

RE: [PATCH 2/2] drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21

2023-03-06 Thread Zhang, Hawking
We need another one to fix the same issue in nv_read_register. The series is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Monday, March 6, 2023 23:54 To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH

RE: [PATCH] drm/amdgpu: Fix the warning info when removing amdgpu device

2023-03-06 Thread Chen, Guchun
Reviewed-by: Guchun Chen Regards, Guchun -Original Message- From: lyndonli Sent: Tuesday, March 7, 2023 10:12 AM To: amd-gfx@lists.freedesktop.org Cc: Prosyak, Vitaly ; Koenig, Christian ; Deucher, Alexander ; Chen, Guchun ; Xu, Feifei ; Ma, Jun ; Li, Lyndon Subject: [PATCH] drm/am

[PATCH] drm/amdgpu: Fix the warning info when removing amdgpu device

2023-03-06 Thread lyndonli
Actually, the drm_dev_enter in psp_cmd_submit_buf does not protect anything. And it is not used to prevent concurrent access. If DRM device is unplugged, it will always check the condition in WARN_ON. We'd better not keep adding commands to the list. Simply moving the drm_dev_enter/drm_dev_exit hig

Re: [PATCH] drm/amdkfd: Fixed kfd_process cleanup on module exit.

2023-03-06 Thread Felix Kuehling
Am 2023-03-06 um 16:58 schrieb David Belanger: Handle case when module is unloaded (kfd_exit) before a process space (mm_struct) is released. Signed-off-by: David Belanger --- drivers/gpu/drm/amd/amdkfd/kfd_module.c | 4 ++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 57 ++

[PATCH] drm/amdkfd: fix warning in SVM debug statement

2023-03-06 Thread Alex Deucher
Print a long long value. In file included from ./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_object.h:32, from drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:29: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c: In function ‘svm_migrate_copy_to_vram’: ./drivers/gpu/drm/amd/

Re: [v2] drm/amd/pm: Fix sienna cichlid incorrect OD volage after resume

2023-03-06 Thread Alex Deucher
+ Evan, Kenneth On Mon, Mar 6, 2023 at 2:49 PM Limonciello, Mario wrote: > > On 3/4/2023 17:44, Błażej Szczygieł wrote: > > Always setup overdrive tables after resume. Preserve only some > > user-defined settings in user_overdrive_table if they're set. > > > > Copy restored user_overdrive_table i

[PATCH] drm/amdkfd: Fixed kfd_process cleanup on module exit.

2023-03-06 Thread David Belanger
Handle case when module is unloaded (kfd_exit) before a process space (mm_struct) is released. Signed-off-by: David Belanger --- drivers/gpu/drm/amd/amdkfd/kfd_module.c | 4 ++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 57 2 files changed, 61 insertions(+) diff --git

Re: [PATCH v2 RESEND] drm/amdgpu: register a vga_switcheroo client for MacBooks with apple-gmux

2023-03-06 Thread Alex Deucher
Applied. Thanks! Alex On Fri, Mar 3, 2023 at 6:35 AM Orlando Chamberlain wrote: > > Commit 3840c5bcc245 ("drm/amdgpu: disentangle runtime pm and > vga_switcheroo") made amdgpu only register a vga_switcheroo client for > GPU's with PX, however AMD GPUs in dual gpu Apple Macbooks do need to > reg

Re: [v2] drm/amd/pm: Fix sienna cichlid incorrect OD volage after resume

2023-03-06 Thread Limonciello, Mario
On 3/4/2023 17:44, Błażej Szczygieł wrote: Always setup overdrive tables after resume. Preserve only some user-defined settings in user_overdrive_table if they're set. Copy restored user_overdrive_table into od_table to get correct values. Signed-off-by: Błażej Szczygieł --- .../amd/pm/swsmu

Re: [PATCH] drm/amd/display: change several dcn30 variables storage-class-specifier to static

2023-03-06 Thread Alex Deucher
Applied. Thanks! Alex On Sun, Mar 5, 2023 at 7:52 AM Tom Rix wrote: > > smatch reports these similar problems in dcn30 > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dwb.c:223:25: > warning: symbol 'dcn30_dwbc_funcs' was not declared. Should it be static? > drivers/gpu/drm/amd/amdgpu/

Re: [PATCH] drm/amd/display: change several dcn20 variables storage-class-specifier to static

2023-03-06 Thread Alex Deucher
Applied. Thanks! Alex On Sat, Mar 4, 2023 at 11:22 AM Tom Rix wrote: > > smatch reports these similar problems in dcn20 > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dsc.c:53:24: > warning: symbol 'dcn20_dsc_funcs' was not declared. Should it be static? > drivers/gpu/drm/amd/amdgpu/.

Re: [PATCH] drm/amd/display: change several dcn201 variables storage-class-specifier to static

2023-03-06 Thread Alex Deucher
Applied. Thanks! Alex On Sat, Mar 4, 2023 at 10:26 AM Tom Rix wrote: > > smatch reports these similar problems in dcn201 > drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c:165:22: > warning: symbol 'dcn201_funcs' was not declared. Should it be static? > drivers/gpu/drm

Re: [PATCH v6 32/57] nouveau: adapt NV_DEBUG, NV_ATOMIC to use DRM.debug

2023-03-06 Thread Timur Tabi
On Sun, Sep 4, 2022 at 4:48 PM Jim Cromie wrote: > > These 2 macros used drm_debug_enabled() on DRM_UT_{DRIVER,ATOMIC} > respectively, replace those with drm_dbg_##cat invocations. > > this results in new class'd prdbg callsites: > > :#> grep nouveau /proc/dynamic_debug/control | grep class | wc >

RE: [PATCH] drm/amdgpu: disable cstate properly for driver reloading scenario

2023-03-06 Thread Deucher, Alexander
[AMD Official Use Only - General] > -Original Message- > From: Lazar, Lijo > Sent: Monday, March 6, 2023 12:42 AM > To: Deucher, Alexander ; Quan, Evan > ; amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdgpu: disable cstate properly for driver > reloading scenario > > > > O

Re: [PATCH] amdgpu: Avoid building on UML

2023-03-06 Thread Felix Kuehling
Looks like this patch got lost over the holidays. Alex, are you OK with applying this patch? Or are people looking for a more general solution to not build HW drivers for UML? FWIW: Acked-by: Felix Kuehling Am 2023-01-12 um 23:30 schrieb Peter Foley: The amdgpu driver tries to use fields no

[linux-next:master] BUILD REGRESSION dc837c1a5137a8cf2e9432c1891392b6a66f4d8d

2023-03-06 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: dc837c1a5137a8cf2e9432c1891392b6a66f4d8d Add linux-next specific files for 20230306 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202302100744.d1zzxxfn-...@intel.com https

[PATCH 2/2] drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21

2023-03-06 Thread Alex Deucher
Properly skip non-existent registers as well. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc21.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/

[PATCH 1/2] drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc15

2023-03-06 Thread Alex Deucher
Properly skip non-existent registers as well. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/dr

Re: Build regressions/improvements in v6.3-rc1

2023-03-06 Thread Geert Uytterhoeven
On Mon, 6 Mar 2023, Geert Uytterhoeven wrote: Below is the list of build error/warning regressions/improvements in v6.3-rc1[1] compared to v6.2[2]. Summarized: - build errors: +9/-14 - build warnings: +4/-1447 Happy fixing! ;-) Thanks to the linux-next team for providing the build service.

[PATCH] drm/amd/display: remove an unnecessary NULL check

2023-03-06 Thread Danila Chernetsov
The 'pipe' can't be NULL because it points to an element of array. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixed: 7cf2c840c6b5 (drm/amd/display: Commit validation set from state) Signed-off-by: Danila Chernetsov --- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 fi

Re: [PATCH 1/2] drm/amdgpu: Move to common indirect reg access helper

2023-03-06 Thread Christian König
Am 06.03.23 um 09:04 schrieb Hawking Zhang: Replace soc15, nv, soc21 specific callbacks with common one. so we don't need to duplicate code when introduce new asics. Nice cleanup. Is pcie_rreg/pcie_wreg/... now still set to anything else than the common functions? If not we might also remove t

[PATCH v2] drm/ttm: Change the meaning of the fields in the ttm_place structure from pfn to bytes

2023-03-06 Thread Somalapuram Amaranath
The ttm_plac structure allows page-based allocation, to support byte-based allocation using default or custom ttm_resource_manager_func function like ttm_range_man_alloc, amdgpu_gtt_mgr_new, i915_ttm_buddy_man_alloc,nouveau_vram_manager_new etc. Change the ttm_place structure member fpfn, lpfn, mem

Re: [PATCH] drm/amdgpu: Retire pcie_gen3_enable function

2023-03-06 Thread Gao, Likun
[AMD Official Use Only - General] This patch is Reviewed-by: Likun Gao . Regards, Likun 发件人: amd-gfx 代表 Hawking Zhang 发送时间: 2023年3月6日星期一 下午7:38 收件人: amd-gfx@lists.freedesktop.org ; Gao, Likun 抄送: Zhang, Hawking 主题: [PATCH] drm/amdgpu: Retire pcie_gen3_en

[PATCH] drm/amdgpu: Retire pcie_gen3_enable function

2023-03-06 Thread Hawking Zhang
Not needed since from vi. drop the function so we don't duplicate code when introduce new asics. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/nv.c| 17 - drivers/gpu/drm/amd/amdgpu/soc15.c | 20 drivers/gpu/drm/amd/amdgpu/soc21.c | 17 -

Re: [PATCH] drm/amdgpu: Use uncached ioremap() for LoongArch

2023-03-06 Thread WANG Xuerui
On 2023/3/6 10:49, Huacai Chen wrote: Hi, Christian, On Mon, Mar 6, 2023 at 12:40 AM Christian König wrote: Am 05.03.23 um 06:21 schrieb Huacai Chen: LoongArch maintains cache coherency in hardware, but its WUC attribute (Weak-ordered UnCached, which is similar to WC) is out of the scope of

[PATCH] drivers/gpu: fix typo in comment

2023-03-06 Thread Husain Alshehhi
Replace "isntance" with "instance". Signed-off-by: Husain Alshehhi --- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h| 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmu

[PATCH] drm/amd/display: change several dcn30 variables storage-class-specifier to static

2023-03-06 Thread Tom Rix
smatch reports these similar problems in dcn30 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dwb.c:223:25: warning: symbol 'dcn30_dwbc_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mmhubbub.c:214:28: warning: symbol 'dcn30_mmhubbub_fun

[PATCH] drm/amd/display: change several dcn20 variables storage-class-specifier to static

2023-03-06 Thread Tom Rix
smatch reports these similar problems in dcn20 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dsc.c:53:24: warning: symbol 'dcn20_dsc_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dwb.c:304:25: warning: symbol 'dcn20_dwbc_funcs' was not

[PATCH] drm/amd/display: add prefix to amdgpu_dm_plane.h functions

2023-03-06 Thread David Tadokoro
From: David Tadokoro The amdgpu_dm_plane.h functions didn't have names that indicated where they were declared. To better filter results in debug tools like ftrace, prefix these functions with 'amdgpu_dm_plane_'. Note that we may want to make this same change in other files like amdgpu_dm_crtc.

[PATCH] drm/amd/display: change several dcn201 variables storage-class-specifier to static

2023-03-06 Thread Tom Rix
smatch reports these similar problems in dcn201 drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c:165:22: warning: symbol 'dcn201_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_resource.c:77:30: warning: symbol 'dcn201

Re: [PATCH] drm/amd/display: Simplify same effect if/else blocks

2023-03-06 Thread Joe Perches
On Fri, 2023-03-03 at 15:35 -0500, Harry Wentland wrote: > Actually I was wrong. Too many similar-looking snippets in this > function made me look at the wrong thing. This change is fine and > Reviewed-by: Harry Wentland

[PATCH] drm/amdgpu: Use uncached ioremap() for LoongArch

2023-03-06 Thread Huacai Chen
LoongArch maintains cache coherency in hardware, but its WUC attribute (Weak-ordered UnCached, which is similar to WC) is out of the scope of cache coherency machanism. This means WUC can only used for write-only memory regions. So use uncached ioremap() for LoongArch in the amdgpu driver. Signed-

RE: [PATCH 2/2] drm/amdgpu: Move to common helper to query soc rev_id

2023-03-06 Thread Gao, Likun
Series is Reviewed-by: Likun Gao . Regards, Likun -Original Message- From: amd-gfx On Behalf Of Hawking Zhang Sent: Monday, March 6, 2023 4:04 PM To: amd-gfx@lists.freedesktop.org; Gao, Likun Cc: Zhang, Hawking Subject: [PATCH 2/2] drm/amdgpu: Move to common helper to query soc rev_id

[PATCH 2/2] drm/amdgpu: Move to common helper to query soc rev_id

2023-03-06 Thread Hawking Zhang
Replace soc15, nv, soc21 get_rev_id callback with common helper so we don't need to duplicate code when introduce new asics. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 drivers/gpu/drm/amd/amdg

[PATCH 1/2] drm/amdgpu: Move to common indirect reg access helper

2023-03-06 Thread Hawking Zhang
Replace soc15, nv, soc21 specific callbacks with common one. so we don't need to duplicate code when introduce new asics. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 32 +++--- drivers/gpu/drm/amd/amdgp