Re: [PATCH v3 0/8] Support DEVICE_GENERIC memory in migrate_vma_*

2021-07-23 Thread Sierra Guiza, Alejandro (Alex)
On 7/17/2021 2:54 PM, Sierra Guiza, Alejandro (Alex) wrote: On 7/16/2021 5:14 PM, Felix Kuehling wrote: Am 2021-07-16 um 11:07 a.m. schrieb Theodore Y. Ts'o: On Wed, Jun 23, 2021 at 05:49:55PM -0400, Felix Kuehling wrote: I can think of two ways to test the changes for MEMORY_DEVICE_GENERIC

Re: [PATCH 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Matt Coffin
On 7/21/21 9:20 PM, Evan Quan wrote: The customized OD settings can be divided into two parts: those committed ones and non-committed ones. - For those changes which had been fed to SMU before S3/S4/Runpm suspend kicked, they are committed changes. They should be properly restored

Re: [PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms (v3)

2021-07-23 Thread Taylor, Ryan
[AMD Official Use Only] Thanks Alex! I will make these changes. Best, Ryan From: Alex Deucher Sent: Friday, July 23, 2021 7:33 AM To: Taylor, Ryan Cc: Maling list - DRI developers ; amd-gfx list ; kernel test robot ; Daniel Vetter ; Siqueira, Rodrigo ;

Re: [PATCH V2 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Lazar, Lijo
Good one, that makes better use of flags. Thanks, Lijo From: Chen, Guchun Sent: Friday, July 23, 2021 7:14:58 PM To: Lazar, Lijo ; Quan, Evan ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: RE: [PATCH V2 1/2] drm/amd/pm: restore user customized

RE: [PATCH V2 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Chen, Guchun
[Public] Just curious that in the patch, it adds a variable *user_od* serving the check of applying user customized OD setting. Instead of this, does it make sense to use the *flag* in struct smu_user_dpm_profile for this? As we have below bit in pm/inc/amdgpu_smu.h, can we add another bit for

Re: [PATCH V2 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Deucher, Alexander
[AMD Official Use Only] I haven't had a chance to look at the patches too closely, but if it could be done in a generic may, that makes sense to me. Maybe as a follow up patch? Alex From: Lazar, Lijo Sent: Friday, July 23, 2021 6:09 AM To: Quan, Evan ;

Re: [PATCH v2] drm/amdgpu: Check pmops for desired suspend state

2021-07-23 Thread Lazar, Lijo
On 7/23/2021 6:18 PM, Pratik Vishwakarma wrote: [Why] User might change the suspend behaviour from OS. [How] Check with pm for target suspend state and set s0ix flag only for s2idle state. v2: User might change default suspend state, use target state Suggested-by: Lijo Lazar Signed-off-by:

[PATCH v2] drm/amdgpu: Check pmops for desired suspend state

2021-07-23 Thread Pratik Vishwakarma
[Why] User might change the suspend behaviour from OS. [How] Check with pm for target suspend state and set s0ix flag only for s2idle state. v2: User might change default suspend state, use target state Suggested-by: Lijo Lazar Signed-off-by: Pratik Vishwakarma ---

Re: [PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms (v3)

2021-07-23 Thread Alex Deucher
On Wed, Jul 21, 2021 at 1:07 PM Ryan Taylor wrote: > > Move dce_virtual into amdgpu_vkms and update all references to > dce_virtual with amdgpu_vkms. > > v2: Removed more references to dce_virtual. > > v3: Restored display modes from previous implementation. > > Reported-by: kernel test robot >

Re: [PATCH 1/3] drm/amdgpu: create amdgpu_vkms (v2)

2021-07-23 Thread Alex Deucher
On Wed, Jul 21, 2021 at 1:07 PM Ryan Taylor wrote: > > Modify the VKMS driver into an api that dce_virtual can use to create > virtual displays that obey drm's atomic modesetting api. > > v2: Made local functions static. > > Reported-by: kernel test robot > Signed-off-by: Ryan Taylor > --- >

Re: [PATCH V2 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Lazar, Lijo
The series looks good to me, though I prefer to use a common logic to restore od settings so that smuv12,smuv13 gets the restore feature by default once they add the user table logic. Don't have strong argument for it unless Alex, Kenneth or others have some comments. Anyway, the series is

Re: [PATCH v2] drm/amdgpu: Check pmops for desired suspend state

2021-07-23 Thread Alex Deucher
On Fri, Jul 23, 2021 at 9:08 AM Lazar, Lijo wrote: > > > > On 7/23/2021 6:18 PM, Pratik Vishwakarma wrote: > > [Why] > > User might change the suspend behaviour from OS. > > > > [How] > > Check with pm for target suspend state and set s0ix > > flag only for s2idle state. > > > > v2: User might

Re: [PATCH 2/2] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Jingwen Chen
On Fri Jul 23, 2021 at 10:45:49AM +0200, Christian König wrote: > Am 23.07.21 um 09:07 schrieb Jingwen Chen: > > [SNIP] > > Hi Christian, > > > > The thing is vm flush fence has no job passed to amdgpu_fence_emit, so > > go through the jobs cannot help find the vm flush fence. And keep the > >

RE: [PATCH 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Quan, Evan
[Public] I probably get your point. Please check the update V2. BR Evan > -Original Message- > From: Lazar, Lijo > Sent: Friday, July 23, 2021 3:39 PM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: RE: [PATCH 1/2] drm/amd/pm: restore user

[PATCH V2 2/2] drm/amd/pm: restore user customized OD settings properly for Sienna Cichlid

2021-07-23 Thread Evan Quan
Properly restore those committed and non-committed user customized OD settings. Change-Id: I25396df0b3ecdd7a0d9fc77ed220b0abf1fde020 Signed-off-by: Evan Quan --- .../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 37 ++- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git

[PATCH V2 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Evan Quan
The customized OD settings can be divided into two parts: those committed ones and non-committed ones. - For those changes which had been fed to SMU before S3/S4/Runpm suspend kicked, they are committed changes. They should be properly restored and fed to SMU on S3/S4/Runpm resume. -

RE: [PATCH 2/2] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Liu, Monk
[AMD Official Use Only] Hi Christian How about this way: #define AMDGPU_DMA_FENCE_FLAG_INSIDE_JOB DMA_FENCE_FLAG_USER_BITS And we can use AMDGPU_DMA_FENCE_FLAG_INSIDE_JOB instead of DMA_FENCE_FLAG_USER_BITS everywhere Thanks -- Monk Liu |

RE: [PATCH 1/2] drm/amd/amdgpu embed hw_fence into amdgpu_job

2021-07-23 Thread Liu, Monk
[AMD Official Use Only] Hi jingwen In the lines like below: + if (job != NULL) { + /* mark this fence has a parent job */ + set_bit(DMA_FENCE_FLAG_USER_BITS, >flags); + } The DMA_FENCE_FLAG_USER_BITS usage looks not good enough Please try to improve it,

RE: [PATCH 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Lazar, Lijo
[Public] Hi Evan, In that case, using "od_edit" table for the intermediate table During commit command, what if it's done like 1) Copy and update table if od_edit table is different than user_od table 2) Set the flag to false if od_edit table and boot_od table are different

RE: [PATCH] drm/amdgpu: retire sdma v5_2 golden settings from driver

2021-07-23 Thread Gao, Likun
[AMD Official Use Only] Reviewed-by: Likun Gao Regards, Likun -Original Message- From: Hawking Zhang Sent: Friday, July 23, 2021 2:11 PM To: amd-gfx@lists.freedesktop.org; Gao, Likun ; Deucher, Alexander Cc: Zhang, Hawking Subject: [PATCH] drm/amdgpu: retire sdma v5_2 golden

RE: [PATCH 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Quan, Evan
[AMD Official Use Only] Hi Lijo, Sorry, I doubled checked. The implementation of Navi1x is right. The original design for "restores to default settings" is a two-step process. That means for "case PP_OD_COMMIT_DPM_TABLE:" we must distinguish whether it's an usual customized od setting update

Re: [PATCH 2/2] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Jingwen Chen
On Fri Jul 23, 2021 at 08:33:02AM +0200, Christian König wrote: > Am 22.07.21 um 18:47 schrieb Jingwen Chen: > > On Thu Jul 22, 2021 at 06:24:28PM +0200, Christian König wrote: > > > Am 22.07.21 um 16:45 schrieb Andrey Grodzovsky: > > > > On 2021-07-22 6:45 a.m., Jingwen Chen wrote: > > > > > On

RE: [PATCH 1/2] drm/amd/pm: restore user customized OD settings properly for NV1x

2021-07-23 Thread Quan, Evan
[AMD Official Use Only] > -Original Message- > From: Lazar, Lijo > Sent: Thursday, July 22, 2021 5:03 PM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH 1/2] drm/amd/pm: restore user customized OD settings > properly for NV1x > > > >

[PATCH] drm/amdgpu: retire sdma v5_2 golden settings from driver

2021-07-23 Thread Hawking Zhang
They are initalized by hardware during power up phase, starting from sdma v5_2 generation Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 17 - 1 file changed, 17 deletions(-) diff --git

Re: [PATCH 2/2] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Christian König
Am 23.07.21 um 11:25 schrieb Jingwen Chen: On Fri Jul 23, 2021 at 10:45:49AM +0200, Christian König wrote: Am 23.07.21 um 09:07 schrieb Jingwen Chen: [SNIP] Hi Christian, The thing is vm flush fence has no job passed to amdgpu_fence_emit, so go through the jobs cannot help find the vm flush

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-23 Thread Christian König
Am 23.07.21 um 11:00 schrieb Daniel Vetter: On Fri, Jul 23, 2021 at 10:33:48AM +0200, Christian König wrote: Am 23.07.21 um 10:21 schrieb Daniel Vetter: On Wed, Jul 14, 2021 at 10:51 AM Christian König wrote: Am 13.07.21 um 17:28 schrieb Alex Deucher: On Tue, Jul 13, 2021 at 2:57 AM

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-23 Thread Daniel Vetter
On Fri, Jul 23, 2021 at 10:33:48AM +0200, Christian König wrote: > > > Am 23.07.21 um 10:21 schrieb Daniel Vetter: > > On Wed, Jul 14, 2021 at 10:51 AM Christian König > > wrote: > > > > > > > > > Am 13.07.21 um 17:28 schrieb Alex Deucher: > > > > On Tue, Jul 13, 2021 at 2:57 AM Christian

Re: [PATCH 2/2] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Christian König
Am 23.07.21 um 09:07 schrieb Jingwen Chen: [SNIP] Hi Christian, The thing is vm flush fence has no job passed to amdgpu_fence_emit, so go through the jobs cannot help find the vm flush fence. And keep the rest fences in the RCU array will lead to signaling them in the ib_test right after ASIC

[PATCH v2] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Jingwen Chen
[Why] After embeded hw_fence to amdgpu_job, we need to add tdr support for this feature. [How] 1. Add a resubmit_flag for resubmit jobs. 2. Clear job fence from RCU and force complete vm flush fences in pre_asic_reset 3. skip dma_fence_get for resubmit jobs and add a dma_fence_put for

[PATCH v2 1/2] drm/amd/amdgpu embed hw_fence into amdgpu_job

2021-07-23 Thread Jingwen Chen
From: Jack Zhang Why: Previously hw fence is alloced separately with job. It caused historical lifetime issues and corner cases. The ideal situation is to take fence to manage both job and fence's lifetime, and simplify the design of gpu-scheduler. How: We propose to embed hw_fence into

[PATCH] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Jingwen Chen
[Why] After embeded hw_fence to amdgpu_job, we need to add tdr support for this feature. [How] 1. Add a resubmit_flag for resubmit jobs. 2. Clear job fence from RCU and force complete vm flush fences in pre_asic_reset 3. skip dma_fence_get for resubmit jobs and add a dma_fence_put for

[PATCH 1/2] drm/amd/amdgpu embed hw_fence into amdgpu_job

2021-07-23 Thread Jingwen Chen
From: Jack Zhang Why: Previously hw fence is alloced separately with job. It caused historical lifetime issues and corner cases. The ideal situation is to take fence to manage both job and fence's lifetime, and simplify the design of gpu-scheduler. How: We propose to embed hw_fence into

Re: [PATCH 2/2] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Jingwen Chen
On Fri Jul 23, 2021 at 12:06:32AM -0400, Andrey Grodzovsky wrote: > > On 2021-07-22 8:20 p.m., Jingwen Chen wrote: > > On Thu Jul 22, 2021 at 01:50:09PM -0400, Andrey Grodzovsky wrote: > > > On 2021-07-22 1:27 p.m., Jingwen Chen wrote: > > > > On Thu Jul 22, 2021 at 01:17:13PM -0400, Andrey

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-23 Thread Christian König
Am 23.07.21 um 10:21 schrieb Daniel Vetter: On Wed, Jul 14, 2021 at 10:51 AM Christian König wrote: Am 13.07.21 um 17:28 schrieb Alex Deucher: On Tue, Jul 13, 2021 at 2:57 AM Christian König wrote: Am 13.07.21 um 00:06 schrieb Felix Kuehling: KFD Thunk maps invisible VRAM BOs with

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-23 Thread Daniel Vetter
On Wed, Jul 14, 2021 at 10:51 AM Christian König wrote: > > > > Am 13.07.21 um 17:28 schrieb Alex Deucher: > > On Tue, Jul 13, 2021 at 2:57 AM Christian König > > wrote: > >> > >> > >> Am 13.07.21 um 00:06 schrieb Felix Kuehling: > >>> KFD Thunk maps invisible VRAM BOs with PROT_NONE,

Re: [PATCH] drm/amdgpu: Check pmops for desired suspend state

2021-07-23 Thread Lazar, Lijo
On 7/22/2021 10:57 AM, Pratik Vishwakarma wrote: [Why] User might set mem_sleep as deep and it will result in amdgpu resume errors. [How] Check with pm for default suspend state Signed-off-by: Pratik Vishwakarma --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2

Re: [PATCH 2/2] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Andrey Grodzovsky
On 2021-07-22 8:20 p.m., Jingwen Chen wrote: On Thu Jul 22, 2021 at 01:50:09PM -0400, Andrey Grodzovsky wrote: On 2021-07-22 1:27 p.m., Jingwen Chen wrote: On Thu Jul 22, 2021 at 01:17:13PM -0400, Andrey Grodzovsky wrote: On 2021-07-22 12:47 p.m., Jingwen Chen wrote: On Thu Jul 22, 2021 at

Re: [PATCH 2/2] drm: add tdr support for embeded hw_fence

2021-07-23 Thread Christian König
Am 22.07.21 um 18:47 schrieb Jingwen Chen: On Thu Jul 22, 2021 at 06:24:28PM +0200, Christian König wrote: Am 22.07.21 um 16:45 schrieb Andrey Grodzovsky: On 2021-07-22 6:45 a.m., Jingwen Chen wrote: On Wed Jul 21, 2021 at 12:53:51PM -0400, Andrey Grodzovsky wrote: On 2021-07-20 11:13 p.m.,