Re: [PATCH] drm/amdgpu: Place new CPU-accessbile BOs in GTT if visible VRAM is full

2017-05-18 Thread zhoucm1
On 2017年05月19日 11:04, John Brooks wrote: Set GTT as the busy placement for newly created BOs that have the AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED flag, so that they don't cause established BOs to be evicted from visible VRAM. You this patch is consistent with my opinion I mentioned in Marek

Re: [PATCH] drm/amdgpu: fix ocl test performance drop

2017-05-18 Thread zhoucm1
I also realized this problem when I did fix for sched fence, I thought if no issue, just left it as current code, it's more safe. As Flora point it out, it results in performance drop, then we need to correct it back. pipeline_sync in vm flush should be inserted only when

Re: [PATCH] drm/amdgpu: fix ocl test performance drop

2017-05-18 Thread Flora Cui
btw, what's about gfx9 for amdgpu_vm_ring_has_compute_vm_bug()? Is the workaround still needed? On Fri, May 19, 2017 at 10:25:19AM +0800, Flora Cui wrote: > On Thu, May 18, 2017 at 01:38:15PM +0200, Christian König wrote: > > Am 18.05.2017 um 09:45 schrieb Flora Cui: > > >partial revert commit

Topics for beginners

2017-05-18 Thread Subrat Meher
Hi, I am interested in working on radeon's Linux graphics stack. Are there any areas that are more approachable to someone unfamiliar with the stack? As for existing knowledge, I have worked with OpenGL, OpenCL and embedded applications. Apologies if this is not the right place for this

[PATCH] drm/amdgpu: Place new CPU-accessbile BOs in GTT if visible VRAM is full

2017-05-18 Thread John Brooks
Set GTT as the busy placement for newly created BOs that have the AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED flag, so that they don't cause established BOs to be evicted from visible VRAM. Signed-off-by: John Brooks --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 18

Re: [PATCH 0/3] drm/amdgpu: Tweaks for high pressure on CPU visible VRAM

2017-05-18 Thread John Brooks
/images/screen-dl-gtt_busy_only-20170518-192602.png http://www.fastquake.com/images/screen-dlsysprof-gttpatch-20170518-223200.png -- John Brooks (Frogging101) ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman

Re: [PATCH] drm/amdgpu: fix ocl test performance drop

2017-05-18 Thread Flora Cui
On Thu, May 18, 2017 at 01:38:15PM +0200, Christian König wrote: > Am 18.05.2017 um 09:45 schrieb Flora Cui: > >partial revert commit <6971d3d> - drm/amdgpu: cleanup logic in > >amdgpu_vm_flush > > > >Change-Id: Iadce9d613dfe9a739643a74050cea55854832adb > >Signed-off-by: Flora Cui

Re: [PATCH 3/3] drm/amdgpu: Try evicting from CPU visible to invisible VRAM first

2017-05-18 Thread Michel Dänzer
On 19/05/17 10:43 AM, John Brooks wrote: > On Fri, May 19, 2017 at 10:20:37AM +0900, Michel Dänzer wrote: >> On 19/05/17 12:43 AM, John Brooks wrote: >>> On Thu, May 18, 2017 at 06:08:09PM +0900, Michel Dänzer wrote: From: Michel Dänzer In exchange, move BOs

Re: [PATCH 3/3] drm/amdgpu: Try evicting from CPU visible to invisible VRAM first

2017-05-18 Thread John Brooks
On Fri, May 19, 2017 at 10:20:37AM +0900, Michel Dänzer wrote: > On 19/05/17 12:43 AM, John Brooks wrote: > > On Thu, May 18, 2017 at 06:08:09PM +0900, Michel Dänzer wrote: > >> From: Michel Dänzer > >> > >> In exchange, move BOs with the

Re: [PATCH] iommu/amd: flush IOTLB for specific domains only

2017-05-18 Thread Michel Dänzer
On 07/04/17 07:20 PM, Joerg Roedel wrote: > On Mon, Mar 27, 2017 at 11:47:07AM +0530, arindam.n...@amd.com wrote: >> From: Arindam Nath >> >> The idea behind flush queues is to defer the IOTLB flushing >> for domains for which the mappings are no longer valid. We >> add such

[PATCH] drm/amd: include instead of "linux/delay.h"

2017-05-18 Thread Masahiro Yamada
Use <...> notation to include headers located in include/linux. While we are here, tweak the includes order a bit to sort them alphabetically. Signed-off-by: Masahiro Yamada --- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c| 4 ++--

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

2017-05-18 Thread walter harms
Am 17.05.2017 20:13, schrieb 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

Re: [PATCH 3/3] drm/amdgpu: Try evicting from CPU visible to invisible VRAM first

2017-05-18 Thread Michel Dänzer
On 19/05/17 12:43 AM, John Brooks wrote: > On Thu, May 18, 2017 at 06:08:09PM +0900, Michel Dänzer wrote: >> From: Michel Dänzer >> >> In exchange, move BOs with the AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED >> flag set to CPU visible VRAM with more force. >> >> For other BOs,

Re: [PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-05-18 Thread Michel Dänzer
On 19/05/17 04:35 AM, Felix Kuehling wrote: > On 17-04-27 05:22 AM, Michel Dänzer wrote: >> On 27/04/17 05:15 AM, Felix Kuehling wrote: >>> Hi Michel, >>> >>> You said in an earlier email that it doesn't have to be convenient. With >>> that in mind, I went back to a minimalistic solution that

[PATCH 5/5] drm/amdgpu: Update Kconfig help for SI and CIK support

2017-05-18 Thread Felix Kuehling
Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/Kconfig | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index f3b6df8..468a19b 100644 ---

[PATCH 2/5] drm/amdgpu: Add module param to control CIK support

2017-05-18 Thread Felix Kuehling
If AMDGPU supports CIK, add a module parameter to control CIK support. It's on by default in AMDGPU, while it is off by default in radeon. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6

[PATCH 3/5] drm/radeon: Add module param to control SI support

2017-05-18 Thread Felix Kuehling
If AMDGPU supports SI, add a module parameter to control SI support in radeon. It's on by default in radeon, while it will be off by default in AMDGPU as long as SI support is experimental. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/radeon/radeon.h | 3 +++

[PATCH 4/5] drm/amdgpu: Add module param to control SI support

2017-05-18 Thread Felix Kuehling
If AMDGPU supports SI, add a module parameter to control SI support. It's off by default in AMDGPU as long as SI suppost is experimental, while it is on by default in radeon. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++

Re: [PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

2017-05-18 Thread Felix Kuehling
On 17-04-27 05:22 AM, Michel Dänzer wrote: > On 27/04/17 05:15 AM, Felix Kuehling wrote: >> Hi Michel, >> >> You said in an earlier email that it doesn't have to be convenient. With >> that in mind, I went back to a minimalistic solution that doesn't need >> any additional Kconfig options and only

[PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-18 Thread Lukas Wunner
Nicolai Stange reports the following oops which is caused by dereferencing rdev->pdev before it's subsequently set by radeon_device_init(). Fix it. BUG: unable to handle kernel NULL pointer dereference at 07cb IP: radeon_driver_load_kms+0xeb/0x230 [radeon] PGD 0 P4D 0

Re: (radeon?) WARNING: drivers/gpu/drm/drm_irq.c:1195 drm_vblank_put (v4.11-12441-g56868a4)

2017-05-18 Thread Tommi Rantala
2017-05-11 5:51 GMT+03:00 Michel Dänzer : > On 11/05/17 04:33 AM, Tommi Rantala wrote: >> Complete kernel log: >> http://termbin.com/dzy5 >> >> [ 249.952546] [ cut here ] >> [ 249.952593] WARNING: CPU: 5 PID: 0 at >>

Re: [PATCH 3/3] drm/amdgpu: Try evicting from CPU visible to invisible VRAM first

2017-05-18 Thread John Brooks
On Thu, May 18, 2017 at 06:08:09PM +0900, Michel Dänzer wrote: > From: Michel Dänzer > > In exchange, move BOs with the AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED > flag set to CPU visible VRAM with more force. > > For other BOs, this gives another chance to stay in VRAM if

RE: [PATCH] drm/amd/amdgpu: Enable raven gpu_info firmware

2017-05-18 Thread Zhang, Hawking
IIRC It's already in amd-staging-4.9 branch. Anyway, the patch is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Tom St Denis Sent: Thursday, May 18, 2017 20:00 To:

Re: [PATCH] drm/amd/amdgpu: Enable raven gpu_info firmware

2017-05-18 Thread Tom St Denis
On 18/05/17 10:07 AM, Zhang, Hawking wrote: IIRC It's already in amd-staging-4.9 branch. Anyway, the patch is Reviewed-by: Hawking Zhang It must have gone missing when Alex (Deucher) made the 4.11 branch. Thanks for the R-b but perhaps we should cherry-pick the patch

[PATCH] drm/radeon: fix "force the UVD DPB into VRAM as well"

2017-05-18 Thread Christian König
From: Christian König The DPB must be in VRAM, but not in the first segment. Signed-off-by: Christian König Tested-by: Arthur Marsh --- drivers/gpu/drm/radeon/radeon_uvd.c | 2 +- 1 file changed, 1

[PATCH] drm/amd/amdgpu: Enable raven gpu_info firmware

2017-05-18 Thread Tom St Denis
Add CHIP_RAVEN to the list of ASICs that have gpu_info firmware. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH] drm/amdgpu: fix ocl test performance drop

2017-05-18 Thread Christian König
Am 18.05.2017 um 09:45 schrieb Flora Cui: partial revert commit <6971d3d> - drm/amdgpu: cleanup logic in amdgpu_vm_flush Change-Id: Iadce9d613dfe9a739643a74050cea55854832adb Signed-off-by: Flora Cui I don't see how the revert should be faster than the original. Especially

[PATCH] drm/amdgpu: fix ocl test performance drop

2017-05-18 Thread Flora Cui
partial revert commit <6971d3d> - drm/amdgpu: cleanup logic in amdgpu_vm_flush Change-Id: Iadce9d613dfe9a739643a74050cea55854832adb Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff

Re: [PATCH] drm/amdgpu: add dep_sync for amdgpu job

2017-05-18 Thread Christian König
Am 18.05.2017 um 10:18 schrieb Chunming Zhou: The fence in dep_sync cannot be optimized. Change-Id: Ica1924ad4fe991c0f13438ab521036f60544afcc Signed-off-by: Chunming Zhou A bit more commit message wouldn't hurt, but either way the patch is Reviewed-by: Christian König

Re: Plan: BO move throttling for visible VRAM evictions

2017-05-18 Thread Marek Olšák
On May 18, 2017 10:17 AM, "Michel Dänzer" wrote: On 17/05/17 09:35 PM, Marek Olšák wrote: > 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,

Re: [PATCH 1/3] drm/amdgpu: Drop useless loops for placement restrictions

2017-05-18 Thread Michel Dänzer
On 18/05/17 06:17 PM, Christian König wrote: > Am 18.05.2017 um 11:08 schrieb Michel Dänzer: >> From: Michel Dänzer >> >> We know how the placements were initialized in these cases, so we can >> set the restrictions directly without a loop. >> >> Signed-off-by: Michel

Re: [PATCH 1/3] drm/amdgpu: Drop useless loops for placement restrictions

2017-05-18 Thread Christian König
Am 18.05.2017 um 11:08 schrieb Michel Dänzer: From: Michel Dänzer We know how the placements were initialized in these cases, so we can set the restrictions directly without a loop. Signed-off-by: Michel Dänzer ---

[PATCH 3/3] drm/amdgpu: Try evicting from CPU visible to invisible VRAM first

2017-05-18 Thread Michel Dänzer
From: Michel Dänzer In exchange, move BOs with the AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED flag set to CPU visible VRAM with more force. For other BOs, this gives another chance to stay in VRAM if they happened to lie in the CPU visible part and another BO needs to go

[PATCH 0/3] drm/amdgpu: Tweaks for high pressure on CPU visible VRAM

2017-05-18 Thread Michel Dänzer
From: Michel Dänzer This series was developed and tested under the following scenario: Running the PTS dirt-rally benchmark (1920x1080, Ultra) on Tonga with 2G, with CPU visible VRAM artificially restricted to 64 MB. Without this series, there's a lot of stutter during

[PATCH 1/3] drm/amdgpu: Drop useless loops for placement restrictions

2017-05-18 Thread Michel Dänzer
From: Michel Dänzer We know how the placements were initialized in these cases, so we can set the restrictions directly without a loop. Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 13 +++--

[PATCH 2/3] drm/amdgpu: Don't evict other BOs from VRAM for page faults

2017-05-18 Thread Michel Dänzer
From: Michel Dänzer If there is no free space in CPU visible VRAM for the faulting BO, move it to GTT instead of evicting other BOs from CPU visible VRAM. Signed-off-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 22

Re: Plan: BO move throttling for visible VRAM evictions

2017-05-18 Thread Christian König
Am 18.05.2017 um 10:17 schrieb Michel Dänzer: [SNIP] One thing that might help would be if we could swap individual memory nodes between visible and invisible VRAM for CPU page faults, instead of moving/evicting whole BOs. Christian, do you think something like that would be possible? I've

[PATCH] drm/amdgpu: add dep_sync for amdgpu job

2017-05-18 Thread Chunming Zhou
The fence in dep_sync cannot be optimized. Change-Id: Ica1924ad4fe991c0f13438ab521036f60544afcc Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 17

Re: Plan: BO move throttling for visible VRAM evictions

2017-05-18 Thread Michel Dänzer
On 17/05/17 09:35 PM, Marek Olšák wrote: > 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" >

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

2017-05-18 Thread Lukas Wunner
On Wed, May 17, 2017 at 11:08:23PM +0200, Nicolai Stange wrote: > 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] [snip] > Bisection lead to commit 7ffb0ce31cf9

Re: [PATCH] drm/amd: include instead of "linux/delay.h"

2017-05-18 Thread Christian König
Am 18.05.2017 um 06:43 schrieb Masahiro Yamada: Use <...> notation to include headers located in include/linux. While we are here, tweak the includes order a bit to sort them alphabetically. Signed-off-by: Masahiro Yamada Reviewed-by: Christian König