Re: [PATCH] drm/amdkfd: Add procfs-style information for KFD processes

2019-06-19 Thread Christian König
Am 19.06.19 um 16:01 schrieb Russell, Kent: Add a folder structure to /sys/class/kfd/kfd/ called proc which contains subfolders, each representing an active KFD process' PID, containing 1 file: pasid. What is the use case of that information? In other words would it be maybe better to create

Re: [PATCH] drm/amd/amdgpu: Indentation and simplification fixes for DF driver

2019-06-18 Thread Christian König
Am 18.06.19 um 20:26 schrieb StDenis, Tom: Minor indentation and simplifications for the DF 3.6 driver. No functional changes. Signed-off-by: Tom St Denis Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 50 ++-- 1 file changed, 18

[PATCH 3/6] drm/ttm: use the parent resv for ghost objects v2

2019-06-18 Thread Christian König
This way we can even pipeline imported BO evictions. v2: Limit this to only cases when the parent object uses a separate reservation object as well. This fixes another OOM problem. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_util.c | 20 +++- 1 file

[PATCH 4/6] drm/amdgpu: use allowed_domains for exported DMA-bufs

2019-06-18 Thread Christian König
Avoid that we ping/pong the buffers when we stop to pin DMA-buf exports by using the allowed domains for exported buffers. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 6/6] drm/amdgpu: add independent DMA-buf import v6

2019-06-18 Thread Christian König
interface v4: split out from unpinned DMA-buf work v5: rebased and cleanup on new DMA-buf interface v6: squash with invalidation callback change, stop using _(map|unmap)_locked Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 65 - drivers

[PATCH 5/6] drm/amdgpu: add independent DMA-buf export v6

2019-06-18 Thread Christian König
leftovers v3: split out from unpinned DMA-buf work v4: rebase on top of new no_sgt_cache flag v5: fix some warnings by including amdgpu_dma_buf.h v6: fix locking for non amdgpu exports Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 210 +--- drivers

[PATCH 2/6] drm/ttm: remove the backing store if no placement is given

2019-06-18 Thread Christian König
Pipeline removal of the BOs backing store when no placement is given during validation. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index

[PATCH 1/6] dma-buf: add dynamic DMA-buf handling v10

2019-06-18 Thread Christian König
together with pin/unpin changes v7: pin/unpin takes an attachment now v8: nuke dma_buf_attachment_(map|unmap)_locked, everything is now handled backward compatible v9: always cache when export/importer don't agree on dynamic handling v10: minimal style cleanup Signed-off-by: Christian König

Re: [PATCH] drm/amdgpu: add job->preamble_status back to status value

2019-06-18 Thread Christian König
Am 18.06.19 um 12:31 schrieb Xiao, Jack: job->preamble_status was accidently dropped from the combination value of status varaiable which is the parameter of some ring level function. The patch is to add it back. Signed-off-by: Jack Xiao For now Acked-by: Christian König , cause we n

Re: [PATCH 268/459] drm/amdgpu/gfx10: remove static GDS, GWS and OA allcoation

2019-06-18 Thread Christian König
Am 17.06.19 um 21:30 schrieb Alex Deucher: From: Hawking Zhang Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher Since the fields where removed this should most likely be squashed into the original commit adding the code, or otherwise everything in between won't compile any more.

Re: [PATCH 201/459] drm/amdgpu: fix memory leak in preemption unit test

2019-06-18 Thread Christian König
Can probably be squashed into the original adding of the unit test. Christian. Am 17.06.19 um 21:29 schrieb Alex Deucher: From: Jack Xiao It forgot to put job fence, caused fence memory leak. Signed-off-by: Jack Xiao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher ---

Re: [PATCH 092/459] drm/amdgpu: add ib preemption status in amdgpu_job

2019-06-18 Thread Christian König
Am 17.06.19 um 21:10 schrieb Alex Deucher: From: Jack Xiao Add ib preemption status in amdgpu_job, so that ring level function can detect preemption and program for resuming it. Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher ---

Re: [PATCH 247/459] Revert "drm/amdgpu: mask some pm interfaces for navi10 because they are changed or not workable so far"

2019-06-18 Thread Christian König
Am 17.06.19 um 21:30 schrieb Alex Deucher: From: Kevin Wang This reverts commit fd9c75d217d5b4ed72672722b6621e2635363dfe. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher Would it be possible to squash that into the original commit which disabled things?

Re: [PATCH] drm/amd/amdgpu: cast mem->num_pages to 64-bits when shifting

2019-06-17 Thread Christian König
Am 17.06.19 um 21:15 schrieb Kuehling, Felix: Looks good to me. One cosmetic comment inline. With that fixed this patch is Reviewed-by:  Felix Kuehling On 2019-06-14 12:51 p.m., StDenis, Tom wrote: On 32-bit hosts mem->num_pages is 32-bits and can overflow when shifted. Add a cast to avoid

Re: [PATCH] drm/amd/amdgpu: cast mem->num_pages to 64-bits when shifting

2019-06-17 Thread Christian König
Reviewed-by: Christian König Am 17.06.19 um 20:21 schrieb Tom St Denis: ping? On Fri, Jun 14, 2019 at 12:51 PM StDenis, Tom <mailto:tom.stde...@amd.com>> wrote: On 32-bit hosts mem->num_pages is 32-bits and can overflow when shifted.  Add a cast to avoid this.

Re: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init

2019-06-17 Thread Christian König
A quick guide to the different tags: Signed-off-by: I'm somehow responsible that the code is in the mainline tree. E.g. either the Author of a patch or some maintainer who forwarded the stuff to Linus. Tested-by: I tested the code and found it working good. Reviewed-by: I'm familiar with both

[PATCH 1/6] dma-buf: add dynamic DMA-buf handling v10

2019-06-17 Thread Christian König
together with pin/unpin changes v7: pin/unpin takes an attachment now v8: nuke dma_buf_attachment_(map|unmap)_locked, everything is now handled backward compatible v9: always cache when export/importer don't agree on dynamic handling v10: minimal style cleanup Signed-off-by: Christian König

[PATCH 2/6] drm/ttm: remove the backing store if no placement is given

2019-06-17 Thread Christian König
Pipeline removal of the BOs backing store when no placement is given during validation. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index

[PATCH 5/6] drm/amdgpu: add independent DMA-buf export v6

2019-06-17 Thread Christian König
leftovers v3: split out from unpinned DMA-buf work v4: rebase on top of new no_sgt_cache flag v5: fix some warnings by including amdgpu_dma_buf.h v6: fix locking for non amdgpu exports Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 210 +--- drivers

[PATCH 4/6] drm/amdgpu: use allowed_domains for exported DMA-bufs

2019-06-17 Thread Christian König
Avoid that we ping/pong the buffers when we stop to pin DMA-buf exports by using the allowed domains for exported buffers. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 6/6] drm/amdgpu: add independent DMA-buf import v6

2019-06-17 Thread Christian König
interface v4: split out from unpinned DMA-buf work v5: rebased and cleanup on new DMA-buf interface v6: squash with invalidation callback change, stop using _(map|unmap)_locked Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 65 - drivers

[PATCH 3/6] drm/ttm: use the parent resv for ghost objects v2

2019-06-17 Thread Christian König
This way we can even pipeline imported BO evictions. v2: Limit this to only cases when the parent object uses a separate reservation object as well. This fixes another OOM problem. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_util.c | 20 +++- 1 file

Re: [PATCH] drm/amdgpu: only use kernel zone if need_dma32 is not required

2019-06-12 Thread Christian König
Well that we evict here is perfectly intentional. The laptop I'm typing on actually don't work without this, so please don't touch any of that. Christian. Am 12.06.19 um 20:06 schrieb Yang, Philip: That's kind of hack because dma32 zone is not needed, it has bad effect to trigger

Re: [PATCH] drm/amdgpu: only use kernel zone if need_dma32 is not required

2019-06-12 Thread Christian König
Am 12.06.19 um 17:13 schrieb Yang, Philip: TTM create two zones, kernel zone and dma32 zone for system memory. If system memory address allocated is below 4GB, this account to dma32 zone and will exhaust dma32 zone and trigger unnesssary TTM eviction. Patch "drm/ttm: Account for kernel

Re: [PATCH v3] drm/amdgpu: explicitly set mmGDS_VMID0_BASE to 0

2019-06-12 Thread Christian König
Am 12.06.19 um 15:11 schrieb Zhu, James: Explicitly set mmGDS_VMID0_BASE to 0. Also update GDS_VMID0_BASE/_SIZE with direct register writes. Signed-off-by: James Zhu Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 35 +-- 1 file

Re: [PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v3)

2019-06-12 Thread Christian König
Am 12.06.19 um 13:08 schrieb StDenis, Tom: (v2): Return 0 and set mem->mm_node to NULL. (v3): Use atomic64_add_return instead. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 17 - 1 file changed, 12 inserti

Re: [PATCH] drm/amdgpu: explicitly set mmGDS_VMID0_BASE to 0

2019-06-12 Thread Christian König
Am 10.06.19 um 19:26 schrieb Zhu, James: Explicitly set mmGDS_VMID0_BASE to 0. Also update GDS_VMID0_BASE/_SIZE with direct register writes. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 33 +++-- 1 file changed, 15 insertions(+), 18

Re: [PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v2)

2019-06-12 Thread Christian König
Am 12.06.19 um 09:26 schrieb Michel Dänzer: On 2019-06-11 6:54 p.m., StDenis, Tom wrote: (v2): Return 0 and set mem->mm_node to NULL. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-)

Re: [PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v2)

2019-06-12 Thread Christian König
Am 11.06.19 um 18:54 schrieb StDenis, Tom: (v2): Return 0 and set mem->mm_node to NULL. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git

Re: [PATCH] drm/amdgpu: Reserve space for shared fence

2019-06-12 Thread Christian König
-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index 81e0e75..74e8695 100644 --- a/drivers/gpu/drm/amd/amdgpu

Re: [PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM

2019-06-11 Thread Christian König
Am 10.06.19 um 16:32 schrieb StDenis, Tom: Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

Re: [PATCH] drm/amdgpu: Add GDS clearing workaround in later init for gfx9

2019-06-08 Thread Christian König
Yeah, that would be a good idea as well. Additional to that I suggest to update GDS_VMID0_BASE/_SIZE with direct register writes instead of PM4 packets. Christian. Am 07.06.19 um 22:16 schrieb Shamis, Leonid: James, Do you set GDS_VMID0_BASE to 0?.. I don't see it in your patch. Regards,

Re: FW: [PATCH] drm/ttm: fix ttm client driver (e.g. amdgpu) reload issue

2019-06-06 Thread Christian König
It is part of amd-staging-drm-next and has Alex Signed-of by tag. So it should definitely be upstream, Alex any idea why that patch isn't in drm-next? Christian. Am 05.06.19 um 20:10 schrieb Koenig, Christian: Mhm, looks like that somehow got dropped during rebase. Going to dig up where

Re: [PATCH] drm/amd/amdgpu: remove vram_page_split kernel option (v3)

2019-06-06 Thread Christian König
Am 06.06.19 um 13:51 schrieb StDenis, Tom: On 2019-06-06 7:49 a.m., Christian König wrote: Am 06.06.19 um 12:50 schrieb StDenis, Tom: This option is no longer needed.  The default code paths are now the only option. v2: Add HPAGE support and a default for non contiguous maps v3: Misread 512

Re: [PATCH] drm/amd/amdgpu: remove vram_page_split kernel option (v3)

2019-06-06 Thread Christian König
y((uint32_t)num_nodes, sizeof(*nodes), You can probably drop that cast here, apart from that the patch is Reviewed-by: Christian König . Do you want to look into test/benchmark as well? Thanks, Christian. GFP_KERNEL | __GFP_ZERO); if (!nodes) r

Re: [PATCH] drm/amd/amdgpu: remove vram_page_split kernel option (v2)

2019-06-06 Thread Christian König
Am 04.06.19 um 19:15 schrieb StDenis, Tom: This option is no longer needed. The default code paths are now the only option. v2: Add HPAGE support and a default for non contiguous maps Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 -

Re: [PATCH] drm/amdgpu: bump the DRM version for GDS ENOMEM fixes

2019-06-05 Thread Christian König
Am 05.06.19 um 04:50 schrieb Marek Olšák: From: Marek Olšák Signed-off-by: Marek Olšák Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu

Re: [PATCH] drm/ttm: fix ttm_bo_unreserve

2019-06-05 Thread Christian König
Am 04.06.19 um 21:03 schrieb Zeng, Oak: Regards, Oak -Original Message- From: amd-gfx On Behalf Of Kuehling, Felix Sent: Tuesday, June 4, 2019 2:47 PM To: Christian König ; dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/ttm: fix

[PATCH] drm/ttm: fix ttm_bo_unreserve

2019-06-04 Thread Christian König
Since we now keep BOs on the LRU we need to make sure that they are removed when they are pinned. Signed-off-by: Christian König --- include/drm/ttm/ttm_bo_driver.h | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm

Re: [PATCH] drm/amd/amdgpu: remove vram_page_split kernel option

2019-06-04 Thread Christian König
Am 04.06.19 um 15:49 schrieb StDenis, Tom: This option is no longer needed. The default code paths are now the only option. NAK, we still need the functionality. It just doesn't needs to be configurable, but rather use the CPU defaults. Christian. Signed-off-by: Tom St Denis ---

Re: [PATCH] drm/amdgpu: no need fbcon under sriov

2019-06-04 Thread Christian König
Am 04.06.19 um 15:43 schrieb Yintian Tao: Under Sriov, there is no need of the support for fbcon. NAK, that error message is not related to fbcon but means that PCIe device removal is not supported. Christian. Signed-off-by: Yintian Tao --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3

Re: [PATCH] drm/amdgpu: fix ring test failure issue during s3 in vce 3.0 (V2)

2019-06-04 Thread Christian König
tely, meaning move its read location further down in the code flow. With this patch applied the s3 failure is no more seen for >5k s3 cycles, which otherwise is pretty consistent. V2: remove reduntant fetch of rptr Signed-off-by: Louis Li Reviewed-by: Christian König CC: stable... Who does t

Re: [PATCH] drm/amdgpu: use new HMM APIs and helpers

2019-06-03 Thread Christian König
Am 03.06.19 um 12:17 schrieb Christian König: Am 01.06.19 um 00:01 schrieb Kuehling, Felix: On 2019-05-31 5:32 p.m., Yang, Philip wrote: On 2019-05-31 3:42 p.m., Kuehling, Felix wrote: On 2019-05-31 1:28 p.m., Yang, Philip wrote: On 2019-05-30 6:36 p.m., Kuehling, Felix wrote

Re: [PATCH] drm/amdgpu: use new HMM APIs and helpers

2019-06-03 Thread Christian König
Am 01.06.19 um 00:01 schrieb Kuehling, Felix: On 2019-05-31 5:32 p.m., Yang, Philip wrote: On 2019-05-31 3:42 p.m., Kuehling, Felix wrote: On 2019-05-31 1:28 p.m., Yang, Philip wrote: On 2019-05-30 6:36 p.m., Kuehling, Felix wrote: #if IS_ENABLED(CONFIG_DRM_AMDGPU_USERPTR) -

Re: [PATCH] drm/amdgpu/display: Drop some new CONFIG_DRM_AMD_DC_DCN1_01 guards

2019-05-31 Thread Christian König
Am 31.05.19 um 18:37 schrieb Alex Deucher: These got added back by subsequent merges accidently. Signed-off-by: Alex Deucher Acked-by: Christian König --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 4 2 files

Re: [PATCH] drm/amdgpu: fix a race in GPU reset with IB test (v2)

2019-05-31 Thread Christian König
thread to delayed work since it's just the IB tests now which can happen later. Schedule the work at init and resume time. It's not needed at reset time because the IB tests are called directly. Cc: Xinhui Pan Signed-off-by: Alex Deucher Reviewed-by: Christian König --- drivers/gpu/drm/amd

Re: [PATCH] drm/sched: Fix make htmldocs warnings.

2019-05-30 Thread Christian König
Am 29.05.19 um 21:36 schrieb Daniel Vetter: On Wed, May 29, 2019 at 04:43:45PM +, Grodzovsky, Andrey wrote: I don't, sorry. Should we fix that? Seems like you do plenty of scheduler stuff, so would make sense I guess ... Reviewed-by: Christian König for the patch. And +1 for giving

[PATCH 04/10] drm/ttm: cleanup ttm_bo_mem_space

2019-05-29 Thread Christian König
We tried this once before, but that turned out to be more complicated than thought. With all the right prerequisites it looks like we can do this now. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 127 ++- 1 file changed, 66 insertions(+), 61

[PATCH 08/10] drm/amdgpu: drop some validation failure messages

2019-05-29 Thread Christian König
The messages about amdgpu_cs_list_validate are duplicated because the caller will complain into the logs as well and we can also get interrupted by a signal here. Also fix the the caller to not report -EAGAIN from validation. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu

[PATCH 06/10] drm/ttm: fix busy memory to fail other user v10

2019-05-29 Thread Christian König
cases. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 77 ++-- 1 file changed, 66 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 8a8859cf60e8..c7de667d482a 100644 --- a/drivers/gpu/drm

[PATCH 09/10] drm/amdgpu: create GDS, GWS and OA in system domain

2019-05-29 Thread Christian König
And only move them in on validation. This allows for better control when multiple processes are fighting over those resources. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH 02/10] drm/ttm: return immediately in case of a signal

2019-05-29 Thread Christian König
When a signal arrives we should return immediately for handling it and not try other placements first. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm

[PATCH 03/10] drm/ttm: remove manual placement preference

2019-05-29 Thread Christian König
If drivers don't prefer a system memory placement they should not but it into the placement list first. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers

[PATCH 07/10] drm/amd/display: use ttm_eu_reserve_buffers instead of amdgpu_bo_reserve v2

2019-05-29 Thread Christian König
From: Chunming Zhou add ticket for display bo, so that it can preempt busy bo. v2: fix stupid rebase error Change-Id: I9f031cdcc8267de00e819ae303baa0a52df8ebb9 Signed-off-by: Chunming Zhou Reviewed-by: Christian König --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21

[PATCH 05/10] drm/ttm: immediately move BOs to the new LRU v3

2019-05-29 Thread Christian König
-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 42 +++- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 0dbb23b0dedd..8a8859cf60e8 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c

[PATCH 10/10] drm/amdgpu: stop removing BOs from the LRU v3

2019-05-29 Thread Christian König
This avoids OOM situations when we have lots of threads submitting at the same time. v3: apply this to the whole driver, not just CS Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c| 2 +- drivers/gpu/drm/amd

[PATCH 01/10] drm/ttm: Make LRU removal optional v2

2019-05-29 Thread Christian König
We are already doing this for DMA-buf imports and also for amdgpu VM BOs for quite a while now. If this doesn't run into any problems we are probably going to stop removing BOs from the LRU altogether. v2: drop BUG_ON from ttm_bo_add_to_lru Signed-off-by: Christian König --- .../gpu/drm/amd

Re: [PATCH] drm/amdgpu:Fix the unpin warning about csb buffer

2019-05-29 Thread Christian König
Sorry for the delay, your patch simply got stuck in the daily wave of mails. Reviewed-by: Christian König Regards, Christian. Am 29.05.19 um 05:07 schrieb Deng, Emily: Hi Christian, I have reverted the before change as your suggestion, and sent this new patch, could you help to review

Re: [PATCH] drm/amdgpu: fix a race in GPU reset with IB test

2019-05-29 Thread Christian König
Am 28.05.19 um 21:29 schrieb Alex Deucher: Split late_init into two functions, one (do_late_init) which just does the hw init, and late_init which calls do_late_init and schedules the IB test work. Call do_late_init in the GPU reset code to run the init code, but not schedule the IB test code.

[PATCH 06/10] drm/ttm: fix busy memory to fail other user v10

2019-05-28 Thread Christian König
cases. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 77 ++-- 1 file changed, 66 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 3bc31da1df67..98aa90056807 100644 --- a/drivers/gpu/drm

[PATCH 10/10] drm/amdgpu: stop removing BOs from the LRU v3

2019-05-28 Thread Christian König
This avoids OOM situations when we have lots of threads submitting at the same time. v3: apply this to the whole driver, not just CS Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c| 2 +- drivers/gpu/drm/amd

[PATCH 09/10] drm/amdgpu: create GDS, GWS and OA in system domain

2019-05-28 Thread Christian König
And only move them in on validation. This allows for better control when multiple processes are fighting over those resources. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH 08/10] drm/amdgpu: drop some validation failure messages

2019-05-28 Thread Christian König
The messages about amdgpu_cs_list_validate are duplicated because the caller will complain into the logs as well and we can also get interrupted by a signal here. Also fix the the caller to not report -EAGAIN from validation. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu

[PATCH 07/10] drm/amd/display: use ttm_eu_reserve_buffers instead of amdgpu_bo_reserve v2

2019-05-28 Thread Christian König
From: Chunming Zhou add ticket for display bo, so that it can preempt busy bo. v2: fix stupid rebase error Change-Id: I9f031cdcc8267de00e819ae303baa0a52df8ebb9 Signed-off-by: Chunming Zhou Reviewed-by: Christian König --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21

[PATCH 05/10] drm/ttm: immediately move BOs to the new LRU v2

2019-05-28 Thread Christian König
Move BOs which are currently in a lower domain to the new LRU before allocating backing space while validating. This makes sure that we always have enough entries on the LRU to allow for other processes to wait for an operation to complete. v2: generalize the test Signed-off-by: Christian König

[PATCH 04/10] drm/ttm: cleanup ttm_bo_mem_space

2019-05-28 Thread Christian König
We tried this once before, but that turned out to be more complicated than thought. With all the right prerequisites it looks like we can do this now. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 127 ++- 1 file changed, 66 insertions(+), 61

[PATCH 01/10] drm/ttm: Make LRU removal optional v2

2019-05-28 Thread Christian König
We are already doing this for DMA-buf imports and also for amdgpu VM BOs for quite a while now. If this doesn't run into any problems we are probably going to stop removing BOs from the LRU altogether. v2: drop BUG_ON from ttm_bo_add_to_lru Signed-off-by: Christian König --- .../gpu/drm/amd

[PATCH 02/10] drm/ttm: return immediately in case of a signal

2019-05-28 Thread Christian König
When a signal arrives we should return immediately for handling it and not try other placements first. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm

[PATCH 03/10] drm/ttm: remove manual placement preference

2019-05-28 Thread Christian König
If drivers don't prefer a system memory placement they should not but it into the placement list first. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers

Re: [PATCH] drm/amdgpu: add DRIVER_SYNCOBJ_TIMELINE to amdgpu

2019-05-28 Thread Christian König
Reviewed-by: Christian König Am 28.05.19 um 05:05 schrieb Cui, Flora: the patch is Reviewed-by: Flora Cui 在 5/28/2019 10:52 AM, Chunming Zhou 写道: Change-Id: I2b1af1478fbddbb5084b90b3ff85c2eb964bd217 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1

Re: [PATCH] drm/amdgpu: enable PCIE atomics ops support

2019-05-28 Thread Christian König
Am 27.05.19 um 20:23 schrieb Kuehling, Felix: On 2019-05-27 7:51 a.m., Christian König wrote: That idea sounds sane to me as well. By the way, do we somewhere signal to userspace if atomics are supported or not? Yes. KFD topology (a flag in the iolink) provides that information to user mode

Re: [PATCH] drm/amdgpu: fix ring test failure issue during s3 in vce 3.0

2019-05-28 Thread Christian König
Wow, really good catch! The underlying problem is most likely that VCE block is either power or clock gated and because of this the readptr read always returns zero. Now amdgpu_ring_alloc() informs the power management code that the block is about to be used and so the gating is turned off.

Re: [PATCH] drm/amdgpu: enable PCIE atomics ops support

2019-05-27 Thread Christian König
That idea sounds sane to me as well. By the way, do we somewhere signal to userspace if atomics are supported or not? I mean would be nice to keep the state inside adev if this fails for some reason. Christian. Am 27.05.19 um 13:16 schrieb Zhang, Hawking: How about put

Re: [PATCH] drm/amdgpu: Don't need to call csb_vram_unpin

2019-05-27 Thread Christian König
Am 27.05.19 um 10:41 schrieb Emily Deng: As it will destroy clear_state_obj, and also will unpin it in the gfx_v9_0_sw_fini, so don't need to call csb_vram unpin in gfx_v9_0_hw_fini, or it will have unpin warning. v2: For suspend, still need to do unpin Signed-off-by: Emily Deng ---

Re: [PATCH 02/12] dma-buf: add dma_buf_(un)map_attachment_locked variants v3

2019-05-27 Thread Christian König
Christian König wrote: Add function variants which can be called with the reservation lock already held. v2: reordered, add lockdep asserts, fix kerneldoc v3: rebased on sgt caching Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 63 +++ include

Re: [PATCH] drm/amdgpu: fix unload driver fail

2019-05-24 Thread Christian König
Am 24.05.19 um 11:52 schrieb Emily Deng: dc_destroy should be called amdgpu_cgs_destroy_device, as it will use cgs context to read or write registers. Signed-off-by: Emily Deng Acked-by: Christian König --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 --- 1 file changed

Re: [PATCH 06/10] drm/ttm: fix busy memory to fail other user v10

2019-05-24 Thread Christian König
will return EAGAIN and eventually dm_plane_helper_prepare_fb popups out pinned failed message .For this case, the patch#7 can we add EAGAIN as ERESTARTSYS which filter out the annoying error message . Thanks, Prike -Original Message- From: Christian König Sent: Thursday, May 23, 2019 7:04 PM

Re: [PATCH 8/8] drm/amdkfd: Use kfd fd to mmap mmio

2019-05-24 Thread Christian König
Am 24.05.19 um 00:41 schrieb Zeng, Oak: TTM doesn't support CPU mapping of sg type bo (under which mmio bo is created). Switch mmaping of mmio page to kfd device file. Change-Id: I1a1a24f2ac0662be3783d460c137731ade007b83 Signed-off-by: Oak Zeng Acked-by: Christian König --- drivers/gpu

Re: [PATCH 06/10] drm/ttm: fix busy memory to fail other user v10

2019-05-23 Thread Christian König
Am 23.05.19 um 12:24 schrieb zhoucm1: On 2019年05月22日 20:59, Christian König wrote: [CAUTION: External Email] BOs on the LRU might be blocked during command submission and cause OOM situations. Avoid this by blocking for the first busy BO not locked by the same ticket as the BO we

Re: [PATCH 01/10] drm/ttm: Make LRU removal optional.

2019-05-23 Thread Christian König
Am 23.05.19 um 11:15 schrieb zhoucm1: On 2019年05月22日 20:59, Christian König wrote: [SNIP] @@ -203,7 +204,10 @@ void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket, reservation_object_add_shared_fence(bo->resv, fence); else reservation_object_add_excl_fence(bo-&g

Re: [PATCH 10/10] drm/amdgpu: stop removing BOs from the LRU v3

2019-05-23 Thread Christian König
on the LRU list? Could we do the same thing in amdgpu_amdkfd_gpuvm.c? And if we did, what would be the expected side effects or consequences? Thanks,   Felix On 2019-05-22 8:59 a.m., Christian König wrote: [CAUTION: External Email] This avoids OOM situations when we have lots of threads submitting

Re: [PATCH 01/12] dma-buf: add dynamic caching of sg_table

2019-05-22 Thread Christian König
Am 22.05.19 um 18:17 schrieb Sumit Semwal: Hi Christian, On Sat, 27 Apr 2019 at 05:31, Liam Mark wrote: On Tue, 16 Apr 2019, Christian König wrote: To allow a smooth transition from pinning buffer objects to dynamic invalidation we first start to cache the sg_table for an attachment unless

Re: [PATCH] drm/sched: Fix static checker warning for potential NULL ptr

2019-05-22 Thread Christian König
Am 22.05.19 um 15:57 schrieb Andrey Grodzovsky: Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König --- drivers/gpu/drm/scheduler/sched_main.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_main.c b

[PATCH 09/10] drm/amdgpu: create GDS, GWS and OA in system domain

2019-05-22 Thread Christian König
And only move them in on validation. This allows for better control when multiple processes are fighting over those resources. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH 07/10] drm/amd/display: use ttm_eu_reserve_buffers instead of amdgpu_bo_reserve v2

2019-05-22 Thread Christian König
From: Chunming Zhou add ticket for display bo, so that it can preempt busy bo. v2: fix stupid rebase error Change-Id: I9f031cdcc8267de00e819ae303baa0a52df8ebb9 Signed-off-by: Chunming Zhou Reviewed-by: Christian König --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21

[PATCH 06/10] drm/ttm: fix busy memory to fail other user v10

2019-05-22 Thread Christian König
cases. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 77 ++-- 1 file changed, 66 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 4c6389d849ed..861facac33d4 100644 --- a/drivers/gpu/drm

[PATCH 10/10] drm/amdgpu: stop removing BOs from the LRU v3

2019-05-22 Thread Christian König
This avoids OOM situations when we have lots of threads submitting at the same time. v3: apply this to the whole driver, not just CS Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c| 2 +- drivers/gpu/drm/amd

[PATCH 08/10] drm/amdgpu: drop some validation failure messages

2019-05-22 Thread Christian König
The messages about amdgpu_cs_list_validate are duplicated because the caller will complain into the logs as well and we can also get interrupted by a signal here. Also fix the the caller to not report -EAGAIN from validation. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu

[PATCH 03/10] drm/ttm: remove manual placement preference

2019-05-22 Thread Christian König
If drivers don't prefer a system memory placement they should not but it into the placement list first. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers

[PATCH 02/10] drm/ttm: return immediately in case of a signal

2019-05-22 Thread Christian König
When a signal arrives we should return immediately for handling it and not try other placements first. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm

[PATCH 01/10] drm/ttm: Make LRU removal optional.

2019-05-22 Thread Christian König
We are already doing this for DMA-buf imports and also for amdgpu VM BOs for quite a while now. If this doesn't run into any problems we are probably going to stop removing BOs from the LRU altogether. Signed-off-by: Christian König --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 9

[PATCH 04/10] drm/ttm: cleanup ttm_bo_mem_space

2019-05-22 Thread Christian König
We tried this once before, but that turned out to be more complicated than thought. With all the right prerequisites it looks like we can do this now. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 127 ++- 1 file changed, 66 insertions(+), 61

[PATCH 05/10] drm/ttm: immediately move BOs to the new LRU v2

2019-05-22 Thread Christian König
Move BOs which are currently in a lower domain to the new LRU before allocating backing space while validating. This makes sure that we always have enough entries on the LRU to allow for other processes to wait for an operation to complete. v2: generalize the test Signed-off-by: Christian König

Re: [PATCH] gpu: drm: use struct_size() in kmalloc()

2019-05-21 Thread Christian König
Am 21.05.19 um 09:23 schrieb Daniel Vetter: On Tue, May 21, 2019 at 4:33 AM Alex Deucher wrote: On Mon, May 20, 2019 at 7:19 PM Pan, Xinhui wrote: Daniel, what you are talking about is totally wrong. 1) AFAIK, only one zero-size array can be in the end of a struct. 2) two struct_size will

Re: 答复: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV

2019-05-17 Thread Christian König
@lists.freedesktop.org *主题:* Re: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV Looks good to me now, but I don't know the technical background why this BO is not needed under SRIOV. So this patch is Acked-by: Christian König . Regards, Christian. Am 17.05.19 um 04:41 schrieb Tao, Yintian: >

Re: [RFC PATCH v2 4/5] drm, cgroup: Add total GEM buffer allocation limit

2019-05-16 Thread Christian König
Am 16.05.19 um 16:03 schrieb Kenny Ho: On Thu, May 16, 2019 at 3:25 AM Christian König wrote: Am 16.05.19 um 09:16 schrieb Koenig, Christian: Am 16.05.19 um 04:29 schrieb Kenny Ho: On Wed, May 15, 2019 at 5:26 PM Welty, Brian wrote: On 5/9/2019 2:04 PM, Kenny Ho wrote: Each file is multi

Re: [RFC PATCH v2 4/5] drm, cgroup: Add total GEM buffer allocation limit

2019-05-16 Thread Christian König
Am 16.05.19 um 09:16 schrieb Koenig, Christian: Am 16.05.19 um 04:29 schrieb Kenny Ho: [CAUTION: External Email] On Wed, May 15, 2019 at 5:26 PM Welty, Brian wrote: On 5/9/2019 2:04 PM, Kenny Ho wrote: There are four control file types, stats (ro) - display current measured values for a

Re: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV

2019-05-16 Thread Christian König
Am 16.05.19 um 07:11 schrieb Yintian Tao: PSP fw primary buffer is not used under SRIOV Therefore, we don't need to allocate memory for it. Signed-off-by: Yintian Tao Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 22 +- 1 file changed, 13

Re: [PATCH 11/11] drm/amdgpu: stop removing BOs from the LRU during CS

2019-05-15 Thread Christian König
ser space? you can verify it by some games, performance could be different much between multiple runnings. -David Original Message Subject: Re: [PATCH 11/11] drm/amdgpu: stop removing BOs from the LRU during CS From: Christian König To: "Zhou, David(ChunMing)" ,

Re: [PATCH 02/11] drm/ttm: fix busy memory to fail other user v8

2019-05-15 Thread Christian König
Am 15.05.19 um 10:45 schrieb Daniel Vetter: On Wed, May 15, 2019 at 10:38:28AM +0200, Daniel Vetter wrote: On Tue, May 14, 2019 at 02:31:18PM +0200, Christian König wrote: From: Chunming Zhou heavy gpu job could occupy memory long time, which lead other user fail to get memory. basically

  1   2   3   4   5   6   7   8   9   10   >