RE: [PATCH 1/7] drm/amd/pm: correct the fan speed RPM setting

2021-07-07 Thread Chen, Guchun
[Public] tach_period = 60 * crystal_clock_freq * 1 / (8 * speed); Any multiplication's overflow possibility? Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Evan Quan Sent: Wednesday, July 7, 2021 9:57 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Quan

RE: [PATCH 2/7] drm/amd/pm: record the RPM and PWM based fan speed settings

2021-07-07 Thread Chen, Guchun
[Public] Two nit-picks. Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Evan Quan Sent: Wednesday, July 7, 2021 9:57 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Quan, Evan Subject: [PATCH 2/7] drm/amd/pm: record the RPM and PWM based fan speed settings

RE: [PATCH 4/7] drm/amd/pm: correct the fan speed RPM retrieving

2021-07-07 Thread Chen, Guchun
[Public] A comment inline. Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Evan Quan Sent: Wednesday, July 7, 2021 9:57 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Quan, Evan Subject: [PATCH 4/7] drm/amd/pm: correct the fan speed RPM retrieving The rel

RE: [PATCH 5/7] drm/amd/pm: drop the unnecessary intermediate percent-based transition

2021-07-07 Thread Chen, Guchun
[Public] Seems 255 and 100 are used multiple times in different files. Is it better to define them as a macro? Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Evan Quan Sent: Wednesday, July 7, 2021 9:57 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Quan,

[PATCH v5] drm/amdgpu: Restore msix after FLR

2021-07-07 Thread Peng Ju Zhou
From: "Emily.Deng" After FLR, the msix will be cleared, so need to re-enable it. Signed-off-by: Emily.Deng Signed-off-by: Peng Ju Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b

RE: [PATCH v4] drm/amdgpu: Restore msix after FLR

2021-07-07 Thread Zhou, Peng Ju
[AMD Official Use Only] Adding VF check and static for function, patch sent out as v5. -- BW Pengju Zhou > -Original Message- > From: Lazar, Lijo > Sent: Monday, July 5, 2021 1:52 PM > To: Zhou, Peng Ju ; amd-gfx@lis

Re: [PATCH AUTOSEL 5.13 113/189] drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue.

2021-07-07 Thread Sasha Levin
On Tue, Jul 06, 2021 at 07:09:37PM -0400, Felix Kuehling wrote: Am 2021-07-06 um 5:44 p.m. schrieb Alex Deucher: On Tue, Jul 6, 2021 at 7:16 AM Sasha Levin wrote: From: Yifan Zhang [ Upstream commit 631003101c516ea29a74aee59666708857b9a805 ] If GC has entered CGPG, ringing doorbell > first

RE: [PATCH] drm/amdgpu: Correct the irq numbers for virtual crtc

2021-07-07 Thread Deng, Emily
[AMD Official Use Only] Ping .. >-Original Message- >From: Emily Deng >Sent: Tuesday, July 6, 2021 10:14 PM >To: amd-gfx@lists.freedesktop.org >Cc: Deng, Emily >Subject: [PATCH] drm/amdgpu: Correct the irq numbers for virtual crtc > >The irq number should be decided by num_crtc, and

[PATCH] drm/amdgpu: change the imprecise function name

2021-07-07 Thread Roy Sun
The callback functions are used for SRIOV read/write instead of just for rlcg read/write Signed-off-by: Roy Sun --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h| 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 drivers/gpu/drm/amd

Re: [Linaro-mm-sig] [PATCH v4 0/2] Add p2p via dmabuf to habanalabs

2021-07-07 Thread Christian König
Am 06.07.21 um 14:23 schrieb Daniel Vetter: On Tue, Jul 06, 2021 at 02:21:10PM +0200, Christoph Hellwig wrote: On Tue, Jul 06, 2021 at 10:40:37AM +0200, Daniel Vetter wrote: Greg, I hope this will be good enough for you to merge this code. So we're officially going to use dri-devel for technic

Re: [PATCH 1/7] drm/amd/pm: correct the fan speed RPM setting

2021-07-07 Thread Lazar, Lijo
On 7/7/2021 7:26 AM, Evan Quan wrote: The relationship "PWM = RPM / smu->fan_max_rpm" between fan speed PWM and RPM is not true for SMU11 ASICs. So, we need a new way to perform the fan speed RPM setting. Change-Id: I1afe8102f02ead9a8a07c7105f689ac60a85b0d8 Signed-off-by: Evan Quan --- dri

Re: [PATCH 2/7] drm/amd/pm: record the RPM and PWM based fan speed settings

2021-07-07 Thread Lazar, Lijo
On 7/7/2021 7:26 AM, Evan Quan wrote: As the relationship "PWM = RPM / smu->fan_max_rpm" between fan speed PWM and RPM is not true for SMU11 ASICs. So, both the RPM and PWM settings need to be saved. Change-Id: I318c134d442273d518b805339cdf383e151b935d Signed-off-by: Evan Quan --- drivers/

Re: [Linaro-mm-sig] [PATCH v4 0/2] Add p2p via dmabuf to habanalabs

2021-07-07 Thread Daniel Vetter
On Wed, Jul 7, 2021 at 2:17 PM Christian König wrote: > Am 06.07.21 um 14:23 schrieb Daniel Vetter: > > On Tue, Jul 06, 2021 at 02:21:10PM +0200, Christoph Hellwig wrote: > >> On Tue, Jul 06, 2021 at 10:40:37AM +0200, Daniel Vetter wrote: > Greg, I hope this will be good enough for you to mer

Re: [PATCH 3/7] drm/amd/pm: correct the fan speed PWM retrieving

2021-07-07 Thread Lazar, Lijo
On 7/7/2021 7:26 AM, Evan Quan wrote: The relationship "PWM = RPM / smu->fan_max_rpm" between fan speed PWM and RPM is not true for SMU11 ASICs. So, we need a new way to retrieving the fan speed PWM. Change-Id: Idfe0276d7113b9c921b88fa08085a33fd971d621 Signed-off-by: Evan Quan --- .../incl

[PATCH] drm/amd/display: update header file name

2021-07-07 Thread Xiaomeng Hou
Update the register header file name. Signed-off-by: Xiaomeng Hou --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c b/drivers/gpu/drm/amd/display/dc/clk_mg

Re: [PATCH 4/7] drm/amd/pm: correct the fan speed RPM retrieving

2021-07-07 Thread Lazar, Lijo
On 7/7/2021 7:26 AM, Evan Quan wrote: The relationship "PWM = RPM / smu->fan_max_rpm" between fan speed PWM and RPM is not true for SMU11 ASICs. So, we need a new way to retrieving the fan speed RPM. Change-Id: Ife4298c8b7ec93ef023a7da27d59654e0444e044 Signed-off-by: Evan Quan --- .../incl

RE: [PATCH] drm/amd/display: update header file name

2021-07-07 Thread Liu, Aaron
[AMD Official Use Only] Reviewed-by: Aaron Liu -- Best Regards Aaron Liu > -Original Message- > From: Hou, Xiaomeng (Matthew) > Sent: Wednesday, July 7, 2021 5:05 PM > To: amd-gfx@lists.freedesktop.org > Cc: Liu, Aaron ; Kazlauskas, Nicholas > ; Hou, Xiaomeng (Matthew) > > Subject: [P

Re: [PATCH 5/7] drm/amd/pm: drop the unnecessary intermediate percent-based transition

2021-07-07 Thread Lazar, Lijo
As mentioned in another patch, renaming function to set_/get_ pwm will clarify things better. The scale is 0-255 in hwmon as well. Thanks, Lijo On 7/7/2021 7:26 AM, Evan Quan wrote: Currently, the readout of fan speed pwm is transited into percent-based and then pwm-based. However, the transit

Re: [PATCH 7/7] drm/amd/pm: correct the address of Arcturus fan related registers

2021-07-07 Thread Lazar, Lijo
Arcturus callbacks were dropped in another patch in this series. Instead of dropping, better to keep the callbacks and use the specific reg offsets. Thanks, Lijo On 7/7/2021 7:26 AM, Evan Quan wrote: These registers have different address from other SMU V11 ASICs. Change-Id: Iaeb0438331eed9b0

RE: [PATCH] drm/amdgpu: Correct the irq numbers for virtual crtc

2021-07-07 Thread Liu, Monk
[AMD Official Use Only] Reviewed by: Monk Liu Thanks -- Monk Liu | Cloud-GPU Core team -- -Original Message- From: amd-gfx On Behalf Of Deng, Emily Sent: Wednesday, July 7, 2021 3:42 PM To: Deng, Emily ;

[PATCH] drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting

2021-07-07 Thread Oak Zeng
If GPU is during a resetting cycle, writing to GPU can cause unpredictable protection fault. Disallow using kfd debugfs hang_hws to hang hws if GPU is resetting. Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/g

Re: drm/amdkfd: implement counters for vm fault and migration

2021-07-07 Thread philip yang
On 2021-07-06 11:36 a.m., Colin Ian King wrote: Hi, Static analysis with Coverity on linux-next has found a potential null pointer dereference in function svm_range_restore_pages in drivers/gpu/drm/amd/amdkfd/kfd_svm.c from the following commit: commit d4eb

Re: drm/amdkfd: implement counters for vm fault and migration

2021-07-07 Thread philip yang
On 2021-07-06 9:08 p.m., Felix Kuehling wrote: Am 2021-07-06 um 11:36 a.m. schrieb Colin Ian King: Hi, Static analysis with Coverity on linux-next has found a potential null pointer dereference in function svm_range_restore_pages in drivers/

RE: [PATCH] drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting

2021-07-07 Thread Russell, Kent
[AMD Official Use Only] Some slight grammar > -Original Message- > From: amd-gfx On Behalf Of Oak Zeng > Sent: Wednesday, July 7, 2021 12:28 PM > To: amd-gfx@lists.freedesktop.org > Cc: Bai, Zoy (zoybai) ; Xu, Feifei ; > Kuehling, Felix > ; Lazar, Lijo ; Zeng, Oak > > Subject: [PATCH]

[PATCH] drm/amdkfd: handle fault counters on invalid address

2021-07-07 Thread Philip Yang
prange is NULL if vm fault retry on invalid address, for this case, can not use prange to get pdd, use adev to get gpuidx and then get pdd instead, then increase pdd vm fault counter. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 30 +--- 1 file ch

Re: [PATCH] drm/amdkfd: handle fault counters on invalid address

2021-07-07 Thread Felix Kuehling
On 2021-07-07 2:34 p.m., Philip Yang wrote: prange is NULL if vm fault retry on invalid address, for this case, can not use prange to get pdd, use adev to get gpuidx and then get pdd instead, then increase pdd vm fault counter. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling ---