Re: [PATCH] drm/amdgpu: add more cases to DCE11 possible crtc mask setup

2017-02-09 Thread Michel Dänzer
On 10/02/17 02:02 PM, Alex Deucher wrote: > Add cases for asics with 3 and 5 crtcs. Fixes an artificial > limitation on asics with 3 or 5 crtcs. > > Fixes: > https://bugs.freedesktop.org/show_bug.cgi?id=99744 > > Signed-off-by: Alex Deucher > Cc: sta...@vger.kernel.org > --- > drivers/gpu/drm/

[PATCH] drm/amdgpu: add more cases to DCE11 possible crtc mask setup

2017-02-09 Thread Alex Deucher
Add cases for asics with 3 and 5 crtcs. Fixes an artificial limitation on asics with 3 or 5 crtcs. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99744 Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ++ 1 file changed, 6 insertion

Re: [PATCH 2/2] drm/amdgpu: use amdgpu_gem_va_check() in amdgpu_gem_va_update_vm()

2017-02-09 Thread zhoucm1
On 2017年02月10日 06:28, Samuel Pitoiset wrote: This removes code duplication. Signed-off-by: Samuel Pitoiset Reviewed-by: Chunming Zhou Thanks, David Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/dr

Re: [PATCH 1/2] drm/amdgpu: drop multiple bo_unreserve() calls in amdgpu_gem_op_ioctl()

2017-02-09 Thread zhoucm1
On 2017年02月10日 06:28, Samuel Pitoiset wrote: Move amdgpu_bo_unreserve() outside of the switch. While we are at it, add a missing break in the default case. Signed-off-by: Samuel Pitoiset --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-

[PATCH 1/2] drm/amdgpu: drop multiple bo_unreserve() calls in amdgpu_gem_op_ioctl()

2017-02-09 Thread Samuel Pitoiset
Move amdgpu_bo_unreserve() outside of the switch. While we are at it, add a missing break in the default case. Signed-off-by: Samuel Pitoiset --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_g

[PATCH 2/2] drm/amdgpu: use amdgpu_gem_va_check() in amdgpu_gem_va_update_vm()

2017-02-09 Thread Samuel Pitoiset
This removes code duplication. Signed-off-by: Samuel Pitoiset --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index ae4658a10e2c..76569e31bfd8

[PATCH 1/8] drm/amdgpu: Expose mode_config functions for DM

2017-02-09 Thread Harry Wentland
Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 33 + 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_display.h diff --git a/

[PATCH 4/8] drm/amd/display: Remove unused define from amdgpu_dm_types

2017-02-09 Thread Harry Wentland
Change-Id: Idfd0d0d6e537eddbc75378ba394b0f36bd89dd50 Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.h b/drivers/gpu/drm/amd/display/amdgpu_dm/a

[PATCH 0/8] Refactor DC atomic commit and gamma

2017-02-09 Thread Harry Wentland
These patches are first steps of addressing some of the problems in DC's atomic implementation. Please take a look and provide feedback if possible. Our hope is that we can start setting a direction on fixing up DC to do atomic correctly and lay the groundwork for moving past the midlayer. THe big

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

2017-02-09 Thread Harry Wentland
This reverts commit cb341a319f7e66f879d69af929c3dadfc1a8f31e. --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 136 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h| 15 --- 2 files changed, 28 insertions(+), 123 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 6/8] drm/amd/display: Refactor atomic commit implementation.

2017-02-09 Thread Harry Wentland
From: Andrey Grodzovsky Modify amdgpu_dm_atomic_comit to implement atomic_comit_tail hook. Unify Buffer objects allocation and dealocation for surface updates and page flips. Simplify wait for fences and target_vbank logic for non blockiing commit. Remove hacky update surface to page flip synchro

[PATCH 7/8] drm/amd/display: Refactor headless to use atomic commit.

2017-02-09 Thread Harry Wentland
From: Andrey Grodzovsky Headless mode set needs to be synchronized against outstanding nonblocking commits. This achieved by building atomic state and commiting it. Change-Id: Ie5e778afb33dd5c303a169216a7bb8c2d857037e Signed-off-by: Andrey Grodzovsky --- .../drm/amd/display/amdgpu_dm/amdgpu_dm

[PATCH 5/8] drm/amdgpu: Add a few members to support DAL atomic refactor.

2017-02-09 Thread Harry Wentland
From: Andrey Grodzovsky Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h index fda53fa0313f..1e77136d6f0c 100644 --- a/driver

[PATCH 3/8] drm/amd/display: Use atomic helpers for gamma

2017-02-09 Thread Harry Wentland
We were using set_properties and gamma in a weird way. This change aligns the properties with other drivers and allows us to remove a private gamma flag and reuse atomic helpers for most of this. Change-Id: Ic74b692ee6c6d3e4fd938c6226e65b54075ff983 Signed-off-by: Harry Wentland --- .../drm/amd/d

[PATCH 2/8] drm/amd/display: Use amdgpu mode funcs statically

2017-02-09 Thread Harry Wentland
No need to assign them dynamically. This is much more readable. Change-Id: I2d8a356e8d916800c4553c4e9b19ce42f7f1c391 Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd

Re: Change queue/pipe split between amdkfd and amdgpu

2017-02-09 Thread Andres Rodriguez
Hey Oded, Sorry to be a nuisance, but if you have everything still setup could you give this fix a quick go? diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 5321d18..9f70ee0 100644 --- a/drivers/gpu/drm/amd/amdk

Re: Change queue/pipe split between amdkfd and amdgpu

2017-02-09 Thread Andres Rodriguez
Thanks Oded for the test results. I'll work on a fix. Regards, Andres On Thu, Feb 9, 2017 at 3:11 PM, Oded Gabbay wrote: > Andres, > > I tried your patches on Kaveri with airlied's drm-next branch. > I used radeon+amdkfd > > The following test failed: KFDQMTest.CreateMultipleCpQueues > Howeve

Re: Change queue/pipe split between amdkfd and amdgpu

2017-02-09 Thread Oded Gabbay
Andres, I tried your patches on Kaveri with airlied's drm-next branch. I used radeon+amdkfd The following test failed: KFDQMTest.CreateMultipleCpQueues However, I can't debug it because I don't have the sources of kfdtest. In dmesg, I saw the following warning during boot: WARNING: CPU: 0 PID:

Re: PRT support for amdgpu v3

2017-02-09 Thread Bas Nieuwenhuizen
Tested on amd-staging-4.9 + these patches, and it works for me too. Thanks, Bas Nieuwenhuizen On Wed, Feb 8, 2017, at 16:04, Christian König wrote: > Hi guys, > > ok I finally found time to write an unit test for this and hammered out > the last few bugs. > > Seems to work fine on my Tonga now.

[pull] radeon and amdgpu drm-next-4.11

2017-02-09 Thread Alex Deucher
Hi Dave, Some additional fixes for 4.11. Delayed a bit due to Chinese New Year. Highlights: - Powerplay fixes - VCE and UVD powergating fixes - Clean up amdgpu SI gfx code to match CI and VI - Misc bug fixes The following changes since commit 18566acac18f5784347bc5fe636a26897d1c963b: Merge b

[PATCH] drm/amd/amdgpu: Update read_sensor calls to have size parameter

2017-02-09 Thread Tom St Denis
This update allows sensors to return more than 1 value and indicates to the caller how many bytes are written. The debugfs interface has been updated to handle reading all of the values. Simply seek to the enum value (multiplied by 4) and then read as many bytes as the sensor provides. Signed-of

Re: [PATCH libdrm 1/2] amdgpu: add AMDGPU_VM_PAGE_PRT

2017-02-09 Thread Emil Velikov
On 8 February 2017 at 12:34, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > This is a new kernel interface. > > Signed-off-by: Nicolai Hähnle > --- > include/drm/amdgpu_drm.h | 2 ++ Hi Nicolai, Please see the "When and how to update these files" section in the README -Emil _

Re: [PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-09 Thread Christian König
Am 09.02.2017 um 11:33 schrieb Samuel Pitoiset: When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible recursive locking detected" in this codepath. For debugging purposes, I also added a "WARN_ON(ww_mutex_is_locked())" when ttm_bo_init(

Re: PRT support for amdgpu v3

2017-02-09 Thread Christian König
Am 09.02.2017 um 11:11 schrieb Nicolai Hähnle: On 08.02.2017 16:04, Christian König wrote: Hi guys, ok I finally found time to write an unit test for this and hammered out the last few bugs. Seems to work fine on my Tonga now. Please note that this set is based on "fix race in GEM VA map IO

Re: [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset

2017-02-09 Thread Christian König
Am 09.02.2017 um 15:37 schrieb Deucher, Alexander: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Monk Liu Sent: Thursday, February 09, 2017 12:46 AM To: amd-gfx@lists.freedesktop.org Cc: Liu, Monk Subject: [PATCH] drm/amdgpu:use hw_init for s

RE: [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset

2017-02-09 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Monk Liu > Sent: Thursday, February 09, 2017 12:46 AM > To: amd-gfx@lists.freedesktop.org > Cc: Liu, Monk > Subject: [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset > > no suspend invoked

RE: [PATCH] drm/amdgpu:remove unused macro

2017-02-09 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Monk Liu > Sent: Thursday, February 09, 2017 12:49 AM > To: amd-gfx@lists.freedesktop.org > Cc: Liu, Monk > Subject: [PATCH] drm/amdgpu:remove unused macro > > Change-Id: I37901358f0dc3e24c0b

[PATCH v2 2/2] drm/amdgpu: report the number of bytes moved at buffer creation

2017-02-09 Thread Samuel Pitoiset
Like ttm_bo_validate(), ttm_bo_init() might need to move BO and the number of bytes moved by TTM should be reported. This can help the throttle buffer migration mechanism to make a better decision. v2: fix computation Signed-off-by: Samuel Pitoiset --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH v2 1/2] drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()

2017-02-09 Thread Samuel Pitoiset
When ttm_bo_init() fails, the reservation mutex should be unlocked. In debug build, the kernel reported "possible recursive locking detected" in this codepath. For debugging purposes, I also added a "WARN_ON(ww_mutex_is_locked())" when ttm_bo_init() fails and the mutex was locked as expected. Thi

Re: [PATCH 2/2] drm/amdgpu: report the number of bytes moved at buffer creation

2017-02-09 Thread Samuel Pitoiset
On 02/09/2017 01:58 AM, Michel Dänzer wrote: On 09/02/17 08:35 AM, Samuel Pitoiset wrote: Like ttm_bo_validate(), ttm_bo_init() might need to move BO and the number of bytes moved by TTM should be reported. This can help the throttle buffer migration mechanism to make a better decision. Signe

Re: PRT support for amdgpu v3

2017-02-09 Thread Nicolai Hähnle
On 08.02.2017 16:04, Christian König wrote: Hi guys, ok I finally found time to write an unit test for this and hammered out the last few bugs. Seems to work fine on my Tonga now. Please note that this set is based on "fix race in GEM VA map IOCTL v2", without that patch you will run into a N