Re: [PATCH v10 08/10] dyndbg: add print-to-tracefs, selftest with it - RFC

2021-11-23 Thread Pekka Paalanen
On Mon, 22 Nov 2021 15:42:38 -0700 jim.cro...@gmail.com wrote: > On Mon, Nov 22, 2021 at 2:02 AM Pekka Paalanen wrote: > > > > On Fri, 19 Nov 2021 11:21:36 -0500 > > Jason Baron wrote: > > > > > On 11/18/21 10:24 AM, Pekka Paalanen wrote: > > > > On Thu, 18 Nov 2021 09:29:27 -0500 > > > > Ja

Re: [PATCH v10 08/10] dyndbg: add print-to-tracefs, selftest with it - RFC

2021-11-23 Thread Simon Ser
First off, let me reiterate that this feature would be invaluable as user-space developers. It's often pretty difficult to figure out the cause of an EINVAL, we have to ask users to follow complicated instructions [1] to grab DRM logs. Then have to skim through several megabytes of logs to find the

[PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID

2021-11-23 Thread Jane Jian
[WHY] for sriov odd# vf will modify vcn0 engine ip revision(due to multimedia bandwidth feature), which will be mismatched with original vcn0 revision [HOW] skip ip revision match case and continue use asic type to check Signed-off-by: Jane Jian Change-Id: I1ace32acbf3a13c0baac958508da1324ec387

[PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID

2021-11-23 Thread Jane Jian
[WHY] for sriov odd# vf will modify vcn0 engine ip revision(due to multimedia bandwidth feature), which will be mismatched with original vcn0 revision [HOW] skip ip revision match case and continue use asic type to check Signed-off-by: Jane Jian Change-Id: I1ace32acbf3a13c0baac958508da1324ec387

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

2021-11-23 Thread Deucher, Alexander
[AMD Official Use Only] Series is: Reviewed-by: Alex Deucher From: Tuikov, Luben Sent: Monday, November 22, 2021 5:25 PM To: amd-gfx@lists.freedesktop.org Cc: Tuikov, Luben ; Deucher, Alexander Subject: [PATCH 3/3] drm/amd/pm: Print the error on command submis

Re: [PATCH 1/2] drm/amdgpu: fix vkms hrtimer settings

2021-11-23 Thread Alex Deucher
On Mon, Nov 22, 2021 at 8:59 PM Cui, Flora wrote: > > [Public] > > > Modprobe -r amdgpu get oops in amdgpu_vkms_sw_fini() > > for (i = 0; i < adev->mode_info.num_crtc; i++) > > if (adev->mode_info.crtcs[i]) > >

Re: [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID

2021-11-23 Thread Deucher, Alexander
[Public] Can we just add a check for the new IP version in that case? This looks really hacky. Alex From: Jane Jian Sent: Tuesday, November 23, 2021 6:34 AM To: amd-gfx@lists.freedesktop.org ; Deucher, Alexander ; Chen, Guchun ; Chen, JingWen Cc: Jian, Jane

Re: [PATCH 2/2] drm/amdkfd: Slighly optimize 'init_doorbell_bitmap()'

2021-11-23 Thread Christophe JAILLET
Le 22/11/2021 à 22:44, Felix Kuehling a écrit : Am 2021-11-21 um 12:41 p.m. schrieb Christophe JAILLET: The 'doorbell_bitmap' bitmap has just been allocated. So we can use the non-atomic '__set_bit()' function to save a few cycles as no concurrent access can happen. Signed-off-by: Christophe JA

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

2021-11-23 Thread Alistair Popple
On Tuesday, 23 November 2021 4:16:55 AM AEDT Felix Kuehling wrote: [...] > > Right, so long as my fix goes in I don't think there is anything wrong with > > pinning device public pages. Agree that we should avoid FOLL_LONGTERM pins > > for > > device memory though. I think the way to do that is

[PATCH 2/2] drm/amdgpu: enable Navi retry fault wptr overflow

2021-11-23 Thread Philip Yang
If xnack is on, VM retry fault interrupt send to IH ring1, and ring1 will be full quickly. IH cannot receive other interrupts, this causes deadlock if migrating buffer using sdma and waiting for sdma done while handling retry fault. Remove VMC from IH storm client, enable ring1 write pointer overf

[PATCH 1/2] drm/amdgpu: enable Navi 48-bit IH timestamp counter

2021-11-23 Thread Philip Yang
By default this timestamp is 32 bit counter. It gets overflowed in around 10 minutes. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c index 1

Re: [PATCH 2/2] drm/amdgpu: enable Navi retry fault wptr overflow

2021-11-23 Thread Felix Kuehling
Am 2021-11-23 um 11:03 a.m. schrieb Philip Yang: > If xnack is on, VM retry fault interrupt send to IH ring1, and ring1 > will be full quickly. IH cannot receive other interrupts, this causes > deadlock if migrating buffer using sdma and waiting for sdma done > while handling retry fault. > > Remov

[PATCH v5] drm/amdgpu: handle IH ring1 overflow

2021-11-23 Thread Philip Yang
IH ring1 is used to process GPU retry fault, overflow is enabled to drain retry fault because we want receive other interrupts while handling retry fault to recover range. There is no overflow flag set when wptr pass rptr. Use timestamp of rptr and wptr to handle overflow and drain retry fault. Ad

[PATCH] drm/amdgpu/pm: fix powerplay OD interface

2021-11-23 Thread Alex Deucher
The overclocking interface currently appends data to a string. Revert back to using sprintf(). Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1774 Fixes: 6db0c87a0a8ee1 ("amdgpu/pm: Replace hwmgr smu usage of sprintf with sysfs_emit") Signed-off-by: Alex Deucher --- .../drm/amd/pm/powerp

[PATCH v2 2/2] drm/amdkfd: Slighly optimize 'init_doorbell_bitmap()'

2021-11-23 Thread Christophe JAILLET
The 'doorbell_bitmap' bitmap has just been allocated. So we can use the non-atomic '__set_bit()' function to save a few cycles as no concurrent access can happen. Reviewed-by: Felix Kuehling Signed-off-by: Christophe JAILLET --- bitmap_set() could certainly also be use, but range checking would

[PATCH v2 1/2] drm/amdkfd: Use bitmap_zalloc() when applicable

2021-11-23 Thread Christophe JAILLET
'doorbell_bitmap' and 'queue_slot_bitmap' are bitmaps. So use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid some open-coded arithmetic in allocator arguments. Also change the corresponding 'kfree()' into 'bitmap_free()' to keep consistency. Reviewed-by: Felix Kuehling Signed

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

2021-11-23 Thread Arunpravin
On 18/11/21 12:09 am, Matthew Auld wrote: > 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

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

2021-11-23 Thread Arunpravin
On 18/11/21 12:32 am, Matthew Auld wrote: > 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

RE: [PATCH] drm/amdgpu/pm: fix powerplay OD interface

2021-11-23 Thread Quan, Evan
[AMD Official Use Only] Acked-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Wednesday, November 24, 2021 4:01 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH] drm/amdgpu/pm: fix powerplay OD interface > > The o

[PATCH 1/3] drm/amdgpu: cancel the correct hrtimer on exit

2021-11-23 Thread Flora Cui
Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c index ce982afeff91..ac9a8cd21c4b 100644 --- a/drivers/gpu/drm/amd/amdg

[PATCH 2/3] drm/amdgpu: fix vkms crtc settings

2021-11-23 Thread Flora Cui
otherwise adev->mode_info.crtcs[] is NULL Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 42 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.h | 5 ++- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkm

[PATCH 3/3] drm/amdgpu: check atomic flag to differeniate with legacy path

2021-11-23 Thread Flora Cui
since vkms support atomic KMS interface Signed-off-by: Flora Cui Reviewed-by: Guchun Chen Acked-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/

RE: [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID

2021-11-23 Thread Jian, Jane
[Public] Hi Guchun, Per Alex's suggestion, we would better add a check for new vcn0 IP version, which is a version only owned by sriov and a way that I originally did, how do you think? Thanks, Jane From: Deucher, Alexander Sent: Tuesday, November 23, 2021 11:03 PM To: Jian, Jane ; amd-gfx@l

RE: [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID

2021-11-23 Thread Chen, Guchun
[Public] Hi Jane/Alex, Adding a check of new IP in this case looks good to me. Regards, Guchun From: Jian, Jane Sent: Wednesday, November 24, 2021 10:54 AM To: Deucher, Alexander ; Chen, Guchun ; Chen, JingWen Cc: amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu/sriov/vcn: skip

[PATCH] drm/amdgpu: fix byteorder error in amdgpu discovery

2021-11-23 Thread Yang Wang
fix some byteorder issues about amdgpu discovery. This will result in running errors on the big end system. (e.g:MIPS) Signed-off-by: Yang Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/a

Re: [PATCH] drm/amdgpu: fix byteorder error in amdgpu discovery

2021-11-23 Thread Lazar, Lijo
On 11/24/2021 10:07 AM, Yang Wang wrote: fix some byteorder issues about amdgpu discovery. This will result in running errors on the big end system. (e.g:MIPS) Signed-off-by: Yang Wang Reviewed-by: Lijo Lazar Thanks, Lijo --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 12 ++-

RE: [PATCH] drm/amdgpu: fix byteorder error in amdgpu discovery

2021-11-23 Thread Chen, Guchun
[Public] Reviewed-by: Guchun Chen Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Yang Wang Sent: Wednesday, November 24, 2021 12:37 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Lazar, Lijo ; Wang, Yang(Kevin) ; Zhang, Hawking Subject: [PATCH] drm/amdg

Re: [PATCH 1/2] drm/amdgpu: enable Navi 48-bit IH timestamp counter

2021-11-23 Thread Christian König
Am 23.11.21 um 17:03 schrieb Philip Yang: By default this timestamp is 32 bit counter. It gets overflowed in around 10 minutes. Signed-off-by: Philip Yang Reviewed-by: Christian König for the series. --- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH] drm/amdgpu/pm: fix powerplay OD interface

2021-11-23 Thread Christian König
Am 23.11.21 um 21:01 schrieb Alex Deucher: The overclocking interface currently appends data to a string. Revert back to using sprintf(). Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1774 Fixes: 6db0c87a0a8ee1 ("amdgpu/pm: Replace hwmgr smu usage of sprintf with sysfs_emit") Signed-