Re: [PATCH] Revert "drm/amdgpu: Refactor flip into prepare submit and submit. (v2)"

2017-04-27 Thread Michel Dänzer
On 27/04/17 07:04 PM, Christian König wrote: > Am 27.04.2017 um 10:18 schrieb Michel Dänzer: >> From: Michel Dänzer >> >> This reverts commit cb341a319f7e66f879d69af929c3dadfc1a8f31e. >> >> The purpose of the refactor was for amdgpu_crtc_prepare/submit_flip to >> be used by the DC code, but that's

[PATCH 3/3] drm/amd/powerplay: implement stop dpm task for vega10.

2017-04-27 Thread Rex Zhu
Change-Id: I19202f1e54ce6a1b8b54aacbc0d42dbba7605662 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 97 ++ .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 23 + .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.h | 1 + .../gpu/drm/amd

[PATCH 1/3] drm/amd/powerplay: add disable_smc_ctf callback in hwmgr.

2017-04-27 Thread Rex Zhu
export disablesmcctf to eventmgr. need to disable temperature alert when s3/s4. otherwise, when resume back,enable temperature alert will fail. Change-Id: I6bbc85b0fc389e442a44ad4d0db3db3342ff5955 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 10 ++ d

[PATCH 2/3] drm/amd/powerplay: complete disable_smc_firmware_ctf_tasks.

2017-04-27 Thread Rex Zhu
Change-Id: I7d7f760c5996ddb00a17b34d4b0a3070a965 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/eventmgr/eventsubchains.c | 2 +- drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c | 5 + drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h | 1 + 3 files changed, 7 inse

Re: [PATCH] drm/amdgpu: add cu info wave_front_size

2017-04-27 Thread Wang, Ken
Reviewed-by: Ken Wang From: Junwei Zhang Sent: Friday, April 28, 2017 11:10:46 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander; Wang, Ken; Zhang, Jerry Subject: [PATCH] drm/amdgpu: add cu info wave_front_size missed that for gfx v9 info export Signe

[PATCH] drm/amdgpu: add cu info wave_front_size

2017-04-27 Thread Junwei Zhang
missed that for gfx v9 info export Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 503010a..e330009 100644 --- a/drivers/gpu/drm/amd/amdgpu/amd

RE: [PATCH] amdgpu: add vm ioctl support

2017-04-27 Thread Zhang, Jerry
Reviewed-by: Junwei Zhang Regards, Jerry (Junwei Zhang) Linux Base Graphics SRDC Software Development _ > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of > zhoucm1 > Sent: Friday, April 28, 2017 10:59 >

Re: [PATCH] amdgpu: add vm ioctl support

2017-04-27 Thread zhoucm1
This is drm patch for dedicated vmid. Kernel patch has pushed to staging, anyone could have a quick review on this? Jerry? Guess Christian is in dream at current time. Regards, David Zhou On 2017年04月28日 10:38, Chunming Zhou wrote: Change-Id: I3c1ea377dad8f6d64a992b071a6ec36a1143e416 Signed-of

RE: [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset v2

2017-04-27 Thread Zhang, Jerry
Nice catch! Reviewed-by: Junwei Zhang Regards, Jerry (Junwei Zhang) Linux Base Graphics SRDC Software Development _ > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of > Chunming Zhou > Sent: Friday, April

[PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset v2

2017-04-27 Thread Chunming Zhou
the case could happen when gpu reset: 1. when gpu reset, cs can be continue until sw queue is full, then push job will wait with holding pd reservation. 2. gpu_reset routine will also need pd reservation to restore page table from their shadow. 3. cs is waiting for gpu_reset complete, but gpu res

[PATCH] amdgpu: add vm ioctl support

2017-04-27 Thread Chunming Zhou
Change-Id: I3c1ea377dad8f6d64a992b071a6ec36a1143e416 Signed-off-by: Chunming Zhou --- include/drm/amdgpu_drm.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h index 26d02ba..28cda3a 100644 --- a/include/drm/amdgpu_drm

Re: [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset

2017-04-27 Thread Zhang, Jerry (Junwei)
On 04/27/2017 08:04 PM, Christian König wrote: Am 27.04.2017 um 12:23 schrieb zhoucm1: On 2017年04月27日 18:11, Christian König wrote: Am 27.04.2017 um 11:08 schrieb Zhang, Jerry (Junwei): On 04/27/2017 04:25 PM, Chunming Zhou wrote: the case could happen when gpu reset: 1. when gpu reset, cs

[RFC] drm/amd/amdgpu: get rid of else branch

2017-04-27 Thread Nikola Pajkovsky
This is super simple elimination of else branch and I should probably even use unlikely in if (ring->count_dw < count_dw) { However, amdgpu_ring_write() has similar if condition, but does not return after DRM_ERROR and it looks suspicious. On error, we still adding v to ring and keeping c

CZ EDC param and support

2017-04-27 Thread Panariti, David
The changes in the workarounds function use DRM_INFO rather than DRM_DEBUG because CZs with EDC are often used in embedded environments and any info can be useful especially in the case of an intermittent problem. >From e1ce383592c275b58ad95bd80b5479af8c1f9dae Mon Sep 17 00:00:00 2001 From: Davi

[PATCH umr] Avoid opening the DRM file by default

2017-04-27 Thread Tom St Denis
Opening the DRM file (/dev/dri/card%d) triggers all sorts of KMD work to happen which is not useful if the KMD is hung or not working. Since --top is the only user of the file currently we simply defer opening it until --top is invoked. Signed-off-by: Tom St Denis --- src/app/top.c | 7 +++

[PATCH 10/11] drm/amdgpu: forward operation context to ttm_bo_mem_space

2017-04-27 Thread Christian König
From: Christian König This way we can finally use some more stats. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/

[PATCH 06/11] drm/ttm: use an operation context for ttm_bo_mem_space

2017-04-27 Thread Christian König
From: Christian König Instead of specifying interruptible and no_wait_gpu manually. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 drivers/gpu/drm/nouveau/nouveau_bo.c| 6 -- drivers/gpu/drm/radeon/radeon_ttm.c | 8 drivers/gpu/

[PATCH 04/11] drm/ttm: add operation ctx to ttm_bo_validate

2017-04-27 Thread Christian König
From: Christian König Give moving a BO into place an operation context to work with. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 3 ++- drivers/g

[PATCH 11/11] drm/amdgpu: use the new TTM bytes moved counter

2017-04-27 Thread Christian König
From: Christian König Instead of the global statistics use the per context bytes moved counter. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 + 2 files changed, 2 insertions(+), 10 deletions(-) di

[PATCH 09/11] drm/ttm: add number of bytes moved to the operation context

2017-04-27 Thread Christian König
From: Christian König Add some statistics how many bytes we have moved. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + include/drm/ttm/ttm_bo_api.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 0c

[PATCH 07/11] drm/ttm: use the operation context inside TTM

2017-04-27 Thread Christian König
From: Christian König Instead of passing down the parameters manually to every function. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 69 +++- 1 file changed, 30 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo

[PATCH 02/11] drm/ttm: cleanup ttm_bo_driver.h

2017-04-27 Thread Christian König
From: Christian König Extern is the default for function declerations anyway. Signed-off-by: Christian König --- include/drm/ttm/ttm_bo_driver.h | 113 +++- 1 file changed, 54 insertions(+), 59 deletions(-) diff --git a/include/drm/ttm/ttm_bo_driver.h b/inc

[PATCH 05/11] drm/ttm: use an operation ctx for ttm_bo_init_reserved

2017-04-27 Thread Christian König
From: Christian König Instead of specifying if sleeping should be interruptible. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- drivers/gpu/drm/ttm/ttm_bo.c | 12 +--- include/drm/ttm/ttm_bo_api.h | 5 ++--- 3 files

[PATCH 01/11] drm/ttm: cleanup coding style in ttm_bo_api.h

2017-04-27 Thread Christian König
From: Christian König Extern is the default for function declerations anyway and this solves a bunch of 80char per line issues. Signed-off-by: Christian König --- include/drm/ttm/ttm_bo_api.h | 135 ++- 1 file changed, 56 insertions(+), 79 deletions(-)

[PATCH 08/11] drm/ttm: add context to driver move callback as well

2017-04-27 Thread Christian König
From: Christian König Instead of passing the parameters manually. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 21 +++-- drivers/gpu/drm/nouveau/nouveau_bo.c| 27 --- drivers/gpu/drm/qxl/qxl_ttm.c | 9 --

[PATCH 03/11] drm/ttm: remove cur_placement

2017-04-27 Thread Christian König
From: Christian König Not used any more. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 5 ++--- include/drm/ttm/ttm_bo_api.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 04cbecc..7033

RE: [PATCH] drm/amdgpu: remove unused and mostly unimplemented CGS functions

2017-04-27 Thread Kuehling, Felix
KFD doesn't use CGS. Regards, Felix -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Deucher, Alexander Sent: Wednesday, April 26, 2017 12:36 PM To: 'Christian König'; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu: remove unus

Re: [PATCH v2] drm/radeon: only warn once in radeon_ttm_bo_destroy if va list not empty

2017-04-27 Thread Christian König
Am 27.04.2017 um 16:10 schrieb Julien Isorce: Encountered a dozen of exact same backtraces when mesa's pb_cache_release_all_buffers is called after that a gpu reset failed. v2: Remove superfluous error message added in v1. bug: https://bugs.freedesktop.org/show_bug.cgi?id=96271 Signed-off-by:

[PATCH v2] drm/radeon: only warn once in radeon_ttm_bo_destroy if va list not empty

2017-04-27 Thread Julien Isorce
Encountered a dozen of exact same backtraces when mesa's pb_cache_release_all_buffers is called after that a gpu reset failed. v2: Remove superfluous error message added in v1. bug: https://bugs.freedesktop.org/show_bug.cgi?id=96271 Signed-off-by: Julien Isorce --- drivers/gpu/drm/radeon/radeo

RE: [PATCH 2/2] drm/amdgpu: bump version for exporting gpu info for gfx9

2017-04-27 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Junwei Zhang > Sent: Thursday, April 27, 2017 4:31 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander; Wang, Ken; Zhang, Jerry > Subject: [PATCH 2/2] drm/amdgpu: bump version for

RE: [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset

2017-04-27 Thread Liu, Monk
A really good improvement Reviewed-by: Monk Liu -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of zhoucm1 Sent: Thursday, April 27, 2017 6:24 PM To: Christian König ; Zhang, Jerry ; amd-gfx@lists.freedesktop.org Cc: Liu, Monk Subject: Re: [P

Re: [PATCH] drm/amdgpu: remove unused and mostly unimplemented CGS functions v2

2017-04-27 Thread Alex Deucher
On Thu, Apr 27, 2017 at 9:22 AM, Christian König wrote: > From: Christian König > > Those functions are all unused and some not even implemented. > > v2: keep cgs_get_pci_resource it is used by the ACP driver. > > Signed-off-by: Christian König Reviewed-by: Alex Deucher > --- > drivers/gpu/d

Re: [PATCH] drm/amdgpu: remove unused and mostly unimplemented CGS functions

2017-04-27 Thread Christian König
Am 26.04.2017 um 18:36 schrieb Deucher, Alexander: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian König Sent: Wednesday, April 26, 2017 9:14 AM To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: remove unused and mostly u

[PATCH] drm/amdgpu: remove unused and mostly unimplemented CGS functions v2

2017-04-27 Thread Christian König
From: Christian König Those functions are all unused and some not even implemented. v2: keep cgs_get_pci_resource it is used by the ACP driver. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 198 --- drivers/gpu/drm/amd/include/cgs_common.h |

Re: [PATCH 0/6 v5] *** Dedicated vmid per process v5 ***

2017-04-27 Thread Christian König
Reviewed-by: Christian König for patch #3 and #5. Am 27.04.2017 um 15:09 schrieb Chunming Zhou: The current kernel implementation, which grabs the idle VMID from pool when emitting the job may: The back-to-back submission from one process could use different VMID. The submission to

[PATCH 0/6 v5] *** Dedicated vmid per process v5 ***

2017-04-27 Thread Chunming Zhou
The current kernel implementation, which grabs the idle VMID from pool when emitting the job may: The back-to-back submission from one process could use different VMID. The submission to different queues from single process could use different VMID It works well in most case but cannot

[PATCH 1/6] drm/amdgpu: add vm ioctl

2017-04-27 Thread Chunming Zhou
It will be used for reserving vmid. Change-Id: Ib7169ea999690c8e82d0dcbccdd2d97760c0270a Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 18 ++ driv

[PATCH 2/6] drm/amdgpu: add reserved vmid field in vm struct v2

2017-04-27 Thread Chunming Zhou
v2: rename dedicated_vmid to reserved_vmid Change-Id: Id728e20366c8a1ae90d4e901dc80e136e2a613bb Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 - drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 ++

[PATCH 3/6] drm/amdgpu: reserve/unreserve vmid by vm ioctl v4

2017-04-27 Thread Chunming Zhou
add reserve/unreserve vmid funtions. v3: only reserve vmid from gfxhub v4: fix racy condition Change-Id: I5f80dc39dc9d44660a96a2b710b0dbb4d3b9039d Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 62 +++--- 1 file ch

[PATCH 4/6] drm/amdgpu: add limitation for dedicated vm number v4

2017-04-27 Thread Chunming Zhou
v2: move #define to amdgpu_vm.h v3: move reserved vmid counter to id_manager, and increase counter before allocating vmid v4: rename to reserved_vmid_num Change-Id: Ie5958cf6dbdc1c8278e61d9158483472d6f5c6e3 Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König ---

[PATCH 6/6] drm/amdgpu: bump module verion for reserved vmid

2017-04-27 Thread Chunming Zhou
Change-Id: I1065e0430ed44f7ee6c29214b72e35a7343ea02b Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/d

[PATCH 5/6] drm/amdgpu: implement grab reserved vmid V4

2017-04-27 Thread Chunming Zhou
v2: move sync waiting only when flush needs v3: fix racy v4: peek fence instead of get fence, and fix potential context starved. Change-Id: I64da2701c9fdcf986afb90ba1492a78d5bef1b6c Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 79 ++

Re: [PATCH] drm/radeon: only warn once in radeon_ttm_bo_destroy if va list not empty

2017-04-27 Thread Christian König
Am 27.04.2017 um 12:58 schrieb Julien Isorce: But always print an error. Encountered a dozen of exact same backtraces when mesa's pb_cache_release_all_buffers is called after that a gpu reset failed. An other approach would be to check rdev->vm_manager.enabled instead of rdev->accel_working in

Re: [PATCH 0/6 v4] *** Dedicated vmid per process v4 ***

2017-04-27 Thread Christian König
Am 27.04.2017 um 12:26 schrieb zhoucm1: On 2017年04月27日 17:51, Christian König wrote: Patch #1, #2, #4 and #6 are Reviewed-by: Christian König . Patch #3: +/* Select the first entry VMID */ +idle = list_first_entry(&id_mgr->ids_lru, struct amdgpu_vm_id, list); +list_del_init(&i

Re: [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset

2017-04-27 Thread Christian König
Am 27.04.2017 um 12:23 schrieb zhoucm1: On 2017年04月27日 18:11, Christian König wrote: Am 27.04.2017 um 11:08 schrieb Zhang, Jerry (Junwei): On 04/27/2017 04:25 PM, Chunming Zhou wrote: the case could happen when gpu reset: 1. when gpu reset, cs can be continue until sw queue is full, then pu

Re: [PATCH] drm/radeon: reject bo creation from ioctl when the gpu is disabled

2017-04-27 Thread Christian König
Am 27.04.2017 um 12:57 schrieb Julien Isorce: Like done in radeon_cs_ioctl. In particular it avoids mesa to call map/unmap: radeon_create_bo ioctl(DRM_RADEON_GEM_CREATE) -> ok ioctl(DRM_RADEON_GEM_VA-MAP) radeon_destroy_bo ioctl(DRM_RADEON_GEM_VA-UNMAP) Encountered also cas

[PATCH] drm/radeon: only warn once in radeon_ttm_bo_destroy if va list not empty

2017-04-27 Thread Julien Isorce
But always print an error. Encountered a dozen of exact same backtraces when mesa's pb_cache_release_all_buffers is called after that a gpu reset failed. An other approach would be to check rdev->vm_manager.enabled instead of rdev->accel_working in the other function radeon_gem_object_close. But

[PATCH] drm/radeon: reject bo creation from ioctl when the gpu is disabled

2017-04-27 Thread Julien Isorce
Like done in radeon_cs_ioctl. In particular it avoids mesa to call map/unmap: radeon_create_bo ioctl(DRM_RADEON_GEM_CREATE) -> ok ioctl(DRM_RADEON_GEM_VA-MAP) radeon_destroy_bo ioctl(DRM_RADEON_GEM_VA-UNMAP) Encountered also cases where the vm_manager succeeded to be enabled after

Re: [PATCH 0/6 v4] *** Dedicated vmid per process v4 ***

2017-04-27 Thread zhoucm1
On 2017年04月27日 17:51, Christian König wrote: Patch #1, #2, #4 and #6 are Reviewed-by: Christian König . Patch #3: +/* Select the first entry VMID */ +idle = list_first_entry(&id_mgr->ids_lru, struct amdgpu_vm_id, list); +list_del_init(&idle->list); +vm->reserved_vmid[vmhub]

Re: [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset

2017-04-27 Thread zhoucm1
On 2017年04月27日 18:11, Christian König wrote: Am 27.04.2017 um 11:08 schrieb Zhang, Jerry (Junwei): On 04/27/2017 04:25 PM, Chunming Zhou wrote: the case could happen when gpu reset: 1. when gpu reset, cs can be continue until sw queue is full, then push job will wait with holding pd reservat

Re: [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset

2017-04-27 Thread Christian König
Am 27.04.2017 um 11:08 schrieb Zhang, Jerry (Junwei): On 04/27/2017 04:25 PM, Chunming Zhou wrote: the case could happen when gpu reset: 1. when gpu reset, cs can be continue until sw queue is full, then push job will wait with holding pd reservation. 2. gpu_reset routine will also need pd rese

Re: [PATCH] Revert "drm/amdgpu: Refactor flip into prepare submit and submit. (v2)"

2017-04-27 Thread Christian König
Am 27.04.2017 um 10:18 schrieb Michel Dänzer: From: Michel Dänzer This reverts commit cb341a319f7e66f879d69af929c3dadfc1a8f31e. The purpose of the refactor was for amdgpu_crtc_prepare/submit_flip to be used by the DC code, but that's no longer the case. Signed-off-by: Michel Dänzer --- dri

Re: [PATCH] drm/amdgpu: Enable chained IB MCBP support

2017-04-27 Thread Christian König
Am 27.04.2017 um 09:18 schrieb Trigger Huang: Support for MCBP/Virtualization in combination with chained IBs is formal released on firmware feature version #46. So enable it according to firmware feature version, otherwise, world switch will hang. Signed-off-by: Trigger Huang Reviewed-by: Ch

Re: [PATCH 0/6 v4] *** Dedicated vmid per process v4 ***

2017-04-27 Thread Christian König
Patch #1, #2, #4 and #6 are Reviewed-by: Christian König . Patch #3: + /* Select the first entry VMID */ + idle = list_first_entry(&id_mgr->ids_lru, struct amdgpu_vm_id, list); + list_del_init(&idle->list); + vm->reserved_vmid[vmhub] = idle; + mutex_unlock(&id_mgr-

Re: [PATCH 2/2] drm/amdgpu: Fix use of interruptible waiting

2017-04-27 Thread Michel Dänzer
On 27/04/17 04:39 PM, Michel Dänzer wrote: > On 27/04/17 04:19 AM, Alex Xie wrote: >> Hi, >> >> I knew this is part of ioctl. And I intended to fix this interruptible >> waiting in an ioctl. > > It's by design, nothing that needs fixing in the case of an ioctl. > > >> 1. The wait is short. There

Re: [PATCH 5/6] drm/amdgpu: implement grab dedicated vmid V2

2017-04-27 Thread Christian König
Am 27.04.2017 um 06:42 schrieb zhoucm1: On 2017年04月27日 10:52, Zhang, Jerry (Junwei) wrote: On 04/26/2017 07:10 PM, Chunming Zhou wrote: v2: move sync waiting only when flush needs Change-Id: I64da2701c9fdcf986afb90ba1492a78d5bef1b6c Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amd

Re: [PATCH 2/2] drm/amdgpu: Fix use of interruptible waiting

2017-04-27 Thread Michel Dänzer
On 27/04/17 06:05 PM, Christian König wrote: > >> 2. In this function and caller functions, the error handling for such >> interrupt is complicated and risky. When the waiting is interrupted by >> a signal, the callers of this function need to handle this interrupt >> error. I traced the calling s

Re: [PATCH 3/6] drm/amdgpu: reserve/unreserve vmid by vm ioctl v3

2017-04-27 Thread Christian König
Am 27.04.2017 um 04:24 schrieb Zhang, Jerry (Junwei): On 04/27/2017 10:13 AM, zhoucm1 wrote: On 2017年04月26日 20:26, Christian König wrote: Am 26.04.2017 um 13:10 schrieb Chunming Zhou: add reserve/unreserve vmid funtions. v3: only reserve vmid from gfxhub Change-Id: I5f80dc39dc9d44660a96a2b7

Re: [PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-04-27 Thread Michel Dänzer
On 27/04/17 05:15 AM, Felix Kuehling wrote: > > Hi Michel, > > You said in an earlier email that it doesn't have to be convenient. With > that in mind, I went back to a minimalistic solution that doesn't need > any additional Kconfig options and only uses two module parameters (one > in radeon, o

Re: [PATCH 2/2] drm/amdgpu: Fix use of interruptible waiting

2017-04-27 Thread Christian König
1. The wait is short. There is not much benefit by interruptible waiting. The BO is a frame buffer BO. Are there many competitors to lock this BO? If not, the wait is very short. This is my main reason to change. The problem is that all those waits can block the MM subsystem from reclaiming me

Re: [PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-04-27 Thread Christian König
Am 26.04.2017 um 22:15 schrieb Felix Kuehling: On 17-04-25 02:28 AM, Michel Dänzer wrote: On 22/04/17 02:05 AM, Felix Kuehling wrote: __setup doesn't work in modules. Right. We could build something like drivers/video/fbdev/core/fb_cmdline.c:video_setup() into the kernel to handle this, but it

Re: [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset

2017-04-27 Thread Zhang, Jerry (Junwei)
On 04/27/2017 04:25 PM, Chunming Zhou wrote: the case could happen when gpu reset: 1. when gpu reset, cs can be continue until sw queue is full, then push job will wait with holding pd reservation. 2. gpu_reset routine will also need pd reservation to restore page table from their shadow. 3. cs

[PATCH 1/2] drm/amdgpu: export more gpu info for gfx9

2017-04-27 Thread Junwei Zhang
v2: 64-bit aligned for gpu info Signed-off-by: Ken Wang Signed-off-by: Junwei Zhang Reviewed-by: Alex Deucher Reviewed-by: Qiang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 11 +++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++

[PATCH 2/2] drm/amdgpu: bump version for exporting gpu info for gfx9

2017-04-27 Thread Junwei Zhang
Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index ead00d7..857c3be 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dr

[PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset

2017-04-27 Thread Chunming Zhou
the case could happen when gpu reset: 1. when gpu reset, cs can be continue until sw queue is full, then push job will wait with holding pd reservation. 2. gpu_reset routine will also need pd reservation to restore page table from their shadow. 3. cs is waiting for gpu_reset complete, but gpu res

[PATCH] Revert "drm/amdgpu: Refactor flip into prepare submit and submit. (v2)"

2017-04-27 Thread Michel Dänzer
From: Michel Dänzer This reverts commit cb341a319f7e66f879d69af929c3dadfc1a8f31e. The purpose of the refactor was for amdgpu_crtc_prepare/submit_flip to be used by the DC code, but that's no longer the case. Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 147 ++

Re: [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset

2017-04-27 Thread zhoucm1
pls ignore this one, will send another new one. On 2017年04月27日 15:20, Chunming Zhou wrote: the case could happen when gpu reset: 1. when gpu reset, cs can be continue until sw queue is full, then push job will wait with holding pd reservation. 2. gpu_reset routine will also need pd reservation

Re: [PATCH 0/6 v4] *** Dedicated vmid per process v4 ***

2017-04-27 Thread Zhang, Jerry (Junwei)
It looks fine for me now. Reviewed-by: Junwei Zhang Jerry On 04/27/2017 01:00 PM, Chunming Zhou wrote: The current kernel implementation, which grabs the idle VMID from pool when emitting the job may: The back-to-back submission from one process could use different VMID. The submi

Re: [PATCH 5/6] drm/amdgpu: implement grab reserved vmid V3

2017-04-27 Thread Zhang, Jerry (Junwei)
On 04/27/2017 01:54 PM, Zhang, Jerry (Junwei) wrote: On 04/27/2017 01:00 PM, Chunming Zhou wrote: v2: move sync waiting only when flush needs v3: fix racy Change-Id: I64da2701c9fdcf986afb90ba1492a78d5bef1b6c Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 72 +++

RE: [PATCH] drm/amdgpu: Enable chained IB MCBP support

2017-04-27 Thread Yu, Xiangliang
Reviewed-by: Xiangliang Yu Thanks! Xiangliang Yu > -Original Message- > From: Trigger Huang [mailto:trigger.hu...@amd.com] > Sent: Thursday, April 27, 2017 3:18 PM > To: amd-gfx@lists.freedesktop.org > Cc: Liu, Monk ; Yu, Xiangliang > ; Huang, Trigger > Subject: [PATCH] drm/amdgpu: Ena

Re: [PATCH 2/2] drm/amdgpu: Fix use of interruptible waiting

2017-04-27 Thread Michel Dänzer
On 27/04/17 04:19 AM, Alex Xie wrote: > Hi, > > I knew this is part of ioctl. And I intended to fix this interruptible > waiting in an ioctl. It's by design, nothing that needs fixing in the case of an ioctl. > 1. The wait is short. There is not much benefit by interruptible > waiting. The BO

[PATCH] drm/amdgpu: Enable chained IB MCBP support

2017-04-27 Thread Trigger Huang
Support for MCBP/Virtualization in combination with chained IBs is formal released on firmware feature version #46. So enable it according to firmware feature version, otherwise, world switch will hang. Signed-off-by: Trigger Huang --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 17 +++--

[PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset

2017-04-27 Thread Chunming Zhou
the case could happen when gpu reset: 1. when gpu reset, cs can be continue until sw queue is full, then push job will wait with holding pd reservation. 2. gpu_reset routine will also need pd reservation to restore page table from their shadow. 3. cs is waiting for gpu_reset complete, but gpu res

RE: [PATCH] drm/amdgpu: Enable chained IB MCBP support

2017-04-27 Thread Liu, Monk
Reviewed-by: Monk Liu -Original Message- From: Trigger Huang [mailto:trigger.hu...@amd.com] Sent: Thursday, April 27, 2017 3:18 PM To: amd-gfx@lists.freedesktop.org Cc: Liu, Monk ; Yu, Xiangliang ; Huang, Trigger Subject: [PATCH] drm/amdgpu: Enable chained IB MCBP support Support for

Re: [PATCH 3/6] drm: fourcc byteorder: add bigendian support to drm_mode_legacy_fb_format

2017-04-27 Thread Michel Dänzer
On 27/04/17 03:45 PM, Gerd Hoffmann wrote: > Hi, > >>> That is done using the RADEON_TILING_SWAP_{16,32}BIT flag mentioned in >>> another thread? >> >> Right. >> >> >>> What about dumb bos? You've mentioned the swap flag isn't used for >>> those. Which implies they are in little endian byte or