Re: [PATCH] drm/amdgpu: add flag for high priority contexts

2017-01-05 Thread Christian König
Am 04.01.2017 um 21:56 schrieb Andres Rodriguez: Hey Serguei On 2017-01-04 07:56 AM, Christian König wrote: Am 04.01.2017 um 12:03 schrieb Sagalovitch, Serguei: Andres, I have on rather generic design question: Why we want to restrict it to CAP_SYS_ADMIN? + if (priority == AMD_SCHED_

Re: code review of amdgpu change

2017-01-05 Thread Christian König
In general please don't use HTML mail for public mailing lists, those mails are usually rejected by most lists (but not amd-gfx). Apart from that the patch looks sane to me and is Acked-by: Christian König . Regards, Christian. Am 04.01.2017 um 20:54 schrieb Lin, Amber: Current amdgpu allo

[PART1 PATCH 0/8] Introduce a method to get clock gating status dynamically

2017-01-05 Thread Huang Rui
This series patches implement to get the clock gating status dynamically into debugfs. User will enter profiling mode to runtime disable clockgating, so it needs an interface to expose clock gating states. Part 1 works for VI, I will implement it on CI/SI in following days. Here is the example on

[PART1 PATCH 4/8] drm/amdgpu: add clockgating_state method for gmc v8

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c index 2f36417..6f46562 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +++ b/d

[PART1 PATCH 3/8] drm/amdgpu: add clockgating_state method for gfx v8

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 40 +++ 1 file changed, 40 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index c4afa8e..25e5670 100644 --- a/drivers/gpu/drm/amd/amdgpu

amd-gfx@lists.freedesktop.org

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 12 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 12 2 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c index 03a35d9..9f1d8f6 1006

[PART1 PATCH 5/8] drm/amdgpu: add clockgating_state method for sdma v3

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c index 4ca38a1..581f4a3 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c ++

[PART1 PATCH 1/8] drm/amdgpu: introduce an interface to get clock gating status dynamically

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 drivers/gpu/drm/amd/include/amd_shared.h | 2 ++ 4 files changed, 19 insertions(+) diff --git a/d

[PART1 PATCH 6/8] drm/amdgpu: add clockgating_state method for vi common

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/vi.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index 2523f31..88e3fd7 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm

[PART1 PATCH 8/8] drm/amdgpu: add clockgating_state method for vce v3

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index 35ff1c3..15742e0 100644 --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +++ b

[PART1 PATCH 2/8] drm/amdgpu: add parse clock gating state

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 95 ++ 1 file changed, 95 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 7aa561d..431bae4 100644 --- a/drivers/gpu/drm/amd/amdg

RE: code review of amdgpu change

2017-01-05 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Lin, Amber Sent: Wednesday, January 04, 2017 2:55 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix; Russell, Kent Subject: code review of amdgpu change Current amdgpu allows to disable PC

RE: [PART1 PATCH 0/8] Introduce a method to get clock gating status dynamically

2017-01-05 Thread Deucher, Alexander
> -Original Message- > From: Huang Rui [mailto:ray.hu...@amd.com] > Sent: Thursday, January 05, 2017 8:50 AM > To: Deucher, Alexander; amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex; Mao, David; Fu, Ping; Zhang, Hawking; Huang, Ray > Subject: [PART1 PATCH 0/8] Introduce a method to get clock

Re: [PART1 PATCH 0/8] Introduce a method to get clock gating status dynamically

2017-01-05 Thread StDenis, Tom
Some of them are part of AON tiles but are unstable during PM switches. That's why the debugfs mmio entry supports a PM lock. So they might be readable while powered off but unstable if the firmware is in the middle of a PM switch. Tom From: amd-gfx on beh

Re: [PART1 PATCH 2/8] drm/amdgpu: add parse clock gating state

2017-01-05 Thread Felix Kuehling
This could be done with much less code duplication: static const struct { u32 flag; const char *name; } clocks[] = { {AMD_CG_SUPPORT_GFX_MGCG, "Medium Grain Clock Gating"}, {AMD_CG_SUPPORT_GFX_MGLS, "Medium Grain memor

Re: [PART1 PATCH 2/8] drm/amdgpu: add parse clock gating state

2017-01-05 Thread William Lewis
Minor nit. s/Grain/Grained/ Also, amdgpu_clockgating_state as a function name does not seem explicit enough as to what it's doing, maybe amdgpu_get_clockgating_state? On 01/05/17 07:49, Huang Rui wrote: > Signed-off-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 95 > +++

Re: Shared semaphores for amdgpu

2017-01-05 Thread Andres Rodriguez
Cool, thanks for the heads up David. Regards, Andres On 1/4/2017 11:13 PM, Mao, David wrote: Hi Andres, We have a local change made yesterday which eliminate the need to get unused fd in the creation time. If everything goes well, I expect the change could be sent out for review next w

[PATCH 03/10] drm/amdgpu: update si kicker smc firmware

2017-01-05 Thread Alex Deucher
From: Flora Cui Signed-off-by: Flora Cui Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 57 ++--- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/amd/amd

[PATCH 01/10] drm/radeon/si: load special ucode for certain MC configs

2017-01-05 Thread Alex Deucher
Required for certain MC configs. Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/si.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index ad4d7b8..bbc239e 100644 --- a/drivers/gpu/drm/radeon/si.c +

[PATCH 07/10] drm/amdgpu: drop oland quirks

2017-01-05 Thread Alex Deucher
Fixed by the new 58 MC firmware. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c index 10bedfa..34cb7ea 100644 --- a/drivers/gpu/drm/amd/

[PATCH 05/10] drm/radeon: drop verde dpm quirks

2017-01-05 Thread Alex Deucher
fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98897 https://bugs.launchpad.net/bugs/1651981 Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org Cc: Adrian Fiergolski --- drivers/gpu/drm/radeon/si_dpm.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/ra

[PATCH 04/10] drm/radeon: update smc firmware selection for SI

2017-01-05 Thread Alex Deucher
Use the appropriate smc firmware for each chip revision. Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org --- drivers/gpu/drm/radeon/si.c | 60 + 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/radeon/si.c b/driver

[PATCH 09/10] drm/radeon: drop oland quirks

2017-01-05 Thread Alex Deucher
Fixed by the new 58 MC firmware. Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/si_dpm.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 13ba73f..668060f 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +

[PATCH 02/10] drm/amdgpu/si: load special ucode for certain MC configs

2017-01-05 Thread Alex Deucher
Required for certain MC configs. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c index 45a573e..3864682 100644 --- a/

[PATCH 10/10] drm/radeon: drop the mclk quirk for hainan

2017-01-05 Thread Alex Deucher
fixed by the new 58 mc firmware. Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/si_dpm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 668060f..2944916 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/

[PATCH 08/10] drm/amdgpu: drop the mclk quirk for hainan

2017-01-05 Thread Alex Deucher
fixed by the new 58 mc firmware. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c index 34cb7ea..e9242d6 100644 --- a/drivers/gpu/drm/amd/amdgpu/si_dpm

[PATCH 06/10] drm/amdgpu: drop verde dpm quirks

2017-01-05 Thread Alex Deucher
Port of radeon change to amdgpu. Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c index 0566e9a..10bedfa 1006

Re: [PATCH] drm/amdgpu: add flag for high priority contexts

2017-01-05 Thread Andres Rodriguez
Hey Michel, Sounds fair. I don't think we are in a rush to get this merged until it actually can provide the guarantees that we need. I've gotten some good feedback on code change improvements, and that should be enough to get me to the next stage with HW support. I'll send and updated patc

Re: [PART1 PATCH 0/8] Introduce a method to get clock gating status dynamically

2017-01-05 Thread Huang Rui
On Thu, Jan 05, 2017 at 11:40:33PM +0800, Deucher, Alexander wrote: > > -Original Message- > > From: Huang Rui [mailto:ray.hu...@amd.com] > > Sent: Thursday, January 05, 2017 8:50 AM > > To: Deucher, Alexander; amd-gfx@lists.freedesktop.org > > Cc: Zhu, Rex; Mao, David; Fu, Ping; Zhang, Haw

Re: [PART1 PATCH 2/8] drm/amdgpu: add parse clock gating state

2017-01-05 Thread Huang Rui
On Thu, Jan 05, 2017 at 11:33:38AM -0500, Felix Kuehling wrote: > This could be done with much less code duplication: > > static const struct { > u32 flag; > const char *name; > } clocks[] = { > {AMD_CG_SUPPORT_GFX_MGCG, "Medium Grain Clock Gat

Re: [PART1 PATCH 2/8] drm/amdgpu: add parse clock gating state

2017-01-05 Thread Huang Rui
On Thu, Jan 05, 2017 at 04:34:45PM +, William Lewis wrote: > Minor nit. > > s/Grain/Grained/ > > Also, amdgpu_clockgating_state as a function name does not seem explicit > enough as to what it's doing, maybe amdgpu_get_clockgating_state? > Yep, thanks to reminder. Thanks, Rui

[PART1 PATCH v2 2/8] drm/amdgpu: add parse clock gating state

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Cc: William Lewis Cc: Felix Kuehling --- William, "Medium Grain Clock Gating" is referred from HW spec. So it's better to align with it. I updated function name from clockgating_state to get_clockgating_state. Thanks, Rui --- drivers/gpu/d

[PART1 PATCH v2 8/8] drm/amdgpu: add get clockgating_state method for vce v3

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 37 +++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h ind

[PART1 PATCH v2 0/8] Introduce a method to get clock gating status dynamically

2017-01-05 Thread Huang Rui
This series patches implement to get the clock gating status dynamically into debugfs. User will enter profiling mode to runtime disable clockgating, so it needs an interface to expose clock gating states. Part 1 works for VI, I will implement it on CI/SI in following days. Changes from V1 -> V2:

amd-gfx@lists.freedesktop.org

2017-01-05 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 26 -- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 26 -- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/