[PATCH] drm/amd/powerplay: Fix CZ SMU firmware load check (v3)

2016-08-26 Thread Tom St Denis
Remove an errant return in the middle of the check function as well as check for success in the start function. (v2) Add return check to smu_load_fw() (v3) Don't return early if SMU load check fails Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c

[PATCH] drm/amd/powerplay: Fix CZ SMU firmware load check (v4)

2016-08-26 Thread Tom St Denis
Remove an errant return in the middle of the check function as well as check for success in the start function. (v2) Add return check to smu_load_fw() (v3) Don't return early if SMU load check fails (v4) No returns! :-) Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/powerplay/s

[PATCH 3/3] drm/amd/powerplay: Only load MEC firmware once on Stoney

2016-08-26 Thread Tom St Denis
Only load the MEC1 firmware once in the Carrizo SMU manager driver. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c b/drivers/gpu/drm/amd

[PATCH 2/3] drm/amd/powerplay: Fix up return codes in cz SMU manager

2016-08-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c index cc94c4fcbbbd..f51bd8de2f69

[PATCH 1/3] drm/amd/powerplay: Tidy up cz SMU manager

2016-08-26 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c index e6464e21f9b2

Tidy up the CZ SMU Mananger

2016-08-26 Thread Tom St Denis
The first two patches fix up code style and error return codes. The third patch avoids loading the MEC1 firmware twice on Stoney parts. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH] drm/amd/amdgpu: debugfs SMC addresses are byte addresses

2016-08-29 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 1b31a7c1d217..288cfb4fa2ba 100644 --- a/drivers/gpu

[PATCH 2/3] drm/amd/amdgpu: Simplify mask creation in gfx6

2016-09-01 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c index 099539f0fa53..5f508c96496f 100644 --- a/drivers/gpu/drm/amd/amdgpu

Various fixes for gfx6

2016-09-01 Thread Tom St Denis
Patch #1 adds missing mutex locking around se/sh/instance writes. Patches #2/3 perform various cleanups. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 1/3] drm/amd/amdgpu: Add GRBM lock to various SI functions

2016-09-01 Thread Tom St Denis
Add missing lock around SE/SH/INSTANCE selections. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c index 17a560cd6420..099539f0fa53

[PATCH 3/3] drm/amd/amdgpu: Various tidy ups for gfx6

2016-09-01 Thread Tom St Denis
Various whitespace and logical simplifications for gfx6. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 40 +-- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd

[PATCH 4/6] drm/amd/amdgpu: Merge get_wptr functions in gfx6

2016-09-02 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c index 8cc5025d8a4d..73685a4816fe 100644 --- a

[PATCH 3/6] drm/amd/amdgpu: Merge get_rptr functions in gfx8

2016-09-02 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index c14ba7079ea3..02056762ea06 100644 --- a/drivers/gpu/drm/amd

[PATCH 2/6] drm/amd/amdgpu: Merge get_rptr functions in gfx7

2016-09-02 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 99afab8113f1..84ad13ec3771 100644 --- a/drivers/gpu/drm/amd

Merge get_rptr and get_wptr functions

2016-09-02 Thread Tom St Denis
These patches merge the ring get_rptr and get_wptr functions from each of the GFX drivers between gfx and compute rings. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 6/6] drm/amd/amdgpu: Merge get_wptr functions in gfx8

2016-09-02 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 02056762ea06..d8b17745bc19 100644 --- a/drivers/gpu/drm

[PATCH 5/6] drm/amd/amdgpu: Merge get_wptr functions in gfx7

2016-09-02 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 84ad13ec3771..926fd570f0ed 100644 --- a/drivers/gpu

[PATCH 1/6] drm/amd/amdgpu: Merge get_rptr functions in gfx6

2016-09-02 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c index 63ca77937714..8cc5025d8a4d 100644 --- a/drivers/gpu/drm/amd

Various tidy'ups with SI DMA/DPM/SMC/IH code

2016-09-06 Thread Tom St Denis
Various cleanups including simplifications, LOC reductions and whitespace corrections. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 2/7] drm/amd/amdgpu: Allow calling si_dpm_fini at any point

2016-09-06 Thread Tom St Denis
Allow calling fini even if ps array is not allocated. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c index e90bb4423cc7

[PATCH 5/7] drm/amd/amdgpu: Tidy up SI IH code

2016-09-06 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_ih.c | 30 -- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c b/drivers/gpu/drm/amd/amdgpu/si_ih.c index 994ff02db013..8fae3d4a2360 100644 --- a/drivers

[PATCH 7/7] drm/amd/amdgpu: Comment out currently unused SI DPM struct

2016-09-06 Thread Tom St Denis
The tahiti_le structure is not currently used. Comment it out to avoid warnings. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c index

[PATCH 3/7] drm/amd/amdgpu: Clean up SI DPM table assignments

2016-09-06 Thread Tom St Denis
Hoist common assignments out of cases. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 42 + 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c index

[PATCH 1/7] drm/amd/amdgpu: Tidy up SI DMA code

2016-09-06 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 35 +-- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c index 377f4ae9e777..2abdaa681797 100644 --- a

[PATCH 4/7] drm/amd/amdgpu: Correct whitespace in SI DPM code

2016-09-06 Thread Tom St Denis
Replace 8 spaces with tabs, correct {} braces, etc. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 441 +--- 1 file changed, 209 insertions(+), 232 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 6/7] drm/amd/amdgpu: Tidy up SI SMC code

2016-09-06 Thread Tom St Denis
As well as merge SMC clock functions into one to reduce LOC. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/si_smc.c | 25 - drivers/gpu/drm/amd/amdgpu/sislands_smc.h | 3 +-- 3 files changed, 12

[PATCH] drm/amd/amdgpu: Remove double lock from gfx v6

2016-09-07 Thread Tom St Denis
The function gfx_v6_0_get_cu_info() was taking the grbm_idx_mutex which was then taken by a dependent function gfx_v6_0_get_cu_active_bitmap(). This patch removes the select from the parent function to avoid the double lock. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c

[PATCH] drm/amd/amdgpu: Convert messages in gmc v6 to dev_*()

2016-09-07 Thread Tom St Denis
Make the kernel log messaging more consistent and use the dev_*() functions instead of a mix of DRM_*() and printk(). Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH] drm/amd/amdgpu: Fix return values in SI DPM code

2016-09-07 Thread Tom St Denis
Fix a couple of spots where errors were not returned as well as add some error messages to si_patch_dependency_based_on_leakage() which were not being read. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff

[PATCH] drm/amdgpu: Avoid use-after-free

2016-09-12 Thread Tom St Denis
Switch to _SAFE variant of list macro to avoid use-after-free bug. Signed-off-by: Tom St Denis --- amdgpu/amdgpu_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index fb5b3a8c4bc4..cd92a0957293 100644 --- a/amdgpu/amdgpu_cs.c

[PATCH] drm/amd/amdgpu: Add sensors debugfs support

2016-09-15 Thread Tom St Denis
x27;ed off so they shouldn't cause any sort of oops. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 31 +++ drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 20 + drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 96 ++

Add sensors support to debugfs for Powerplay

2016-09-15 Thread Tom St Denis
This patch adds the ability to read various sensors from userspace. It's extensible so we can always add more later on. Currently CZ/ST supported (CZ tested with a WIP copy of the debug tool). ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https

Add sensors support to debugfs for Powerplay (v2)

2016-09-15 Thread Tom St Denis
Re-factored into front/back end. These patches add the ability to read various sensor data back from powerplay to the userspace. Currently only CZ/ST is supported. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/ma

[PATCH 2/2] drm/amd/amdgpu: Hook up read_sensor() to debugfs

2016-09-15 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 31 ++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 9103e7baf26e..b6a4588c95ee 100644 --- a

[PATCH 1/2] drm/amd/powerplay: Add read_sensor() callback to hwmgr

2016-09-15 Thread Tom St Denis
Provides standardized interface to read various sensors. The API is extensible (by adding to the end of the amd_pp_sensors enumeration list. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 20 + drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 96

Add read_sensor() support for fiji/tonga/iceland/polaris10

2016-09-15 Thread Tom St Denis
Tested on my Tonga but should in theory work for the others as well since they're 99% copy/paste (except which SMC reg is read for GPU load...) ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH] drm/amd/powerplay: Add read_sensor support to tonga/fiji/polaris/iceland

2016-09-15 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 35 +- .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c| 35 +- .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 34 - drivers/gpu/drm/amd

Powerplay sensors (v2.5)

2016-09-16 Thread Tom St Denis
I've rebased the backend to squash the carrizo + rest patches together and then touched up the debugfs entry per Edwards suggestions. Tested on Tonga, Carrizo, and Stoney. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.

[PATCH 2/2] drm/amd/amdgpu: Hook up read_sensor() to debugfs (v2)

2016-09-16 Thread Tom St Denis
(v2) Tidy'ed up read function. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 31 ++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 1/2] drm/amd/powerplay: Add read_sensor() callback to hwmgr (v2)

2016-09-16 Thread Tom St Denis
Provides standardized interface to read various sensors. The API is extensible (by adding to the end of the amd_pp_sensors enumeration list. Support has been added to Carrizo/Tonga/Fiji/Polaris/Iceland (v2) Squashed the two sensor patches into one. Signed-off-by: Tom St Denis --- drivers/gpu

[PATCH 1/2] drm/amd/powerplay: Add read_sensor() callback to hwmgr (v3)

2016-09-19 Thread Tom St Denis
Provides standardized interface to read various sensors. The API is extensible (by adding to the end of the amd_pp_sensors enumeration list. Support has been added to Carrizo/smu7 (v2) Squashed the two sensor patches into one. (v3) Updated to apply to smu7_hwmgr instead Signed-off-by: Tom St

powerplay sensors (v3)

2016-09-19 Thread Tom St Denis
Updated to refactor onto hwmgr changes. Now only adds to the carrizo and smu7 managers. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 2/2] drm/amd/amdgpu: Hook up read_sensor() to debugfs (v2)

2016-09-19 Thread Tom St Denis
(v2) Tidy'ed up read function. Signed-off-by: Tom St Denis Reviewed-by: Edward O'Callaghan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 31 ++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/

[PATCH] drm/amd/powerplay: Replace per-asic print_performance with generic

2016-09-19 Thread Tom St Denis
Replace per-asic print_current_performance() functions with generic that calls read_sensor. Tested on Tonga and Carrizo for aesthetics and accuracy. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

[PATCH 1/3] drm/amd/amdgpu: Remove division from vblank_wait

2016-09-22 Thread Tom St Denis
Removes division from vblank_wait for DCE v6, v8, and v10. Was already implemented for v11. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 8 +--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 8 +--- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 +--- 3 files

Remainder of small cleanups for DCEv6

2016-09-22 Thread Tom St Denis
Small cleanups to sync up DCEv6 with the style of the others ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 3/3] drm/amd/amdgpu: Various cleanups for DCEv6

2016-09-22 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 46 --- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index dce5414f4ae3..a4fa30b9924a 100644

[PATCH 2/3] drm/amd/amdgpu: Clean up afmt allocation in DCEv6.

2016-09-22 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index e41d583740b5..dce5414f4ae3 100644 --- a/drivers/gpu/drm

[PATCH 1/2] drm/amd/powerplay: Enable UVD powergating for SMU7

2016-09-30 Thread Tom St Denis
This patch enables detecting VCE/UVD PG features and fixes the UVD powergate function. Tested on a Tonga (by reading UVD tile/clk bits during playback/idle). Signed-off-by: Tom St Denis --- .../gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c| 12 +--- drivers/gpu/drm/amd

[PATCH 2/2] drm/amd/amdgpu: Enable UVD PG on Tonga

2016-09-30 Thread Tom St Denis
Tested by reading tile/clk bits during load/idle. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index c6bc3df36118..c4394a6b82e9 100644 --- a

Enable UVD PG for SMU7 and turn on for Tonga

2016-09-30 Thread Tom St Denis
Patch #1 fixes the UVD powergating function in the smu7 driver as well as senses vce/uvd features (so we can fix/add vce PG later on). Patch #2 enables it for tonga. Tested by reading tile/clk bits during load/idle. ___ amd-gfx mailing list amd-gfx@lis

Re: [PATCH] drm/amdgpu: remove duplicate evict_vram in suspend path

2016-10-05 Thread Tom St Denis
I proposed to remove that when running into SDMA job out-of-order issues and Christian K very strongly NAK'ed that (a couple of times). So I suspect he'll do it again. Tom On Wed, Oct 5, 2016 at 8:10 PM Dave Airlie wrote: > On 6 October 2016 at 05:42, Alex Deucher wrote: > > Looks like fallo

[PATCH] drm/amd/amdgpu: Allow broadcast on debugfs read

2016-10-09 Thread Tom St Denis
Allow any of the se/sh/instance fields to be specified as a broadcast by submitting 0x3FF. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd

[PATCH] drm/amd/amdgpu: Allow broadcast on debugfs read (v2)

2016-10-09 Thread Tom St Denis
Allow any of the se/sh/instance fields to be specified as a broadcast by submitting 0x3FF. (v2) Fix broadcast range checking Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

Re: [PATCH] drm/amdgpu: remove duplicate evict_vram in suspend path

2016-10-09 Thread Tom St Denis
Yup that's what I said in another part of the thread :-) i'm a trailblazer of bad ideas at times :-) hehehehe Tom On Sun, Oct 9, 2016 at 11:13 AM Christian König wrote: > Am 05.10.2016 um 21:42 schrieb Alex Deucher: > > Looks like fallout from a rebase or merge. > > > > Signed-off-by: Alex Deu

[PATCH] drm/amd/amdgpu: Make debugfs write compliment read

2016-10-10 Thread Tom St Denis
Add PG lock support as well as bank selection to the MMIO write function. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 43 ++ 1 file changed, 43 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm

Re: [PATCH] drm/amd/amdgpu: Make debugfs write compliment read

2016-10-10 Thread Tom St Denis
> > Am 10.10.2016 um 14:51 schrieb Tom St Denis: > > Add PG lock support as well as bank selection to > > the MMIO write function. > > > > Signed-off-by: Tom St Denis > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 43 >

[PATCH 2/3] drm/amd/amdgpu: Allow broadcast on debugfs read (v2)

2016-10-11 Thread Tom St Denis
Allow any of the se/sh/instance fields to be specified as a broadcast by submitting 0x3FF. (v2) Fix broadcast range checking Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH 3/3] drm/amd/amdgpu: Make debugfs write compliment read

2016-10-11 Thread Tom St Denis
Add PG lock support as well as bank selection to the MMIO write function. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 43 ++ 1 file changed, 43 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm

More debugfs entries

2016-10-11 Thread Tom St Denis
Resending the MMIO upgrades for completeness. Christian offered an ACK but I'd like to see a RB or NAK. This also adds a debugfs entry used to read wave data on CZ/VI platforms (tested on my Carrizo). The patch #3 already has a use in reading SQ information from user space so I'd like to advoc

[PATCH 1/3] drm/amd/amdgpu: Add wave reader to debugfs

2016-10-11 Thread Tom St Denis
Currently supports CZ/VI. Allows nearly atomic read of wave data from GPU. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu

[PATCH] drm/amd/amdgpu: Fix debugfs wave reader

2016-10-13 Thread Tom St Denis
On non VI/CZ platforms it would not free the grbm index lock. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

Fix lock imbalance in debugfs wave reader

2016-10-13 Thread Tom St Denis
I introduced a lock imbalance in the debugfs wave reader. This patch fixes that. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH] drm/radeon/si_dpm: Limit clocks on HD86xx part

2016-10-13 Thread Tom St Denis
Limit clocks on a specific HD86xx part to avoid crashes (while awaiting an appropriate PP fix). Signed-off-by: Tom St Denis --- drivers/gpu/drm/radeon/si_dpm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index

[PATCH] drm/amdgpu/si_dpm: Limit clocks on HD86xx part

2016-10-13 Thread Tom St Denis
From: Tom St Denis Limit clocks on a specific HD86xx part to avoid crashes (while awaiting an appropriate PP fix). Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu

[PATCH] drm/amd/amdgpu: re-factor debugfs wave reader

2016-10-14 Thread Tom St Denis
Move IP version specific code into a callback. Also add support for gfx7 devices. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 25

[PATCH] drm/amd/amdgpu: Put in rest of wave fields

2016-10-14 Thread Tom St Denis
Add the rest of the basic SQ WAVE fields to finish off the implementation. Eventually, a separate interface will be needed for GPRs. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 ++ 2 files changed, 12

Clean up indirect SQ register accessors for gfx7/8

2016-11-07 Thread Tom St Denis
Denumberify the two indirect accessors to make the code cleaner. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 1/2] drm/amd/amdgpu: Clean up wave gfx7 helper

2016-11-07 Thread Tom St Denis
De-numberify indirect register access for gfx v7. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 4dda3ddb3fec

[PATCH 2/2] drm/amd/amdgpu: Clean up wave gfx8 helper

2016-11-07 Thread Tom St Denis
De-numberify indirect register access for gfx v8. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 4f46d706675b

[PATCH] drm/amd/amdgpu: Fix gfxv6 driver issues from porting to new headers

2016-11-10 Thread Tom St Denis
This patch fixes a couple of bugs that fell out from the porting effort. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0

[PATCH] drm/amd/amdgpu: Port GMC v6 driver to new SI headers (v2)

2016-11-10 Thread Tom St Denis
Port the GMC v6 driver over to the new SI headers. Tested with a Tahiti SI ASIC. (v2) Fixed a couple of typos (in commented code) and moved defines to si_enums.h Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 323 ++ drivers/gpu

[PATCH] drm/amd/amdgpu: port of DCE v6 to new headers

2016-11-14 Thread Tom St Denis
Port of SI DCE v6 over to new AMDGPU headers. Tested on a Tahiti with GNOME through various hot plugs/rotations/sizes/fullscreen/windowed and staging drm/xf86-video-amdgpu. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 441 +++-- drivers

[PATCH 1/2] drm/amd/amdgpu: port of DCE v6 to new headers (v2)

2016-11-14 Thread Tom St Denis
Port of SI DCE v6 over to new AMDGPU headers. Tested on a Tahiti with GNOME through various hot plugs/rotations/sizes/fullscreen/windowed and staging drm/xf86-video-amdgpu. (v2) Re-factored to remove formatting changes to si_enums.h as well rename various defines. Signed-off-by: Tom St

[PATCH 2/2] drm/amd/amdgpu: Tidy up formatting in si_enums.h

2016-11-14 Thread Tom St Denis
Clean up formatting/alignment in si_enums.h to make it more presentable. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/si_enums.h | 241 +- 1 file changed, 121 insertions(+), 120 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_enums.h b

debugfs support for reading GPRs

2016-12-05 Thread Tom St Denis
The following patches add support for GFX v6, v7, and v8 to allow userspace to read GPRs (SGPRs) via debugfs. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 3/3] drm/amd/amdgpu: Add gpr reading for GFX v7

2016-12-05 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index bbef2e86ea1f..4c4fb9bdd185 100644 --- a/drivers/gpu/drm/amd

[PATCH 2/3] drm/amd/amdgpu: Add gpr reading for GFX v6

2016-12-05 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c index c0b2f4ebadea..01b58c65f37c 100644 --- a/drivers/gpu/drm/amd

[PATCH 1/3] drm/amd/amdgpu: Add debugfs support for reading GPRs

2016-12-05 Thread Tom St Denis
Implemented for SGPRs for GFX v8 initially. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 72 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 25 +++ 3 files changed, 99

[PATCH 3/3] drm/amd/amdgpu: Add gpr reading for GFX v7

2016-12-06 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index bbef2e86ea1f..4c4fb9bdd185 100644 --- a/drivers/gpu/drm/amd

[PATCH 1/3] drm/amd/amdgpu: Add debugfs support for reading GPRs (v2)

2016-12-06 Thread Tom St Denis
Implemented for SGPRs for GFX v8 initially. (v2) cleanup minor whitespace and remove sanity check and addressing is in dwords not bytes Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 67

[PATCH 2/3] drm/amd/amdgpu: Add gpr reading for GFX v6

2016-12-06 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c index c0b2f4ebadea..01b58c65f37c 100644 --- a/drivers/gpu/drm/amd

GPR read support via debugfs (v2)

2016-12-06 Thread Tom St Denis
These patches introduce debugfs access to read GPRs (SGPRs for now). (v2): Fixes white space, addressing is in dwords not bytes, and removes the buggy sanity checking. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedeskto

[PATCH] drm/amd/amdgpu: Add pcie indirect support to amdgpu_mm_wreg_mmio_rlc()

2022-01-07 Thread Tom St Denis
The function amdgpu_mm_wreg_mmio_rlc() is used by debugfs to write to MMIO registers. It didn't support registers beyond the BAR mapped MMIO space. This adds pcie indirect write support. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++- 1 file chang

[PATCH] drm/amd/amdgpu: Add ip_discovery_text sysfs entry

2022-01-24 Thread Tom St Denis
{0} v3.0.0: 01a0 02409c00 DF{0} v3.0.0: 7000 0240b800 DFX{0} v4.1.0: 0580 02409400 DFX_DAP{0} v2.0.0: 05a0 00b8 0240c400 DMU{0} v2.0.2: 0012 00c0 34c0 9000 02403c00 FUSE{0} v11.0.0: 00017400 02401400 GC{0} v10.1.10: 1260 a000 02402c00 Signed-off-by: Tom St

[PATCH] drm/amd/amdgpu: Add ip_discovery_text sysfs entry (v2)

2022-01-25 Thread Tom St Denis
buffer size and fix alignment in amdgpu.h Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 79 ++- 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

Re: drm/amd/amdgpu: Add ip_discovery_text sysfs entry (v2)

2022-01-26 Thread Tom St Denis
Thanks, if we don't end up dropping this patchset I'll incorporate your suggestions into a v3. Tom On Wed, Jan 26, 2022 at 12:36 AM Limonciello, Mario < mario.limoncie...@amd.com> wrote: > A few suggestion ideas inline. > > On 1/25/2022 12:18, Tom St Denis wrote:

[PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers

2021-08-24 Thread Tom St Denis
need be. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 177 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h | 32 2 files changed, 209 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/a

Re: [PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers

2021-08-24 Thread Tom St Denis
OCTL interface in order to pass > >> along state information like SRBM and GRBM bank switching. This > >> new interface also allows a full 32-bit MMIO address range which > >> the previous didn't. With this new design we have room to grow > >> the flexibility

Re: [PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers

2021-08-24 Thread Tom St Denis
hehehe I just moved it to uapi... No worries, you're the maintainer, I'll move it back before posting v2. Cheers, Tom On Tue, Aug 24, 2021 at 9:22 AM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 24.08.21 um 14:42 schrieb Tom St Denis: > > The IOC

[PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers (v2)

2021-08-24 Thread Tom St Denis
need be. (v2): Move read/write to .read/.write, fix style, add comment for IOCTL data structure Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 162 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h | 32 2 files changed, 194 inser

[PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers (v3)

2021-08-24 Thread Tom St Denis
need be. (v2): Move read/write to .read/.write, fix style, add comment for IOCTL data structure (v3): C style comments Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 162 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h | 32 2 files ch

Re: [PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers (v2)

2021-08-25 Thread Tom St Denis
I'll send a v4 in a bit this morning Tom On Wed, Aug 25, 2021 at 2:35 AM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > > > Am 24.08.21 um 15:36 schrieb Tom St Denis: > > This new debugfs interface uses an IOCTL interface in order to pass >

Re: [PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers (v2)

2021-08-25 Thread Tom St Denis
as well, just make sure that you don't have any hidden > padding. > > Nirmoy had a tool to double check for paddings which I once more forgot > the name of. > > Christian. > > Am 25.08.21 um 12:40 schrieb Tom St Denis: > > The struct works as is but I'll c

Re: [PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers (v2)

2021-08-25 Thread Tom St Denis
md/amdgpu/amdgpu.o -C amdgpu_debugfs_regs2_iocdata > > It has a rather nifty output with padding holes, byte addresses, cache > lines etc for your structure. > > Christian. > > Am 25.08.21 um 13:04 schrieb Tom St Denis: > > I tested it by forcing bit patterns into the ioctl da

[PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers (v4)

2021-08-25 Thread Tom St Denis
need be. (v2): Move read/write to .read/.write, fix style, add comment for IOCTL data structure (v3): C style comments (v4): use u32 in struct and remove offset variable Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 158 drivers/gpu/dr

[PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers (v5)

2021-08-25 Thread Tom St Denis
igned-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 150 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_umr.h | 51 +++ 3 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 drivers/gp

[PATCH] drm/amd/amdgpu: Add missing mp_11_0_8_sh_mask.h header

2021-09-27 Thread Tom St Denis
The commit 9b716ef1501b2e62181073493dc1c7a17140bd21 added the offset header but didn't add the masks. This adds the masks based on what was selected for the offsets. Signed-off-by: Tom St Denis --- .../include/asic_reg/mp/mp_11_0_8_sh_mask.h | 355 ++ 1 file changed

[PATCH] drm/amd/amdgpu: move dpcs headers to dpcs directory

2021-10-20 Thread Tom St Denis
Move dpcs headers from asic_reg/dcn to asic_reg/dpcs. Update various .c files to include new path. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 4 ++-- drivers/gpu/drm/amd

[PATCH] drm/amd/amdgpu: Add APU flag and asic_type to gca_config debugfs data

2022-02-15 Thread Tom St Denis
Needed by umr to detect if ip discovered ASIC is an APU or not. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu

<    1   2   3   4   5   6   7   8   9   10   >