Re: [PATCH] drm/amd/amdgpu: Print out ring name in dev_info

2017-04-19 Thread Tom St Denis
On 19/04/17 11:07 AM, Christian König wrote: Am 19.04.2017 um 17:03 schrieb Tom St Denis: So it's more obvious which rings are using which INV engines. Signed-off-by: Tom St Denis I wonder if we shouldn't stop printing the ring numbers completely in the ring and IB

Re: [PATCH] drm/amd/amdgpu: Print out ring name in dev_info

2017-04-19 Thread Christian König
Am 19.04.2017 um 17:03 schrieb Tom St Denis: So it's more obvious which rings are using which INV engines. Signed-off-by: Tom St Denis I wonder if we shouldn't stop printing the ring numbers completely in the ring and IB tests as well and always use the ring name. But

[PATCH] drm/amdgpu: fix amdgpu_vm_clear_freed

2017-04-19 Thread Christian König
From: Christian König Use amdgpu_vm_bo_update_mapping() instead of amdgpu_vm_bo_split_mapping() here. We don't want any flags set in the cleared areas and splitting should be unnecessary. Signed-off-by: Christian König ---

[PATCH] drm/amd/amdgpu: Print out ring name in dev_info

2017-04-19 Thread Tom St Denis
So it's more obvious which rings are using which INV engines. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

Re: [rfc repost] drm sync objects - a new beginning (make ickle happier?)

2017-04-19 Thread James Jones
On 04/19/2017 05:07 AM, Christian König wrote: Am 13.04.2017 um 03:41 schrieb Dave Airlie: Okay I've taken Chris's suggestions to heart and reworked things around a sem_file to see how they might look. This means the drm_syncobj are currently only useful for semaphores, the flags field could

Re: [rfc repost] drm sync objects - a new beginning (make ickle happier?)

2017-04-19 Thread Dave Airlie
On 19 April 2017 at 22:07, Christian König wrote: > Am 13.04.2017 um 03:41 schrieb Dave Airlie: >> >> Okay I've taken Chris's suggestions to heart and reworked things >> around a sem_file to see how they might look. >> >> This means the drm_syncobj are currently only

RE: [PATCH 2/2] drm/amd/amdgpu: Change comp GFXv9 ring name to remove space

2017-04-19 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Tom St Denis > Sent: Wednesday, April 19, 2017 9:11 AM > To: amd-gfx@lists.freedesktop.org > Cc: StDenis, Tom > Subject: [PATCH 2/2] drm/amd/amdgpu: Change comp GFXv9 ring name to > remove

Re: [PATCH V2] drm/amdgpu: Destroy psp ring in hw_fini

2017-04-19 Thread Alex Deucher
On Tue, Apr 18, 2017 at 3:04 AM, Trigger Huang wrote: > Fix issue that PSP initialization will fail if reload amdgpu module. > That's because the PSP ring must be destroyed to be ready for the > next time PSP initialization. > > Changes in v2: > - Move

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

2017-04-19 Thread Felix Kuehling
On 17-04-11 10:23 PM, Michel Dänzer wrote: > One possibility would be making each driver also parse the other > driver's module parameter on the kernel command line. I.e. radeon would > parse > > amdgpu.enable_cik=0 I looked for a way to do this. I think I figured out the parsing part. But I

Re: [rfc repost] drm sync objects - a new beginning (make ickle happier?)

2017-04-19 Thread Dave Airlie
On 20 April 2017 at 04:42, Dave Airlie wrote: > On 19 April 2017 at 22:07, Christian König wrote: >> Am 13.04.2017 um 03:41 schrieb Dave Airlie: >>> >>> Okay I've taken Chris's suggestions to heart and reworked things >>> around a sem_file to see how

RE: [PATCH] drm/amdgpu: fix amdgpu_vm_clear_freed

2017-04-19 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Christian König > Sent: Wednesday, April 19, 2017 10:07 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH] drm/amdgpu: fix amdgpu_vm_clear_freed > > From: Christian König

[PATCH 1/2] drm/amdgpu: add gtt print like vram when dump mm table V2

2017-04-19 Thread Chunming Zhou
Change-Id: If0474e24e14d237d2d55731871c5ceb11e5a3601 Signed-off-by: Chunming Zhou Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +- 2 files

[PATCH 2/2] drm/amdgpu: increase gtt size to 3GB by default

2017-04-19 Thread Chunming Zhou
Change-Id: Icdf2486a2d1116e71dc8958cda679a4a83838489 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

[PATCH V3] drm/amdgpu: Destroy psp ring in hw_fini

2017-04-19 Thread Trigger Huang
Fix issue that PSP initialization will fail if reload amdgpu module. That's because the PSP ring must be destroyed to be ready for the next time PSP initialization. Changes in v2: - Move psp_ring_destroy before all BOs free (suggested by Ray Huang). Changes in v3: -

RE: [PATCH V2] drm/amdgpu: Destroy psp ring in hw_fini

2017-04-19 Thread Huang, Trigger
Hi Ray, Thanks for your suggestions. As discussed, free adev->firmware.rbuf is still needed. I have made a patch V3 according to your suggestions. Thanks & Best Wishes, Trigger Huang -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Huang

RE: [PATCH V2] drm/amdgpu: Destroy psp ring in hw_fini

2017-04-19 Thread Huang, Trigger
Hi Alex, Thanks for your help. Thanks & Best Wishes, Trigger Huang -Original Message- From: Alex Deucher [mailto:alexdeuc...@gmail.com] Sent: Thursday, April 20, 2017 3:18 AM To: Huang, Trigger Cc: amd-gfx list ; Huang, Ray

Re: [PATCH V2] drm/amdgpu: Destroy psp ring in hw_fini

2017-04-19 Thread Huang Rui
On Tue, Apr 18, 2017 at 03:04:45PM +0800, Trigger Huang wrote: > Fix issue that PSP initialization will fail if reload amdgpu module. > That's because the PSP ring must be destroyed to be ready for the > next time PSP initialization. > > Changes in v2: > - Move psp_ring_destroy before all

Re: [PATCH] dmr/amdgpu: Fix wrongly unref of BO

2017-04-19 Thread Christian König
Hi AlexBin, the answer is ttm_bo_kunmap isn't called at all and yes in the case of an iomap we leak the address space reserved. But that is completely harmless on a 64bit system compared to leaking the memory backing the address space. Using amdgpu_bo_free_kernel() instead of openly coding

Re: [libdrm] amdgpu/: concisely && consistently check null ptrs in canonical form

2017-04-19 Thread Nicolai Hähnle
On 18.04.2017 18:20, Edward O'Callaghan wrote: Be consistent and use the canonical form while sanity checking null pointers, also combine a few branches for brevity. Signed-off-by: Edward O'Callaghan Sure, it's a good cleanup. Feel free to add the corresponding

Re: [PATCH 1/3] drm/amdgpu: fix gtt mgr available statistics

2017-04-19 Thread Christian König
Am 19.04.2017 um 08:52 schrieb zhoucm1: On 2017年04月19日 14:38, Christian König wrote: Am 19.04.2017 um 05:50 schrieb Chunming Zhou: gtt_mgr_alloc is called by many places in local driver, while gtt_mgr_new is called by get_node in ttm. NAK, that can lead to over allocating the address space

Re: SPAM //Re: [PATCH] drm/amdgpu: reserve space before adding a shared fence

2017-04-19 Thread Christian König
Am 10.04.2017 um 09:11 schrieb Zhang, Jerry (Junwei): On 04/10/2017 03:02 PM, Christian König wrote: Mhm, did you run into an actual issue or was that just from reading the code? Just reading the code. (maybe adding the prefix [RFC] is better) Yeah, that is usually a good idea, but I'm

Re: [RfC PATCH] drm: fourcc byteorder: brings header file comments in line with reality.

2017-04-19 Thread Gerd Hoffmann
Hi, > > >> BTW, this supports Gerd's patch, since the KMS fbdev emulation code uses > > >> e.g. DRM_FORMAT_XRGB for depth/bpp 24/32, and the fbdev API uses > > >> native endian packed colour values. > > > > > > Same is true for DRM_IOCTL_MODE_ADDFB, with depth/bpp 24/32 you'll get > > >

[PATCH 1/2] drm/amd/amdgpu: Change comp GFXv6 ring name to remove space

2017-04-19 Thread Tom St Denis
umr expects the ring name to be a complete word. This also makes it consistent with GFXv7/8. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c

Re: [PATCH 1/2] drm/amd/amdgpu: Change comp GFXv6 ring name to remove space

2017-04-19 Thread Christian König
Am 19.04.2017 um 15:10 schrieb Tom St Denis: umr expects the ring name to be a complete word. This also makes it consistent with GFXv7/8. Signed-off-by: Tom St Denis Reviewed-by: Christian König for both. ---

Re: [PATCH 4/6] drm/amdgpu: implement lru amdgpu_queue_mgr policy for compute v4

2017-04-19 Thread Christian König
Am 14.04.2017 um 00:04 schrieb Andres Rodriguez: Use an LRU policy to map usermode rings to HW compute queues. Most compute clients use one queue, and usually the first queue available. This results in poor pipe/queue work distribution when multiple compute apps are running. In most cases pipe

Re: [PATCH 1/3] drm/amdgpu: Remove redundant itermediate return val in sdma_v4_0.c

2017-04-19 Thread Christian König
Am 17.04.2017 um 14:05 schrieb Rex Zhu: Change-Id: I27aca4ad0f06f01390c92ed7a520e9c89e99b13d Signed-off-by: Rex Zhu Reviewed-by: Christian König for the whole series. --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 +- 1 file changed, 1

Re: [PATCH v2] drm/amdgpu: PRT support for gfx9 (v2)

2017-04-19 Thread Christian König
Am 19.04.2017 um 10:10 schrieb Zhang, Jerry (Junwei): On 04/19/2017 03:28 PM, Christian König wrote: Am 19.04.2017 um 03:53 schrieb Junwei Zhang: v2: unify PRT bit for all ASICs Signed-off-by: Junwei Zhang Acked-by: David Zhou ---

Re: [rfc repost] drm sync objects - a new beginning (make ickle happier?)

2017-04-19 Thread Christian König
Am 13.04.2017 um 03:41 schrieb Dave Airlie: Okay I've taken Chris's suggestions to heart and reworked things around a sem_file to see how they might look. This means the drm_syncobj are currently only useful for semaphores, the flags field could be used in future to use it for other things, and

Re: [PATCH] drm/amdgpu: fix amdgpu_vm_clear_freed

2017-04-19 Thread Zhang, Jerry (Junwei)
On 04/19/2017 10:07 PM, Christian König wrote: From: Christian König Use amdgpu_vm_bo_update_mapping() instead of amdgpu_vm_bo_split_mapping() here. We don't want any flags set in the cleared areas and splitting should be unnecessary. Yeah, the mappings in the

Re: [PATCH] dmr/amdgpu: Fix wrongly unref of BO

2017-04-19 Thread Xie, AlexBin
Hi Christian, Without correctly kunmap, page table is corrupted. Page entries point to wrong memory locations. You might call it completely harmless. But I think this is a severe bug. Leaking memory is better than a corrupted page table. Think security. Would you provide any document and

Re: [PATCH] dmr/amdgpu: Fix wrongly unref of BO

2017-04-19 Thread Christian König
Without correctly kunmap, page table is corrupted. Page entries point to wrong memory locations. You might call it completely harmless. But I think this is a severe bug. Leaking memory is better than a corrupted page table. Think security. We are talking about the page tables for the vmalloc

RE: [PATCH V2] drm/amdgpu: Destroy psp ring in hw_fini

2017-04-19 Thread Huang, Trigger
Hi, Would you please help to review this patch? Thanks & Best Wishes, Trigger Huang -Original Message- From: Trigger Huang [mailto:trigger.hu...@amd.com] Sent: Tuesday, April 18, 2017 3:05 PM To: amd-gfx@lists.freedesktop.org Cc: Liu, Monk ; Yu, Xiangliang

Re: [PATCH V2] drm/amdgpu: Destroy psp ring in hw_fini

2017-04-19 Thread Huang Rui
On Thu, Apr 20, 2017 at 08:53:54AM +0800, Huang Rui wrote: > On Tue, Apr 18, 2017 at 03:04:45PM +0800, Trigger Huang wrote: > > +int psp_v3_1_ring_destroy(struct psp_context *psp, enum psp_ring_type > > ring_type) > > +{ > > + int ret = 0; > > + struct psp_ring *ring; > > +

[PATCH] drm/amdgpu: update smu9 driver interface

2017-04-19 Thread Evan Quan
Signed-off-by: Evan Quan Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/inc/smu9_driver_if.h | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu9_driver_if.h

Re: [PATCH] drm/amdgpu: update smu9 driver interface

2017-04-19 Thread Alex Deucher
On Wed, Apr 19, 2017 at 9:52 PM, Evan Quan wrote: > Signed-off-by: Evan Quan > Signed-off-by: Alex Deucher Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/powerplay/inc/smu9_driver_if.h | 18

Re: [PATCH 1/3] drm/amdgpu: fix gtt mgr available statistics

2017-04-19 Thread zhoucm1
On 2017年04月19日 17:40, Christian König wrote: Am 19.04.2017 um 11:15 schrieb zhoucm1: On 2017年04月19日 14:59, Christian König wrote: Am 19.04.2017 um 08:52 schrieb zhoucm1: On 2017年04月19日 14:38, Christian König wrote: Am 19.04.2017 um 05:50 schrieb Chunming Zhou: gtt_mgr_alloc is called

Re: [PATCH 3/3] drm/amdgpu: move gtt usage statistic to gtt mgr

2017-04-19 Thread Christian König
Am 19.04.2017 um 05:50 schrieb Chunming Zhou: Change-Id: Ifea42c8ae2206143d7e22b35eea537ba9e928fe8 Signed-off-by: Chunming Zhou Nice idea for a cleanup, but please do even a few more things: 1. Rebase on not moving the statistics from mgr_new to mgr_alloc. 2. Joing

Re: [PATCH 1/3] drm/amdgpu: fix gtt mgr available statistics

2017-04-19 Thread zhoucm1
On 2017年04月19日 14:38, Christian König wrote: Am 19.04.2017 um 05:50 schrieb Chunming Zhou: gtt_mgr_alloc is called by many places in local driver, while gtt_mgr_new is called by get_node in ttm. NAK, that can lead to over allocating the address space and we can't handle that during

Re: [PATCH 1/3] drm/amdgpu: fix gtt mgr available statistics

2017-04-19 Thread Christian König
Am 19.04.2017 um 05:50 schrieb Chunming Zhou: gtt_mgr_alloc is called by many places in local driver, while gtt_mgr_new is called by get_node in ttm. NAK, that can lead to over allocating the address space and we can't handle that during suspend/resume. Regards, Christian. Change-Id:

Re: [PATCH 2/3] drm/amdgpu: add gtt print like vram when dump mm table

2017-04-19 Thread Christian König
Am 19.04.2017 um 05:50 schrieb Chunming Zhou: Change-Id: If0474e24e14d237d2d55731871c5ceb11e5a3601 Signed-off-by: Chunming Zhou One nit pick below. --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 2

Re: [PATCH v2] drm/amdgpu: PRT support for gfx9 (v2)

2017-04-19 Thread Christian König
Am 19.04.2017 um 03:53 schrieb Junwei Zhang: v2: unify PRT bit for all ASICs Signed-off-by: Junwei Zhang Acked-by: David Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 ++- 2 files changed, 7

Re: [PATCH v2] drm/amdgpu: PRT support for gfx9 (v2)

2017-04-19 Thread Zhang, Jerry (Junwei)
On 04/19/2017 03:28 PM, Christian König wrote: Am 19.04.2017 um 03:53 schrieb Junwei Zhang: v2: unify PRT bit for all ASICs Signed-off-by: Junwei Zhang Acked-by: David Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +

Re: [PATCH 1/3] drm/amdgpu: fix gtt mgr available statistics

2017-04-19 Thread Christian König
Am 19.04.2017 um 11:15 schrieb zhoucm1: On 2017年04月19日 14:59, Christian König wrote: Am 19.04.2017 um 08:52 schrieb zhoucm1: On 2017年04月19日 14:38, Christian König wrote: Am 19.04.2017 um 05:50 schrieb Chunming Zhou: gtt_mgr_alloc is called by many places in local driver, while

Re: [PATCH 1/3] drm/amdgpu: fix gtt mgr available statistics

2017-04-19 Thread zhoucm1
On 2017年04月19日 14:59, Christian König wrote: Am 19.04.2017 um 08:52 schrieb zhoucm1: On 2017年04月19日 14:38, Christian König wrote: Am 19.04.2017 um 05:50 schrieb Chunming Zhou: gtt_mgr_alloc is called by many places in local driver, while gtt_mgr_new is called by get_node in ttm. NAK,