Re: [PATCH v2 1/1] drm/amdgpu: Fix MMIO HDP flush on SRIOV

2021-11-17 Thread Lazar, Lijo
On 11/18/2021 5:52 AM, Felix Kuehling wrote: On 2021-11-10 11:34 a.m., Felix Kuehling wrote: Am 2021-11-10 um 11:11 a.m. schrieb Lazar, Lijo: [Public] (... && !amdgpu_sriov_vf(adev)) This kind of closes the door for all versions. My thought was - having it in the same function provides a

[PATCH] drm/amdgpu: reset asic after system-wide suspend aborted

2021-11-17 Thread Prike Liang
Do ASIC reset at the moment Sx suspend aborted behind of amdgpu suspend to keep AMDGPU in a clean reset state and that can avoid re-initialize device improperly error. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |

Re: [PATCH v2] drm/amdkfd: Retrieve SDMA numbers from amdgpu

2021-11-17 Thread Felix Kuehling
Am 2021-11-18 um 12:39 a.m. schrieb Amber Lin: > Instead of hard coding the number of sdma engines and the number of > sdma_xgmi engines in the device_info table, get the number of toal SDMA > instances from amdgpu. The first two engines are sdma engines and the > rest are sdma-xgmi engines unless

[PATCH v2] drm/amdkfd: Retrieve SDMA numbers from amdgpu

2021-11-17 Thread Amber Lin
Instead of hard coding the number of sdma engines and the number of sdma_xgmi engines in the device_info table, get the number of toal SDMA instances from amdgpu. The first two engines are sdma engines and the rest are sdma-xgmi engines unless the ASIC doesn't support XGMI. v2: add kfd_ prefix to

Re: 回复: 回复: [PATCH Review 3/4] drm/amdgpu: add message smu to get ecc_table

2021-11-17 Thread Lazar, Lijo
On 11/18/2021 9:56 AM, Yang, Stanley wrote: [AMD Official Use Only] -邮件原件- 发件人: Lazar, Lijo 发送时间: Thursday, November 18, 2021 12:04 PM 收件人: Yang, Stanley ; amd- g...@lists.freedesktop.org; Zhang, Hawking ; Clements, John ; Quan, Evan ; Wang, Yang(Kevin) 主题: Re: 回复: [PATCH Review

回复: 回复: [PATCH Review 3/4] drm/amdgpu: add message smu to get ecc_table

2021-11-17 Thread Yang, Stanley
[AMD Official Use Only] > -邮件原件- > 发件人: Lazar, Lijo > 发送时间: Thursday, November 18, 2021 12:04 PM > 收件人: Yang, Stanley ; amd- > g...@lists.freedesktop.org; Zhang, Hawking ; > Clements, John ; Quan, Evan > ; Wang, Yang(Kevin) > 主题: Re: 回复: [PATCH Review 3/4] drm/amdgpu: add message smu t

[pull] amdgpu, amdkfd drm-fixes-5.16

2021-11-17 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.16. The following changes since commit fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf: Linux 5.16-rc1 (2021-11-14 13:56:52 -0800) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-5.16-2021-11-17 for you to fe

Re: 回复: [PATCH Review 4/4] query umc error info from ecc_table

2021-11-17 Thread Lazar, Lijo
On 11/18/2021 9:29 AM, Yang, Stanley wrote: [AMD Official Use Only] -邮件原件- 发件人: Lazar, Lijo 发送时间: Wednesday, November 17, 2021 7:15 PM 收件人: Yang, Stanley ; amd- g...@lists.freedesktop.org; Zhang, Hawking ; Clements, John ; Quan, Evan ; Wang, Yang(Kevin) 主题: Re: [PATCH Review 4/4]

Re: 回复: [PATCH Review 3/4] drm/amdgpu: add message smu to get ecc_table

2021-11-17 Thread Lazar, Lijo
On 11/18/2021 9:07 AM, Yang, Stanley wrote: [AMD Official Use Only] -邮件原件- 发件人: Lazar, Lijo 发送时间: Wednesday, November 17, 2021 7:24 PM 收件人: Yang, Stanley ; amd- g...@lists.freedesktop.org; Zhang, Hawking ; Clements, John ; Quan, Evan ; Wang, Yang(Kevin) 主题: Re: [PATCH Review 3/4]

回复: [PATCH Review 4/4] query umc error info from ecc_table

2021-11-17 Thread Yang, Stanley
[AMD Official Use Only] > -邮件原件- > 发件人: Lazar, Lijo > 发送时间: Wednesday, November 17, 2021 7:15 PM > 收件人: Yang, Stanley ; amd- > g...@lists.freedesktop.org; Zhang, Hawking ; > Clements, John ; Quan, Evan > ; Wang, Yang(Kevin) > 主题: Re: [PATCH Review 4/4] query umc error info from ecc_tab

[PATCH 1/2] drm/amdgpu: Generalize KFD dmabuf import

2021-11-17 Thread Felix Kuehling
Use proper amdgpu_gem_prime_import function to handle all kinds of imports. Remember the dmabuf reference to enable proper multi-GPU attachment to multiple VMs without erroneously re-exporting the underlying BO multiple times. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdgpu/amdgpu_amdkf

[PATCH 2/2] drm/amdkfd: Implement DMA buf fd export for RDMA

2021-11-17 Thread Felix Kuehling
Exports a DMA buf fd of a given KFD buffer handle. This is intended for the new upstreamable RDMA solution coming to UCX and libfabric. The corresponding user mode change (Thunk API and kfdtest) is here: https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/commits/fxkamd/dmabuf Signed-off-by

回复: [PATCH Review 3/4] drm/amdgpu: add message smu to get ecc_table

2021-11-17 Thread Yang, Stanley
[AMD Official Use Only] > -邮件原件- > 发件人: Lazar, Lijo > 发送时间: Wednesday, November 17, 2021 7:24 PM > 收件人: Yang, Stanley ; amd- > g...@lists.freedesktop.org; Zhang, Hawking ; > Clements, John ; Quan, Evan > ; Wang, Yang(Kevin) > 主题: Re: [PATCH Review 3/4] drm/amdgpu: add message smu to ge

回复: [PATCH Review 2/4] drm/amdgpu: add new query interface for umc block

2021-11-17 Thread Yang, Stanley
[AMD Official Use Only] > -邮件原件- > 发件人: Lazar, Lijo > 发送时间: Wednesday, November 17, 2021 7:36 PM > 收件人: Yang, Stanley ; amd- > g...@lists.freedesktop.org; Zhang, Hawking ; > Clements, John ; Quan, Evan > ; Wang, Yang(Kevin) > 主题: Re: [PATCH Review 2/4] drm/amdgpu: add new query interfa

Re: [PATCH v2 1/1] drm/amdgpu: Fix MMIO HDP flush on SRIOV

2021-11-17 Thread Felix Kuehling
On 2021-11-10 11:34 a.m., Felix Kuehling wrote: Am 2021-11-10 um 11:11 a.m. schrieb Lazar, Lijo: [Public] (... && !amdgpu_sriov_vf(adev)) This kind of closes the door for all versions. My thought was - having it in the same function provides a logical grouping for how it's handled for differ

Re: [PATCH 3/3] drm/amdkfd: simplify drain retry fault

2021-11-17 Thread Felix Kuehling
On 2021-11-16 10:43 p.m., Philip Yang wrote: unmap range always set svms->drain_pagefaults flag to simplify both parent range and child range unmap. Deferred list work takes mmap write lock to read and clear svms->drain_pagefaults, to serialize with unmap callback. Add atomic flag svms->draini

Re: [PATCH 2/3] drm/amdkfd: handle VMA remove race

2021-11-17 Thread Felix Kuehling
On 2021-11-16 10:43 p.m., Philip Yang wrote: VMA may be removed before unmap notifier callback, restore pages take mmap write lock to lookup VMA to avoid race, The old code looked up the VMA after taking the mmap lock (either read or write) and kept holding the lock afterwards. I think even wi

Re: [PATCH 1/3] drm/amdkfd: process exit and retry fault race

2021-11-17 Thread Felix Kuehling
On 2021-11-16 10:43 p.m., Philip Yang wrote: kfd process mmu release notifier callback drain retry fault to ensure no retry fault comes after removing kfd process from the hash table, otherwise svm page fault handler will fail to recover the fault and dump GPU vm fault log. Drain retry fault nee

Re: [PATCH] drm/amdkfd: Retrieve SDMA numbers from amdgpu

2021-11-17 Thread Felix Kuehling
On 2021-11-17 3:36 p.m., Amber Lin wrote: Instead of hard coding the number of sdma engines and the number of sdma_xgmi engines in the device_info table, get the number of toal SDMA instances from amdgpu. The first two engines are sdma engines and the rest are sdma-xgmi engines unless the ASIC do

Re: [PATCH 2/2] drm/amd/pm: Print the error on command submission

2021-11-17 Thread Alex Deucher
Acked-by: Alex Deucher On Wed, Nov 17, 2021 at 1:56 PM Luben Tuikov wrote: > > Print the error on command submission immediately after submitting to > the SMU. This is rate-limited. It helps to immediately know there was an > error on command submission, rather than leave it up to clients to rep

Re: [PATCH 1/2] drm/amd/pm: Add debug prints

2021-11-17 Thread Alex Deucher
On Wed, Nov 17, 2021 at 1:56 PM Luben Tuikov wrote: > > Add prints where there are none and none are printed in the callee. > > Add a print in sienna_cichlid_run_btc() to help debug and to mirror other > platforms, as no print is present in the caller, smu_smc_hw_setup(). > > Remove the word "prev

Re: [PATCH -next] drm/amd/display: check top_pipe_to_program pointer

2021-11-17 Thread Alex Deucher
Applied. Thanks! On Mon, Nov 15, 2021 at 3:10 AM Yang Li wrote: > > Clang static analysis reports this error > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:2870:7: warning: > Dereference of null pointer [clang-analyzer-core.NullDereference] > if > (top_pipe_to_program->st

Re: [PATCH] drm/amd/display: remove no need NULL check before kfree

2021-11-17 Thread Alex Deucher
Applied. Thanks! On Mon, Nov 15, 2021 at 8:48 PM Bernard Zhao wrote: > > This change is to cleanup the code a bit. > > Signed-off-by: Bernard Zhao > --- > .../drm/amd/display/dc/dcn10/dcn10_resource.c | 18 ++ > 1 file changed, 6 insertions(+), 12 deletions(-) > > diff --git a

Re: [PATCH] drm/amd/display: cleanup the code a bit

2021-11-17 Thread Alex Deucher
Applied. Thanks! On Tue, Nov 16, 2021 at 4:19 AM Christian König wrote: > > Am 16.11.21 um 02:34 schrieb Bernard Zhao: > > In function dc_sink_destruct, kfree will check pointer, no need > > to check again. > > This change is to cleanup the code a bit. > > > > Signed-off-by: Bernard Zhao > > Th

Re: [PATCH] drm/amd/amdgpu: fix potential memleak

2021-11-17 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Nov 15, 2021 at 10:56 AM Felix Kuehling wrote: > > Am 2021-11-14 um 9:58 p.m. schrieb Bernard Zhao: > > In function amdgpu_get_xgmi_hive, when kobject_init_and_add failed > > There is a potential memleak if not call kobject_put. > > > > Signed-off-by: Bernard Zhao

Re: [PATCH v2] drm/amd/amdgpu: cleanup the code style a bit

2021-11-17 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Nov 15, 2021 at 7:09 AM Bernard Zhao wrote: > > This change is to cleanup the code style a bit. > > Signed-off-by: Bernard Zhao > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 21 + > 1 file changed, 13 insertions(+), 8 deletions(-) > > dif

Re: [PATCH] drm/amd/amdgpu: remove useless break after return

2021-11-17 Thread Alex Deucher
Applied thanks. If you want to make the numbering more sequential, please also update the other dce files if you make that change. Alex On Mon, Nov 15, 2021 at 2:14 AM Bernard Zhao wrote: > > This change is to remove useless break after return. > > Signed-off-by: Bernard Zhao > --- > drivers/

Re: [PATCH v3 1/6] drm: move the buddy allocator from i915 into common drm

2021-11-17 Thread kernel test robot
Hi Arunpravin, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on drm-intel/for-linux-next v5.16-rc1] [cannot apply to drm-tip/drm-tip next-2027] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

[PATCH] drm/amdkfd: Retrieve SDMA numbers from amdgpu

2021-11-17 Thread Amber Lin
Instead of hard coding the number of sdma engines and the number of sdma_xgmi engines in the device_info table, get the number of toal SDMA instances from amdgpu. The first two engines are sdma engines and the rest are sdma-xgmi engines unless the ASIC doesn't support XGMI. v2: Move get_num_*_sdma

Re: [PATCH 1/1] amdgpu/pm: restructure reporting of clock values by smu

2021-11-17 Thread Alex Deucher
On Wed, Nov 17, 2021 at 2:12 AM Lazar, Lijo wrote: > > > > On 11/17/2021 11:50 AM, Darren Powell wrote: > > Use of sysfs_emit by each of the specific device implementations is > > problematic. > > To remove this back to a higher level, this patch adds a new function > > "get_clock_levels" >

Re: [PATCH v3 4/6] drm: implement a method to free unused pages

2021-11-17 Thread Matthew Auld
On 16/11/2021 20:18, Arunpravin wrote: On contiguous allocation, we round up the size to the *next* power of 2, implement a function to free the unused pages after the newly allocate block. v2(Matthew Auld): - replace function name 'drm_buddy_free_unused_pages' with drm_buddy_block_trim

[PATCH 2/2] drm/amd/pm: Print the error on command submission

2021-11-17 Thread Luben Tuikov
Print the error on command submission immediately after submitting to the SMU. This is rate-limited. It helps to immediately know there was an error on command submission, rather than leave it up to clients to report the error, as sometimes they do not. Cc: Alex Deucher Signed-off-by: Luben Tuiko

[PATCH 1/2] drm/amd/pm: Add debug prints

2021-11-17 Thread Luben Tuikov
Add prints where there are none and none are printed in the callee. Add a print in sienna_cichlid_run_btc() to help debug and to mirror other platforms, as no print is present in the caller, smu_smc_hw_setup(). Remove the word "previous" from comment and print to make it shorter and avoid confusi

Re: [PATCH v3 2/6] drm: improve drm_buddy_alloc function

2021-11-17 Thread Matthew Auld
On 16/11/2021 20:18, Arunpravin wrote: - Make drm_buddy_alloc a single function to handle range allocation and non-range allocation demands - Implemented a new function alloc_range() which allocates the requested power-of-two block comply with range limitations - Moved order computation a

Re: [PATCH v3 1/6] drm: move the buddy allocator from i915 into common drm

2021-11-17 Thread Matthew Auld
On 16/11/2021 20:18, Arunpravin wrote: Move the base i915 buddy allocator code into drm - Move i915_buddy.h to include/drm - Move i915_buddy.c to drm root folder - Rename "i915" string with "drm" string wherever applicable - Rename "I915" string with "DRM" string wherever applicable - Fix header

Re: [PATCH v3 1/6] drm: move the buddy allocator from i915 into common drm

2021-11-17 Thread Arunpravin
Hi Christian, I will make this a separate module. Thanks, Arun On 17/11/21 1:33 pm, Christian König wrote: > I've looked a bit more into this and I think we should just follow > Thomas Zimmermann's idea to make this a separate module. > > Otherwise we just have the code around all the time even

Re: Backlight control broken on UM325 (OLED) on 5.15 (bisected)

2021-11-17 Thread Samuel Čavoj
Hi Roman, On 17.11.2021 15:26, Li, Roman wrote: > [Public] > > Hi Samuel, > > Can you please try: https://patchwork.freedesktop.org/patch/463485/ ? Yup, that did the trick. Works as before. Thank you very much. Samuel > > Thanks, > Roman > > > -Original Message- > > From: Samuel Čav

Re: [PATCH] drm/amd/display: Fix OLED brightness control on eDP

2021-11-17 Thread Samuel Čavoj
On 17.11.2021 10:22, roman...@amd.com wrote: > From: Roman Li > > [Why] > After commit ("drm/amd/display: add support for multiple backlights") > number of eDPs is defined while registering backlight device. > However the panel's extended caps get updated once before register call. > That leads t

Re: [PATCH] drm/amd/display: Fix OLED brightness control on eDP

2021-11-17 Thread Alex Deucher
On Wed, Nov 17, 2021 at 10:22 AM wrote: > > From: Roman Li > > [Why] > After commit ("drm/amd/display: add support for multiple backlights") > number of eDPs is defined while registering backlight device. > However the panel's extended caps get updated once before register call. > That leads to r

RE: Backlight control broken on UM325 (OLED) on 5.15 (bisected)

2021-11-17 Thread Li, Roman
[Public] Hi Samuel, Can you please try: https://patchwork.freedesktop.org/patch/463485/ ? Thanks, Roman > -Original Message- > From: Samuel Čavoj > Sent: Tuesday, November 16, 2021 8:33 AM > To: Alex Deucher > Cc: Deucher, Alexander ; Li, Sun peng (Leo) > ; Li, Roman ; Maling list - D

[PATCH] drm/amd/display: Fix OLED brightness control on eDP

2021-11-17 Thread Roman.Li
From: Roman Li [Why] After commit ("drm/amd/display: add support for multiple backlights") number of eDPs is defined while registering backlight device. However the panel's extended caps get updated once before register call. That leads to regression with extended caps like oled brightness contro

Re: [PATCH v1 1/9] mm: add zone device coherent type memory support

2021-11-17 Thread Christoph Hellwig
On Mon, Nov 15, 2021 at 01:30:18PM -0600, Alex Sierra wrote: > @@ -5695,8 +5695,8 @@ static int mem_cgroup_move_account(struct page *page, > * 2(MC_TARGET_SWAP): if the swap entry corresponding to this pte is a > * target for charge migration. if @target is not NULL, the entry is > store

Re: [PATCH Review 2/4] drm/amdgpu: add new query interface for umc block

2021-11-17 Thread Lazar, Lijo
On 11/17/2021 3:41 PM, Stanley.Yang wrote: add message smu to query error information Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 16 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 4 + drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 161

Re: [PATCH Review 3/4] drm/amdgpu: add message smu to get ecc_table

2021-11-17 Thread Lazar, Lijo
On 11/17/2021 3:41 PM, Stanley.Yang wrote: support ECC TABLE message, this table include unc ras error count and error address Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 7 .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c| 38 +++

Re: [PATCH Review 4/4] query umc error info from ecc_table

2021-11-17 Thread Lazar, Lijo
On 11/17/2021 3:41 PM, Stanley.Yang wrote: if smu support ECCTABLE, driver can message smu to get ecc_table then query umc error info from ECCTABLE apply pmfw version check to ensure backward compatibility Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 42 +

[PATCH Review 4/4] query umc error info from ecc_table

2021-11-17 Thread Stanley . Yang
if smu support ECCTABLE, driver can message smu to get ecc_table then query umc error info from ECCTABLE apply pmfw version check to ensure backward compatibility Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 42 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras

[PATCH Review 2/4] drm/amdgpu: add new query interface for umc block

2021-11-17 Thread Stanley . Yang
add message smu to query error information Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 16 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 4 + drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 161 3 files changed, 181 insertions(+) diff --git a/

[PATCH Review 3/4] drm/amdgpu: add message smu to get ecc_table

2021-11-17 Thread Stanley . Yang
support ECC TABLE message, this table include unc ras error count and error address Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 7 .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c| 38 +++ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c| 2

[PATCH Review 1/4] drm/amdgpu: Update smu driver interface for aldebaran

2021-11-17 Thread Stanley . Yang
update smu driver if version to 0x08 to avoid mismatch log A version mismatch can still happen with an older FW Change-Id: I97f2bc4ed9a9cba313b744e2ff6812c90b244935 Signed-off-by: Stanley.Yang --- .../drm/amd/pm/inc/smu13_driver_if_aldebaran.h | 18 +- drivers/gpu/drm/amd/pm/inc/

Re: [PATCH v3 1/6] drm: move the buddy allocator from i915 into common drm

2021-11-17 Thread Christian König
I've looked a bit more into this and I think we should just follow Thomas Zimmermann's idea to make this a separate module. Otherwise we just have the code around all the time even if it is unused and implementing this should be trivial. See how DRM_GEM_CMA_HELPER or DRM_VRAM_HELPER are done