Re: [PATCH] drm/amd/powerplay: check whether SMU IP is enabled before access

2020-05-25 Thread Zhao, Yong
@lists.freedesktop.org Cc: Deucher, Alexander ; Zhao, Yong ; Quan, Evan Subject: [PATCH] drm/amd/powerplay: check whether SMU IP is enabled before access Since on early phase of bringup, the SMU IP may be not enabled or supported. Without this, we may hit null pointer dereference on accessing smu->a

Re: drm/amdkfd: Change pasid's type to unsigned int

2020-05-22 Thread Zhao, Yong
[AMD Official Use Only - Internal Distribution Only] Hi Fenghua, I am okay with the idea. Regards, Yong From: Fenghua Yu Sent: Friday, May 22, 2020 5:21 PM To: Kuehling, Felix Cc: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: drm/amdkfd: Change

Re: [PATCH 2/2] drm/amdgpu: drop navi pcie bw callback

2020-05-21 Thread Zhao, Yong
[AMD Official Use Only - Internal Distribution Only] The series are Reviewed-by: Yong Zhao From: amd-gfx on behalf of Alex Deucher Sent: Thursday, May 21, 2020 12:52 PM To: amd-gfx list Cc: Deucher, Alexander Subject: Re: [PATCH 2/2] drm/amdgpu: drop navi pc

Re: [PATCH] drm/amdkfd: Consolidate duplicated bo alloc flags

2020-03-05 Thread Zhao, Yong
[AMD Official Use Only - Internal Distribution Only] Okay, I will change back to its original format. Yong From: Kuehling, Felix Sent: Thursday, March 5, 2020 3:49 PM To: amd-gfx@lists.freedesktop.org ; Zhao, Yong Subject: Re: [PATCH] drm/amdkfd: Consolidate

Re: [PATCH 1/2] drm/amdgpu: remove unused variable

2020-02-27 Thread Zhao, Yong
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Yong Zhao From: amd-gfx on behalf of Alex Deucher Sent: Thursday, February 27, 2020 3:14 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 1/2] drm/amdgpu: remove unus

Re: [PATCH] drm/amdkfd: change SDMA MQD memory type

2020-02-26 Thread Zhao, Yong
[AMD Official Use Only - Internal Distribution Only] It looks good to me. I was thinking maybe we should go one step further, adding more explanation comments around the MQD control stack workaround, so that people have a clearer idea of what's that MQD control stack workaround is about. We can

Re: [PATCH 1/1] drm/amdgpu: Fix 32-bit build

2020-02-26 Thread Zhao, Yong
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Yong Zhao From: amd-gfx on behalf of Felix Kuehling Sent: Wednesday, February 26, 2020 12:12 PM To: amd-gfx@lists.freedesktop.org ; Deucher, Alexander Cc: Pan, Xinhui Subject: [PATCH 1/1] drm/

Re: [PATCH 6/6] drm/amdkfd: Delete unnecessary unmap queue package submissions

2020-02-25 Thread Zhao, Yong
: Kuehling, Felix Sent: Tuesday, February 25, 2020 12:06 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 6/6] drm/amdkfd: Delete unnecessary unmap queue package submissions As I understand it, the SDMA queue counting wasn't incorrect. The main change here is that you no l

Re: [PATCH 3/5] drm/amdgpu: GPU TLB flush API moved to amdgpu_amdkfd

2019-12-23 Thread Zhao, Yong
[AMD Official Use Only - Internal Distribution Only] True. There indeed are two vmhubs on Navi. So my two comments are not useful here. Yong From: Kuehling, Felix Sent: Monday, December 23, 2019 2:34 PM To: Zhao, Yong ; Sierra Guiza, Alejandro (Alex) ; amd-gfx

Re: [PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset()

2019-12-16 Thread Zhao, Yong
in switch. Yong From: Kuehling, Felix Sent: Monday, December 16, 2019 2:39 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset() On 2019-12-13 8:38, Yong Zhao wrote: > This prevents

Re: [PATCH 1/1] drm/amdgpu: Raise KFD unpinned system memory limit

2019-11-25 Thread Zhao, Yong
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Yong Zhao From: amd-gfx on behalf of Felix Kuehling Sent: Monday, November 25, 2019 4:28 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH 1/1] drm/amdgpu: Raise KFD unpinned system memory li

Re: [PATCH 2/2] drm/amdkfd: Move pm_create_runlist_ib() out of pm_send_runlist()

2019-11-22 Thread Zhao, Yong
f the name changes because the original names are prone to cause confusion. Regards, Yong From: Kuehling, Felix Sent: Friday, November 22, 2019 4:21 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 2/2] drm/amdkfd: Move pm_create_runlist_ib() o

Re: [PATCH] drm/amdgpu/soc15: move struct definition around to align with other soc15 asics

2019-11-15 Thread Zhao, Yong
Reviewed-by: Yong Zhao From: amd-gfx on behalf of Alex Deucher Sent: Friday, November 15, 2019 11:13 AM To: amd-gfx list Cc: Deucher, Alexander Subject: Re: [PATCH] drm/amdgpu/soc15: move struct definition around to align with other soc15 asics Ping? On Mon

Re: [PATCH 3/3] drm/amdkfd: Fix a bug when calculating save_area_used_size

2019-11-12 Thread Zhao, Yong
+ Laurent From: Zhao, Yong Sent: Monday, November 11, 2019 6:25 PM To: amd-gfx@lists.freedesktop.org ; Cornwall, Jay Cc: Zhao, Yong Subject: [PATCH 3/3] drm/amdkfd: Fix a bug when calculating save_area_used_size workgroup context data writes from m

Re: [PATCH] drm/amdkfd: Use kernel queue v9 functions for v10 (ver2)

2019-11-07 Thread Zhao, Yong
Okay. I submitted a PSDB. Meanwhile, I got the answer from FW and SQ HW contact that nothing bad will happen on GFX9 by writing 1 to TRAP_EN. Regards, Yong From: Kuehling, Felix Sent: Thursday, November 7, 2019 4:07 PM To: Zhao, Yong ; amd-gfx

Re: [PATCH 2/3] drm/amdkfd: only keep release_mem function for Hawaii

2019-11-07 Thread Zhao, Yong
rongly about. With that said, the change is Reviewed-by: Felix Kuehling <mailto:felix.kuehl...@amd.com> Regards, Felix Regards, Yong From: Kuehling, Felix <mailto:felix.kuehl...@amd.com> Sent: Thursday, November 7, 2019 2:12 PM To: Zhao, Yon

[PATCH] drm/amdkfd: Use kernel queue v9 functions for v10 (ver2)

2019-11-07 Thread Zhao, Yong
The kernel queue functions for v9 and v10 are the same except pm_map_process_v* which have small difference, so they should be reused. This eliminates the need of reapplying several patches which were applied on v9 but not on v10, such as bigger GWS and more than 2 SDMA engine support which were in

Re: [PATCH 2/3] drm/amdkfd: only keep release_mem function for Hawaii

2019-11-07 Thread Zhao, Yong
, it is a must. Regards, Yong From: Kuehling, Felix Sent: Thursday, November 7, 2019 2:12 PM To: Zhao, Yong ; Alex Deucher Cc: Russell, Kent ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 2/3] drm/amdkfd: only keep release_mem function for Hawaii On 2019-11

Re: [PATCH 2/3] drm/amdkfd: only keep release_mem function for Hawaii

2019-11-07 Thread Zhao, Yong
pre SOC15 or not, and I have an impression that MEC firmware agrees to maintain the kernel queue interface stable across generations most of time. Regards, Yong From: Alex Deucher Sent: Thursday, November 7, 2019 1:32 PM To: Kuehling, Felix Cc: Zhao, Yong

[PATCH] drm/amdkfd: Use kernel queue v9 functions for v10

2019-11-07 Thread Zhao, Yong
The kernel queue functions for v9 and v10 are the same except pm_map_process_v* which have small difference, so they should be reused. This eliminates the need of reapplying several patches which were applied on v9 but not on v10, such as bigger GWS and more than 2 SDMA engine support which were in

Re: [PATCH 2/3] drm/amdkfd: only keep release_mem function for Hawaii

2019-11-07 Thread Zhao, Yong
Kent From: amd-gfx <mailto:amd-gfx-boun...@lists.freedesktop.org> On Behalf Of Zhao, Yong Sent: Thursday, November 7, 2019 11:57 AM To: Kuehling, Felix <mailto:felix.kuehl...@amd.com>; amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> Subject: Re: [PATCH 2/3

[PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-07 Thread Zhao, Yong
The new code uses straightforward bit shifts and thus has better readability. Change-Id: I0c1f7cca7e24ddb7b4ffe1cb0fa71943828ae373 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 17 +++-- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 1 - drivers/gpu/drm/amd/am

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-07 Thread Zhao, Yong
True. Thank you for spotting that. MMAP-related code was added after I inititally drafted this change earlier this year. Regards, Yong From: Kuehling, Felix Sent: Thursday, November 7, 2019 12:05 AM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re

Re: [PATCH] drm/amdgpu: Add comments to gmc structure

2019-11-07 Thread Zhao, Yong
If this is not submitted, I would like to see some comments regarding the explanation of MC address and logical address, which I prefer to mention as GPU physical/virtual address. Regards, Yong From: amd-gfx on behalf of Alex Deucher Sent: Thursday, November

Re: [PATCH 2/3] drm/amdkfd: only keep release_mem function for Hawaii

2019-11-07 Thread Zhao, Yong
Hi Felix, That's because v8 and v7 share the same packet_manager_funcs. In this case, it is better to keep it as it is. Regards, Yong From: Kuehling, Felix Sent: Wednesday, November 6, 2019 11:45 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subjec

Re: [PATCH] drm/amdgpu: Improve RAS documentation

2019-11-06 Thread Zhao, Yong
See two wording comments inline. With that Reviewed-by: Yong Zhao On 2019-10-30 2:41 p.m., Alex Deucher wrote: > Clarify some areas, clean up formatting, add section for > unrecoverable error handling. > > Signed-off-by: Alex Deucher > --- > Documentation/gpu/amdgpu.rst| 35 +++

Re: [PATCH] drm/radeon: fix si_enable_smc_cac() failed issue

2019-11-06 Thread Zhao, Yong
Reviewed-by: Yong Zhao On 2019-10-30 10:22 a.m., Alex Deucher wrote: > Need to set the dte flag on this asic. > > Port the fix from amdgpu: > 5cb818b861be114148e8dbeb4259698148019dd1 > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/radeon/si_dpm.c | 1 + > 1 file changed, 1 insertion(+)

Re: [PATCH] drm/amdgpu/renoir: move gfxoff handling into gfx9 module

2019-11-06 Thread Zhao, Yong
Reviewed-by: Yong Zhao On 2019-11-06 11:34 a.m., Alex Deucher wrote: > Ping? > > On Tue, Oct 29, 2019 at 4:10 PM Alex Deucher wrote: >> To properly handle the option parsing ordering. >> >> Signed-off-by: Alex Deucher >> --- >> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 ++ >> drivers/gpu

[PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-05 Thread Zhao, Yong
The new code uses straightforward bit shifts and thus has better readability. Change-Id: I0c1f7cca7e24ddb7b4ffe1cb0fa71943828ae373 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 10 -- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 1 - drivers/gpu/drm/amd/amdkfd/kf

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-05 Thread Zhao, Yong
Okay. I will delete that line. Regards, Yong From: Kuehling, Felix Sent: Tuesday, November 5, 2019 5:34 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations On 2019-11-01 7:03 p.m

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
g, Felix Sent: Friday, November 1, 2019 6:48 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations On 2019-11-01 4:48 p.m., Zhao, Yong wrote: > The new code is much cleaner and results

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
Sent: Friday, November 1, 2019 5:13 PM To: amd-gfx@lists.freedesktop.org ; Zhao, Yong Subject: Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations NAK. This won't work for several reasons. The mmap_offset is used as offset parameter in the mmap system call. If you check th

Re: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
Please discard this one and look for an update version. Regards, Yong From: Zhao, Yong Sent: Friday, November 1, 2019 4:11 PM To: amd-gfx@lists.freedesktop.org Cc: Zhao, Yong Subject: [PATCH] drm/amdkfd: Simplify the mmap offset related bit operations The new

[PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
The new code is much cleaner and results in better readability. Change-Id: I0c1f7cca7e24ddb7b4ffe1cb0fa71943828ae373 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 13 +++-- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 1 - drivers/gpu/drm/amd/amdkfd/kfd_priv.h

[PATCH] drm/amdkfd: Simplify the mmap offset related bit operations

2019-11-01 Thread Zhao, Yong
The new code is much cleaner and results in better readability. Change-Id: I0c1f7cca7e24ddb7b4ffe1cb0fa71943828ae373 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 10 -- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 1 - drivers/gpu/drm/amd/amdkfd/kfd_priv.h|

[PATCH] drm/amdkfd: Rename create_cp_queue() to init_user_queue()

2019-11-01 Thread Zhao, Yong
create_cp_queue() could also work with SDMA queues, so we should rename it. Change-Id: I76cbaed8fa95dd9062d786cbc1dd037ff041da9d Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/g

[PATCH 1/2] drm/amdkfd: Use better name to indicate the offset is in dwords

2019-11-01 Thread Zhao, Yong
Change-Id: I75da23bba90231762cf58da3170f5bb77ece45ed Signed-off-by: Yong Zhao --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 14 +++--- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 8 3 files changed,

[PATCH 2/2] drm/amdkfd: Avoid using doorbell_off as offset in process doorbell pages

2019-11-01 Thread Zhao, Yong
dorbell_off in the queue properties is mainly used for the doorbell dw offset in pci bar. We should not set it to the doorbell byte offset in process doorbell pages. This makes the code much easier to read. Change-Id: I553045ff9fcb3676900c92d10426f2ceb3660005 Signed-off-by: Yong Zhao --- drivers

[PATCH 3/3] drm/amdkfd: Use kernel queue v9 functions for v10

2019-10-30 Thread Zhao, Yong
The kernel queue functions for v9 and v10 are the same except pm_map_process_v* which have small difference, so they should be reused. This eliminates the need of reapplying several patches which were applied on v9 but not on v10, such as bigger GWS and more than 2 SDMA engine support which were in

[PATCH 2/3] drm/amdkfd: only keep release_mem function for Hawaii

2019-10-30 Thread Zhao, Yong
release_mem won't be used at all on GFX9 and GFX10, so delete it. Change-Id: I13787a8a29b83e7516c582a7401f2e14721edf5f Signed-off-by: Yong Zhao --- .../gpu/drm/amd/amdkfd/kfd_kernel_queue_v10.c | 35 ++- .../gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 33 ++--- 2 file

[PATCH 1/3] drm/amdkfd: Adjust function sequences to avoid unnecessary declarations

2019-10-30 Thread Zhao, Yong
This is cleaner. Change-Id: I8cdecad387d8c547a088c6050f77385ee1135be1 Signed-off-by: Yong Zhao --- .../gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c b/drivers/gp

Re: [PATCH] drm/amdkfd: Delete unnecessary pr_fmt switch

2019-10-28 Thread Zhao, Yong
Modified according to the comment and pushed. Thanks! Regards, Yong From: Alex Deucher Sent: Monday, October 28, 2019 8:39 AM To: Zhao, Yong Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Delete unnecessary pr_fmt switch On Fri, Oct 25

[PATCH] drm/amdkfd: Delete unnecessary pr_fmt switch

2019-10-25 Thread Zhao, Yong
Given amdkfd.ko has been merged into amdgpu.ko, this switch is no longer useful. Change-Id: If56b80e086f4ea26f347c70b620b3892afc24ddf Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 4 drivers/gpu/

[PATCH] drm/amdkfd: Delete duplicated queue bit map reservation

2019-10-24 Thread Zhao, Yong
The KIQ is on the second MEC and its reservation is covered in the latter logic, so no need to reserve its bit twice. Change-Id: Ieee390953a60c7d43de5a9aec38803f1f583a4a9 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 1 file changed, 8 deletions(-) diff --

Re: [PATCH 1/6] drm/amdkfd: Update parameter type of pasid to uint16_t

2019-09-30 Thread Zhao, Yong
t said, you don't really save any > resources, because 8-bit and 16-bit ints still consume 32-bits on the > call stack. > > Regards, >   Felix > > On 2019-09-27 11:41 p.m., Zhao, Yong wrote: >> This is consistent with other code and

[PATCH] drm/amdkfd: Improve KFD IOCTL printing

2019-09-30 Thread Zhao, Yong
The code use hex define, so should the printing. Change-Id: Ia7cc7690553bb043915b3d8c0157216c64421a60 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers

Re: [PATCH 5/6] drm/amdgpu: Add the HDP flush support for Navi

2019-09-30 Thread Zhao, Yong
Not much relationship between them, except that this functional change is to fix a IOCTL error printing. Yong From: Kuehling, Felix Sent: Monday, September 30, 2019 11:57 AM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 5/6] drm/amdgpu

Re: [PATCH 6/6] drm/amdkfd: Improve KFD IOCTL printing

2019-09-30 Thread Zhao, Yong
Okay, I will change dev_err back to dev_dbg. The hex printing is still very useful. Yong From: Kuehling, Felix Sent: Monday, September 30, 2019 11:47 AM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 6/6] drm/amdkfd: Improve KFD IOCTL

Re: [PATCH 4/6] drm/amdkfd: Use array to probe kfd2kgd_calls

2019-09-30 Thread Zhao, Yong
Thanks. Will check that and fix the missing const. Yong From: Kuehling, Felix Sent: Monday, September 30, 2019 11:42 AM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 4/6] drm/amdkfd: Use array to probe kfd2kgd_calls On 2019-09-27 11:41 p.m

[PATCH 4/6] drm/amdkfd: Use array to probe kfd2kgd_calls

2019-09-27 Thread Zhao, Yong
This is the same idea as the kfd device info probe and move all the probe control together for easy maintenance. Change-Id: I85c98bb08eb2a4a1a80c3b913c32691cc74602d1 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 65 +-- drivers/gpu/drm/amd/amdgpu/am

[PATCH 5/6] drm/amdgpu: Add the HDP flush support for Navi

2019-09-27 Thread Zhao, Yong
The HDP flush support code was missing in the nbio and nv files. Change-Id: I046ff52567676b56bf16dc1728b02481233acb61 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 16 +--- drivers/gpu/drm/amd/amdgpu/nv.c| 9 + 2 files changed, 22 insertions(+

[PATCH 6/6] drm/amdkfd: Improve KFD IOCTL printing

2019-09-27 Thread Zhao, Yong
The code use hex define, so should the printing. Also, printf a message if there is a failure. Change-Id: Ia7cc7690553bb043915b3d8c0157216c64421a60 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH 3/6] drm/amdkfd: Delete unnecessary function declarations

2019-09-27 Thread Zhao, Yong
Ajust the function sequences so that those function delcarations are not needed any more. Change-Id: I3a270ade7ac380cd083e90611177d7a45249823f Signed-off-by: Yong Zhao --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 115 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 118 +

[PATCH 1/6] drm/amdkfd: Update parameter type of pasid to uint16_t

2019-09-27 Thread Zhao, Yong
This is consistent with other code and registers in the code. Change-Id: I04dd12bdb465a43cfcd8936ed0f227a6546830e8 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 4 ++-- drivers/gpu/drm/amd/amdg

[PATCH 2/6] drm/amdgpu: Delete useless header file reference

2019-09-27 Thread Zhao, Yong
Those header file includes are not needed. Change-Id: I44aa7e4d0391f9b2c2be757765c1437b603688ae Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c

[PATCH] drm/amdgpu: Export setup_vm_pt_regs() logic for mmhub 2.0

2019-09-27 Thread Zhao, Yong
The KFD code will call this function later. Change-Id: I5993323603799963e9eb473852b6c72de2172ed6 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 19 --- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.h | 2 ++ 2 files changed, 14 insertions(+), 7 deletions(-) diff

Re: [PATCH 1/2] drm/amdkfd: Record vmid pasid mapping in the driver for non HWS mode

2019-09-26 Thread Zhao, Yong
On 2019-09-26 6:16 p.m., Kuehling, Felix wrote: > On 2019-09-26 5:59 p.m., Zhao, Yong wrote: >> On 2019-09-26 5:36 p.m., Kuehling, Felix wrote: >>> Minor nit-pick inline. Otherwise this patch is >>> >>> Reviewed-by: Felix Kuehling >>> >>>

Re: [PATCH 2/2] drm/amdkfd: Query vmid pasid mapping through stored info for non HWS

2019-09-26 Thread Zhao, Yong
Okay, I will delete that message. Yong On 2019-09-26 5:31 p.m., Kuehling, Felix wrote: > On 2019-09-26 5:27 p.m., Zhao, Yong wrote: >> Because we record the mapping under non HWS mode in the software, >> we can query pasid through vmid using the stored mapping instead of >

Re: [PATCH 1/2] drm/amdkfd: Record vmid pasid mapping in the driver for non HWS mode

2019-09-26 Thread Zhao, Yong
On 2019-09-26 5:36 p.m., Kuehling, Felix wrote: > Minor nit-pick inline. Otherwise this patch is > > Reviewed-by: Felix Kuehling > > On 2019-09-26 5:27 p.m., Zhao, Yong wrote: >> This makes possible the vmid pasid mapping query through soft

[PATCH 1/2] drm/amdkfd: Record vmid pasid mapping in the driver for non HWS mode

2019-09-26 Thread Zhao, Yong
This makes possible the vmid pasid mapping query through software. Change-Id: Ib539aae277a227cc39f6469ae23c46c4d289b87b Signed-off-by: Yong Zhao --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 33 --- .../drm/amd/amdkfd/kfd_device_queue_manager.h | 3 +- drivers/gpu/drm/amd/

[PATCH 2/2] drm/amdkfd: Query vmid pasid mapping through stored info for non HWS

2019-09-26 Thread Zhao, Yong
Because we record the mapping under non HWS mode in the software, we can query pasid through vmid using the stored mapping instead of reading from ATC registers. This also prepares for the defeatured ATC block in future ASICs. Change-Id: I781cb9d30dc0cc93379908ff1cf8da798bb26f13 Signed-off-by: Yo

[PATCH 2/2] drm/amdkfd: Query vmid pasid mapping through stored info

2019-09-26 Thread Zhao, Yong
Because we record the mapping in the software, we can query pasid through vmid using the stored mapping instead of reading from ATC registers. This also prepares for the defeatured ATC block in future ASICs. Change-Id: I781cb9d30dc0cc93379908ff1cf8da798bb26f13 Signed-off-by: Yong Zhao --- drive

[PATCH 1/2] drm/amdkfd: Record vmid pasid mapping in the driver

2019-09-26 Thread Zhao, Yong
This makes possible the vmid pasid mapping query through software. Change-Id: Ib539aae277a227cc39f6469ae23c46c4d289b87b Signed-off-by: Yong Zhao --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 33 --- .../drm/amd/amdkfd/kfd_device_queue_manager.h | 3 +- drivers/gpu/drm/amd/

Re: [PATCH 4/6] drm/amdkfd: Record vmid pasid mapping in the driver

2019-09-26 Thread Zhao, Yong
I agree. Yong On 2019-09-26 2:54 p.m., Kuehling, Felix wrote: > On 2019-09-26 2:38 p.m., Zhao, Yong wrote: >> This makes possible the vmid pasid mapping query through software. >> >> Change-Id: Ib539aae277a227cc39f6469ae23c46c4d289b87b >> Signed-off-by: Yong Zhao >

Re: [PATCH 3/3] drm/amdkfd: Remove the control stack workaround for GFX10

2019-09-26 Thread Zhao, Yong
Hi Felix, I reworded this patch in the next series. Please review the first two patches in this series. Regards, Yong From: amd-gfx on behalf of Zhao, Yong Sent: Wednesday, September 25, 2019 2:34 PM To: Kuehling, Felix ; amd-gfx@lists.freedesktop.org

[PATCH 5/6] drm/amdkfd: Query vmid pasid mapping through stored info

2019-09-26 Thread Zhao, Yong
Because we record the mapping in the software, we can query pasid through vmid using the stored mapping instead of reading from ATC registers. This also prepares for the defeatured ATC block in future ASICs. Change-Id: I781cb9d30dc0cc93379908ff1cf8da798bb26f13 Signed-off-by: Yong Zhao --- .../g

[PATCH 2/6] drm/amdkfd: Delete unused defines

2019-09-26 Thread Zhao, Yong
They are not used anywhere. Change-Id: Ieba4f57760f0c45f24e54629245cae419b8ff157 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/am

[PATCH 6/6] drm/amdkfd: Eliminate get_atc_vmid_pasid_mapping_valid

2019-09-26 Thread Zhao, Yong
get_atc_vmid_pasid_mapping_valid() is very similar to get_atc_vmid_pasid_mapping_pasid(), so they can be merged into a new function get_atc_vmid_pasid_mapping_info() to reduce register access times. Change-Id: I255ebf2629012400b07fe6a69c3d075cfd46612e Signed-off-by: Yong Zhao --- .../drm/amd/amd

[PATCH 1/6] drm/amdkfd: Move the control stack on GFX10 to userspace buffer

2019-09-26 Thread Zhao, Yong
The GFX10 does not require the control stack to be right after mqd buffer any more, so move it back to usersapce allocated CSWR buffer. Change-Id: I446c9685549a09ac8846a42ee22d86cfb93fd98c Signed-off-by: Yong Zhao --- .../gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 37 ++- 1 file

[PATCH 3/6] drm/amdkfd: Use hex print format for pasid

2019-09-26 Thread Zhao, Yong
Since KFD pasid starts from 0x8000 (32768 in decimal), it is better perceived as a hex number. Meanwhile, change the pasid type from unsigned int to uint16_t to be consistent throughout the code. Change-Id: I565fe39f69e782749a697f18545775354c7a89f8 Signed-off-by: Yong Zhao --- drivers/gpu/drm/am

[PATCH 4/6] drm/amdkfd: Record vmid pasid mapping in the driver

2019-09-26 Thread Zhao, Yong
This makes possible the vmid pasid mapping query through software. Change-Id: Ib539aae277a227cc39f6469ae23c46c4d289b87b Signed-off-by: Yong Zhao --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 34 +-- .../drm/amd/amdkfd/kfd_device_queue_manager.h | 3 +- 2 files changed, 26

Re: [PATCH] drm/amdkfd: Fix race in gfx10 context restore handler

2019-09-25 Thread Zhao, Yong
Reviewed-by: Yong Zhao From: amd-gfx on behalf of Cornwall, Jay Sent: Wednesday, September 25, 2019 6:06 PM To: amd-gfx@lists.freedesktop.org Cc: Cornwall, Jay Subject: [PATCH] drm/amdkfd: Fix race in gfx10 context restore handler Missing synchronization with

[PATCH] drm/amdkfd: Use hex print format for pasid

2019-09-25 Thread Zhao, Yong
Since KFD pasid starts from 0x8000 (32768 in decimal), it is better perceived as a hex number. Change-Id: I565fe39f69e782749a697f18545775354c7a89f8 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 12 +-- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c | 4 ++--

Re: [PATCH 3/3] drm/amdkfd: Remove the control stack workaround for GFX10

2019-09-25 Thread Zhao, Yong
Yes. I confirmed with CP guys and they said the behavior on GFX10 is the same as GFX8 now. I remember that the workaround on GFX9 was to help with a HW bug, but not too sure. Regards, Yong On 2019-09-25 2:25 p.m., Kuehling, Felix wrote: > On 2019-09-25 2:15 p.m., Zhao, Yong wrote: >

[PATCH 3/3] drm/amdkfd: Remove the control stack workaround for GFX10

2019-09-25 Thread Zhao, Yong
The GFX10 does not have this hardware bug any more, so remove it. Change-Id: I446c9685549a09ac8846a42ee22d86cfb93fd98c Signed-off-by: Yong Zhao --- .../gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 37 ++- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/d

[PATCH 2/3] drm/amdkfd: Use setup_vm_pt_regs function from base driver in KFD

2019-09-25 Thread Zhao, Yong
This was done on GFX9 previously, now do it for GFX10. Change-Id: I4442e60534c59bc9526a673559f018ba8058deac Signed-off-by: Yong Zhao --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/amdg

[PATCH 1/3] drm/amdgpu: Export setup_vm_pt_regs() logic for gfxhub 2.0

2019-09-25 Thread Zhao, Yong
The KFD code will call this function later. Change-Id: I88a53368cdee719b2c75393e5cdbd8290584548e Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 20 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.h | 2 ++ 2 files changed, 14 insertions(+), 8 deletions(-) d

Re: [PATCH] drm/amdkfd: Add NAVI12 support from kfd side

2019-09-24 Thread Zhao, Yong
: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Add NAVI12 support from kfd side I will push to drm-next branch . After check the code again , this change will cause issue in the kfd since CHIP_NAVI12 not added in other place where check the device_info

Re: [PATCH] drm/amdkfd: Add NAVI12 support from kfd side

2019-09-24 Thread Zhao, Yong
Reviewed-by: Yong Zhao Make sure to push to the new 5.3 branch. Yong From: amd-gfx on behalf of Liu, Shaoyun Sent: Tuesday, September 24, 2019 6:16 PM To: amd-gfx@lists.freedesktop.org Cc: Liu, Shaoyun Subject: [PATCH] drm/amdkfd: Add NAVI12 support from kf

[PATCH 1/2] drm/amdkfd: Fix NULL pointer dereference for set_scratch_backing_va()

2019-09-23 Thread Zhao, Yong
Currently this function pointer is missing for GFX10. Considering it is a void function since GFX9, fix it by checking the function pointer before dereferencing it. Change-Id: I1dc8e5163f259251357bfaa42a91ff991fba6dd5 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus

[PATCH 2/2] drm/amdkfd: Sync gfx10 kfd2kgd_calls function pointers

2019-09-23 Thread Zhao, Yong
get_hive_id was not set. Also, adjust the function setting sequence. Change-Id: I51962954cd0707ebe9aa6c85c71110dee98d6200 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/a

Re: [PATCH 2/2] drm/amdkfd: Use better name for sdma queue non HWS path

2019-09-23 Thread Zhao, Yong
Okay, I will incorporate Shaoyun's input. Yong From: Liu, Shaoyun Sent: Monday, September 23, 2019 10:27 AM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 2/2] drm/amdkfd: Use better name for sdma queue non HWS path Probably rena

[PATCH 3/3] drm/amdkfd: Remove unnecessary pm_init() for non HWS mode

2019-09-22 Thread Zhao, Yong
The packet manager is not needed for non HWS mode except Hawaii, so only initialize it for Hawaii under non HWS mode. This will simplify debugging under non HWS mode for all new asics, because it eliminates one variable out of the equation in non HWS mode Change-Id: Ie2b61b546299a50366b9ab97900f4b

[PATCH 2/3] drm/amdkfd: Remove excessive print when reserving doorbells

2019-09-22 Thread Zhao, Yong
The dozens of printing messages are compressed into 2 lines. Change-Id: I339b3eee06509973f76577091c4c4e9c70ed8248 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_

[PATCH 1/3] drm/amdkfd: Add an error print if SDMA RLC is not idle

2019-09-22 Thread Zhao, Yong
The message will be useful when troubleshooting the issues. Change-Id: Id82bbe80810dccff67c5b1275e9779f6a945dc7a Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 8 ++-- drivers/gpu/drm/amd/am

[PATCH 1/2] drm/amdkfd: Delete useless SDMA register setting on non HWS path

2019-09-22 Thread Zhao, Yong
It turns out when loading hqd for SDMA queues, RESUME_CTX of SDMA*_GFX_CONTEXT_CNTL is already 0, so there is no need to set it to 0 again. In addition, it does not seem right that we should touch SDMA GFX queues when manipulating RLC queues. Change-Id: I2c142d024e94f92194b1cb9feb7f44396b8f3ecc Si

[PATCH 2/2] drm/amdkfd: Use better name for sdma queue non HWS path

2019-09-22 Thread Zhao, Yong
The old name is prone to confusion. The register offset is for a RLC queue rather than a SDMA engine. The value is not a base address, but a register offset. Change-Id: I55fb835f2105392344b1c17323bb55c03f927836 Signed-off-by: Yong Zhao --- .../drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 85 +

[PATCH] drm/amdkfd: Delete unused KFD_IS_* macro

2019-09-16 Thread Zhao, Yong
These were deleted before, but somehow showed up again. Delete them again. Change-Id: I19b3063932380cb74a01d505e8e92f897a2c2cb7 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drive

[PATCH] drm/amdkfd: Delete unused KFD_IS_DGPU macro

2019-09-16 Thread Zhao, Yong
This was deleted before, but somehow showed up again. Delete it again. Change-Id: I19b3063932380cb74a01d505e8e92f897a2c2cb7 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gp

Re: [PATCH] drm/amdkfd: Support Navi14 in KFD

2019-09-05 Thread Zhao, Yong
Fixed and pushed. Thanks. Regards, Yong On 2019-09-05 3:56 p.m., Kuehling, Felix wrote: > On 2019-09-05 3:22 p.m., Zhao, Yong wrote: >> Change-Id: Ie2c6226022ff4d389eaa05b1c84afa7ae4cea0aa >> Signed-off-by: Yong Zhao > Please add a change description. With that fi

[PATCH] drm/amdkfd: Support Navi14 in KFD

2019-09-05 Thread Zhao, Yong
Change-Id: Ie2c6226022ff4d389eaa05b1c84afa7ae4cea0aa Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 19 +++ .../drm/amd/amdkfd/kfd_device_queue_manager.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_flat

[PATCH] drm/amdkfd: Fix a building error when KFD_SUPPORT_IOMMU_V2 is turned off

2019-09-05 Thread Zhao, Yong
The issue was accidentally introduced recently. Change-Id: I3b21caa1596d4f7de1866bed1cb5d8fe1b51504c Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/g

Re: [PATCH] drm/amdkfd: Fill the name field in node topology with asic name v2

2019-08-16 Thread Zhao, Yong
Pushed. Will work on the market name later. Yong From: Kuehling, Felix Sent: Thursday, August 15, 2019 8:45 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Fill the name field in node topology with asic name v2 On 2019-08-13

Re: [PATCH 1/2] drm/amdgpu: Add printing for RW extracted from VM_L2_PROTECTION_FAULT_STATUS

2019-08-14 Thread Zhao, Yong
Pushed! Thanks. Yong On 2019-08-14 3:27 a.m., Christian König wrote: > Am 13.08.19 um 20:08 schrieb Zhao, Yong: >> RW is also useful in most cases. >> >> Change-Id: Icf4bd65ea168e5965a6a8ebe32ce9327a2de2851 >> Signed-off-by: Yong Zhao > > Reviewed-by

[PATCH] drm/amdkfd: Fill the name field in node topology with asic name v2

2019-08-13 Thread Zhao, Yong
The name field in node topology has not been used. We re-purpose it to hold the asic name, which can be queried by user space applications through sysfs. Change-Id: I74f4f5487db169004a9d27ea15abe99261c86220 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 18 +

[PATCH] drm/amdkfd: Fill amdgpu_task_info for KFD VMs

2019-08-13 Thread Zhao, Yong
The amdgpu_task_info will be used when printing VM page fault for KFD processes. Change-Id: Ifd983db5dceb1d477e7287e4893f80565a7a6b06 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process

[PATCH] drm/amdgpu: Set VM_L2_CNTL.PDE_FAULT_CLASSIFICATION to 0 for GFX10

2019-08-13 Thread Zhao, Yong
We have done this for pre-GFX10 asics, but GFX10 did not pick up the new change. The below is the commit message for that change. This is recommended by HW designers. Previously when it was set to 1, the PDE walk error in VM fault will be treated as PERMISSION_OR_INVALID_PAGE_FAULT rather than usu

[PATCH 2/2] drm/amdgpu: Add more page fault info printing for GFX10

2019-08-13 Thread Zhao, Yong
The printing we did for GFX9 was not propogated to GFX10 somehow, so fix it now. Change-Id: Ic0b8381134340b83cd69c3fe186ac7a8a97b1bca Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 33 ++ 1 file changed, 28 insertions(+), 5 deletions(-) diff --git

[PATCH 1/2] drm/amdgpu: Add printing for RW extracted from VM_L2_PROTECTION_FAULT_STATUS

2019-08-13 Thread Zhao, Yong
RW is also useful in most cases. Change-Id: Icf4bd65ea168e5965a6a8ebe32ce9327a2de2851 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 296

Re: [PATCH] drm/amdgpu: Add more page fault info printing for GFX10

2019-08-12 Thread Zhao, Yong
quot;:". Regards, Yong On 2019-08-12 3:12 p.m., Christian König wrote: > Am 12.08.19 um 21:05 schrieb Zhao, Yong: >> The printing we did for GFX9 was not propogated to GFX10 somehow, so fix >> it now. >> >> Change-Id: Ic0b8381134340b83cd69c3fe186ac7a8a97b1bca >

  1   2   >