RE: [PATCH] drm/amdgpu:implement CONTEXT_CONTROL (v3)

2016-09-06 Thread Liu, Monk
1. Don't touch the preamble flag at all, just keep that handling as it is for now. 2. Add the CONTEXT_CONTROL with the appropriate handling on context switch and bump the version number to signal that this is done. 3. When #2 is upstream we hack on Mesa to drop the CONTEXT_CONTROL packets from

[Updated PATCH v2] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-06 Thread Huang Rui
In previous drm_global_item_ref, there are two times of writing ref->object if item->refcount is 0. So this patch does a minor update to put alloc and init ref firstly, and then to modify the item of glob array. Use "else" to avoid two times of writing ref->object. It can make the code logic more c

Re: [PATCH v2] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-06 Thread Huang Rui
Sorry, please ignore this V2, there is a typo in "goto out" at this patch. I will send a "update V2" later. Thanks, Rui On Wed, Sep 07, 2016 at 11:26:39AM +0800, Huang Rui wrote: > In previous drm_global_item_ref, there are two times of writing > ref->object if item->refcount is 0. So this patch

[PATCH v2] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-06 Thread Huang Rui
In previous drm_global_item_ref, there are two times of writing ref->object if item->refcount is 0. So this patch does a minor update to put alloc and init ref firstly, and then to modify the item of glob array. Use "else" to avoid two times of writing ref->object. It can make the code logic more c

[PATCH] drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stop

2016-09-06 Thread Michel Dänzer
From: Michel Dänzer Without this, we were only ever using the first 256MB of VRAM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97593 Tested-by: Konstantin A. Lepikhov Tested-by: Arek Ruśniak Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 5 + 1 file cha

Re: [PATCH] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-06 Thread Huang Rui
On Tue, Sep 06, 2016 at 10:33:18PM +0800, Sean Paul wrote: > On Mon, Sep 5, 2016 at 3:00 AM, Huang Rui wrote: > > In previous drm_global_item_ref, there are two times of writing > > ref->object if item->refcount is 0. So this patch does a minor update > > to put alloc and init ref firstly, and the

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

2016-09-06 Thread Edward O'Callaghan
Patches 1-6 are, Reviewed-by: Edward O'Callaghan Patch 7 is, Acked-by: Edward O'Callaghan On 09/07/2016 02:18 AM, Tom St Denis wrote: > Various cleanups including simplifications, LOC reductions > and whitespace corrections. > > ___ > amd-gfx mailing

Re: [PATCH] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-06 Thread Sean Paul
On Mon, Sep 5, 2016 at 3:00 AM, Huang Rui wrote: > In previous drm_global_item_ref, there are two times of writing > ref->object if item->refcount is 0. So this patch does a minor update > to put alloc and init ref firstly, and then to modify the item of glob > array. Use "else" to avoid two times

[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 in

[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/dri

[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/gpu

[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 7b9debefd64

[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

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..2a72b

Re: [PATCH 2/2] drm/amdgpu: bind GTT on demand

2016-09-06 Thread Christian König
Am 06.09.2016 um 11:53 schrieb zhoucm1: On 2016年09月06日 17:41, Christian König wrote: From: Christian König We don't really need the GTT table any more most of the time. Why? I thought GTT bo is always needed to be bound when GPU is trying to access it, doesn't it? We only need it to be bo

Re: [PATCH 2/2] drm/amdgpu: bind GTT on demand

2016-09-06 Thread zhoucm1
On 2016年09月06日 17:41, Christian König wrote: From: Christian König We don't really need the GTT table any more most of the time. Why? I thought GTT bo is always needed to be bound when GPU is trying to access it, doesn't it? Regards, David Zhou So bind it only on demand. Signed-off-by:

[PATCH 2/2] drm/amdgpu: bind GTT on demand

2016-09-06 Thread Christian König
From: Christian König We don't really need the GTT table any more most of the time. So bind it only on demand. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 34 -- drivers/gpu/drm/a

[PATCH 1/2] drm/amdgpu: fix GTT offset handling

2016-09-06 Thread Christian König
From: Christian König Otherwise we run into problems on 32bit systems with more than 4GB GART. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/dr

Re: [PATCH] drm/amdgpu:implement CONTEXT_CONTROL (v3)

2016-09-06 Thread Christian König
1) Is that my patch must work with current MESA driver ? (even MESA doesn't change any bit of its logic) ? Yes and it must work with all old versions of Mesa. This is usual the tricky part to get right and most of my concern right now. 2) is that my patch can let kmd go to a new path (using C

RE: [PATCH] drm/amdgpu:implement CONTEXT_CONTROL (v3)

2016-09-06 Thread Liu, Monk
Hi Bas & Christian I'm not familiar with the policy of upstream kernel driver, so I cannot say if your proposal is doable or not, I have questions: 1) Is that my patch must work with current MESA driver ? (even MESA doesn't change any bit of its logic) ? 2) is that my patch can let kmd go to a

amd-gfx mailing list now tracked in patchwork

2016-09-06 Thread Michel Dänzer
The amd-gfx mailing list is now tracked in patchwork: https://patchwork.freedesktop.org/project/amd-xorg-ddx/patches/ The status of xf86-video-amdgpu patches should get updated automatically when they are pushed to the main repository, but other patches need to be updated manually. Everybody is

Re: [PATCH v2 00/15] drm/amdgpu/si: Make SI DPM workable

2016-09-06 Thread Michel Dänzer
On 06/09/16 05:16 PM, Huang Rui wrote: > On Tue, Sep 06, 2016 at 04:04:10PM +0800, Marek Olšák wrote: >> On Tue, Sep 6, 2016 at 4:35 AM, Huang Rui wrote: >>> On Tue, Sep 06, 2016 at 03:31:46AM +0800, Marek Olšák wrote: Hi Rui, Do you have Tahiti LE in the office? It might be worth t

Re: [PATCH v2 00/15] drm/amdgpu/si: Make SI DPM workable

2016-09-06 Thread Huang Rui
On Tue, Sep 06, 2016 at 04:04:10PM +0800, Marek Olšák wrote: > On Tue, Sep 6, 2016 at 4:35 AM, Huang Rui wrote: > > On Tue, Sep 06, 2016 at 03:31:46AM +0800, Marek Olšák wrote: > >> Hi Rui, > >> > >> Do you have Tahiti LE in the office? It might be worth testing it to > >> see if it works. There w

Re: [PATCH v2 00/15] drm/amdgpu/si: Make SI DPM workable

2016-09-06 Thread Marek Olšák
On Tue, Sep 6, 2016 at 4:35 AM, Huang Rui wrote: > On Tue, Sep 06, 2016 at 03:31:46AM +0800, Marek Olšák wrote: >> Hi Rui, >> >> Do you have Tahiti LE in the office? It might be worth testing it to >> see if it works. There were some issues with it in the past. >> > > I used Tahiti XT [Device ID 6