[PATCH] drm/amdgpu: add an INFO query for monitoring VRAM CPU page faults

2017-05-17 Thread Marek Olšák
From: Marek Olšák Signed-off-by: Marek Olšák --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 + include/uapi/drm/amdgpu_drm.h | 2 ++

Re: [PATCH] drm/amd/powerplay: ensure loop does not wraparound on decrement

2017-05-17 Thread Dan Carpenter
I sent a patch for this bug earlier. There is a second bug later in the function which my patch fixes as well. regards, dan carpenter ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH 3/4] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors

2017-05-17 Thread Bjorn Helgaas
On Tue, Apr 25, 2017 at 03:01:35PM +0200, Christian König wrote: > Am 12.04.2017 um 18:55 schrieb Bjorn Helgaas: > >[SNIP] > >>>I think the specs would envision this being done via an ACPI _SRS > >>>method on the PNP0A03 host bridge device. That would be a more > >>>generic path that would work

[PATCH] drm/amd/powerplay: ensure loop does not wraparound on decrement

2017-05-17 Thread Colin King
From: Colin Ian King The current for loop decrements i when it is zero and this causes a wrap-around back to ~0 because i is unsigned. In the unlikely event that mask is 0, the loop will run forever. Fix this so we can't loop forever. Detected by CoverityScan,

[REGRESSION] drm/radeon: Don't register Thunderbolt eGPU with vga_switcheroo

2017-05-17 Thread Nicolai Stange
Hi, I'm experiencing a boot failure on next-20170515: BUG: unable to handle kernel NULL pointer dereference at 07cb IP: radeon_driver_load_kms+0xeb/0x230 [radeon] PGD 0 P4D 0 Oops: [#1] SMP Modules linked in: amdkfd amd_iommu_v2 i915(+) radeon(+) i2c_algo_bit

Re: [PATCH] drm/amdgpu: update golden settings

2017-05-17 Thread zhoucm1
Acked-by: Chunming Zhou On 2017年05月17日 15:46, Ken Wang wrote: Change-Id: Ifcc39748c36273fa764cd2641d4b44405dbf59a5 Signed-off-by: Ken Wang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 20 1 file changed, 16 insertions(+), 4

[PATCH xf86-video-ati] Update URLs

2017-05-17 Thread Michel Dänzer
From: Michel Dänzer * Point to the amd-gfx mailing list * Specify the component in all bugzilla URLs * Use https:// for all HTML URLs Signed-off-by: Michel Dänzer --- README | 14 +++--- configure.ac | 2 +- man/radeon.man |

Re: [PATCH 7/7] drm/amdgpu: enable huge page handling in the VM

2017-05-17 Thread zhoucm1
On 2017年05月17日 17:22, Christian König wrote: From: Christian König The hardware can use huge pages to map 2MB of address space with only one PDE. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 96

Re: [PATCH 1/7] drm/amdgpu: cleanup adjust_mc_addr handling v2

2017-05-17 Thread Zhang, Jerry (Junwei)
On 05/17/2017 05:22 PM, Christian König wrote: From: Christian König Rename adjust_mc_addr to get_vm_pde and check the address bits in one place. v2: handle vcn as well, keep setting the valid bit manually, add a BUG_ON() for GMC v6, v7 and v8 as well.

Re: [PATCH 6/7] drm/amdgpu: stop joining VM PTE updates

2017-05-17 Thread Zhang, Jerry (Junwei)
On 05/17/2017 06:08 PM, Zhou, David(ChunMing) wrote: Patch#2: Reviewed-by: Chunming Zhou Patch#3: RB should be from Hawking, so Acked-by: Chunming Zhou Patch#5 #6, are Reviewed-by: Chunming Zhou Feel free to add my RB about

Re: [PATCH 4/4] drm/amdgpu: reset fpriv vram_lost_counter

2017-05-17 Thread zhoucm1
On 2017年05月17日 14:57, Michel Dänzer wrote: On 17/05/17 01:28 PM, zhoucm1 wrote: On 2017年05月17日 11:15, Michel Dänzer wrote: On 17/05/17 12:04 PM, zhoucm1 wrote: On 2017年05月17日 09:18, Michel Dänzer wrote: On 16/05/17 06:25 PM, Chunming Zhou wrote: Change-Id:

[PATCH xf86-video-amdgpu] Use plain glamor_egl_create_textured_screen().

2017-05-17 Thread Michel Dänzer
From: Eric Anholt Since 5064ffab631 (2014), glamor's implementation of _ext just drops the back_pixmap arg, which we were passing NULL (the default) to anyway. Signed-off-by: Eric Anholt (Ported from radeon commit 2b7d77b90108911777a11ecaa63435552000c958)

Re: [PATCH 4/4] drm/amdgpu: reset fpriv vram_lost_counter

2017-05-17 Thread Michel Dänzer
On 17/05/17 01:28 PM, zhoucm1 wrote: > On 2017年05月17日 11:15, Michel Dänzer wrote: >> On 17/05/17 12:04 PM, zhoucm1 wrote: >>> On 2017年05月17日 09:18, Michel Dänzer wrote: On 16/05/17 06:25 PM, Chunming Zhou wrote: > Change-Id: I8eb6d7f558da05510e429d3bf1d48c8cec6c1977 > Signed-off-by:

Re: [PATCH 1/2] drm/amdgpu: fix re-program vm invalidate eng address range for gfxhub on resume

2017-05-17 Thread zhoucm1
On 2017年05月17日 16:19, Christian König wrote: Am 17.05.2017 um 10:11 schrieb zhoucm1: On 2017年05月17日 15:55, Huang Rui wrote: On Wed, May 17, 2017 at 03:43:47PM +0800, Zhou, David(ChunMing) wrote: By this change, I suggest to remove mmhub/gfxhub_v1_0_ip_funcs and their IP block, unify them

Re: [PATCH 4/4] drm/amdgpu: reset fpriv vram_lost_counter

2017-05-17 Thread zhoucm1
On 2017年05月17日 16:40, Christian König wrote: Am 17.05.2017 um 10:01 schrieb Michel Dänzer: On 17/05/17 04:13 PM, zhoucm1 wrote: On 2017年05月17日 14:57, Michel Dänzer wrote: On 17/05/17 01:28 PM, zhoucm1 wrote: On 2017年05月17日 11:15, Michel Dänzer wrote: On 17/05/17 12:04 PM, zhoucm1 wrote:

Re: [PATCH 4/4] drm/amdgpu: reset fpriv vram_lost_counter

2017-05-17 Thread Christian König
Am 17.05.2017 um 10:46 schrieb zhoucm1: On 2017年05月17日 16:40, Christian König wrote: Am 17.05.2017 um 10:01 schrieb Michel Dänzer: On 17/05/17 04:13 PM, zhoucm1 wrote: On 2017年05月17日 14:57, Michel Dänzer wrote: On 17/05/17 01:28 PM, zhoucm1 wrote: On 2017年05月17日 11:15, Michel Dänzer

Re: [PATCH 4/5] drm/amdgpu: Support page directory update via CPU

2017-05-17 Thread zhoucm1
On 2017年05月17日 16:48, Christian König wrote: Am 17.05.2017 um 03:54 schrieb zhoucm1: On 2017年05月17日 05:02, Kasiviswanathan, Harish wrote: -Original Message- From: Zhou, David(ChunMing) Sent: Monday, May 15, 2017 10:50 PM To: Kasiviswanathan, Harish

[PATCH 1/7] drm/amdgpu: cleanup adjust_mc_addr handling v2

2017-05-17 Thread Christian König
From: Christian König Rename adjust_mc_addr to get_vm_pde and check the address bits in one place. v2: handle vcn as well, keep setting the valid bit manually, add a BUG_ON() for GMC v6, v7 and v8 as well. Signed-off-by: Christian König

[PATCH 7/7] drm/amdgpu: enable huge page handling in the VM

2017-05-17 Thread Christian König
From: Christian König The hardware can use huge pages to map 2MB of address space with only one PDE. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 96 +-

Re: [PATCH 1/2] drm/amdgpu: fix re-program vm invalidate eng address range for gfxhub on resume

2017-05-17 Thread zhoucm1
see here, I already find dis-advance: enum amd_ip_block_type { AMD_IP_BLOCK_TYPE_COMMON, AMD_IP_BLOCK_TYPE_GMC, AMD_IP_BLOCK_TYPE_IH, AMD_IP_BLOCK_TYPE_SMC, AMD_IP_BLOCK_TYPE_PSP, AMD_IP_BLOCK_TYPE_DCE, AMD_IP_BLOCK_TYPE_GFX,

Re: [PATCH] gpu: drm: radeon: refactor code

2017-05-17 Thread Christian König
Am 17.05.2017 um 04:20 schrieb Gustavo A. R. Silva: Local variable _color_ is assigned to a constant value and it is never updated again. Remove this variable and refactor the code it affects. Addresses-Coverity-ID: 1226745 Signed-off-by: Gustavo A. R. Silva Mhm, on

Re: [PATCH 1/2] drm/amdgpu: fix re-program vm invalidate eng address range for gfxhub on resume

2017-05-17 Thread Christian König
Am 17.05.2017 um 09:55 schrieb Huang Rui: On Wed, May 17, 2017 at 03:43:47PM +0800, Zhou, David(ChunMing) wrote: By this change, I suggest to remove mmhub/gfxhub_v1_0_ip_funcs and their IP block, unify them to gmc ip block, this way we cannot lost setting when resume back. From hw side, wo

Re: [PATCH 0/3] Cleanup evergreen/si IRQ handling code

2017-05-17 Thread Christian König
Am 16.05.2017 um 23:11 schrieb Lyude: This is the first part of me going through and cleaning up the IRQ handling code for radeon, since after taking a look at it the other day while trying to debug something I realized basically all of the code was copy pasted everywhere, and quite difficult to

Re: [PATCH 4/4] drm/amdgpu: reset fpriv vram_lost_counter

2017-05-17 Thread Christian König
Am 17.05.2017 um 10:01 schrieb Michel Dänzer: On 17/05/17 04:13 PM, zhoucm1 wrote: On 2017年05月17日 14:57, Michel Dänzer wrote: On 17/05/17 01:28 PM, zhoucm1 wrote: On 2017年05月17日 11:15, Michel Dänzer wrote: On 17/05/17 12:04 PM, zhoucm1 wrote: On 2017年05月17日 09:18, Michel Dänzer wrote: On

Re: [PATCH 1/2] drm/amdgpu: fix re-program vm invalidate eng address range for gfxhub on resume

2017-05-17 Thread Huang Rui
On Wed, May 17, 2017 at 04:16:31PM +0800, Koenig, Christian wrote: > Am 17.05.2017 um 09:55 schrieb Huang Rui: > > On Wed, May 17, 2017 at 03:43:47PM +0800, Zhou, David(ChunMing) wrote: > >> By this change, I suggest to remove mmhub/gfxhub_v1_0_ip_funcs and their > >> IP block, unify them to gmc

[PATCH 2/2] drm/amdgpu: fix re-program vm invalidate eng address range for mmhub on resume

2017-05-17 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c index dbfe48d..8979bc2 100644 ---

[PATCH 1/2] drm/amdgpu: fix re-program vm invalidate eng address range for gfxhub on resume

2017-05-17 Thread Huang Rui
Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c index 005075f..41313514 100644 ---

Re: [PATCH 1/2] drm/amdgpu: fix re-program vm invalidate eng address range for gfxhub on resume

2017-05-17 Thread zhoucm1
By this change, I suggest to remove mmhub/gfxhub_v1_0_ip_funcs and their IP block, unify them to gmc ip block, this way we cannot lost setting when resume back. Regards, David Zhou On 2017年05月17日 15:38, Huang Rui wrote: Signed-off-by: Huang Rui ---

Re: [PATCH 4/4] drm/amdgpu: reset fpriv vram_lost_counter

2017-05-17 Thread Michel Dänzer
On 17/05/17 04:13 PM, zhoucm1 wrote: > On 2017年05月17日 14:57, Michel Dänzer wrote: >> On 17/05/17 01:28 PM, zhoucm1 wrote: >>> On 2017年05月17日 11:15, Michel Dänzer wrote: On 17/05/17 12:04 PM, zhoucm1 wrote: > On 2017年05月17日 09:18, Michel Dänzer wrote: >> On 16/05/17 06:25 PM, Chunming

Re: [PATCH 1/2] drm/amdgpu: fix re-program vm invalidate eng address range for gfxhub on resume

2017-05-17 Thread zhoucm1
On 2017年05月17日 15:55, Huang Rui wrote: On Wed, May 17, 2017 at 03:43:47PM +0800, Zhou, David(ChunMing) wrote: By this change, I suggest to remove mmhub/gfxhub_v1_0_ip_funcs and their IP block, unify them to gmc ip block, this way we cannot lost setting when resume back. From hw side, wo

[PATCH] drm/amdgpu: update golden settings

2017-05-17 Thread Ken Wang
Change-Id: Ifcc39748c36273fa764cd2641d4b44405dbf59a5 Signed-off-by: Ken Wang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

Re: [PATCH 2/2] drm/amdgpu: fix re-program vm invalidate eng address range for mmhub on resume

2017-05-17 Thread Wang, Ken
Reviewed-by: Ken Wang From: Huang Rui Sent: Wednesday, May 17, 2017 3:38:49 PM To: amd-gfx@lists.freedesktop.org; Deucher, Alexander; Koenig, Christian Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray

Re: [PATCH 4/5] drm/amdgpu: Support page directory update via CPU

2017-05-17 Thread Christian König
Am 17.05.2017 um 10:53 schrieb zhoucm1: On 2017年05月17日 16:48, Christian König wrote: Am 17.05.2017 um 03:54 schrieb zhoucm1: On 2017年05月17日 05:02, Kasiviswanathan, Harish wrote: -Original Message- From: Zhou, David(ChunMing) Sent: Monday, May 15, 2017 10:50 PM To:

Re: [PATCH 1/2] drm/amdgpu: fix re-program vm invalidate eng address range for gfxhub on resume

2017-05-17 Thread Huang Rui
On Wed, May 17, 2017 at 03:43:47PM +0800, Zhou, David(ChunMing) wrote: > By this change, I suggest to remove mmhub/gfxhub_v1_0_ip_funcs and their > IP block, unify them to gmc ip block, this way we cannot lost setting > when resume back. > From hw side, wo won't have real gmc since this chip,

Re: [PATCH 1/2] drm/amdgpu: fix re-program vm invalidate eng address range for gfxhub on resume

2017-05-17 Thread Christian König
Am 17.05.2017 um 10:11 schrieb zhoucm1: On 2017年05月17日 15:55, Huang Rui wrote: On Wed, May 17, 2017 at 03:43:47PM +0800, Zhou, David(ChunMing) wrote: By this change, I suggest to remove mmhub/gfxhub_v1_0_ip_funcs and their IP block, unify them to gmc ip block, this way we cannot lost

Re: [PATCH 4/5] drm/amdgpu: Support page directory update via CPU

2017-05-17 Thread Christian König
Am 17.05.2017 um 03:54 schrieb zhoucm1: On 2017年05月17日 05:02, Kasiviswanathan, Harish wrote: -Original Message- From: Zhou, David(ChunMing) Sent: Monday, May 15, 2017 10:50 PM To: Kasiviswanathan, Harish ; amd-gfx@lists.freedesktop.org Subject: Re:

Re: [PATCH 4/4] drm/amdgpu: reset fpriv vram_lost_counter

2017-05-17 Thread Michel Dänzer
On 17/05/17 05:46 PM, zhoucm1 wrote: > > > On 2017年05月17日 16:40, Christian König wrote: >> Am 17.05.2017 um 10:01 schrieb Michel Dänzer: >>> On 17/05/17 04:13 PM, zhoucm1 wrote: On 2017年05月17日 14:57, Michel Dänzer wrote: > On 17/05/17 01:28 PM, zhoucm1 wrote: >> On 2017年05月17日

[PATCH 3/7] drm/amdgpu: fix another fundamental VM bug

2017-05-17 Thread Christian König
From: Christian König I always wondered why this code uses the MC address. Now it came to me that this is actually a bug and only works by coincident because we used to have VRAM mapped at zero. Signed-off-by: Christian König ---

[PATCH 6/7] drm/amdgpu: stop joining VM PTE updates

2017-05-17 Thread Christian König
From: Christian König This isn't beneficial any more since VRAM allocations are now split so that they fits into a single page table. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 61

[PATCH 2/7] drm/amdgpu: add some extra VM error handling

2017-05-17 Thread Christian König
From: Christian König If updating the PDs fails we now invalidate all entries to try again later. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 +- 1 file changed, 33

[PATCH 5/7] drm/amdgpu: cache the complete pde

2017-05-17 Thread Christian König
From: Christian König Makes it easier to update the PDE with huge pages. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git

[PATCH 4/7] drm/amdgpu: Return EINVAL if no PT BO

2017-05-17 Thread Christian König
From: Harish Kasiviswanathan This change is also useful for the upcoming changes where page tables can be updated by CPU. Change-Id: I07510ed60c94cf1944ee96bb4b16c40ec88ea17c Signed-off-by: Harish Kasiviswanathan Reviewed-by:

Re: [PATCH 4/4] drm/amdgpu: reset fpriv vram_lost_counter

2017-05-17 Thread Marek Olšák
David, We already have a query that returns whether a device is lost. It's called amdgpu_cs_query_reset_state. That should return whether a hang was caused by a certain context or whether the hang happened but the context is innocent. You can extend it to accept no context, in which case it will

RE: [PATCH 6/7] drm/amdgpu: stop joining VM PTE updates

2017-05-17 Thread Zhou, David(ChunMing)
Patch#2: Reviewed-by: Chunming Zhou Patch#3: RB should be from Hawking, so Acked-by: Chunming Zhou Patch#5 #6, are Reviewed-by: Chunming Zhou For patch#7, further transfer +1 page table, I need a bit time of tomorrow. Regards,

RE: [PATCH 4/4] drm/amdgpu: reset fpriv vram_lost_counter

2017-05-17 Thread Zhou, David(ChunMing)
Yes, agree, it's easy to extend it as your like. For innocent context, which would need us to find out the context of guilty job, which is TODO. Regards, David Zhou -Original Message- From: Marek Olšák [mailto:mar...@gmail.com] Sent: Wednesday, May 17, 2017 5:50 PM To: Christian König

[PATCH] drm/amdgpu: update golden settings

2017-05-17 Thread Ken Wang
Change-Id: Ifcc39748c36273fa764cd2641d4b44405dbf59a5 Signed-off-by: Ken Wang --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

Re: Plan: BO move throttling for visible VRAM evictions

2017-05-17 Thread Marek Olšák
On May 16, 2017 3:57 AM, "Michel Dänzer" wrote: On 15/05/17 07:11 PM, Marek Olšák wrote: > On May 15, 2017 4:29 AM, "Michel Dänzer" > wrote: > > I think the next step should be to make radeonsi keep track of how much >