[PATCH 3/4] drm/amdgpu: Add kgd kfd interface get_tile_config()

2017-08-11 Thread Felix Kuehling
From: Yong Zhao Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 29 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 28 +- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 12 +

[PATCH 2/4] drm/amdkfd: Adding new IOCTL for scratch memory

2017-08-11 Thread Felix Kuehling
From: Moses Reuben Signed-off-by: Moses Reuben Signed-off-by: Ben Goz Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 44 ++ drivers/gpu/drm/amd/amdkfd/kfd_device.c| 3 ++ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

[PATCH 0/4] More KFD features to make the runtime happy

2017-08-11 Thread Felix Kuehling
This patch series adds two more features that are needed to get the current HSA runtime to initialize successfully. With this I am able to run OCL tests from the current (upcoming) ROCm release on CZ. Moses Reuben (2): drm/amdgpu: Adding new kgd/kfd interface functions to support scratch mem

Re: [PATCH 18/19] drm/amdgpu: Disable GFX PG on CZ

2017-08-11 Thread StDenis, Tom
Hi Felix, Well it's really up to Christian and Alex but I'd keep an eye on this since it'll cause issues with embedded down the road. I happen to have a CZ system so I could possibly try and bisect 4.11/4.12 and see if there's any stable points for you guys. Is there a short and simple KFD se

Re: [PATCH 18/19] drm/amdgpu: Disable GFX PG on CZ

2017-08-11 Thread Felix Kuehling
Yes, I'm up-to-date. KFD doesn't use the KIQ to map the HIQ. And HIQ maps all our other queues (unless we're disabling the hardware scheduler). Regards, Felix On 2017-08-11 07:45 PM, StDenis, Tom wrote: > Hi Felix, > > I'm assuming your tree is up to date with amd-staging-4.11 or 4.12 but we d

[PATCH 16/19] drm/amdkfd: Update PM4 packet headers

2017-08-11 Thread Felix Kuehling
To match current firmware. The map process packet has been extended to support scratch. This is a non-backwards compatible change and it's about two years old. So no point keeping the old version around conditionally. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c

[PATCH 19/19] drm/amd: Update MEC HQD loading code for KFD

2017-08-11 Thread Felix Kuehling
Various bug fixes and improvements that accumulated over the last two years. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 16 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 130 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c

[PATCH 05/19] drm/amdkfd: Clean up KFD style errors and warnings

2017-08-11 Thread Felix Kuehling
From: Kent Russell Using checkpatch.pl -f showed a number of style issues. This patch addresses as many of them as possible. Some long lines have been left for readability, but attempts to minimize them have been made. Signed-off-by: Kent Russell Signed-off-by: Felix Kuehling --- drivers/gpu

[PATCH 10/19] drm/amdkfd: Remove BUG_ONs for NULL pointer arguments

2017-08-11 Thread Felix Kuehling
Remove BUG_ONs that check for NULL pointer arguments that are dereferenced in the same function. Dereferencing the NULL pointer will generate a BUG anyway, so the explicit check is redundant and unnecessary overhead. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c

[PATCH 02/19] drm/amdkfd: Fix typo in dbgdev_wave_reset_wavefronts

2017-08-11 Thread Felix Kuehling
Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c b/drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c index d5e19b5..8b14a4e 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_dbgde

[PATCH 08/19] drm/amdkfd: Fix goto usage

2017-08-11 Thread Felix Kuehling
From: Kent Russell Remove gotos that do not feature any common cleanup, and use gotos instead of repeating cleanup commands. According to kernel.org: "The goto statement comes in handy when a function exits from multiple locations and some common work such as cleanup has to be done. If there is

[PATCH 07/19] drm/amdkfd: Change x==NULL/false references to !x

2017-08-11 Thread Felix Kuehling
From: Kent Russell Upstream prefers the !x notation to x==NULL or x==false. Along those lines change the ==true or !=NULL references as well. Also make the references to !x the same, excluding () for readability. Signed-off-by: Kent Russell Signed-off-by: Felix Kuehling --- drivers/gpu/drm/am

[PATCH 11/19] drm/amdkfd: Fix doorbell initialization and finalization

2017-08-11 Thread Felix Kuehling
Handle errors in doorbell aperture initialization instead of BUG_ON. iounmap doorbell aperture during finalization. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 9 - drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 13 +++-- drivers/gpu/drm/amd/amdkfd

[PATCH 01/19] drm/amdkfd: Fix double Mutex lock order

2017-08-11 Thread Felix Kuehling
From: Yair Shachar Signed-off-by: Yair Shachar --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 6316aad..2a45718e 100644 --- a/drivers

[PATCH 04/19] drm/amdkfd: Fix allocated_queues bitmap initialization

2017-08-11 Thread Felix Kuehling
Use shared_resources.queue_bitmap to determine the queues available for KFD in each pipe. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device

[PATCH 14/19] drm/amdkfd: Add more error printing to help bringup

2017-08-11 Thread Felix Kuehling
From: Yong Zhao Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index f628ac3..e

[PATCH 13/19] drm/amdkfd: Handle remaining BUG_ONs more gracefully

2017-08-11 Thread Felix Kuehling
In most cases, BUG_ONs can be replaced with WARN_ON with an error return. In some void functions just turn them into a WARN_ON and possibly an early exit. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c| 3 +- drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c

[PATCH 15/19] drm/amdkfd: Clamp EOP queue size correctly on Gfx8

2017-08-11 Thread Felix Kuehling
From: Jay Cornwall Gfx8 HW incorrectly clamps CP_HQD_EOP_CONTROL.EOP_SIZE, which can lead to scheduling deadlock due to SE EOP done counter overflow. Enforce a EOP queue size limit which prevents the CP from sending more than 0xFF events at a time. Signed-off-by: Jay Cornwall Reviewed-by: Feli

[PATCH 06/19] drm/amdkfd: Consolidate and clean up log commands

2017-08-11 Thread Felix Kuehling
From: Kent Russell Consolidate log commands so that dev_info(NULL, "Error...") uses the more accurate pr_err, remove the module name from the log (can be seen via dynamic debugging with +m), and the function name (can be seen via dynamic debugging with +f). We also don't need debug messages sayin

Re: [PATCH 0/3] dma-buf changes for ttm and amdgpu

2017-08-11 Thread Sumit Semwal
Hi Alex, On 10 August 2017 at 22:31, Alex Deucher wrote: > We have some changes in ttm and amdgpu that depend on these patches. > Sumit, can you pull these in via dma-buf or should I roll them up > through my amdgpu tree? > > Christian König (3): > dma-buf: dma_fence_put is NULL safe > dma-bu

[PATCH v3 01/28] drm/amdgpu: switch to drm_*_get(), drm_*_put() helpers

2017-08-11 Thread Cihangir Akturk
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and drm_*_unreference() helpers. drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() and should not be used by new code. So convert all users of compatibility functions

[PATCH v3 19/28] drm/radeon: switch to drm_*_get(), drm_*_put() helpers

2017-08-11 Thread Cihangir Akturk
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and drm_*_unreference() helpers. drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() and should not be used by new code. So convert all users of compatibility functions

[PATCH v3 00/28] DRM API Conversions

2017-08-11 Thread Cihangir Akturk
Changes since v2: - Patch series is based on *drm-misc-next* as suggested by Sean Paul. - Dropped patch 05 (drm/atmel-hlcdc) and patch 25 (drm/vc4) from v2, since they were already pulled in the drm-misc-next Changes since v1: - This time patches were generated with coccinelle instead of my o

Re: [PATCH 6/6] drm/amdgpu/cik: add IP modules for DC for APUs

2017-08-11 Thread Harry Wentland
On 2017-08-11 09:23 AM, Deucher, Alexander wrote: >> -Original Message- >> From: Wentland, Harry >> Sent: Thursday, August 10, 2017 9:49 PM >> To: Alex Deucher; amd-gfx@lists.freedesktop.org >> Cc: Deucher, Alexander >> Subject: Re: [PATCH 6/6] drm/amdgpu/cik: add IP modules for DC for AP

Re: [PATCH 2/2] drm/amd/display/dc: make dce120_link_encoder_create static

2017-08-11 Thread Harry Wentland
On 2017-08-11 09:22 AM, Deucher, Alexander wrote: >> -Original Message- >> From: Wentland, Harry >> Sent: Thursday, August 10, 2017 9:41 PM >> To: Alex Deucher; amd-gfx@lists.freedesktop.org >> Cc: Deucher, Alexander >> Subject: Re: [PATCH 2/2] drm/amd/display/dc: make >> dce120_link_encode

RE: [PATCH 6/6] drm/amdgpu/cik: add IP modules for DC for APUs

2017-08-11 Thread Deucher, Alexander
> -Original Message- > From: Wentland, Harry > Sent: Thursday, August 10, 2017 9:49 PM > To: Alex Deucher; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH 6/6] drm/amdgpu/cik: add IP modules for DC for APUs > > All patches are > Reviewed-by: Harry Wentland Do

RE: [PATCH 2/2] drm/amd/display/dc: make dce120_link_encoder_create static

2017-08-11 Thread Deucher, Alexander
> -Original Message- > From: Wentland, Harry > Sent: Thursday, August 10, 2017 9:41 PM > To: Alex Deucher; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH 2/2] drm/amd/display/dc: make > dce120_link_encoder_create static > > Both patches are > Reviewed-by: Harr

[PATCH] first is incorrect if hit NULL/signaled fence

2017-08-11 Thread Monk Liu
From: Monk Liu Change-Id: Id65a5bc54db074ea7885203bb098665afb052448 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 4e7265d..c48a321 1006

Re: [PATCH] drm/amd/amdgpu: fix bug fail to remove debugfs when rmmod

2017-08-11 Thread Christian König
Hi Annie, well something is clearly not working as expected here. All those files are registered with drm_debugfs_create_files() and should automatically be removed when drm_debugfs_cleanup() is called. Can you figure out what is going wrong here? Thanks, Christian. Am 11.08.2017 um 04:25 s

Re: [PATCH libdrm] drm/amdgpu: add new low overhead command submission API. (v2)

2017-08-11 Thread Christian König
Am 10.08.2017 um 21:43 schrieb Dave Airlie: On 10 August 2017 at 23:56, Emil Velikov wrote: Hi Dave, On 18 July 2017 at 04:52, Dave Airlie wrote: +int amdgpu_cs_submit_raw(amdgpu_device_handle dev, +amdgpu_context_handle context, +amdgpu_bo_li