RE: drm/amd/powerplay: expose max engine and memory clock info for powerplay enabled case

2016-10-12 Thread Deucher, Alexander
I don't know if we need to add a cgs call to fill in the max_clock_voltage_limits structure. That's mostly just leftover from radeon. A better solution would be use the existing amdgpu_dpm_get_sclk and amdgpu_dpm_get_mclk macros. Maybe something like the attached patch? Unless there is a

[PATCH 7/8] drm/amdgpu/powerplay: add an implementation for get_vce_clock_state (v2)

2016-10-12 Thread Alex Deucher
Used by the powerplay dpm code. v2: update to the new API Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c

[PATCH] drm/radeon: change vblank_time's calculation method to reduce computational error.

2016-10-12 Thread Alex Deucher
Ported from Rex's amdgpu change. Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org --- drivers/gpu/drm/radeon/r600_dpm.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/radeon/r600_dpm.c

Re: [PATCH 2/2] drm/amdgpu: add VCE VM session tracking

2016-10-12 Thread Leo Liu
On 10/12/2016 07:05 AM, Christian König wrote: Andy & Leo could you give that a brief testing? run `kill -9' over 30 times, no issue. Patch is: Reviewed-and-Tested by: Leo Liu I currently don't have a setup for encoding/transcoding clips. Regards, Christian. Am

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

2016-10-12 Thread StDenis, Tom
It comes from amdgpu_query_gpu_info_init() for (i = 0; i < (int)dev->info.num_shader_engines; i++) { unsigned instance = (i << AMDGPU_INFO_MMR_SE_INDEX_SHIFT) | (AMDGPU_INFO_MMR_SH_INDEX_MASK <<

Re: [PATCH 2/2] drm/amdgpu: add VCE VM session tracking

2016-10-12 Thread Andy Furniss
Christian König wrote: Andy & Leo could you give that a brief testing? Seems to be OK for me. I currently don't have a setup for encoding/transcoding clips. Regards, Christian. Am 10.10.2016 um 18:45 schrieb Alex Deucher: On Mon, Oct 10, 2016 at 9:40 AM, Christian König

Re: [PATCH 4/4] drm/amdgpu: used cached gca values for vi_read_register

2016-10-12 Thread Andy Furniss
Grazvydas Ignotas wrote: On Wed, Oct 12, 2016 at 2:48 AM, Andy Furniss wrote: I still can't shutdown/reboot as in https://bugs.freedesktop.org/show_bug.cgi?id=98200 which is fixed for radeon, but apparently not (for me at least) with amdgpu. You probably need

RE: [PATCH] drm/amd/powerplay: don't give up if DPM is already running

2016-10-12 Thread Zhu, Rex
Hi Grazvydas and Alex, We needed to disable dpm when rmmod amdgpu for this issue. I am checking the function of disable dpm task. Best Regards Rex -Original Message- From: Alex Deucher [mailto:alexdeuc...@gmail.com] Sent: Wednesday, October 12, 2016 4:01 AM To: Grazvydas Ignotas;

Re: [PATCH 4/4] drm/amdgpu: used cached gca values for vi_read_register

2016-10-12 Thread Grazvydas Ignotas
On Wed, Oct 12, 2016 at 2:48 AM, Andy Furniss wrote: > > I still can't shutdown/reboot > as in https://bugs.freedesktop.org/show_bug.cgi?id=98200 > which is fixed for radeon, but apparently not (for me at least) with amdgpu. You probably need a951ed85abd46 that went to

Re: [PATCH 5/6] drm/amdgpu/powerplay: add an implementation for get_vce_clock_table

2016-10-12 Thread Christian König
Hi Rex, So amd_vce_state is our hardware representation and drm_amdgpu_info_vce_clock_table is the IOCTL interface structure? Is there a reason for not using drm_amdgpu_info_vce_clock_table directly in the hw manager, except that we don't want to include the IOCTL interface here? Cause

RE: [PATCH 5/6] drm/amdgpu/powerplay: add an implementation for get_vce_clock_table

2016-10-12 Thread Zhu, Rex
Hi Christian, I mean patch 5 can be changed as static struct amd_vce_state* pp_dpm_get_vce_clock_table(void *handle, int num) { PP_CHECK((struct pp_instance *)handle); hwmgr = ((struct pp_instance *)handle)->hwmgr; if (hwmgr && num < hwmgr->num_vce_state_tables) return

Re: [PATCH 5/6] drm/amdgpu/powerplay: add an implementation for get_vce_clock_table

2016-10-12 Thread Christian König
Hi Rex, the problem with this approach is that you need to copy the entries from one structure to another, like we have below: > + vce_clk_table.entries[i].sclk = hwmgr->vce_states[i].sclk; > + vce_clk_table.entries[i].mclk =

RE: [PATCH 5/6] drm/amdgpu/powerplay: add an implementation for get_vce_clock_table

2016-10-12 Thread Zhu, Rex
Hi Alex, In Patch1, I moved struct amdgpu_vce_states to amd_shared.h from amdgpu.h. So in powerplay, we used same vce state definition. So the define of static struct drm_amdgpu_info_vce_clock_table pp_dpm_get_vce_clock_table(void *handle) Can change to static struct amd_vce_state

drm/amd/powerplay: expose max engine and memory clock info for powerplay enabled case

2016-10-12 Thread Quan, Evan
Hi All, We found the max engine clock and max memory clock are both wrongly reported as 0(by AMDGPU_INFO_DEV_INFO ioctl). The attached patch tries to fix it. Please help to review it. Any comment is welcomed. Regards, Evan 0001-drm-amd-powerplay-expose-max-engine-memory-clock-inf.patch

Re: [PATCH 1/2] drm/radeon: fix up dp aux tear down

2016-10-12 Thread Michel Dänzer
On 12/10/16 01:26 AM, Alex Deucher wrote: > Port the amdgpu fixes from Grazvydas to radeon. > > bug: > https://bugs.freedesktop.org/show_bug.cgi?id=98200 > > Signed-off-by: Alex Deucher [...] > @@ -938,6 +948,7 @@ static void radeon_connector_destroy(struct