[PATCH v2] drm/amd/amdgpu: S4 issue for amdgpu

2016-09-02 Thread jimqu
reset the asic if adapter is not powerdown when doing freeze() thaw() and restore(), in order to get a valid state of adapter. Change-Id: Ibb03ab3c2ce6ef3c83affbe767308dc22474f563 Signed-off-by: JimQu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +-- drivers/gpu/drm/amd/am

Re: [PATCH 2/2] drm/radeon: handle runtime pm in fbcon (v2)

2016-09-02 Thread Edward O'Callaghan
On 09/03/2016 01:18 AM, Alex Deucher wrote: > Ported from nouveau. > > v2: re-enable runtime autosuspend in the error case > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/radeon/radeon_fb.c | 28 > 1 file changed, 28 insertions(+) > > diff --git a/drivers

Re: [PATCH 2/4] radeonkfd/amdkfd: Implement get_local_mem_info()

2016-09-02 Thread Edward O'Callaghan
On 09/03/2016 12:49 PM, Edward O'Callaghan wrote: > Signed-off-by: Edward O'Callaghan > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 32 > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 3 ++- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2

[PATCH 4/4] amdkfd: Fix possible dangling ptr in kfd_dbgmgr_destroy()

2016-09-02 Thread Edward O'Callaghan
Signed-off-by: Edward O'Callaghan --- drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c b/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c index 56d6763..8a26d5a 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c +++ b/dr

[PATCH 2/4] radeonkfd/amdkfd: Implement get_local_mem_info()

2016-09-02 Thread Edward O'Callaghan
Signed-off-by: Edward O'Callaghan --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 32 --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 +- d

[PATCH 3/4] amdkfd: Add some missing memset zero'ing in queue init func

2016-09-02 Thread Edward O'Callaghan
Signed-off-by: Edward O'Callaghan --- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c index 9beae87..fa23342 100644 --- a/drivers/gp

amdkfd - misc fixes + get_local_mem_info() port

2016-09-02 Thread Edward O'Callaghan
The following series applies on top of either master or the drm-next-4.9 branch. Apart from the couple of misc fixes here we port out the 'get_local_mem_info()' helper out of the ROCm kernel patch mountain and hook that up so to be mainlined. Edward O'Callaghan (4): [PATCH 1/4] amdkfd: Tidy up

[PATCH 1/4] amdkfd: Tidy up kfd_generate_gpu_id() uint64_t bitshift unpack

2016-09-02 Thread Edward O'Callaghan
Dereference the one time and unpack the lower and upper 32bit portions with the proper kernel helper macros. Signed-off-by: Edward O'Callaghan --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_

[PATCH] drm/amdgpu/vi: Use correct external_rev_id for stoney

2016-09-02 Thread Alex Deucher
From: Jordan Lazare Reviewed-by: Alex Deucher Signed-off-by: Jordan Lazare Cc: sta...@vger.kernel.org Signed-off-by: Alex Deucher --- 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/amdgp

Re: [PATCH v4 xserver 0/4] modesetting: add DRI2 page flip support

2016-09-02 Thread Adam Jackson
On Mon, 2016-08-22 at 18:14 +0800, Qiang Yu wrote: > Hi guys, > > This patch set is for adding DRI2 page flip support to modesetting > driver. I mainly take reference of amdgpu DDX and reuse present > page flip code in the modesetting driver. remote: I: patch #106902 updated using rev a586bf9ccf

[PATCH 2/2] drm/radeon: handle runtime pm in fbcon (v2)

2016-09-02 Thread Alex Deucher
Ported from nouveau. v2: re-enable runtime autosuspend in the error case Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_fb.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c

[PATCH 1/2] drm/amdgpu: handle runtime pm in fbcon (v2)

2016-09-02 Thread Alex Deucher
Ported from nouveau. v2: re-enable runtime autosuspend in the error case Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/

Re: [PATCH] drm/amd/amdgpu: S4 issue for amdgpu

2016-09-02 Thread Alex Deucher
On Thu, Sep 1, 2016 at 2:22 AM, jimqu wrote: > reset the asic if adapter is not powerdown when doing freeze() > thaw() and restore(), in order to get a valid state of adapter. > > Change-Id: Id2e4587c06b556eb651ab9277ffc903f780dea56 > Signed-off-by: JimQu > --- > drivers/gpu/drm/amd/amdgpu/amdgp

Re: Merge get_rptr and get_wptr functions

2016-09-02 Thread Christian König
Am 02.09.2016 um 15:58 schrieb Deucher, Alexander: -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Tom St Denis Sent: Friday, September 02, 2016 8:49 AM To: amd-gfx@lists.freedesktop.org Subject: Merge get_rptr and get_wptr functions These pat

RE: Merge get_rptr and get_wptr functions

2016-09-02 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Tom St Denis > Sent: Friday, September 02, 2016 8:49 AM > To: amd-gfx@lists.freedesktop.org > Subject: Merge get_rptr and get_wptr functions > > These patches merge the ring get_rptr and get_

RE: [PATCH xf86-video-ati 4/4] Make TearFree effective with PRIME slave scanout

2016-09-02 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Friday, September 02, 2016 6:04 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-ati 4/4] Make TearFree effective with PRIME > slave scanout > > From:

RE: [PATCH 03/10] drm/amdgpu: handle runtime pm in fbcon

2016-09-02 Thread Deucher, Alexander
> -Original Message- > From: Michel Dänzer [mailto:mic...@daenzer.net] > Sent: Thursday, September 01, 2016 9:47 PM > To: Alex Deucher > Cc: amd-gfx list; Deucher, Alexander > Subject: Re: [PATCH 03/10] drm/amdgpu: handle runtime pm in fbcon > > On 02/09/16 05:44 AM, Alex Deucher wrote: >

RE: [PATCH] drm/amd/amdgpu: S4 issue for amdgpu

2016-09-02 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Qu, Jim > Sent: Thursday, September 01, 2016 9:07 PM > To: Alex Deucher > Cc: amd-gfx list > Subject: 答复: [PATCH] drm/amd/amdgpu: S4 issue for amdgpu > > Hi Alex: > > Weird, last day, I used

Re: [PATCH 2/2] drm/amdgpu: prevent command submission failures under memory pressure

2016-09-02 Thread Marek Olšák
On Fri, Sep 2, 2016 at 12:56 PM, Christian König wrote: > Am 02.09.2016 um 12:33 schrieb Marek Olšák: >> >> On Fri, Sep 2, 2016 at 9:38 AM, Christian König >> wrote: >>> >>> Am 01.09.2016 um 16:33 schrieb Deucher, Alexander: >>> return r; > + > + return -ENOMEM; > +} >>> >>> Unreachable code

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

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/a

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

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

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

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

2016-09-02 Thread StDenis, Tom
I'll submit a few new patches merging them in gfx 6/7/8 individually. As for refactoring not really. A static check would only work if all of the code were in one unit. When I was adding the config data to debugfs I just grep'ed manually to discover that they're not really read anywhere in th

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

2016-09-02 Thread StDenis, Tom
The "adev" variable must be in scope when using the RREG32/WREG32 (and derivatives) macros. Tom From: Edward O'Callaghan Sent: Thursday, September 1, 2016 23:22 To: Tom St Denis; amd-gfx@lists.freedesktop.org Cc: StDenis, Tom Subject: Re: [PATCH 3/3] drm/amd/a

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

2016-09-02 Thread Christian König
We could merge those to reduce the # of LOC. Yes, please do so if you have time. BTW: Do you know any tool/hack/whatever to find unused structure members? E.g. members which are never accessed or only set but never read? We seem to have quite a number of those in amdgpu, radeon as well as

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

2016-09-02 Thread StDenis, Tom
Nope your eyes are fine. Note that the same pattern exists in gfx_v8_0.c as well. I guess different ring struct pointers are passed so they're not talking to the same ring. We could merge those to reduce the # of LOC. Tom From: Christian König Sent: Thurs

Re: [PATCH 2/2] drm/amdgpu: prevent command submission failures under memory pressure

2016-09-02 Thread Christian König
Am 02.09.2016 um 12:33 schrieb Marek Olšák: On Fri, Sep 2, 2016 at 9:38 AM, Christian König wrote: Am 01.09.2016 um 16:33 schrieb Deucher, Alexander: return r; > + > + return -ENOMEM; > +} Unreachable code. Other than that looks good. Ups, indeed just a merge error. With that fixed: Revie

Re: [PATCH 2/2] drm/amdgpu: prevent command submission failures under memory pressure

2016-09-02 Thread Marek Olšák
On Fri, Sep 2, 2016 at 9:38 AM, Christian König wrote: > Am 01.09.2016 um 16:33 schrieb Deucher, Alexander: > >> return r; > + > + return -ENOMEM; > +} > > Unreachable code. Other than that looks good. > > > Ups, indeed just a merge error. > > With that fixed: Reviewed-by: Alex Deucher > > Thanks

[PATCH xf86-video-ati 2/4] Move up radeon_scanout_extents_intersect

2016-09-02 Thread Michel Dänzer
From: Michel Dänzer Will be needed higher up by the following changes. No functional change. Signed-off-by: Michel Dänzer --- src/radeon_kms.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/radeon_kms.c b/src/radeon_kms.c in

[PATCH xf86-video-ati 1/4] Factor out transform_region helper

2016-09-02 Thread Michel Dänzer
From: Michel Dänzer While we're at it, fix leaking the memory allocated for xRectangles. Signed-off-by: Michel Dänzer --- src/radeon_kms.c | 73 +--- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/src/radeon_kms.c b/src/radeo

[PATCH xf86-video-ati 3/4] Synchronize scanout pixmaps for TearFree

2016-09-02 Thread Michel Dänzer
From: Michel Dänzer Copy the damaged areas which are still valid in the other scanout pixmap from there, then only copy the remaining damaged area from the screen pixmap. This is slightly more efficient, and will be significantly more efficient with the following change. Signed-off-by: Michel D

[PATCH xf86-video-ati 4/4] Make TearFree effective with PRIME slave scanout

2016-09-02 Thread Michel Dänzer
From: Michel Dänzer TearFree can now prevent tearing with any possible display configuration. Note that with PRIME slave scanout, there may still be inter-GPU tearing if the primary GPU uses a different driver. Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 33 --- src/

Re: [PATCH 2/2] drm/amdgpu: prevent command submission failures under memory pressure

2016-09-02 Thread Christian König
Am 01.09.2016 um 16:33 schrieb Deucher, Alexander: >return r; > + > + return -ENOMEM; > +} Unreachable code. Other than that looks good. Ups, indeed just a merge error. With that fixed: Reviewed-by: Alex Deucher Thanks for the review, I've just pushed the resulting patches to amd-staging-4

答复: [PATCH] drm/amd/amdgpu: S4 issue for amdgpu

2016-09-02 Thread Qu, Jim
Hi Alex: The atombios issue seems to be caused by my test driver. and I reinstall a clear driver without atombios_fini/init. it is OK for S4. So please ignore the atombios_fini/init functions in the patch, I will delete them if get RB. Thanks JimQu 发件人: