[PATCH 4/6] drm/amdgpu: Wait for all clients importing out dma-bufs.

2020-05-09 Thread Andrey Grodzovsky
Also avoid GPU recovery if device is unplagged Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 27 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +++- drivers/gpu/drm/amd/amdgpu/

[PATCH 2/6] drm/amdgpu: Force unmap all user VMAs on device removal.

2020-05-09 Thread Andrey Grodzovsky
Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 14 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdg

[PATCH 5/6] drm/ttm: Add destroy flag in TTM BO eviction interface

2020-05-09 Thread Andrey Grodzovsky
This will allow to invalidate, destroy backing storage and notify users of BOs when device is unpluged. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2

[PATCH 1/6] drm/ttm: Add unampping of the entire device address space

2020-05-09 Thread Andrey Grodzovsky
Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/ttm/ttm_bo.c| 22 +- include/drm/ttm/ttm_bo_driver.h | 2 ++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index c5b516f..eae61cc 100644 --- a

[PATCH 6/6] drm/amdgpu: Use TTM MMs destroy interface

2020-05-09 Thread Andrey Grodzovsky
Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 4 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + 3 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/dri

[PATCH 3/6] drm/amdgpu: Wait for all user clients

2020-05-09 Thread Andrey Grodzovsky
Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 4 4 files changed, 11 insertions(+) diff --git a/drive

[PATCH 0/6] RFC Support hot device unplug in amdgpu

2020-05-09 Thread Andrey Grodzovsky
This RFC is a more of a proof of concept then a fully working solution as there are a few unresolved issues we are hopping to get advise on from people on the mailing list. Until now extracting a card either by physical extraction (e.g. eGPU with thunderbold connection or by emulation through sy

Re: [PATCH] drm/admgpu: check HDMI HPD status after ddc probe

2020-05-09 Thread Alex Deucher
On Sat, May 9, 2020 at 1:48 AM Binbin Zhou wrote: > > Now, we check the presence of the EDID to determine if there is a monitor > present. > > DVI-I connectors have both analog and digital encoders and the HPD pin > is only reliable on the digital part. > > But when I pull out the Radeon HD8570's

[PATCH] drm/amdgpu: Add autodump debugfs node for gpu reset v4

2020-05-09 Thread jianzh
From: Jiange Zhao When GPU got timeout, it would notify an interested part of an opportunity to dump info before actual GPU reset. A usermode app would open 'autodump' node under debugfs system and poll() for readable/writable. When a GPU reset is due, amdgpu would notify usermode app through wa

[PATCH] drm/amd/amdgpu: remove defined but not used 'crtc_offsets'

2020-05-09 Thread Jason Yan
Fix the following gcc warning: drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c:65:18: warning: ‘crtc_offsets’ defined but not used [-Wunused-const-variable=] static const u32 crtc_offsets[6] = ^~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amd/powerplay: skip judging if baco support for Arcturus sriov

2020-05-09 Thread Jane Jian
since for sriov, baco happens on host side, no need and meaning to judge is baco. also, since kiq reads strap0 in here, if kiq is not ready or gpu reset(kiq resume) happens after this read, would fail to read and wrongly set baco as true(1). Change-Id: Ib67f837edfbf09263133d5614f6dbb890cf27b12 Sig

[PATCH 1/2] drm/amd/powerplay: try to do a graceful shutdown on SW CTF

2020-05-09 Thread Evan Quan
Normally this(SW CTF) should not happen. And by doing graceful shutdown we can prevent further damage. Change-Id: I84f0c0643f78dcb5251089fe83305c460b815b62 Signed-off-by: Evan Quan --- .../gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 21 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0

[PATCH 2/2] drm/amd/powerplay: shutdown on HW CTF

2020-05-09 Thread Evan Quan
To prevent further damage. Change-Id: Iae0399001694bb7446bcc6071cd03d8fa47c9d02 Signed-off-by: Evan Quan --- .../gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 16 +-- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 20 ++- 2 files changed, 33 insertions(+), 3 deletions(