[PATCH] drm/amdgpu: Add vbios info ioctl interface

2021-04-21 Thread Jiawei Gu
Add AMDGPU_INFO_VBIOS_INFO subquery id for detailed vbios info. Signed-off-by: Jiawei Gu --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 19 +++ drivers/gpu/drm/amd/amdgpu/atom.c | 158 + drivers/gpu/drm/amd/amdgpu/atom.h | 11 ++

[PATCH] drm/amdkfd: add per-vmid-debug map_process_support

2021-04-21 Thread Jonathan Kim
In order to support multi-process debugging, HWS PM4 packet MAP_PROCESS requires an extension of 5 DWORDS to support targeting of per-vmid SPI debug control registers as well as watch points per process. v2: align upstream with internal new MEC FW Signed-off-by: Jonathan Kim ---

Re: [PATCH] drm/amdkfd: Add Aldebaran gws support

2021-04-21 Thread Felix Kuehling
On 2021-04-21 10:01 p.m., Harish Kasiviswanathan wrote: Signed-off-by: Harish Kasiviswanathan Acked-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c

[PATCH] drm/amdkfd: Add Aldebaran gws support

2021-04-21 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index b31bae91fbd0..bc57b07523e0 100644 ---

[PATCH v2 06/10] drm/amdgpu: DMA map/unmap when updating GPU mappings

2021-04-21 Thread Felix Kuehling
DMA map kfd_mem_attachments in update_gpuvm_pte. This function is called with the BO and page tables reserved, so we can safely update the DMA mapping. DMA unmap when a BO is unmapped from a GPU and before updating mappings in restore workers. Signed-off-by: Felix Kuehling ---

[PATCH v2 00/10] Implement multi-GPU DMA mappings for KFD

2021-04-21 Thread Felix Kuehling
This patch series fixes DMA-mappings of system memory (GTT and userptr) for KFD running on multi-GPU systems with IOMMU enabled. One SG-BO per GPU is needed to maintain the DMA mappings of each BO. Changes in v2: - Made the original BO parent of the SG BO to fix bo destruction order - Removed

[PATCH v2 02/10] drm/amdgpu: Rename kfd_bo_va_list to kfd_mem_attachment

2021-04-21 Thread Felix Kuehling
This name is more fitting, especially for the changes coming next to support multi-GPU systems with proper DMA mappings. Cleaned up the code and renamed some related functions and variables to improve readability. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h|

[PATCH v2 08/10] drm/amdgpu: Add DMA mapping of GTT BOs

2021-04-21 Thread Felix Kuehling
Use DMABufs with dynamic attachment to DMA-map GTT BOs on other GPUs. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 2 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 76 ++- 2 files changed, 77 insertions(+), 1 deletion(-) diff --git

[PATCH v2 09/10] drm/ttm: Don't count pages in SG BOs against pages_limit

2021-04-21 Thread Felix Kuehling
Pages in SG BOs were not allocated by TTM. So don't count them against TTM's pages limit. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/ttm/ttm_tt.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c

[PATCH v2 04/10] drm/amdgpu: Simplify AQL queue mapping

2021-04-21 Thread Felix Kuehling
Do AQL queue double-mapping with a single attach call. That will make it easier to create per-GPU BOs later, to be shared between the two BO VA mappings on the same GPU. Freeing the attachments is not necessary if map_to_gpu fails. These will be cleaned up when the kdg_mem object is destroyed in

[PATCH v2 03/10] drm/amdgpu: Keep a bo-reference per-attachment

2021-04-21 Thread Felix Kuehling
For now they all reference the same BO. For correct DMA mappings they will refer to different BOs per-GPU. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 22 ++- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git

[PATCH v2 01/10] rock-dbg_defconfig: Enable Intel IOMMU

2021-04-21 Thread Felix Kuehling
Enable the Intel IOMMU driver in the rock-dbg_defconfig. This enables testing of DMA mappings on systems with an Intel IOMMU. Signed-off-by: Felix Kuehling --- arch/x86/configs/rock-dbg_defconfig | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git

[PATCH v2 05/10] drm/amdgpu: Add multi-GPU DMA mapping helpers

2021-04-21 Thread Felix Kuehling
Add BO-type specific helpers functions to DMA-map and unmap kfd_mem_attachments. Implement this functionality for userptrs by creating one SG BO per GPU and filling it with a DMA mapping of the pages from the original mem->bo. Signed-off-by: Felix Kuehling ---

[PATCH v2 07/10] drm/amdgpu: Move kfd_mem_attach outside reservation

2021-04-21 Thread Felix Kuehling
This is needed to avoid deadlocks with DMA buf import in the next patch. Also move PT/PD validation out of kfd_mem_attach, that way the caller can bo this unconditionally. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 75 +++ 1 file changed,

[PATCH v2 10/10] drm/amdgpu: Move dmabuf attach/detach to backend_(un)bind

2021-04-21 Thread Felix Kuehling
The dmabuf attachment should be updated by moving the SG BO to DOMAIN_CPU and back to DOMAIN_GTT. This does not necessarily invoke the populate/unpopulate callbacks. Do this in backend_bind/unbind instead. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 --

[pull] amdgpu drm-fixes-5.12

2021-04-21 Thread Alex Deucher
Hi Dave, Daniel, A few late fixes for 5.12. The following changes since commit 796b556cbfdbe0d65b9793e63653ad24f9fa033c: Merge tag 'vmwgfx-fixes-2021-04-14' of gitlab.freedesktop.org:zack/vmwgfx into drm-fixes (2021-04-18 09:27:00 +1000) are available in the Git repository at:

Re: RTX 6800 XT 4K120 problems

2021-04-21 Thread Alex Deucher
On Wed, Apr 21, 2021 at 5:35 PM Julian Picht wrote: > > Hi all, > > I recently purchased a 4K120Hz display and am currently trying to get it > fully working. It's connected via HDMI 2.1, because it does not have a > DisplayPort input. > > I'm on 5.12-rc8, and it seems that the modes are not

RTX 6800 XT 4K120 problems

2021-04-21 Thread Julian Picht
Hi all, I recently purchased a 4K120Hz display and am currently trying to get it fully working. It's connected via HDMI 2.1, because it does not have a DisplayPort input. I'm on 5.12-rc8, and it seems that the modes are not detected correctly, the driver defaults to YCbCr modes (with chroma

[PATCH 2/2] drm/amdkfd: set attribute access for default ranges

2021-04-21 Thread Alex Sierra
Attribute access value for default ranges is set, based on process xnack on/off. XNACK ON has GPU access attribute for unregistered ranges through page fault. While XNACK OFF has no access attribute for unregistered ranges. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 7

[PATCH 1/2] drm/amdkfd: svm ranges creation for unregistered memory

2021-04-21 Thread Alex Sierra
SVM ranges are created for unregistered memory, triggered by page faults. These ranges are migrated/mapped to GPU VRAM memory. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 108 ++- 1 file changed, 106 insertions(+), 2 deletions(-) diff --git

[PATCH] drm/amdgpu: Register VGA clients after init can no longer fail

2021-04-21 Thread Kai-Heng Feng
When an amdgpu device fails to init, it makes another VGA device cause kernel splat: kernel: amdgpu :08:00.0: amdgpu: amdgpu_device_ip_init failed kernel: amdgpu :08:00.0: amdgpu: Fatal error during GPU init kernel: amdgpu: probe of :08:00.0 failed with error -110 ... kernel: amdgpu

[PATCH 2/2] drm/amdkfd: set attribute access for default ranges

2021-04-21 Thread Alex Sierra
Attribute access value for default ranges is set, based on process xnack on/off. XNACK ON has GPU access attribute for unregistered ranges through page fault. While XNACK OFF has no access attribute for unregistered ranges. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 7

[PATCH 1/2] drm/amdkfd: svm ranges creation for unregistered memory

2021-04-21 Thread Alex Sierra
SVM ranges are created for unregistered memory, triggered by page faults. These ranges are migrated/mapped to GPU VRAM memory. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 108 ++- 1 file changed, 106 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] drm/amd/display: get socBB from VBIOS for dcn302

2021-04-21 Thread Deucher, Alexander
[AMD Official Use Only - Internal Distribution Only] Acked-by: Alex Deucher From: amd-gfx on behalf of Aurabindo Pillai Sent: Wednesday, April 21, 2021 3:17 PM To: amd-gfx@lists.freedesktop.org Cc: Lakha, Bhawanpreet ; Kazlauskas, Nicholas ; R, Bindu

[PATCH] drm/amd/display: get socBB from VBIOS for dcn302

2021-04-21 Thread Aurabindo Pillai
[why] Some SOC BB paramters may vary per SKU, and it does not make sense for driver to hardcode these values. This change was added for dcn30 and dcn301, but not for dcn302 [how] Parse the values from VBIOS if available, and use them if valid Fixes: 93669c8e48 ("drm/amd/display: get socBB from

[PATCH 3/4] drm/amdgpu: cleanup amdgpu_bo_create()

2021-04-21 Thread Nirmoy Das
Remove shadow bo related code as vm code is creating shadow bo using proper API. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 30 ++ 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 4/4] drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag

2021-04-21 Thread Nirmoy Das
Remove unused AMDGPU_GEM_CREATE_SHADOW flag. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 + include/uapi/drm/amdgpu_drm.h | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 1/4] drm/amdgpu: expose amdgpu_bo_create_shadow()

2021-04-21 Thread Nirmoy Das
Exposed amdgpu_bo_create_shadow() will be needed for amdgpu_vm handling. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH 2/4] drm/amdgpu: create shadow bo using amdgpu_bo_create_shadow()

2021-04-21 Thread Nirmoy Das
Shadow BOs are only needed for vm code so call amdgpu_bo_create_shadow() directly instead of depending on amdgpu_bo_create(). Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git

[PATCH] drm/amd/display: Fix build warnings

2021-04-21 Thread Guenter Roeck
Fix the following build warnings. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘dm_update_mst_vcpi_slots_for_dsc’: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6242:46: warning: variable ‘old_con_state’ set but not used

Re: [PATCH 4/6] drm/amdgpu: address remove from fault filter

2021-04-21 Thread Felix Kuehling
On 2021-04-21 3:55 a.m., Christian König wrote: Am 21.04.21 um 03:20 schrieb Felix Kuehling: Am 2021-04-20 um 4:21 p.m. schrieb Philip Yang: Add interface to remove address from fault filter ring by resetting fault ring entry of the fault address timestamp to 0, then future vm fault on the

Re: [PATCH v3 01/20] drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()

2021-04-21 Thread Deucher, Alexander
[AMD Official Use Only - Internal Distribution Only] I'm fine with having these changes go through drm-misc. Alex From: Lipski, Mikita Sent: Wednesday, April 21, 2021 10:23 AM To: Lyude Paul ; dri-de...@lists.freedesktop.org ; intel-...@lists.freedesktop.org

Re: [PATCH v3 01/20] drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()

2021-04-21 Thread Mikita Lipski
Thanks for the change! Reviewed-by: Mikita Lipski On 2021-04-19 6:55 p.m., Lyude Paul wrote: While working on moving i2c device registration into drm_dp_aux_init() - I realized that in order to do so we need to make sure that drivers calling drm_dp_aux_init() handle any errors it could

Re: [BUG] VAAPI encoder cause kernel panic if encoded video in 4K

2021-04-21 Thread Mikhail Gavrilov
On Wed, 21 Apr 2021 at 11:42, Christian König wrote: > I can try, but I'm not sure if we even have the full page fault handling > for Navi in 5.12. > It would be great. For me this patch is working as expected and I already for several days didn't see the panic "kernel BUG at

Re: [PATCH 1/1] drm/amdgpu: implement and use amdgpu_bo_create_with_shadow()

2021-04-21 Thread Christian König
Am 21.04.21 um 15:20 schrieb Nirmoy Das: Shadow bo is only needed for some amdgpu_vm allcations. amdgpu_bo_create_with_shadow() should make it clear that a bo is for amdgpu_vm and will also remove unnecessary checks from amdgpu_bo_create(). I was the one suggesting to make the shadow thing

[PATCH 1/1] drm/amdgpu: implement and use amdgpu_bo_create_with_shadow()

2021-04-21 Thread Nirmoy Das
Shadow bo is only needed for some amdgpu_vm allcations. amdgpu_bo_create_with_shadow() should make it clear that a bo is for amdgpu_vm and will also remove unnecessary checks from amdgpu_bo_create(). Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 26

Re: [PATCH] amdgpu: fix GEM obj leak in amdgpu_display_user_framebuffer_create

2021-04-21 Thread Christian König
Am 21.04.21 um 11:16 schrieb Simon Ser: This error code-path is missing a drm_gem_object_put call. Other error code-paths are fine. Good catch. For some extra points you could change the error handling into using goto error instead of hand wiring it. Either way patch is Reviewed-by:

[PATCH] amdgpu: fix GEM obj leak in amdgpu_display_user_framebuffer_create

2021-04-21 Thread Simon Ser
This error code-path is missing a drm_gem_object_put call. Other error code-paths are fine. Signed-off-by: Simon Ser Fixes: 1769152ac64b ("drm/amdgpu: Fail fb creation from imported dma-bufs. (v2)") Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Bas Nieuwenhuizen ---

Re: [PATCH v3 5/7] drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver

2021-04-21 Thread Daniel Vetter
On Wed, Apr 21, 2021 at 09:01:00AM +0200, Christian König wrote: > Am 20.04.21 um 22:53 schrieb Daniel Vetter: > > On Tue, Apr 20, 2021 at 10:23 PM Felix Kuehling > > wrote: > > > > > > Am 2021-04-20 um 4:51 a.m. schrieb Daniel Vetter: > > > > > > Whole series is Reviewed-by: Christian König >

[PATCH 1/2] drm/scheduler: Change scheduled fence track

2021-04-21 Thread Roy Sun
Update the timestamp of scheduled fence on HW completion of the previous fences This allow more accurate tracking of the fence execution in HW Signed-off-by: David M Nieto Signed-off-by: Roy Sun --- drivers/gpu/drm/scheduler/sched_main.c | 11 +-- 1 file changed, 9 insertions(+), 2

[PATCH 2/2] drm/amdgpu: Add show_fdinfo() interface

2021-04-21 Thread Roy Sun
Tracking devices, process info and fence info using /proc/pid/fdinfo Signed-off-by: David M Nieto Signed-off-by: Roy Sun --- drivers/gpu/drm/amd/amdgpu/Makefile| 2 + drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 61 ++

Re: [PATCH 4/6] drm/amdgpu: address remove from fault filter

2021-04-21 Thread Christian König
Am 21.04.21 um 03:20 schrieb Felix Kuehling: Am 2021-04-20 um 4:21 p.m. schrieb Philip Yang: Add interface to remove address from fault filter ring by resetting fault ring entry of the fault address timestamp to 0, then future vm fault on the address will be processed to recover. Check fault

Re: [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh

2021-04-21 Thread Huang Rui
On Wed, Apr 21, 2021 at 03:12:50PM +0800, Su, Jinzhou (Joe) wrote: > Add flags AMD_CG_SUPPORT_SDMA_MGCG for Vangogh. > Start to open sdma mgcg from firmware version 70. > > Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/nv.c| 1 + >

Re: [PATCH 4/6] drm/amdgpu: address remove from fault filter

2021-04-21 Thread Christian König
Am 20.04.21 um 22:21 schrieb Philip Yang: Add interface to remove address from fault filter ring by resetting fault ring entry of the fault address timestamp to 0, then future vm fault on the address will be processed to recover. Check fault address from fault ring, add address into fault ring

[PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh

2021-04-21 Thread Jinzhou Su
Add flags AMD_CG_SUPPORT_SDMA_MGCG for Vangogh. Start to open sdma mgcg from firmware version 70. Signed-off-by: Jinzhou Su --- drivers/gpu/drm/amd/amdgpu/nv.c| 1 + drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4 2 files changed, 5 insertions(+) diff --git

Re: [PATCH v3 5/7] drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver

2021-04-21 Thread Christian König
Am 20.04.21 um 22:53 schrieb Daniel Vetter: On Tue, Apr 20, 2021 at 10:23 PM Felix Kuehling wrote: Am 2021-04-20 um 4:51 a.m. schrieb Daniel Vetter: Whole series is Reviewed-by: Christian König Thanks a lot. If I'm not mistaken, the patches at [1] need to go in first. So it could take a a

RE: [PATCH] drm/amdgpu: resolve ras print bug

2021-04-21 Thread Clements, John
[AMD Official Use Only - Internal Distribution Only] Please ignore this patch , it has a problem From: amd-gfx On Behalf Of Clements, John Sent: Wednesday, April 21, 2021 2:56 PM To: amd-gfx@lists.freedesktop.org; Zhang, Hawking Subject: [PATCH] drm/amdgpu: resolve ras print bug [AMD

RE: [PATCH] drm/amdgpu: add support for ras init flags

2021-04-21 Thread Zhang, Hawking
[AMD Public Use] Reviewed-by: Hawking Zhang Regards, Hawking From: Clements, John Sent: Wednesday, April 21, 2021 14:57 To: amd-gfx@lists.freedesktop.org; Zhang, Hawking Subject: [PATCH] drm/amdgpu: add support for ras init flags [AMD Official Use Only - Internal Distribution Only]

[PATCH] drm/amdgpu: add support for ras init flags

2021-04-21 Thread Clements, John
[AMD Official Use Only - Internal Distribution Only] Submitting patch to select RAS dGPU mode/poison propagation mode 0001-drm-amdgpu-add-support-for-ras-init-flags.patch Description: 0001-drm-amdgpu-add-support-for-ras-init-flags.patch ___ amd-gfx

[PATCH] drm/amdgpu: resolve ras print bug

2021-04-21 Thread Clements, John
[AMD Official Use Only - Internal Distribution Only] Submitting patch to resolve RAS related dmesg print issue 0002-drm-amdgpu-resolve-ras-print-bug.patch Description: 0002-drm-amdgpu-resolve-ras-print-bug.patch ___ amd-gfx mailing list

RE: [PATCH Review 1/1] drm/amdgpu: optimize gfx ras features flag clean

2021-04-21 Thread Xu, Feifei
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Feifei Xu -Original Message- From: Stanley.Yang Sent: Monday, April 19, 2021 5:44 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Clements, John ; Li, Dennis ; Xu, Feifei ; Yang, Stanley Subject: [PATCH

Re: [BUG] VAAPI encoder cause kernel panic if encoded video in 4K

2021-04-21 Thread Christian König
Am 20.04.21 um 20:03 schrieb Mikhail Gavrilov: On Wed, 14 Apr 2021 at 11:48, Christian König wrote: commit f63da9ae7584280582cbc834b20cc18bfb203b14 Author: Philip Yang Date: Thu Apr 1 00:22:23 2021 -0400 drm/amdgpu: reserve fence slot to update page table That is expected