Re: [PATCH 1/2] drm/amdgpu: fix transform feedback GDS hang on gfx10 (v2)

2019-06-27 Thread Christian König
Am 27.06.19 um 00:35 schrieb Marek Olšák: From: Marek Olšák v2: update emit_ib_size (though it's still wrong because it was wrong before) Signed-off-by: Marek Olšák Can't judge if this is really the right thing to do because I don't know the details of the hw bug. But at least of hand I

Re: [PATCH v4 hmm 12/12] mm/hmm: Fix error flows in hmm_invalidate_range_start

2019-06-27 Thread Ralph Campbell
On 6/24/19 2:01 PM, Jason Gunthorpe wrote: From: Jason Gunthorpe If the trylock on the hmm->mirrors_sem fails the function will return without decrementing the notifiers that were previously incremented. Since the caller will not call invalidate_range_end() on EAGAIN this will result in notifi

Re: [RFC PATCH v3 00/11] new cgroup controller for gpu/drm subsystem

2019-06-27 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 5:05 PM Kenny Ho wrote: > This is a follow up to the RFC I made previously to introduce a cgroup > controller for the GPU/DRM subsystem [v1,v2]. The goal is to be able to > provide resource management to GPU resources using things like container. > The cover letter from v1

Re: [PATCH 4/7] drm/radeon: Fill out gem_object->resv

2019-06-27 Thread Daniel Vetter
On Wed, Jun 26, 2019 at 10:23:12AM +0200, Daniel Vetter wrote: > On Wed, Jun 26, 2019 at 07:10:21AM +, Koenig, Christian wrote: > > Those patches would become superfluous when merging Gerd's work. > > Not entirely, they still remove the gem_prime_res_obj. Setting up > gem_bo.resv is only one h

[PATCH -next] drm/amdgpu: fix debugfs_simple_attr.cocci warnings

2019-06-27 Thread YueHaibing
Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: script

Re: [PATCH 2/2] drm/amdgpu: handle AMDGPU_IB_FLAG_RESET_GDS_MAX_WAVE_ID on gfx10

2019-06-27 Thread zhoucm1
any reason for not care .emit_ib_size in this one? -David On 2019年06月27日 06:35, Marek Olšák wrote: From: Marek Olšák Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx

Re: [PATCH] drm/amd/powerplay: warn on smu interface version mismatch

2019-06-27 Thread Yuan, Xiaojie
Thanks Evan, got your point. Then I'll keep the patch only in our bring up branch. BR, Xiaojie From: Quan, Evan Sent: Thursday, June 27, 2019 9:51:22 AM To: Yuan, Xiaojie; amd-gfx@lists.freedesktop.org Cc: Wang, Kevin(Yang) Subject: RE: [PATCH] drm/amd/po

[PATCH v2] drm/amdgpu: fix scheduler timeout calc

2019-06-27 Thread Cui, Flora
scheduler timeout is in jiffies v2: move timeout check to amdgpu_device_get_job_timeout_settings after parsing the value Change-Id: I26708c163db943ff8d930dd81bcab4b4b9d84eb2 Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 +-- 1 file changed, 5 insertions(+), 2 delet

Re: [PATCH v2] drm/amdgpu: fix scheduler timeout calc

2019-06-27 Thread Christian König
Am 27.06.19 um 12:03 schrieb Cui, Flora: scheduler timeout is in jiffies v2: move timeout check to amdgpu_device_get_job_timeout_settings after parsing the value Change-Id: I26708c163db943ff8d930dd81bcab4b4b9d84eb2 Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 +

[PATCH 2/2] dma-buf: cleanup shared fence removal

2019-06-27 Thread Christian König
While freeing up memory it is easier to remove a fence from a reservation object instead of signaling it and installing a new one in all other objects. Clean this up by adding the removal function to the core reservation object code instead of messing with the internal in amdgpu. No functional ch

[PATCH 1/2] dma-buf: cleanup reservation_object_init/fini

2019-06-27 Thread Christian König
They are not used that often and certainly not in a hot path. Make them normal functions instead of an inline. Signed-off-by: Christian König --- drivers/dma-buf/reservation.c | 45 ++ include/linux/reservation.h | 46 ++- 2 files

Re: [PATCH 2/2] dma-buf: cleanup shared fence removal

2019-06-27 Thread Daniel Vetter
On Thu, Jun 27, 2019 at 12:18 PM Christian König wrote: > > While freeing up memory it is easier to remove a fence from a reservation > object instead of signaling it and installing a new one in all other objects. > > Clean this up by adding the removal function to the core reservation object > co

Re: [PATCH 2/2] dma-buf: cleanup shared fence removal

2019-06-27 Thread Christian König
Am 27.06.19 um 12:43 schrieb Daniel Vetter: On Thu, Jun 27, 2019 at 12:18 PM Christian König wrote: While freeing up memory it is easier to remove a fence from a reservation object instead of signaling it and installing a new one in all other objects. Clean this up by adding the removal functi

[PATCH] drm/amdgpu: fix warning on 32 bit

2019-06-27 Thread Alex Deucher
Properly cast pointer to int. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c index c441e6ce95ec..988c0adaca91 100644 --- a

Re: [PATCH] drm/amdgpu: fix warning on 32 bit

2019-06-27 Thread Christian König
Am 27.06.19 um 15:50 schrieb Alex Deucher: Properly cast pointer to int. Signed-off-by: Alex Deucher Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/dr

[PATCH] drm/amdgpu: drop copy/paste leftover to fix big endian

2019-06-27 Thread Alex Deucher
The buf swap field doesn't exist on RB1. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index 0061a0e8ab78..2932ade7dbd0 100644 --- a/dri

[PATCH -next] drm/amdgpu: remove set but not used variable 'psp_enabled'

2019-06-27 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/nv.c: In function 'nv_common_early_init': drivers/gpu/drm/amd/amdgpu/nv.c:471:7: warning: variable 'psp_enabled' set but not used [-Wunused-but-set-variable] It's not used since inroduction in commit c6b6a42175f5 ("drm/amd

RE: [PATCH] drm/amdgpu: drop copy/paste leftover to fix big endian

2019-06-27 Thread Zhang, Hawking
Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: 2019年6月27日 22:16 To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH] drm/amdgpu: drop copy/paste leftover to fix big endian The buf swap field doesn't exis

Re: [PATCH] drm/amdgpu: drop copy/paste leftover to fix big endian

2019-06-27 Thread Michel Dänzer
On 2019-06-27 4:16 p.m., Alex Deucher wrote: > The buf swap field doesn't exist on RB1. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c > b/drivers/gpu/drm/amd/amdgp

Re: [PATCH] drm/amdgpu: drop copy/paste leftover to fix big endian

2019-06-27 Thread Alex Deucher
On Thu, Jun 27, 2019 at 10:32 AM Michel Dänzer wrote: > > On 2019-06-27 4:16 p.m., Alex Deucher wrote: > > The buf swap field doesn't exist on RB1. > > > > Signed-off-by: Alex Deucher > > --- > > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --gi

Re: [PATCH 2/2] dma-buf: cleanup shared fence removal

2019-06-27 Thread Daniel Vetter
On Thu, Jun 27, 2019 at 3:19 PM Christian König wrote: > > Am 27.06.19 um 12:43 schrieb Daniel Vetter: > > On Thu, Jun 27, 2019 at 12:18 PM Christian König > > wrote: > >> While freeing up memory it is easier to remove a fence from a reservation > >> object instead of signaling it and installing

Re: [PATCH] drm/amd/powerplay: update smu11_driver_if_navi10.h

2019-06-27 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of Tianci Yin Sent: Thursday, June 27, 2019 2:49 AM To: amd-gfx@lists.freedesktop.org Cc: Xiao, Jack; Yin, Tianci (Rico); Zhang, Hawking Subject: [PATCH] drm/amd/powerplay: update smu11_driver_if_navi10.h From: tia

Re: [PATCH 1/2] dma-buf: cleanup reservation_object_init/fini

2019-06-27 Thread Daniel Vetter
On Thu, Jun 27, 2019 at 12:18:12PM +0200, Christian König wrote: > They are not used that often and certainly not in a hot path. > Make them normal functions instead of an inline. > > Signed-off-by: Christian König Reviewed-by: Daniel Vetter > --- > drivers/dma-buf/reservation.c | 45

Re: [PATCH 2/2] dma-buf: cleanup shared fence removal

2019-06-27 Thread Koenig, Christian
Am 27.06.19 um 17:34 schrieb Daniel Vetter: > On Thu, Jun 27, 2019 at 3:19 PM Christian König > wrote: >> Am 27.06.19 um 12:43 schrieb Daniel Vetter: >>> On Thu, Jun 27, 2019 at 12:18 PM Christian König >>> wrote: While freeing up memory it is easier to remove a fence from a reservation

Re: [PATCH][next[ drm/amd/display: fix a couple of spelling mistakes

2019-06-27 Thread Alex Deucher
On Wed, Jun 26, 2019 at 9:32 AM Colin Ian King wrote: > > On 26/06/2019 14:25, Daniel Stone wrote: > > Hi Colin, > > > > On Wed, 26 Jun 2019 at 14:24, Colin King wrote: > >> There are a couple of spelling mistakes in dm_error messages and > >> a comment. Fix these. > > > > Whilst there, you might

Re: [PATCH v4 hmm 12/12] mm/hmm: Fix error flows in hmm_invalidate_range_start

2019-06-27 Thread Jason Gunthorpe
On Wed, Jun 26, 2019 at 11:18:23AM -0700, Ralph Campbell wrote: > > diff --git a/mm/hmm.c b/mm/hmm.c > > index b224ea635a7716..89549eac03d506 100644 > > +++ b/mm/hmm.c > > @@ -64,7 +64,7 @@ static struct hmm *hmm_get_or_create(struct mm_struct *mm) > > init_rwsem(&hmm->mirrors_sem); > > hmm

Re: [PATCH 2/2] dma-buf: cleanup shared fence removal

2019-06-27 Thread Daniel Vetter
On Thu, Jun 27, 2019 at 03:48:06PM +, Koenig, Christian wrote: > Am 27.06.19 um 17:34 schrieb Daniel Vetter: > > On Thu, Jun 27, 2019 at 3:19 PM Christian König > > wrote: > >> Am 27.06.19 um 12:43 schrieb Daniel Vetter: > >>> On Thu, Jun 27, 2019 at 12:18 PM Christian König > >>> wrote: > >>

Re: [PATCH 2/2] dma-buf: cleanup shared fence removal

2019-06-27 Thread Koenig, Christian
Am 27.06.19 um 19:10 schrieb Daniel Vetter: > On Thu, Jun 27, 2019 at 03:48:06PM +, Koenig, Christian wrote: >> Am 27.06.19 um 17:34 schrieb Daniel Vetter: >>> On Thu, Jun 27, 2019 at 3:19 PM Christian König >>> wrote: Am 27.06.19 um 12:43 schrieb Daniel Vetter: > On Thu, Jun 27, 2019

Re: [RFC PATCH v3 04/11] drm, cgroup: Add total GEM buffer allocation limit

2019-06-27 Thread Kenny Ho
On Thu, Jun 27, 2019 at 1:43 AM Daniel Vetter wrote: > > On Wed, Jun 26, 2019 at 06:41:32PM -0400, Kenny Ho wrote: > > So without the sharing restriction and some kind of ownership > > structure, we will have to migrate/change the owner of the buffer when > > the cgroup that created the buffer die

Re: [PATCH 2/2] dma-buf: cleanup shared fence removal

2019-06-27 Thread Daniel Vetter
On Thu, Jun 27, 2019 at 7:20 PM Koenig, Christian wrote: > > Am 27.06.19 um 19:10 schrieb Daniel Vetter: > > On Thu, Jun 27, 2019 at 03:48:06PM +, Koenig, Christian wrote: > >> Am 27.06.19 um 17:34 schrieb Daniel Vetter: > >>> On Thu, Jun 27, 2019 at 3:19 PM Christian König > >>> wrote: > >>>

[PATCH 18/87] gpu: drm: Remove call to memset after kzalloc in tonga_smumgr.c

2019-06-27 Thread Fuqian Huang
kzalloc has already zeroes the memory. So memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga

[PATCH 16/87] gpu: drm: Remove call to memset after kzalloc

2019-06-27 Thread Fuqian Huang
kzalloc has already zeroes the memory. So memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c

[PATCH 15/87] gpu: drm: Remove call to memset after kzalloc in process_pptable_v1_0.c

2019-06-27 Thread Fuqian Huang
kzalloc has already zeroes the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/powe

[PATCH 17/87] gpu: drm: Remove call to memset after kzalloc in iceland_smumgr.c

2019-06-27 Thread Fuqian Huang
kzalloc has already zeroes the memory. So memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/i

[PATCH 14/87] gpu: amd: Remove call to memset after kzalloc

2019-06-27 Thread Fuqian Huang
kzalloc already zerored the memory. so memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amd

Re: [RFC PATCH v3 07/11] drm, cgroup: Add TTM buffer allocation stats

2019-06-27 Thread Kenny Ho
On Thu, Jun 27, 2019 at 2:01 AM Daniel Vetter wrote: > > btw reminds me: I guess it would be good to have a per-type .total > read-only exposed, so that userspace has an idea of how much there is? > ttm is trying to be agnostic to the allocator that's used to manage a > memory type/resource, so do

Re: [RFC PATCH v3 04/11] drm, cgroup: Add total GEM buffer allocation limit

2019-06-27 Thread Daniel Vetter
On Thu, Jun 27, 2019 at 02:42:43PM -0400, Kenny Ho wrote: > On Thu, Jun 27, 2019 at 1:43 AM Daniel Vetter wrote: > > > > On Wed, Jun 26, 2019 at 06:41:32PM -0400, Kenny Ho wrote: > > > So without the sharing restriction and some kind of ownership > > > structure, we will have to migrate/change the

Re: [RFC PATCH v3 07/11] drm, cgroup: Add TTM buffer allocation stats

2019-06-27 Thread Daniel Vetter
On Thu, Jun 27, 2019 at 04:17:09PM -0400, Kenny Ho wrote: > On Thu, Jun 27, 2019 at 2:01 AM Daniel Vetter wrote: > > btw reminds me: I guess it would be good to have a per-type .total > > read-only exposed, so that userspace has an idea of how much there is? > > ttm is trying to be agnostic to the

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-06-27 Thread Li, Sun peng (Leo)
Sorry for the late response! just jumping back on this now. On 2019-05-16 5:40 p.m., Lyude Paul wrote: > [CAUTION: External Email] > > So a couple of things: > > On Thu, 2019-05-16 at 11:17 -0400, sunpeng...@amd.com wrote: >> From: Ville Syrjälä >> >> All available downstream ports - physical

Re: [RFC PATCH v3 07/11] drm, cgroup: Add TTM buffer allocation stats

2019-06-27 Thread Welty, Brian
On 6/26/2019 11:01 PM, Daniel Vetter wrote: > On Thu, Jun 27, 2019 at 12:06:13AM -0400, Kenny Ho wrote: >> On Wed, Jun 26, 2019 at 12:12 PM Daniel Vetter wrote: >>> >>> I think with all the ttm refactoring going on I think we need to de-ttm >>> the interface functions here a bit. With Gerd Hoffma

[pull] amdgpu, ttm drm-next-5.3

2019-06-27 Thread Alex Deucher
Hi Dave, Daniel, Arm fix as requested by Dave, plus a few navi fixes. The following changes since commit 14808a12bdbdc21143eba70ea07830197b3a04ff: Merge tag 'drm-next-5.3-2019-06-25' of git://people.freedesktop.org/~agd5f/linux into drm-next (2019-06-27 12:33:57 +1000) are available in the

[PATCH v2 07/27] gpu: drm: remove memset after zalloc

2019-06-27 Thread Fuqian Huang
zalloc has already zeroed the memory. so memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 -- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 2 -- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c| 2 --

[PATCH] drm/amd/powerplay: use hardware fan control if no powerplay fan table

2019-06-27 Thread Evan Quan
Use SMC default fan table if no external powerplay fan table. Change-Id: Icd7467a7fc5287a92945ba0fcc19699192b1683a Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 +++- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + drivers/gpu/drm

[PATCH] drm/amdgpu: fix MGPU fan boost enablement for XGMI reset

2019-06-27 Thread Evan Quan
MGPU fan boost feature should not be enabled until all the devices from the same hive are all back from reset. Change-Id: I03a69434ff28f4eac209bd91320dde8a238a33cf Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 +

Re: [PATCH v2] drm/amdgpu: fix scheduler timeout calc

2019-06-27 Thread Cui, Flora
在 6/27/2019 6:17 PM, Christian König 写道: > Am 27.06.19 um 12:03 schrieb Cui, Flora: >> scheduler timeout is in jiffies >> v2: move timeout check to amdgpu_device_get_job_timeout_settings after >> parsing the value >> >> Change-Id: I26708c163db943ff8d930dd81bcab4b4b9d84eb2 >> Signed-off-by: Flora C

Re: [PATCH 2/2] dma-buf: cleanup shared fence removal

2019-06-27 Thread Koenig, Christian
Am 27.06.19 um 21:57 schrieb Daniel Vetter: > [SNIP] >> Again, the reason to remove the fence from one reservation object is >> simply that it is faster to remove it from one object than to attach a >> new fence to all other objects. > Hm I guess I was lead astray by the eviction_fence invalidation

Re: [PATCH v2] drm/amdgpu: fix scheduler timeout calc

2019-06-27 Thread Koenig, Christian
Am 28.06.19 um 07:32 schrieb Cui, Flora: > 在 6/27/2019 6:17 PM, Christian König 写道: >> Am 27.06.19 um 12:03 schrieb Cui, Flora: >>> scheduler timeout is in jiffies >>> v2: move timeout check to amdgpu_device_get_job_timeout_settings after >>> parsing the value >>> >>> Change-Id: I26708c163db943ff8d

Re: [RFC PATCH v3 07/11] drm, cgroup: Add TTM buffer allocation stats

2019-06-27 Thread Daniel Vetter
On Fri, Jun 28, 2019 at 3:16 AM Welty, Brian wrote: > On 6/26/2019 11:01 PM, Daniel Vetter wrote: > > On Thu, Jun 27, 2019 at 12:06:13AM -0400, Kenny Ho wrote: > >> On Wed, Jun 26, 2019 at 12:12 PM Daniel Vetter wrote: > >>> > >>> I think with all the ttm refactoring going on I think we need to d