Re: possible use-after-free in amdgpu_dm

2017-10-17 Thread Tom St Denis
On 17/10/17 01:18 PM, Christian König wrote: Am 17.10.2017 um 16:10 schrieb Tom St Denis: In this block of code: void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector) {     struct dm_connector_state *state =     to_dm_connector_state(connector->state);     kfree(st

Various cleanups for amdgpu_dm

2017-10-17 Thread Tom St Denis
Various cleanups to indentation/braces as well as a couple of simplifications. Mostly NFC but there are a couple of patches with trivial functional changes (#6, #8) ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org

[PATCH 09/13] drm/amd/display: Fix indentation in create_eml_sink()

2017-10-17 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index c23e6a

[PATCH 12/13] drm/amd/display: Remove needless cast in amdgpu_dm_connector_init()

2017-10-17 Thread Tom St Denis
The cast of dc_link is redundant. Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/d

[PATCH 10/13] drm/amd/display: Tidy up dm_drm_plane_reset()

2017-10-17 Thread Tom St Denis
Move WARN_ON higher up and in doing so fix brace style. Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/d

[PATCH 13/13] drm/amd/display: Fix brace style

2017-10-17 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c b/drivers/gpu/drm/amd/display/amd

[PATCH 05/13] drm/amd/display: Fix brace style in dm_handle_hpd_rx_irq()

2017-10-17 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 3a927a

[PATCH 02/13] drm/amd/display: Fix indentation in dm_suspend()

2017-10-17 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 8b9076

[PATCH 01/13] drm/amd/display: Simplify dm_late_init()

2017-10-17 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 63ddf7

possible use-after-free in amdgpu_dm

2017-10-17 Thread Tom St Denis
In this block of code: void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector) { struct dm_connector_state *state = to_dm_connector_state(connector->state); kfree(state); state = kzalloc(sizeof(*state), GFP_KERNEL); The value of state is

Re: [PATCH 7/7] drm/amd/powerplay: Tidy up cz_dpm_powerup_vce()

2017-10-16 Thread Tom St Denis
On 16/10/17 02:23 PM, Deucher, Alexander wrote: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Tom St Denis Sent: Monday, October 16, 2017 1:55 PM To: amd-gfx@lists.freedesktop.org Cc: StDenis, Tom Subject: [PATCH 7/7] drm/amd/powerplay: Tidy

[PATCH 3/7] drm/amd/powerplay: Tidy up cz_dpm_powerup_uvd()

2017-10-16 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c

[PATCH 4/7] drm/amd/powerplay: Tidy up cz_dpm_update_uvd_dpm()

2017-10-16 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c

[PATCH 7/7] drm/amd/powerplay: Tidy up cz_dpm_powerup_vce()

2017-10-16 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c index 23df05

Simple cleanups for cz_hwmgr.c

2017-10-16 Thread Tom St Denis
Small set of simple cleanups with no functional changes. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 5/7] drm/amd/powerplay: Tidy up cz_dpm_update_vce_dpm()

2017-10-16 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c

[PATCH 1/7] drm/amd/powerplay: Tidy up cz_start_dpm()

2017-10-16 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c index 96da4f

[PATCH umr] remove --vram-* commands finally

2017-10-16 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- src/app/main.c | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/app/main.c b/src/app/main.c index 0a44c4399bb8..a05fd7f475fa 100644 --- a/src/app/main.c +++ b/src/app/main.c @@ -382,17

Re: regression on suspend/resume for Carrizo

2017-10-13 Thread Tom St Denis
list yet. I've added myself to the watchers list :-) Thanks, Tom Thanks, Leo On 2017-10-13 09:30 AM, Tom St Denis wrote: For what it's worth this commit also breaks resume on my Tonga only system so it's not specific to just Carrizo. On 13/10/17 08:16 AM, Tom St Denis wrote: Hi

Re: regression on suspend/resume for Carrizo

2017-10-13 Thread Tom St Denis
For what it's worth this commit also breaks resume on my Tonga only system so it's not specific to just Carrizo. On 13/10/17 08:16 AM, Tom St Denis wrote: Hi, This commit breaks suspend/resume on my Carrizo A12-9800 system. [root@carrizo linux2]# git bisect bad

regression on suspend/resume for Carrizo

2017-10-13 Thread Tom St Denis
Hi, This commit breaks suspend/resume on my Carrizo A12-9800 system. [root@carrizo linux2]# git bisect bad 7ae4acd21e9e264afb079e23d43bcf2238c7dbea is the first bad commit commit 7ae4acd21e9e264afb079e23d43bcf2238c7dbea Author: Leo (Sunpeng) Li Date: Thu Sep 7 17:05:38

Re: regression with d6c650c0a8f6f671e49553725e1db541376d95f2

2017-10-13 Thread Tom St Denis
At the very least I don't get the hangs like I used to before the patchset so this patch isn't regressing any of that behaviour. Tom On 13/10/17 07:06 AM, Liu, Monk wrote: Yeah, this one looks good You can put my reviewed-by on it *From:*Koenig, Christian *Sent:* 2017年10月13日18:14 *To:*

[PATCH] drm/ttm: Fix unused variables with huge page support

2017-10-12 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index b6f16e73..95022473704b 100644 --- a/d

Re: Tonga PRO [Radeon R9 285/380] [1002:6939] blank screen

2017-10-06 Thread Tom St Denis
On 06/10/17 08:37 AM, Steven Falco wrote: On 10/05/2017 02:26 PM, Martin Babutzka wrote: @Steven Falco: This behavior was EXACTLY the same with my R9 380 caused by commit e37a7b4088da ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c"). This is reverted now since a few days - are you

Re: [PATCH 2/2] drm/amd/powerplay: fix mclk can't switch on Tonga

2017-10-06 Thread Tom St Denis
Hi Rex, Thanks. Everything seems to be functional again on my Tonga. Cheers, Tom On 06/10/17 01:18 AM, Rex Zhu wrote: regresstion issue caused by commit 47047263c52779f1f3393c32e3e53661b53a372e ("drm/amd/powerplay: delete eventmgr related files.") Change-Id:

Re: Tonga PRO [Radeon R9 285/380] [1002:6939] blank screen

2017-10-05 Thread Tom St Denis
 1. Tonga PRO [Radeon R9 285/380] [1002:6939] blank screen   (Steven Falco)    2. Re: Tonga PRO [Radeon R9 285/380] [1002:6939] blank screen   (Tom St Denis)    3. RE: Tonga PRO [Radeon R9 285/380] [1002:6939] blank screen   (Deucher, Alexander)    4. [PATCH libdrm v2 1/2] tests/

Re: Tonga PRO [Radeon R9 285/380] [1002:6939] blank screen

2017-10-05 Thread Tom St Denis
Hi Steve, A dmesg log for starters would help. Could be as simple as a firmware file missing or being the wrong version. Cheers, Tom On 05/10/17 10:45 AM, Steven Falco wrote: I have a Radeon R9 285/380 video card in a machine that is running Fedora 26. When I run with Fedora kernel

tonga mclk regression

2017-10-05 Thread Tom St Denis
I've bisected it to this commit [root@fx6 linux2]# git bisect bad df1e63942063a0638a5813e5904988d834db2665 is the first bad commit commit df1e63942063a0638a5813e5904988d834db2665 Author: Rex Zhu Date: Fri Sep 1 13:46:20 2017 +0800 drm/amd/powerplay: delete eventmgr layer

Re: [PATCH] drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display()

2017-10-05 Thread Tom St Denis
I reset to before offending commit and mclk is still pegged at low. So this commit isn't responsible for this. I'll bisect and try to hunt it down. Tom On 04/10/17 04:52 PM, Tom St Denis wrote: Hi Andy, I didn't check that but this part of the original patch: @@ -689,7 +697,7 @@ static

Re: [PATCH] drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display()

2017-10-04 Thread Tom St Denis
Cheers, Tom On 04/10/17 04:21 PM, Andy Furniss wrote: For me testing on 4.15-wip with tonga it does "fix", but memclk is stuck, which would have avoided the lines had I forced it without this. Maybe you see different on a different kernel - is memclk stuck f

Re: [PATCH] Revert "drm/amd/powerplay: Add support for CI asics to hwmgr"

2017-10-04 Thread Tom St Denis
On 04/10/17 01:39 PM, Deucher, Alexander wrote: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Tom St Denis Sent: Wednesday, October 04, 2017 1:13 PM To: amd-gfx@lists.freedesktop.org Cc: StDenis, Tom Subject: [PATCH] Revert "dr

[PATCH] drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display()

2017-10-04 Thread Tom St Denis
This partially reverts 0b6b4cbf77c995a34a4ec3d705a636434dadc51a and fixes the noise issues on Tonga. Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/g

[PATCH] Revert "drm/amd/powerplay: Add support for CI asics to hwmgr"

2017-10-04 Thread Tom St Denis
0b6b4cbf77c995a34a4ec3d705a636434dadc51a. Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 58 +-- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 118 +-- 2 files changed, 47 insertions(+), 129 deletions(-) diff --git a/drive

powerplay tidyup/refactor suggestion

2017-10-03 Thread Tom St Denis
Hi all, Soliciting for opinion on a tiny refactor I've noticed is possible in the hwmgr API, we have functions like int (*dynamic_state_management_enable)( struct pp_hwmgr *hw_mgr); int (*dynamic_state_management_disable)(

Re: [PATCH 5/5] drm/amd/sched: signal and free remaining fences in amd_sched_entity_fini

2017-10-02 Thread Tom St Denis
Hi Nicolai, Ping? :-) Tom On 28/09/17 11:01 AM, Christian König wrote: Am 28.09.2017 um 16:55 schrieb Nicolai Hähnle: From: Nicolai Hähnle Highly concurrent Piglit runs can trigger a race condition where a pending SDMA job on a buffer object is never executed

Re: build failures on drm-next

2017-10-02 Thread Tom St Denis
wrote: Does anyone have a strong opinion for or against reverting the offending commits? Harry On 2017-10-02 09:49 AM, Tom St Denis wrote: The lastest good commit is commit f5a16c561fb8a15e94a4384e880b9d84a2657098 Author: Colin Ian King <colin.k...@canonical.com> Date:   Thu Sep 28 14:46:1

[PATCH 2/2] drm/amd/powerplay: Fix powerplay bugs

2017-10-02 Thread Tom St Denis
Introduced by commits: cf5235684f9736278f395d1668876000490120d2 7401d47185deaa63f23553c6680ae4a4c0824595 f174394486e1b575933856cfc2b60526d1ac5788 Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 24 1 file chang

[PATCH 1/2] drm/amd/powerplay: Fix bug introduced by 38d794ae060df6cf5bf2caa4742e379a45bcc018

2017-10-02 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_power

Fix powerplay merge errors

2017-10-02 Thread Tom St Denis
Fixes a couple of build errors likely caused by a bad merge. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

build failures on drm-next

2017-10-02 Thread Tom St Denis
The lastest good commit is commit f5a16c561fb8a15e94a4384e880b9d84a2657098 Author: Colin Ian King Date: Thu Sep 28 14:46:17 2017 +0100 drm/radeon: make functions alloc_pasid and free_pasid static The functions alloc_pasid and free_pasid are local to the

Re: [PATCH] dmr/amd/powerplay: Fix typo in ci_populate_fuzzy_fan()

2017-09-26 Thread Tom St Denis
Ping :-) Tom On 25/09/17 01:33 PM, Tom St Denis wrote: Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/g

Re: powerplay change breaks driver

2017-09-25 Thread Tom St Denis
To narrow things down it's likely something in the CZ code paths as it still crashes with the Polaris10 removed. Tom On 25/09/17 01:55 PM, Tom St Denis wrote: This change commit f96306921d5e346ebc82c7c51ae6e0b736e5b425 Author: Rex Zhu <rex@amd.com> Date:   Wed Sep 20 14:44:55 2017

powerplay change breaks driver

2017-09-25 Thread Tom St Denis
This change commit f96306921d5e346ebc82c7c51ae6e0b736e5b425 Author: Rex Zhu Date: Wed Sep 20 14:44:55 2017 +0800 drm/amd/powerplay: refine powerplay code. delete struct smumgr, put smu backend function table in struct hwmgr Change-Id:

[PATCH] dmr/amd/powerplay: Fix typo in ci_populate_fuzzy_fan()

2017-09-25 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c index 7709f620347a..a72ae7

Re: [PATCH 07/10] drm/amdgpu: create powerplay by cgs interface

2017-09-25 Thread Tom St Denis
Nevermind it applies fine after the series you pushed a bit ago today. Cheers, Tom On 25/09/17 12:13 PM, Tom St Denis wrote: This doesn't apply on top of drm-next I don't know why since "git status" doesn't report any conflicting files... Tom On 25/09/17 09:49 AM, Rex Zhu wrote:

Re: [PATCH 07/10] drm/amdgpu: create powerplay by cgs interface

2017-09-25 Thread Tom St Denis
This doesn't apply on top of drm-next I don't know why since "git status" doesn't report any conflicting files... Tom On 25/09/17 09:49 AM, Rex Zhu wrote: Signed-off-by: Rex Zhu Change-Id: I3b2fa446fd7e233042794fe3d2fb5cbce903fe2d ---

[PATCH umr] Use ipname.regname format for --lookup

2017-09-20 Thread Tom St Denis
Since newer asics have IP blocks with the same register we must specify both. Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- doc/umr.1| 2 +- src/app/main.c | 3 ++- src/app/umr_lookup.c | 33 - 3 files changed, 27 insertions(

[PATCH umr 1/2] Revert "switch over from ttm trace to iova debugfs entry (v3)"

2017-09-20 Thread Tom St Denis
OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Tom St Denis <tom.stde...@amd.com> + * + */ +#include "umr.h" + +static void recurse_free(struct umr_map *map) +{ +

[PATCH] drm/amd/amdgpu: Partial revert of iova debugfs

2017-09-20 Thread Tom St Denis
We discovered that on some devices even with iommu enabled you can access all of system memory through the iommu translation. Therefore, we revert the read method to the translation only service and drop the write method completely. Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- d

Re: [PATCH] drm/amd/amdgpu: Fix iova debugfs for non-iommu case

2017-09-20 Thread Tom St Denis
On 20/09/17 03:07 AM, Christian König wrote: Am 19.09.2017 um 23:38 schrieb Tom St Denis: On 19/09/17 02:33 PM, Christian König wrote: [root@carrizo ~]# xxd -l 1024 -s 0xC /sys/kernel/debug/dri/0/amdgpu_iova Actually 0xC is a special address, e.g. video BIOS if I'm not completely

Re: [PATCH] drm/amd/amdgpu: Fix iova debugfs for non-iommu case

2017-09-19 Thread Tom St Denis
On 19/09/17 02:33 PM, Christian König wrote: [root@carrizo ~]# xxd -l 1024 -s 0xC /sys/kernel/debug/dri/0/amdgpu_iova Actually 0xC is a special address, e.g. video BIOS if I'm not completely mistaken. Not sure why that would be mapped by the driver but I can also read the kernel's

Re: [PATCH] drm/amd/amdgpu: Fix iova debugfs for non-iommu case

2017-09-19 Thread Tom St Denis
rly I can "abuse" it. Tom On 19/09/17 01:26 PM, Tom St Denis wrote: On 19/09/17 01:23 PM, Christian König wrote: Am 19.09.2017 um 19:20 schrieb Tom St Denis: On 19/09/17 01:18 PM, Christian König wrote: Am 19.09.2017 um 19:14 schrieb Tom St Denis: On 19/09/17 01:10 PM, Christia

[PATCH] drm/amd/amdgpu: Fix iova debugfs for non-iommu case (v2)

2017-09-19 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> (v2): Don't create iova file when iommu is disabled --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Re: [PATCH] drm/amd/amdgpu: Fix iova debugfs for non-iommu case

2017-09-19 Thread Tom St Denis
On 19/09/17 01:18 PM, Christian König wrote: Am 19.09.2017 um 19:14 schrieb Tom St Denis: On 19/09/17 01:10 PM, Christian König wrote: As far as I know we don't need #ifdefs cause there are dummy functions when IOMMU is not compiled in. But this patch is a NAK since it circumvents the /dev

Re: [PATCH] drm/amd/amdgpu: Fix iova debugfs for non-iommu case

2017-09-19 Thread Tom St Denis
On 19/09/17 01:10 PM, Christian König wrote: As far as I know we don't need #ifdefs cause there are dummy functions when IOMMU is not compiled in. But this patch is a NAK since it circumvents the /dev/mem restriction when IOMMU is disabled and that is not something we can easily allow. I

Re: [PATCH] drm/amd/amdgpu: add support for iova_to_phys to replace TTM trace (v5)

2017-09-19 Thread Tom St Denis
Booting with IOMMU disabled in the bios breaks this. I'll submit a fix in a minute. Should be easy. Tom On 19/09/17 11:25 AM, Tom St Denis wrote: On 19/09/17 11:17 AM, Deucher, Alexander wrote: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf

Re: [PATCH] drm/amd/amdgpu: add support for iova_to_phys to replace TTM trace (v5)

2017-09-19 Thread Tom St Denis
On 19/09/17 11:17 AM, Deucher, Alexander wrote: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Tom St Denis Sent: Tuesday, September 19, 2017 8:13 AM To: amd-gfx@lists.freedesktop.org Cc: StDenis, Tom Subject: [PATCH] drm/amd/amdgpu: add

[PATCH] drm/amd/amdgpu: add support for iova_to_phys to replace TTM trace (v5)

2017-09-19 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> (v2): Add domain to iova debugfs (v3): Add true read/write methods to access system memory of pages mapped to the device (v4): Move get_domain call out of loop and return on error (v5): Just use kmap/kunmap --- drivers/gpu/drm/amd/

[PATCH umr] switch over from ttm trace to iova debugfs entry (v2)

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> (v2): Use iova debugfs for read/write not address translation --- src/lib/CMakeLists.txt | 1 - src/lib/close_asic.c | 2 +- src/lib/discover.c | 3 + src/lib/free_maps.c| 44 -- src/lib/read_vram.c

[PATCH 4/4] drm/ttm: Remove TTM dma tracepoint since it's not required anymore

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/ttm/Makefile | 2 +- drivers/gpu/drm/ttm/ttm_debug.c | 74 - drivers/gpu/drm/ttm/ttm_trace.h | 87 --- drivers/gpu/drm/ttm/ttm_tracepoints.

[PATCH 3/4] drm/amd/amdgpu: remove usage of ttm trace

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 36 +++-- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

remove ttm trace and add iova debugfs (v2)

2017-09-18 Thread Tom St Denis
In this respin I add some changes per feedback and make the iova entry have proper read/write methods which access pages mapped by amdgpu. So there is no need for /dev/mem or /dev/fmem anymore when reading system memory. Patches 3/4 are unchanged and remove the TTM trace from amdgpu and from

[PATCH 1/4] drm/amd/amdgpu: Fold TTM debugfs entries into array (v2)

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> (v2): add domains and avoid strcmp --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 54 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +-- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/drive

[PATCH 2/4] drm/amd/amdgpu: add support for iova_to_phys to replace TTM trace (v3)

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> (v2): Add domain to iova debugfs (v3): Add true read/write methods to access system memory of pages mapped to the device --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 104 1 file changed, 104 inse

Re: [PATCH 1/4] drm/amd/amdgpu: Fold TTM debugfs entries into array

2017-09-18 Thread Tom St Denis
On 18/09/17 08:48 AM, Christian König wrote: Am 18.09.2017 um 14:35 schrieb Tom St Denis: Signed-off-by: Tom St Denis <tom.stde...@amd.com> ---   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 53 ++---   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h |  4 +--   2 files c

Re: [PATCH 2/4] drm/amd/amdgpu: add support for iova_to_phys to replace TTM trace

2017-09-18 Thread Tom St Denis
On 18/09/17 08:52 AM, Christian König wrote: Am 18.09.2017 um 14:35 schrieb Tom St Denis: Signed-off-by: Tom St Denis <tom.stde...@amd.com> ---   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 32   1 file changed, 32 insertions(+) diff --git a/drivers/gpu/d

[PATCH umr] switch over from ttm trace to iova debugfs entry

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- src/lib/CMakeLists.txt | 1 - src/lib/close_asic.c | 2 +- src/lib/discover.c | 3 + src/lib/free_maps.c| 44 - src/lib/read_vram.c| 167 ++--- src

[PATCH 4/4] drm/ttm: Remove TTM dma tracepoint since it's not required anymore

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/ttm/Makefile | 2 +- drivers/gpu/drm/ttm/ttm_debug.c | 74 - drivers/gpu/drm/ttm/ttm_trace.h | 87 --- drivers/gpu/drm/ttm/ttm_tracepoints.

[PATCH 2/4] drm/amd/amdgpu: add support for iova_to_phys to replace TTM trace

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 7848ffa99eb4..b4c298

[PATCH 3/4] drm/amd/amdgpu: remove usage of ttm trace

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 36 +++-- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Remove TTM trace and use proper IOMMU api

2017-09-18 Thread Tom St Denis
These patches tidy up the amdgpu_ttm debugfs creation, add an iova_to_phys interface and then remove the TTM trace from both amdgpu and drm/ttm. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org

[PATCH 1/4] drm/amd/amdgpu: Fold TTM debugfs entries into array

2017-09-18 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 53 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +-- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_tt

Re: [PATCH] drm/amd/amdgpu: Change vram debugfs to NO_KIQ for VM environments

2017-09-13 Thread Tom St Denis
On 13/09/17 02:47 PM, Christian König wrote: Am 13.09.2017 um 18:47 schrieb Deucher, Alexander: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Tom St Denis Sent: Wednesday, September 13, 2017 12:38 PM To: amd-gfx@lists.freedesktop.org Cc

[PATCH umr] Add --vm-write/--vm-read to replace the --vram-* commands to be less confusing

2017-09-13 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- doc/umr.1 | 4 ++-- src/app/main.c | 26 ++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/doc/umr.1 b/doc/umr.1 index b990ff2c412f..e865e131fa51 100644 --- a/doc/umr.1 +++ b/doc/umr.1 @@

Re: [PATCH] drm/amdgpu/gfx9: implement wave VGPR reading

2017-09-13 Thread Tom St Denis
le <nicolai.haeh...@amd.com> Acked-by: Christian König <christian.koe...@amd.com> Reviewed-by: Tom St Denis <tom.stde...@amd.com> Also I've tested it to the extent that I can read out data via umr on my Raven while running piglit. In an ideal world it'd be nice to have a known-answ

[PATCH] drm/amd/powerplay: lock grbm_gfx index when changing instance

2017-09-12 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c index 8c264c

[PATCH 6/6] drm/amd/powerplay: Tidy up smu7_enable_didt()

2017-09-12 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 29 ++ 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c b/drivers/gpu/drm/amd/powerplay

[PATCH 1/6] drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_info()

2017-09-12 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c

[PATCH 5/6] drm/amd/powerplay: Make use of PP_CAP in smu7_powertune.c

2017-09-12 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 42 ++ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c b/drivers/gpu/drm/amd/powerplay

[PATCH 2/6] drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_rpm()

2017-09-12 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c

[PATCH 4/6] drm/amd/powerplay: Remove unneeded return from pp_smu7_thermal_fini()

2017-09-12 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c index 064166b48d1f..686736

[PATCH 3/6] drm/amd/powerplay: Make use of PP_CAP in smu7_thermal.c

2017-09-12 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_the

write to GRBM_GFX_INDEX without lock

2017-09-12 Thread Tom St Denis
In the file smu7_powertune.c we have int smu7_enable_didt_config(struct pp_hwmgr *hwmgr) { int result; uint32_t num_se = 0; uint32_t count, value, value2; struct cgs_system_info sys_info = {0}; sys_info.size = sizeof(struct cgs_system_info);

Re: [PATCH umr 1/4] Fix wave SGPR reading

2017-09-11 Thread Tom St Denis
Hi Nicolai, I don't get this patch, 'x' starts at 0 and goes to sgpr_size but that doesn't include the offset into the SGPR space right? I mean I get the patch in umr_read_sgprs() but in print_waves() won't that mean you're printing out SGPRS[0..size]? Or are you saying having the base

Re: [PATCH umr 0/4] gfx9: read VGPRs of halted waves

2017-09-09 Thread Tom St Denis
Hi Nicolai, Patches look good I'll give them a whirl tomorrow when I have some free time. I'll have to dig out your headless piglit instructions since I still can't bring X up on my Raven board. Also I noticed the use of "(options.bitfields)" (etc, in print_waves) which is not your bug

[PATCH 16/16] drm/amd/powerplay: Tidy up vega10_thermal_initialize()

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_the

[PATCH 13/16] drm/amd/powerplay: Fix indentation in vega10_fan_ctrl_reset_fan_speed_to_default()

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_the

[PATCH 14/16] drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_fan_speed_rpm()

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_the

[PATCH 10/16] drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_static_mode()

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c| 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay

[PATCH 11/16] drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_default_mode()

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_the

[PATCH 06/16] drm/amd/powerplay: Port vega10_hwmgr.c over to PP_CAP

2017-09-08 Thread Tom St Denis
Replace and cleanup lengthy phm_cap_enabled() sequences with PP_CAP. Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 91 -- 1 file changed, 32 insertions(+), 59 deletions(-) diff --git a/drivers/gpu/drm/amd/pow

[PATCH 07/16] drm/amd/powerplay: Port vega10_powertune.c over to PP_CAP

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 47 ++ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c b/drivers/gpu/drm/amd/powerplay

Various vega10 hwmgr cleanups

2017-09-08 Thread Tom St Denis
These patches introduce a couple of new macro sets to help and tidy up the hwmgr code for powerplay. Applied only to the vega10 drivers so far. Should be no functional changes but there are a few re-arrangements of existing code. ___ amd-gfx mailing

[PATCH 09/16] drm/amd/powerplay: Tidy up vega10_fan_ctrl_get_fan_speed_rpm()

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_the

[PATCH 01/16] drm/amd/powerplay: Simplify vega10_patch_voltage_dependency_tables_with_lookup_table()

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 75 +++--- 1 file changed, 23 insertions(+), 52 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay

[PATCH 05/16] drm/amd/powerplay: Add PP_CAP() macro

2017-09-08 Thread Tom St Denis
To replace common lengthy sequence that would create really long lines all over. Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/inc/hardwaremanage

[PATCH 03/16] drm/amd/powerplay: Introduction of bitmask macros for registers

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/include/cgs_common.h | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/amd/include/cgs_common.h b/drivers/gpu/drm/amd/include/cgs_common.h index 0214f63f52fc..92eaa81f9fcb

[PATCH 15/16] drm/amd/powerplay: Tidy up vega10_thermal_set_temperature_range()

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay

[PATCH 12/16] drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_fan_speed_percent()

2017-09-08 Thread Tom St Denis
Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_the

[PATCH 04/16] drm/amd/powerplay: Port vega10_didt_set_mask() to new macros

2017-09-08 Thread Tom St Denis
Start using new CGS bitmask macros. Signed-off-by: Tom St Denis <tom.stde...@amd.com> --- .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 60 -- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertun

<    1   2   3   4   5   6   7   8   >