[PATCH xf86-video-amdgpu 1/2] Use drmmode_crtc->scanout_id instead of 0 to check for scanout buffer

2017-07-13 Thread Michel Dänzer
From: Michel Dänzer Preparation for following change, no functional change intended. (Ported from radeon commit aff267ee36cc6a703a532f91f82adc1ba1425ff3) Signed-off-by: Michel Dänzer --- src/amdgpu_dri2.c| 5 +++-- src/amdgpu_kms.c | 4 ++-- src/amdgpu_present.c | 2 +- 3 files change

[PATCH xf86-video-amdgpu 2/2] If a TearFree flip fails, fall back to non-TearFree operation

2017-07-13 Thread Michel Dänzer
From: Michel Dänzer In order to avoid possible freeze / log file spam in that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99769 (Ported from radeon commit 94dc2b80f3ef0b2c17c20501d824fb0447d52e7a) Signed-off-by: Michel Dänzer --- src/amdgpu_kms.c | 21 +--

[PATCH] drm/amdgpu: fix amdgpu_bo_gpu_accessible()

2017-07-13 Thread Christian König
From: Christian König The test was relaxed a bit to much. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_objec

RE: [PATCH] drm/amdgpu: fix amdgpu_bo_gpu_accessible()

2017-07-13 Thread He, Roger
Reviewed-and-Tested-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Thursday, July 13, 2017 6:23 PM To: amd-gfx@lists.freedesktop.org Cc: Huang, Ray Subject: [PATCH] drm/amdgpu: fix a

Re: [PATCH] drm/amdgpu: fix amdgpu_bo_gpu_accessible()

2017-07-13 Thread Tom St Denis
Seems to fix the regression I noticed on Carrizo. Can add my Acked-By if you haven't pushed it already. Cheers, Tom On 13/07/17 08:19 AM, He, Roger wrote: Reviewed-and-Tested-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesk

RE: [PATCH xf86-video-amdgpu 2/2] If a TearFree flip fails, fall back to non-TearFree operation

2017-07-13 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Thursday, July 13, 2017 4:46 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-amdgpu 2/2] If a TearFree flip fails, fall back to > non-TearFree operati

[PATCH 2/3] drm/amdgpu: only move VM BOs in the LRU during validation

2017-07-13 Thread Christian König
From: Christian König This should save us a bunch of command submission overhead. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 15 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 56 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h |

[PATCH 1/3] drm/amdgpu: track if a PD needs an update

2017-07-13 Thread Christian König
From: Christian König That should reduce our command submission overhead quite a bit. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/d

[PATCH 3/3] drm/amdgpu: only bind VM shadows after validation

2017-07-13 Thread Christian König
From: Christian König No need to do this on every CS. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.

[PATCH umr] Add VCN rings to PM4 supported rings.

2017-07-13 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/app/ring_read.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/ring_read.c b/src/app/ring_read.c index d6b3df58be4d..714a54e4f5ea 100644 --- a/src/app/ring_read.c +++ b/src/app/ring_read.c @@ -52,6 +52,9 @@ void umr_read_ring(struct umr_asic *as

Re: [PATCH 5/7] drm/amdgpu: flush the HDP only once for CPU based VM updates

2017-07-13 Thread Christian König
Am 12.07.2017 um 22:31 schrieb Felix Kuehling: I'm wondering if you need a HDP flush in update_directories at all. Are there cases where the directories are updated but the page tables are not? It can happen that a page table is swapped out and back in. In this case on the PDs need an update,

Re: [PATCH] drm/amdgpu: Optimize recursion in amdgpu_vm_update_level

2017-07-13 Thread Christian König
Am 12.07.2017 um 21:38 schrieb Felix Kuehling: On 17-07-12 03:50 AM, Christian König wrote: That optimization is unnecessary. I have a patch in the pipeline that makes the VM BO permanently CPU mapped and also fixes a couple of bugs in those code path. You mean just for the CPU-update path?

[PATCH umr] Add ability to follow IBs from VCN/UVD rings

2017-07-13 Thread Tom St Denis
This patch detects the sequence of PKT0 writes to registers which configure the VMID/ADDR/SIZE of the IBs in the ring and then chains them once all 4 pieces of information are found. Signed-off-by: Tom St Denis --- src/lib/ring_decode.c | 26 +- src/umr.h | 1

[PATCH umr] Simple tidy up of PKT0 data printout.

2017-07-13 Thread Tom St Denis
Makes it more obvious which lines of output are the data and not headers for PKT0 format packets. Signed-off-by: Tom St Denis --- src/lib/ring_decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c index d87d489b1e4a..c00300e4ce

Re: [PATCH 2/3] drm/amdgpu: only move VM BOs in the LRU during validation

2017-07-13 Thread Felix Kuehling
Reviewed-by: Felix Kuehling On 17-07-13 09:25 AM, Christian König wrote: > From: Christian König > > This should save us a bunch of command submission overhead. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 15 +++-- > drivers/gpu/drm/amd/amdgpu/amdgp

Re: [PATCH 3/3] drm/amdgpu: only bind VM shadows after validation

2017-07-13 Thread Felix Kuehling
On 17-07-13 09:25 AM, Christian König wrote: > From: Christian König > > No need to do this on every CS. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 - > 1 file changed, 12 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/

Re: [PATCH 1/3] drm/amdgpu: track if a PD needs an update

2017-07-13 Thread Felix Kuehling
On 17-07-13 09:25 AM, Christian König wrote: > From: Christian König > > That should reduce our command submission overhead quite a bit. > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 ++- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + > 2 files changed

[PATCH umr] Add SR-IOV detection and VF sampling on supported devices.

2017-07-13 Thread Jean-Francois Thibert
Running the top command on the PF now allows monitoring activity for a single VF by using [] keys and also to monitor relative assignment of each VF. Signed-off-by: Jean-Francois Thibert --- src/app/top.c | 215 +++--- 1 file changed, 205 inser

Re: [PATCH umr] Add SR-IOV detection and VF sampling on supported devices.

2017-07-13 Thread Tom St Denis
Applies cleanly but I can't get test it since I don't have a VM setup. If nobody objects to it in a short while I'll push it through. Tom On 13/07/17 12:19 PM, Jean-Francois Thibert wrote: Running the top command on the PF now allows monitoring activity for a single VF by using [] keys and als

[PATCH v5 04/14] drm: amd: remove dead code and pointless local lut storage

2017-07-13 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Acked-by: Daniel Vetter Signed-off-by: Peter Rosin --- drivers/gpu/drm/amd/amdgpu

[PATCH v5 00/14] improve the fb_setcmap helper

2017-07-13 Thread Peter Rosin
Hi! While trying to get CLUT support for the atmel_hlcdc driver, and specifically for the emulated fbdev interface, I received some push-back that my feeble in-driver attempts should be solved by the core. This is my attempt to do it right. I have obviously not tested all of this with more than a

[PATCH v5 12/14] drm: radeon: remove dead code and pointless local lut storage

2017-07-13 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Acked-by: Daniel Vetter Signed-off-by: Peter Rosin --- drivers/gpu/drm/radeon/ato

Re: [PATCH] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Andres Rodriguez
On 2017-07-12 02:26 PM, Jay Cornwall wrote: The number of compute queues available to the KFD was erroneously calculated as 64. Only the first MEC can execute compute queues and it has 32 queue slots. This caused the oversubscription limit to be calculated incorrectly, leading to a missing chain

Re: [PATCH] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Andres Rodriguez
On 2017-07-13 02:36 PM, Andres Rodriguez wrote: On 2017-07-12 02:26 PM, Jay Cornwall wrote: The number of compute queues available to the KFD was erroneously calculated as 64. Only the first MEC can execute compute queues and it has 32 queue slots. This caused the oversubscription limit to be

Re: [PATCH] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Jay Cornwall
On Thu, Jul 13, 2017, at 13:36, Andres Rodriguez wrote: > On 2017-07-12 02:26 PM, Jay Cornwall wrote: > > The number of compute queues available to the KFD was erroneously > > calculated as 64. Only the first MEC can execute compute queues and > > it has 32 queue slots. > > > > This caused the ove

Re: [PATCH] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Felix Kuehling
On 17-07-13 03:15 PM, Jay Cornwall wrote: > On Thu, Jul 13, 2017, at 13:36, Andres Rodriguez wrote: >> On 2017-07-12 02:26 PM, Jay Cornwall wrote: >>> The number of compute queues available to the KFD was erroneously >>> calculated as 64. Only the first MEC can execute compute queues and >>> it has

Re: [PATCH] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Andres Rodriguez
On 2017-07-13 03:35 PM, Felix Kuehling wrote: On 17-07-13 03:15 PM, Jay Cornwall wrote: On Thu, Jul 13, 2017, at 13:36, Andres Rodriguez wrote: On 2017-07-12 02:26 PM, Jay Cornwall wrote: The number of compute queues available to the KFD was erroneously calculated as 64. Only the first MEC c

[PATCH v2] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Jay Cornwall
The number of compute queues available to the KFD was erroneously calculated as 64. Only the first MEC can execute compute queues and it has 32 queue slots. This caused the oversubscription limit to be calculated incorrectly, leading to a missing chained runlist command at the end of an oversubscr

RE: [PATCH] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Liu, Shaoyun
There is a function get_mec_num use the field , but seems no one call it , maybe remove it as well. Regards Shaoyun.liu -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Andres Rodriguez Sent: Thursday, July 13, 2017 3:54 PM To: Kuehling,

Re: [PATCH v2] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Andres Rodriguez
Reviewed-by: Andres Rodriguez On 2017-07-13 04:23 PM, Jay Cornwall wrote: The number of compute queues available to the KFD was erroneously calculated as 64. Only the first MEC can execute compute queues and it has 32 queue slots. This caused the oversubscription limit to be calculated incorr

[PATCH 1/2] drm: Implement vm_operations_struct.access

2017-07-13 Thread Felix Kuehling
Allows gdb to access contents of user mode mapped BOs. VRAM access requires the driver to implement a new callback in ttm_bo_driver. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 66 - include/drm/ttm/ttm_bo_driver.h | 12 2

[PATCH 2/2] drm/amdgpu: Implement ttm_bo_driver.access_vram callback

2017-07-13 Thread Felix Kuehling
Allows gdb to access contents of user mode mapped VRAM BOs. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 59 + drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 ++ 2 files changed, 61 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgp

Re: [PATCH v2] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Felix Kuehling
People don't seem to like cross-component changes if they can be avoided. I'd prefer separate commits for KFD, radeon, amdgpu, and finally the kgd2kfd interface. With that fixed, Reviewed-by: Felix Kuehling On 17-07-13 04:36 PM, Andres Rodriguez wrote: > > Reviewed-by: Andres Rodriguez > > On 2

Re: [PATCH 2/2] drm/amdgpu: Implement ttm_bo_driver.access_vram callback

2017-07-13 Thread Felix Kuehling
On 17-07-13 05:08 PM, Felix Kuehling wrote: > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h > @@ -78,6 +78,8 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, > struct dma_fence **fence); > > int amdgpu_mmap(struct file *filp, s

Re: [PATCH] drm/amdgpu: fix amdgpu_bo_gpu_accessible()

2017-07-13 Thread Huang Rui
On Thu, Jul 13, 2017 at 06:22:50PM +0800, Christian König wrote: > From: Christian König > > The test was relaxed a bit to much. > > Signed-off-by: Christian König Nice catch, yes, we need take care the case that no gtt is bound. Acked-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH 2/4] drm/amdkfd: Remove unused references to shared_resources.num_mec

2017-07-13 Thread Jay Cornwall
Dead code. Change-Id: Ic0bb1bcca87e96bc5e8fa9894727b0de152e8818 Signed-off-by: Jay Cornwall --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 7 --- 2 files changed, 11 deletions(-) diff --git a/drivers/gpu/drm/amd/am

[PATCH 4/4] drm/amdgpu: Remove unused field kgd2kfd_shared_resources.num_mec

2017-07-13 Thread Jay Cornwall
Dead code. Change-Id: I9575aa73b5741b80dc340f953cc773385c92b2be Signed-off-by: Jay Cornwall --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 - drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 3 --- 2 files changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c

[PATCH 3/4] drm/radeon: Remove initialization of shared_resources.num_mec

2017-07-13 Thread Jay Cornwall
Dead code. Change-Id: I2383e0b541ed55288570b6a0ec8a0d49cdd4df89 Signed-off-by: Jay Cornwall --- drivers/gpu/drm/radeon/radeon_kfd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c index 719ea51..8f8c7c1 100644 --- a/dr

[PATCH v3 1/4] drm/amdgpu: Fix KFD oversubscription by tracking queues correctly

2017-07-13 Thread Jay Cornwall
The number of compute queues available to the KFD was erroneously calculated as 64. Only the first MEC can execute compute queues and it has 32 queue slots. This caused the oversubscription limit to be calculated incorrectly, leading to a missing chained runlist command at the end of an oversubscr

Re: [PATCH 1/3] drm/amdgpu: track if a PD needs an update

2017-07-13 Thread zhoucm1
'if (parent->entries[pt_idx].addr == pt)' is good enough for condition of need_update, adding previous Felix's optimization patch, then the whole picture looks better than this one, IIRC. Regards, David Zhou On 2017年07月13日 21:25, Christian König wrote: From: Christian König That should reduc

Re: [PATCH 2/2] drm/amdgpu: Implement ttm_bo_driver.access_vram callback

2017-07-13 Thread Michel Dänzer
On 14/07/17 06:23 AM, Felix Kuehling wrote: > On 17-07-13 05:08 PM, Felix Kuehling wrote: >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h >> @@ -78,6 +78,8 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, >> struct dma_fence **fe

Re: [PATCH 1/2] drm: Implement vm_operations_struct.access

2017-07-13 Thread Michel Dänzer
On 14/07/17 06:08 AM, Felix Kuehling wrote: > Allows gdb to access contents of user mode mapped BOs. VRAM access > requires the driver to implement a new callback in ttm_bo_driver. Thanks for doing this. Looks mostly good, but I still have some comments. The shortlog prefix should be "drm/ttm:".