Re: [PATCH 4/5] drm/amd/amdgpu: add check that shadow page directory is GPU-accessible

2016-12-15 Thread zhoucm1
On 2016年12月16日 01:10, Nicolai Hähnle wrote: From: Nicolai Hähnle Skip amdgpu_gem_va_update_vm when shadow the page directory is swapped out. Clean up the check for non-shadow BOs as well using the new helper function. This fixes a crash with the stack trace: amdgpu_gem_va_update_vm -> amdgp

Re: [PATCH 2/5] drm/amd/amdgpu: move eviction counting to amdgpu_bo_move_notify

2016-12-15 Thread zhoucm1
On 2016年12月16日 01:10, Nicolai Hähnle wrote: From: Nicolai Hähnle This catches evictions of shadow page tables from the GART. Since shadow page tables are always stored in system memory, amdgpu_bo_move is never called for them. This fixes a crash during command submission that occurs when onl

Re: [PATCH 1/5] drm/ttm: add evict parameter to ttm_bo_driver::move_notify

2016-12-15 Thread zhoucm1
On 2016年12月16日 01:10, Nicolai Hähnle wrote: From: Nicolai Hähnle Ensure that the driver can listen to evictions even when they don't take the path through ttm_bo_driver::move. This is crucial for amdgpu, which relies on an eviction counter to skip re-binding page tables when possible. Signe

Re: [PATCH 3/5] drm/amd/amdgpu: add amdgpu_bo_gpu_accessible helper function

2016-12-15 Thread zhoucm1
On 2016年12月16日 01:10, Nicolai Hähnle wrote: From: Nicolai Hähnle Signed-off-by: Nicolai Hähnle Reviewed-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gp

Re: [PATCH v2] drm/amd/amdgpu: add check that shadow page tables are GPU-accessible

2016-12-15 Thread zhoucm1
On 2016年12月16日 01:59, Nicolai Hähnle wrote: From: Nicolai Hähnle Skip amdgpu_gem_va_update_vm otherwise. Also clean up the check for the non-shadow page tables using the new helper function. This fixes a crash with the stack trace: amdgpu_gem_va_update_vm -> amdgpu_vm_update_page_directory

Re: [PATCH 5/5] drm/amd/amdgpu: add check that shadow page tables are GPU-accessible

2016-12-15 Thread zhoucm1
On 2016年12月16日 01:10, Nicolai Hähnle wrote: From: Nicolai Hähnle Skip amdgpu_gem_va_update_vm otherwise. Also clean up the check for the non-shadow page tables using the new helper function. This fixes a crash with the stack trace: amdgpu_gem_va_update_vm -> amdgpu_vm_update_page_directory

Re: some minor dal cleanups and example of future patches

2016-12-15 Thread Michel Dänzer
On 16/12/16 05:44 AM, Harry Wentland wrote: > On 2016-12-13 01:41 AM, Dave Airlie wrote: > >> One thing I noticed in passing is the displayport code seems >> possibly endian unsafe, it casts bytes read from hardware into >> bitfields, this is the best defined behaviour and is generally >> a patter

Re: [PATCH] amdgpu/display: remove link/stream functions abstraction.

2016-12-15 Thread Dave Airlie
On 16 December 2016 at 09:49, Dave Airlie wrote: > From: Dave Airlie > > Most of these weren't used in the driver, but I can't see why you need > this table instead of just providing direct API, it's not hiding anything. I realised the power module uses some of these, but since that module isn't

[PATCH] amdgpu/display: remove link/stream functions abstraction.

2016-12-15 Thread Dave Airlie
From: Dave Airlie Most of these weren't used in the driver, but I can't see why you need this table instead of just providing direct API, it's not hiding anything. Signed-off-by: Dave Airlie --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c| 2 +- drivers/gpu/drm/amd/display/dc/core/dc

Re: [PATCH 1/1] drm/amd/amdgpu: get maximum and used UVD handles (v3)

2016-12-15 Thread Grazvydas Ignotas
On Thu, Dec 15, 2016 at 4:12 PM, Christian König wrote: > > Regarding which error code to return I think that Emil has the right idea > here. > > Returning -EINVAL usually means that userspace provided an invalid value, > but in this case it doesn't matter which value the UMD provide all of them >

Re: [PATCH] drm/amdgpu: Remove checking for atombios

2016-12-15 Thread Alex Deucher
On Wed, Dec 14, 2016 at 3:52 PM, Nils Wallménius wrote: > This is a left over from radeon, amdgpu doesn't support any > non-atombios parts and amdgpu_device_init would bail if the > check for atombios failed anyway. > > Signed-off-by: Nils Wallménius Applied. thanks! Alex > --- > drivers/gpu

Re: some minor dal cleanups and example of future patches

2016-12-15 Thread Harry Wentland
The series is Reviewed-by: Harry Wentland On 2016-12-13 01:41 AM, Dave Airlie wrote: So whenever I look at DAL I find myself trying to figure out what all of it does, and this leads me to deleting things, so I'm just sending out some stuff that I cleaned today. We really appreciate the clea

[PATCH] drm/amd/amdgpu: get maximum and used UVD handles (v4)

2016-12-15 Thread Alex Deucher
From: Arindam Nath Change History -- v4: Changes suggested by Emil, Christian - return -ENODATA for asics with unlimited sessions v3: changes suggested by Christian - Add a check for UVD IP block using AMDGPU_HW_IP_UVD query type. - Add a check for asic_type to be less than CHIP

[PATCH v2] drm/amd/amdgpu: add check that shadow page tables are GPU-accessible

2016-12-15 Thread Nicolai Hähnle
From: Nicolai Hähnle Skip amdgpu_gem_va_update_vm otherwise. Also clean up the check for the non-shadow page tables using the new helper function. This fixes a crash with the stack trace: amdgpu_gem_va_update_vm -> amdgpu_vm_update_page_directory -> amdgpu_ttm_bind -> amdgpu_gtt_mgr_alloc v

[PATCH 0/5] drm/ttm, amdgpu: fix crashes due to shadow page table evictions

2016-12-15 Thread Nicolai Hähnle
Fix a bunch of related crashes in amdgpu that occur when shadow page tables are kicked out of the GART. One of the issues was that during command submission, we rely on a device-global evictions counter to skip some of the work of page-table validation. The driver was never informed of evictions f

[PATCH 2/5] drm/amd/amdgpu: move eviction counting to amdgpu_bo_move_notify

2016-12-15 Thread Nicolai Hähnle
From: Nicolai Hähnle This catches evictions of shadow page tables from the GART. Since shadow page tables are always stored in system memory, amdgpu_bo_move is never called for them. This fixes a crash during command submission that occurs when only a shadow page table and no other BOs were evic

[PATCH 5/5] drm/amd/amdgpu: add check that shadow page tables are GPU-accessible

2016-12-15 Thread Nicolai Hähnle
From: Nicolai Hähnle Skip amdgpu_gem_va_update_vm otherwise. Also clean up the check for the non-shadow page tables using the new helper function. This fixes a crash with the stack trace: amdgpu_gem_va_update_vm -> amdgpu_vm_update_page_directory -> amdgpu_ttm_bind -> amdgpu_gtt_mgr_alloc S

[PATCH 3/5] drm/amd/amdgpu: add amdgpu_bo_gpu_accessible helper function

2016-12-15 Thread Nicolai Hähnle
From: Nicolai Hähnle Signed-off-by: Nicolai Hähnle --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h index 4306b2f..15a723a 100644 --- a/drivers/gpu

[PATCH 4/5] drm/amd/amdgpu: add check that shadow page directory is GPU-accessible

2016-12-15 Thread Nicolai Hähnle
From: Nicolai Hähnle Skip amdgpu_gem_va_update_vm when shadow the page directory is swapped out. Clean up the check for non-shadow BOs as well using the new helper function. This fixes a crash with the stack trace: amdgpu_gem_va_update_vm -> amdgpu_vm_update_page_directory -> amdgpu_ttm_bind

[PATCH 1/5] drm/ttm: add evict parameter to ttm_bo_driver::move_notify

2016-12-15 Thread Nicolai Hähnle
From: Nicolai Hähnle Ensure that the driver can listen to evictions even when they don't take the path through ttm_bo_driver::move. This is crucial for amdgpu, which relies on an eviction counter to skip re-binding page tables when possible. Signed-off-by: Nicolai Hähnle --- drivers/gpu/drm/a

Re: [PATCH 1/2] drm/amdgpu: update tile table for verde

2016-12-15 Thread Marek Olšák
On Thu, Dec 15, 2016 at 4:16 PM, Deucher, Alexander wrote: >> -Original Message- >> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf >> Of Flora Cui >> Sent: Thursday, December 15, 2016 3:31 AM >> To: amd-gfx@lists.freedesktop.org >> Cc: Cui, Flora >> Subject: [PATCH

RE: [PATCH 1/2] drm/amdgpu: update tile table for verde

2016-12-15 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Flora Cui > Sent: Thursday, December 15, 2016 3:31 AM > To: amd-gfx@lists.freedesktop.org > Cc: Cui, Flora > Subject: [PATCH 1/2] drm/amdgpu: update tile table for verde > > Change-Id: I4e3c6

RE: [PATCH 9/9] drm/amdgpu: update rev id for verde

2016-12-15 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Flora Cui > Sent: Thursday, December 15, 2016 2:33 AM > To: amd-gfx@lists.freedesktop.org > Cc: Cui, Flora > Subject: [PATCH 9/9] drm/amdgpu: update rev id for verde > > Change-Id: I9f2a140d6

Re: [PATCH 1/1] drm/amd/amdgpu: get maximum and used UVD handles (v3)

2016-12-15 Thread Christian König
Am 15.12.2016 um 13:33 schrieb Nath, Arindam: -Original Message- From: Grazvydas Ignotas [mailto:nota...@gmail.com] Sent: Thursday, December 15, 2016 5:52 PM To: Nath, Arindam Cc: Emil Velikov; David Airlie; Deucher, Alexander; ML dri-devel; amd-gfx mailing list; Koenig, Christian Subject

RE: [PATCH 1/1] drm/amd/amdgpu: get maximum and used UVD handles (v3)

2016-12-15 Thread Nath, Arindam
>-Original Message- >From: Grazvydas Ignotas [mailto:nota...@gmail.com] >Sent: Thursday, December 15, 2016 5:52 PM >To: Nath, Arindam >Cc: Emil Velikov; David Airlie; Deucher, Alexander; ML dri-devel; amd-gfx >mailing list; Koenig, Christian >Subject: Re: [PATCH 1/1] drm/amd/amdgpu: get max

Re: [PATCH 1/1] drm/amd/amdgpu: get maximum and used UVD handles (v3)

2016-12-15 Thread Grazvydas Ignotas
On Thu, Dec 15, 2016 at 1:47 PM, Nath, Arindam wrote: >>-Original Message- >>From: Emil Velikov [mailto:emil.l.veli...@gmail.com] >>Sent: Thursday, December 15, 2016 5:01 PM >>To: Nath, Arindam >>Cc: David Airlie; Deucher, Alexander; amd-gfx mailing list; ML dri-devel; >>Koenig, Christian

RE: [PATCH 1/1] drm/amd/amdgpu: get maximum and used UVD handles (v3)

2016-12-15 Thread Nath, Arindam
>-Original Message- >From: Emil Velikov [mailto:emil.l.veli...@gmail.com] >Sent: Thursday, December 15, 2016 5:01 PM >To: Nath, Arindam >Cc: David Airlie; Deucher, Alexander; amd-gfx mailing list; ML dri-devel; >Koenig, Christian >Subject: Re: [PATCH 1/1] drm/amd/amdgpu: get maximum and use

Re: [PATCH 1/1] drm/amd/amdgpu: get maximum and used UVD handles (v3)

2016-12-15 Thread Emil Velikov
On 15 December 2016 at 07:30, Nath, Arindam wrote: >>-Original Message- >>From: Emil Velikov [mailto:emil.l.veli...@gmail.com] >>Sent: Wednesday, December 14, 2016 9:26 PM >>To: Nath, Arindam >>Cc: David Airlie; Deucher, Alexander; amd-gfx mailing list; ML dri-devel; >>Koenig, Christian >>

RE: [PATCH 2/2] drm/amdgpu: update pitcairn golden setting

2016-12-15 Thread Zhang, Jerry
Hi Flora, > @@ -1206,6 +1212,7 @@ static int si_common_early_init(void *handle) > AMD_CG_SUPPORT_HDP_LS | > AMD_CG_SUPPORT_HDP_MGCG; > adev->pg_flags = 0; > + adev->external_rev_id = adev->rev_id + 20; > break; It

Re: [PATCH 1/2] drm/amdgpu: update tile table for verde

2016-12-15 Thread Zhang, Jerry
Hi Flora, the series look good for me. Reviewed-by: Junwei Zhang Regards, Jerry(Junwei Zhang) From: amd-gfx on behalf of Flora Cui Sent: Thursday, December 15, 2016 4:31:16 PM To: amd-gfx@lists.freedesktop.org Cc: Cui, Flora Subject: [PATCH 1/2] drm/a

Re: [PATCH 9/9] drm/amdgpu: update rev id for verde

2016-12-15 Thread Zhang, Jerry
Hi Flora, Just confirm that it's decimal rather than HEX. + adev->external_rev_id = adev->rev_id + 40; Apart from that, the series of patches looks good for me. Reviewed-by: Junwei Zhang Regards, Jerry(Junwei Zhang) From: amd-gfx on behal

[PATCH 1/2] drm/amdgpu: update tile table for verde

2016-12-15 Thread Flora Cui
Change-Id: I4e3c698a04e5f7ee05c0268eec12df519f2305d4 Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 295 +- 1 file changed, 293 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx

[PATCH 2/2] drm/amdgpu: update tile table for oland/hainan

2016-12-15 Thread Flora Cui
Change-Id: Ib8b66559d662cbe8a9f40f7405a4a052c189f604 Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 330 -- 1 file changed, 191 insertions(+), 139 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/g