RE: [PATCH] drm/amdgpu: update the shader to clear specific SGPRs

2021-05-06 Thread Zhang, Hawking
[AMD Public Use] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Dennis Li Sent: Friday, May 7, 2021 11:43 To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Kuehling, Felix ; Zhang, Hawking ; Koenig, Christian Cc: Li, Dennis Subject: [PATCH] drm/amdgpu:

[PATCH] drm/amdgpu: update the shader to clear specific SGPRs

2021-05-06 Thread Dennis Li
Add shader codes to explicitly clear specific SGPRs, such as flat_scratch_lo, flat_scratch_hi and so on. And also correct the allocation size of SGPRs in PGM_RSRC1. Signed-off-by: Dennis Li diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c index

[PATCH 3/5] drm/amdkfd: set owner ref to svm range prefault

2021-05-06 Thread Alex Sierra
svm_range_prefault is called right before migrations to VRAM, to make sure pages are resident in system memory before the migration. With partial migrations, this reference is used by hmm range get pages to avoid migrating pages that are already in the same VRAM domain. Signed-off-by: Alex Sierra

[PATCH 4/5] drm/amdgpu: get owner ref in validate and map

2021-05-06 Thread Alex Sierra
Get the proper owner reference for amdgpu_hmm_range_get_pages function. This is useful for partial migrations. To avoid migrating back to system memory, VRAM pages, that are accessible by all devices in the same memory domain. Ex. multiple devices in the same hive. Signed-off-by: Alex Sierra ---

[PATCH 2/5] drm/amdkfd: add owner ref param to get hmm pages

2021-05-06 Thread Alex Sierra
The parameter is used in the dev_private_owner to decide if device pages in the range require to be migrated back to system memory, based if they are or not in the same memory domain. In this case, this reference could come from the same memory domain with devices connected to the same hive.

[PATCH 5/5] drm/amdkfd: classify and map mixed svm range pages in GPU

2021-05-06 Thread Alex Sierra
[Why] svm ranges can have mixed pages from device or system memory. A good example is, after a prange has been allocated in VRAM and a copy-on-write is triggered by a fork. This invalidates some pages inside the prange. Endding up in mixed pages. [How] By classifying each page inside a prange,

[PATCH 1/5] drm/amdkfd: device pgmap owner at the svm migrate init

2021-05-06 Thread Alex Sierra
pgmap owner member at the svm migrate init could be referenced to either adev or hive, depending on device topology. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 6 +++--- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 3 +++ 2 files changed, 6 insertions(+), 3

Re: [RFC] Add BPF_PROG_TYPE_CGROUP_IOCTL

2021-05-06 Thread Kenny Ho
Sorry for the late reply (I have been working on other stuff.) On Fri, Feb 5, 2021 at 8:49 AM Daniel Vetter wrote: > > So I agree that on one side CU mask can be used for low-level quality > of service guarantees (like the CLOS cache stuff on intel cpus as an > example), and that's going to be

[PATCH] drm/amdgpu: Quit RAS initialization earlier if RAS is disabled

2021-05-06 Thread Oak Zeng
If RAS is disabled through amdgpu_ras_enable kernel parameter, we should quit the RAS initialization eariler to avoid initialization of some RAS data structure such as sysfs etc. Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 1/2] drm/amdgpu: free resources on fence usage query

2021-05-06 Thread David M Nieto
Free the resources if the fence needs to be ignored during the ratio calculation Signed-off-by: David M Nieto Change-Id: Ibfc55a94c53d4b3a1dba8fff4c53fd893195bb96 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

[PATCH 2/2] drm/amdgpu: fix fence calculation

2021-05-06 Thread David M Nieto
The proper metric for fence utilization over several contexts is an harmonic mean, but such calculation is prohibitive in kernel space, so the code approximates it. Because the approximation diverges when one context has a very small ratio compared with the other context, this change filter out

[no subject]

2021-05-06 Thread David M Nieto
During stress testing we found that with some Vulkan applications the fence information displayed in the recently added fdinfo was not properly calculated, two issues were discovered: (1) A missing dma_put_fence on the loop that calculates the usage ratios when the fence is being ignored. (2) The

RE: [PATCH] drm/amdgpu: Enable TCP channel hashing for Aldebaran

2021-05-06 Thread Kasiviswanathan, Harish
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Harish Kasiviswanathan -Original Message- From: Joshi, Mukul Sent: Thursday, May 6, 2021 3:47 PM To: amd-gfx@lists.freedesktop.org Cc: Kasiviswanathan, Harish ; Joshi, Mukul ; Zeng, Oak Subject: [PATCH] drm/amdgpu:

[PATCH] drm/amdgpu: Enable TCP channel hashing for Aldebaran

2021-05-06 Thread Mukul Joshi
Enable TCP channel hashing to match DF hash settings for Aldebaran. Signed-off-by: Mukul Joshi Signed-off-by: Oak Zeng Reviewed-by: Joseph Greathouse --- drivers/gpu/drm/amd/amdgpu/df_v3_6.c| 17 +++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++-

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-06 Thread Andrey Grodzovsky
On 2021-05-06 5:40 a.m., Daniel Vetter wrote: On Fri, Apr 30, 2021 at 01:27:37PM -0400, Andrey Grodzovsky wrote: On 2021-04-30 6:25 a.m., Daniel Vetter wrote: On Thu, Apr 29, 2021 at 04:34:55PM -0400, Andrey Grodzovsky wrote: On 2021-04-29 3:05 p.m., Daniel Vetter wrote: On Thu, Apr

Re: [RFC] CRIU support for ROCm

2021-05-06 Thread Felix Kuehling
Am 2021-05-04 um 9:00 a.m. schrieb Daniel Vetter: > On Fri, Apr 30, 2021 at 09:57:45PM -0400, Felix Kuehling wrote: >> We have been working on a prototype supporting CRIU (Checkpoint/Restore >> In Userspace) for accelerated compute applications running on AMD GPUs >> using ROCm (Radeon Open

Re: [PATCH] drm/amdgpu: fix the fence leak

2021-05-06 Thread Christian König
Am 06.05.21 um 11:14 schrieb Roy Sun: release the unreleased fences A bit better description what's going wrong here would be nice. Signed-off-by: Roy Sun Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 ++-- 1 file changed, 6 insertions(+), 2

[PATCH libdrm] Revert "tests/amdgpu: fix bo eviction test issue"

2021-05-06 Thread Guchun Chen
This reverts commit a5a400c9581c3b91598623603067556b18084c5d. bo evict test was disabled by default per below commit. So still keep it as disabled. 1f6a85cc test/amdgpu: disable bo eviction test by default Signed-off-by: Guchun Chen --- tests/amdgpu/amdgpu_test.c | 3 +++

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-06 Thread Daniel Vetter
On Fri, Apr 30, 2021 at 01:27:37PM -0400, Andrey Grodzovsky wrote: > > > On 2021-04-30 6:25 a.m., Daniel Vetter wrote: > > On Thu, Apr 29, 2021 at 04:34:55PM -0400, Andrey Grodzovsky wrote: > > > > > > > > > On 2021-04-29 3:05 p.m., Daniel Vetter wrote: > > > > On Thu, Apr 29, 2021 at

[PATCH] drm/amdgpu: fix the fence leak

2021-05-06 Thread Roy Sun
release the unreleased fences Signed-off-by: Roy Sun --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 01fe60fedcbe..59b662947dde 100644

Re: [PATCH v3] drm/amdgpu: add support for user trap handlers

2021-05-06 Thread Samuel Pitoiset
Added GF10.3 support. I re-tested this on GFX9 and it still works, though on GFX10+ the trap handler is never reached, is there something obviously wrong in this patch? Thanks! On 5/6/21 8:54 AM, Samuel Pitoiset wrote: A trap handler can be used by userspace to catch shader exceptions like

[PATCH v3] drm/amdgpu: add support for user trap handlers

2021-05-06 Thread Samuel Pitoiset
A trap handler can be used by userspace to catch shader exceptions like divide by zero, memory violations etc. On GFX6-GFX8, the registers used to configure TBA/TMA aren't privileged and can be configured from userpace. On GFX9+ they are per VMID and privileged, only the KMD can configure them.

Re: [PATCH 1/5] drm/fourcc: Add 16 bpc fixed point framebuffer formats.

2021-05-06 Thread Ville Syrjälä
On Sat, Mar 20, 2021 at 04:09:47AM +0200, Ville Syrjälä wrote: > On Fri, Mar 19, 2021 at 10:45:10PM +0100, Mario Kleiner wrote: > > On Fri, Mar 19, 2021 at 10:16 PM Ville Syrjälä > > wrote: > > > > > > On Fri, Mar 19, 2021 at 10:03:13PM +0100, Mario Kleiner wrote: > > > > These are 16 bits per