FW: [PATCH] drm/ttm: fix ttm client driver (e.g. amdgpu) reload issue

2019-06-05 Thread Liu, Monk
-Original Message- From: Monk Liu Sent: Wednesday, June 5, 2019 2:45 PM To: amd-gfx@lists.freedesktop.org Cc: Liu, Monk Subject: [PATCH] drm/ttm: fix ttm client driver (e.g. amdgpu) reload issue need to clear bo glob and mem glob during their release otherwise their member value woul

Re: FW: [PATCH] drm/ttm: fix ttm client driver (e.g. amdgpu) reload issue

2019-06-05 Thread Koenig, Christian
This should already be fixed by patch "drm/ttm: fix re-init of global structures". Christian. Am 05.06.19 um 09:29 schrieb Liu, Monk: > > -Original Message- > From: Monk Liu > Sent: Wednesday, June 5, 2019 2:45 PM > To: amd-gfx@lists.freedesktop.org > Cc: Liu, Monk > Subject: [PATCH] d

Re: [PATCH] drm/amdgpu/{uvd,vcn}: fetch ring's read_ptr after alloc

2019-06-05 Thread Koenig, Christian
Am 05.06.19 um 03:35 schrieb S, Shirish: > Hi Alex, > > On 6/4/2019 9:43 PM, Alex Deucher wrote: >> On Tue, Jun 4, 2019 at 12:07 PM S, Shirish wrote: >>> [What] >>> readptr read always returns zero, since most likely >>> UVD block is either power or clock gated. >>> >>> [How] >>> fetch rptr after

Re: [PATCH] drm/ttm: fix ttm_bo_unreserve

2019-06-05 Thread Christian König
Am 04.06.19 um 21:03 schrieb Zeng, Oak: Regards, Oak -Original Message- From: amd-gfx On Behalf Of Kuehling, Felix Sent: Tuesday, June 4, 2019 2:47 PM To: Christian König ; dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/ttm: fix ttm_bo_unreser

Re: [PATCH] drm/amdgpu: bump the DRM version for GDS ENOMEM fixes

2019-06-05 Thread Christian König
Am 05.06.19 um 04:50 schrieb Marek Olšák: From: Marek Olšák Signed-off-by: Marek Olšák Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/d

[PATCH] drm/amdgpu: register pm sysfs for sriov

2019-06-05 Thread Yintian Tao
we need register pm sysfs for virt in order to support dpm level modification because smu ip block will not be added under SRIOV Signed-off-by: Yintian Tao Change-Id: Ib0e13934c0c33da00f9d2add6be25a373c6fb957 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++ drivers/gpu/drm/amd/amdgpu/amd

Re: [PATCH] drm/ttm: fix ttm_bo_unreserve

2019-06-05 Thread Michel Dänzer
On 2019-06-05 1:24 p.m., Christian König wrote: > Am 04.06.19 um 21:03 schrieb Zeng, Oak: >> From: amd-gfx On Behalf Of >> Kuehling, Felix >> On 2019-06-04 11:23, Christian König wrote: >> >>> Since we now keep BOs on the LRU we need to make sure that they are >>> removed when they are pinned. >>>

[PATCH] drm/amdgpu: register pm sysfs for sriov

2019-06-05 Thread Yintian Tao
we need register pm sysfs for virt in order to support dpm level modification because smu ip block will not be added under SRIOV Signed-off-by: Yintian Tao Change-Id: Ib0e13934c0c33da00f9d2add6be25a373c6fb957 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++ drivers/gpu/drm/amd/amdgpu/amd

Re: [PATCH] drm/ttm: fix ttm_bo_unreserve

2019-06-05 Thread Kuehling, Felix
On 2019-06-05 9:56, Michel Dänzer wrote: > On 2019-06-05 1:24 p.m., Christian König wrote: >> Am 04.06.19 um 21:03 schrieb Zeng, Oak: >>> From: amd-gfx On Behalf Of >>> Kuehling, Felix >>> On 2019-06-04 11:23, Christian König wrote: [snip] >>> --- a/include/drm/ttm/ttm_bo_driver.h >>> +++ b/includ

RE: [PATCH] drm/ttm: fix ttm_bo_unreserve

2019-06-05 Thread Zeng, Oak
Regards, Oak -Original Message- From: Christian König Sent: Wednesday, June 5, 2019 7:25 AM To: Zeng, Oak ; Kuehling, Felix ; dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/ttm: fix ttm_bo_unreserve Am 04.06.19 um 21:03 schrieb Zeng, Oak: > >

RE: FW: [PATCH] drm/ttm: fix ttm client driver (e.g. amdgpu) reload issue

2019-06-05 Thread Liu, Monk
Strange, I get the latest "drm-next" branch and didn't see the change landed /Monk -Original Message- From: Koenig, Christian Sent: Wednesday, June 5, 2019 7:11 PM To: Liu, Monk ; amd-gfx@lists.freedesktop.org Subject: Re: FW: [PATCH] drm/ttm: fix ttm client driver (e.g. amdgpu) re

RE: [PATCH] drm/amdgpu: register pm sysfs for sriov

2019-06-05 Thread Tao, Yintian
Hi Alex Can you help have a review? Thanks in advance. Best Regards Yintian Tao -Original Message- From: amd-gfx On Behalf Of Yintian Tao Sent: Wednesday, June 05, 2019 10:09 PM To: amd-gfx@lists.freedesktop.org; Deucher, Alexander Cc: Tao, Yintian Subject: [PATCH] drm/amdgpu: regi

[PATCH 3/6] drm/amdkfd: Refactor create_queue_nocpsch

2019-06-05 Thread Zeng, Oak
This is prepare work to fix a circular lock dependency. No logic change Change-Id: I4e0ee918260e7780de972dd71f4ce787b4f6dde9 Signed-off-by: Oak Zeng --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 171 +++-- 1 file changed, 57 insertions(+), 114 deletions(-) diff --git

[PATCH 1/6] drm/amdkfd: Only initialize sdma vm for sdma queues

2019-06-05 Thread Zeng, Oak
Don't do the same for compute queues Change-Id: Id5f743ca10c2b761590bfe18cab2f802d3c04d2d Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager

[PATCH 2/6] drm/amdkfd: Only load sdma mqd when queue is active

2019-06-05 Thread Zeng, Oak
Also calls load_mqd with current->mm struct. The mm struct is used to read back user wptr of the queue. Change-Id: I0f6d085878358dcd3a413054dbe61d1ca0fdf66d Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH 6/6] drm/amdkfd: Fix sdma queue allocate race condition

2019-06-05 Thread Zeng, Oak
SDMA queue allocation requires the dqm lock as it modify the global dqm members. Introduce functions to allocate/deallocate in locked/unlocked circumstance. Change-Id: Id3084524c5f65d9629b12cf6b4862a7516945cb1 Signed-off-by: Oak Zeng --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 34 ++

[PATCH 5/6] drm/amdkfd: Fix a circular lock dependency

2019-06-05 Thread Zeng, Oak
The idea to break the circular lock dependency is to move allocate_mqd out of dqm lock protection. See callstack #1 below. [ 59.510149] [drm] Initialized amdgpu 3.30.0 20150101 for :04:00.0 on minor 0 [ 513.604034] == [ 513.604205] WARN

[PATCH 4/6] drm/amdkfd: Separate mqd allocation and initialization

2019-06-05 Thread Zeng, Oak
Introduce a new mqd allocation interface and split the original init_mqd function into two functions: allocate_mqd and init_mqd. This is preparation work to fix a circular lock dependency. Change-Id: I26e53ee1abcdd688ad11d35b433da77e3fa1bee7 Signed-off-by: Oak Zeng --- .../gpu/drm/amd/amdkfd/kfd

RE: [PATCH 1/6] drm/amdkfd: Only initialize sdma vm for sdma queues

2019-06-05 Thread Zeng, Oak
Hi Felix, I rebased this series to the latest drm-next code base. Regards, Oak -Original Message- From: Zeng, Oak Sent: Wednesday, June 5, 2019 12:07 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Zhao, Yong ; Liu, Alex ; Freehill, Chris ; Zeng, Oak Subject: [PATCH 1/6]

[PATCH] drm/amd/display: Use current connector state if NULL when checking bpc

2019-06-05 Thread Nicholas Kazlauskas
[Why] The old logic for checking which output depth to use relied on using the current connector state rather than the new proposed state. This was a problem when performing atomic commits since we weren't verifying it against the incoming max_requested_bpc. But switching this to only use the new

Re: [PATCH] drm/amd/display: Use current connector state if NULL when checking bpc

2019-06-05 Thread Deucher, Alexander
Maybe add a reference to the bug report? Acked-by: Alex Deucher From: amd-gfx on behalf of Nicholas Kazlauskas Sent: Wednesday, June 5, 2019 12:33 PM To: amd-gfx@lists.freedesktop.org Cc: Li, Sun peng (Leo); Wentland, Harry; Kazlauskas, Nicholas Subject: [PATCH]

Re: [PATCH] drm/ttm: fix ttm_bo_unreserve

2019-06-05 Thread Koenig, Christian
Am 05.06.19 um 16:33 schrieb Kuehling, Felix: > On 2019-06-05 9:56, Michel Dänzer wrote: >> On 2019-06-05 1:24 p.m., Christian König wrote: >>> Am 04.06.19 um 21:03 schrieb Zeng, Oak: From: amd-gfx On Behalf Of Kuehling, Felix On 2019-06-04 11:23, Christian König wrote: > [snip] >>>

Re: [PATCH] drm/amd/display: Use current connector state if NULL when checking bpc

2019-06-05 Thread Kazlauskas, Nicholas
On 6/5/19 1:30 PM, Deucher, Alexander wrote: > Maybe add a reference to the bug report? > Acked-by: Alex Deucher Oh right, I can add the bugzilla when this gets reviewed and I push. Thanks! Nicholas Kazlauskas > > *From:*

Re: FW: [PATCH] drm/ttm: fix ttm client driver (e.g. amdgpu) reload issue

2019-06-05 Thread Koenig, Christian
Mhm, looks like that somehow got dropped during rebase. Going to dig up where that actually ended up tomorrow. Christian. Am 05.06.19 um 16:44 schrieb Liu, Monk: > Strange, I get the latest "drm-next" branch and didn't see the change landed > > > /Monk > > -Original Message- > From

Re: 答复: 答复: [PATCH] drm/amdgpu: no need fbcon under sriov

2019-06-05 Thread Koenig, Christian
Am 04.06.19 um 17:29 schrieb Tao, Yintian: Yes, you are right the error message is at wrong place. May I just remove this message? Fine with me, but you might want to double check who added the message and why. Something like "git blame " should do the trick. Christian. Best Regards

[pull] amdgpu drm-fixes-5.2

2019-06-05 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.2: - A fix to make VCE resume more reliable - Updates for new raven variants The following changes since commit 2a3e0b716296a504d9e65fea7acb379c86fe4283: Merge tag 'imx-drm-fixes-2019-05-29' of git://git.pengutronix.de/git/pza/linux into drm-fixes (2019-05-31 09:1

[pull] amdgpu, ttm drm-next-5.3

2019-06-05 Thread Alex Deucher
Hi Dave, Daniel, More new stuff for 5.3: amdgpu: - Revert timeline support until KHR is ready - Various driver reload fixes - Refactor clock handling in DC - Aux fixes for DC - Bandwidth calculation updates for DC - Fix documentation due to file rename - RAS fix - Fix race in late_init ttm: - Al

Re: [PATCH 4/6] drm/amdkfd: Separate mqd allocation and initialization

2019-06-05 Thread Kuehling, Felix
Nice. Surprisingly this actually resulted in slightly fewer lines of code. Some suggestions: Let's also rename uninit_mqd to free_mqd, as it is the counterpart to allocate_mqd, not init_mqd. And unless I'm missing something, init_mqd and update_mqd cannot fail now that allocate_mqd has been se

Re: [PATCH 3/6] drm/amdkfd: Refactor create_queue_nocpsch

2019-06-05 Thread Kuehling, Felix
Patches 1-3 are Reviewed-by: Felix Kuehling On 2019-06-05 12:06 p.m., Zeng, Oak wrote: > This is prepare work to fix a circular lock dependency. > No logic change > > Change-Id: I4e0ee918260e7780de972dd71f4ce787b4f6dde9 > Signed-off-by: Oak Zeng > --- > .../gpu/drm/amd/amdkfd/kfd_device_queue_

Re: [PATCH 5/6] drm/amdkfd: Fix a circular lock dependency

2019-06-05 Thread Kuehling, Felix
This patch looks good to me, but it'll probably change a little if you implement my suggestions for patch 4. Regards,   Felix On 2019-06-05 12:06 p.m., Zeng, Oak wrote: > The idea to break the circular lock dependency is to move allocate_mqd > out of dqm lock protection. See callstack #1 below.

Re: [PATCH 6/6] drm/amdkfd: Fix sdma queue allocate race condition

2019-06-05 Thread Kuehling, Felix
I think the simpler way to fix this, is to restructure create_queue_cpsch similar to the nocpsch version where we allocate the MQD early and take the DQM lock right after that. That way you don't need locked and unlocked variants of allocate_sdma_queue and deallocate_sdma_queue. Regards,   Fe

Re: [PATCH] drm/amdgpu: register pm sysfs for sriov

2019-06-05 Thread Alex Deucher
On Wed, Jun 5, 2019 at 9:54 AM Yintian Tao wrote: > > we need register pm sysfs for virt in order > to support dpm level modification because > smu ip block will not be added under SRIOV > > Signed-off-by: Yintian Tao > Change-Id: Ib0e13934c0c33da00f9d2add6be25a373c6fb957 > --- > drivers/gpu/drm

RE: [PATCH] drm/amdgpu: register pm sysfs for sriov

2019-06-05 Thread Tao, Yintian
Hi Alex Many thanks for your review. Best Regards Yintian Tao -Original Message- From: Alex Deucher Sent: Thursday, June 06, 2019 10:28 AM To: Tao, Yintian Cc: amd-gfx list Subject: Re: [PATCH] drm/amdgpu: register pm sysfs for sriov On Wed, Jun 5, 2019 at 9:54 AM Yintian Tao wrot

Re: [pull] amdgpu, ttm drm-next-5.3

2019-06-05 Thread Dave Airlie
On Thu, 6 Jun 2019 at 05:12, Alex Deucher wrote: > > Hi Dave, Daniel, > > More new stuff for 5.3: > > amdgpu: > - Revert timeline support until KHR is ready > - Various driver reload fixes > - Refactor clock handling in DC > - Aux fixes for DC > - Bandwidth calculation updates for DC > - Fix docum

Re: [pull] amdgpu, ttm drm-next-5.3

2019-06-05 Thread Alex Deucher
On Wed, Jun 5, 2019 at 10:34 PM Dave Airlie wrote: > > On Thu, 6 Jun 2019 at 05:12, Alex Deucher wrote: > > > > Hi Dave, Daniel, > > > > More new stuff for 5.3: > > > > amdgpu: > > - Revert timeline support until KHR is ready > > - Various driver reload fixes > > - Refactor clock handling in DC >

[pull v2] amdgpu, ttm drm-next-5.3

2019-06-05 Thread Alex Deucher
Hi Dave, Daniel, More new stuff for 5.3: amdgpu: - Revert timeline support until KHR is ready - Various driver reload fixes - Refactor clock handling in DC - Aux fixes for DC - Bandwidth calculation updates for DC - Fix documentation due to file rename - RAS fix - Fix race in late_init ttm: - Al

Re: [pull] amdgpu, ttm drm-next-5.3

2019-06-05 Thread Daniel Vetter
On Thu, Jun 6, 2019 at 5:05 AM Alex Deucher wrote: > > On Wed, Jun 5, 2019 at 10:34 PM Dave Airlie wrote: > > > > On Thu, 6 Jun 2019 at 05:12, Alex Deucher wrote: > > > > > > Hi Dave, Daniel, > > > > > > More new stuff for 5.3: > > > > > > amdgpu: > > > - Revert timeline support until KHR is rea

Re: [pull] amdgpu, ttm drm-next-5.3

2019-06-05 Thread Daniel Vetter
On Thu, Jun 6, 2019 at 7:25 AM Daniel Vetter wrote: > > On Thu, Jun 6, 2019 at 5:05 AM Alex Deucher wrote: > > > > On Wed, Jun 5, 2019 at 10:34 PM Dave Airlie wrote: > > > > > > On Thu, 6 Jun 2019 at 05:12, Alex Deucher wrote: > > > > > > > > Hi Dave, Daniel, > > > > > > > > More new stuff for