Re: [PATCH] drm/amdgpu: Sync KFD fence only for move/evict

2017-10-20 Thread Christian König
Am 19.10.2017 um 19:40 schrieb Harish Kasiviswanathan: A single KFD eviction fence is attached to all the BOs of a process including BOs imported. This fence ensures that all BOs belonging to that process stays resident when the process queues are active. Don't add this eviction fence to any syn

Re: [PATCH 1/5] drm/amdgpu:cleanup force_completion

2017-10-20 Thread Christian König
Am 20.10.2017 um 05:33 schrieb Monk Liu: cleanups, now only operate on the given ring Change-Id: I42ee081696ac348660d38be68807f34090ffcce2 Signed-off-by: Monk Liu Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_f

[PATCH 1/2] drm/amdgpu: delete duplicated code.

2017-10-20 Thread Rex Zhu
the variable ref_clock was assigned same value twice in same function. Change-Id: Id26ec6c8265ba53e0cb84511c825c9a446cb18f9 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/g

[PATCH 2/2] drm/amd/powerplay: fix uninitialized variable

2017-10-20 Thread Rex Zhu
refresh_rate was not initialized when program display gap. this patch can fix vce ring test failed when do S3 on Polaris10. Change-Id: Ie7bb363a44df0ea5dca3c03b8d884ac42a5db0a7 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+)

[PATCH 1/2] drm/amd/powerplay: retrieve the real-time coreClock values - currently, the coreClock vaule for min/max performance level on raven is hard-coded. - use the real-time vaule retrieved by Get

2017-10-20 Thread Evan Quan
Change-Id: Ic581d8f7acc4ba7b545a611c071815a5c53f8bb5 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 28 ++ 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c b/drivers/gpu/drm/amd/po

[PATCH 2/2] drm/amdgpu/psp: prevent page fault by checking write_frame address(v3) - Prevent a possible buffer overflow when updating the ring buffer by bounds checking the command frame against the a

2017-10-20 Thread Evan Quan
v2: update the ring_buffer_end address v3: update the commit log Change-Id: If3b79428b32ffab57b4e75f9c20c2b2d7e600223 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 16 ++-- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 16 ++-- 2 files changed, 28 ins

Re: [PATCH 2/5] drm/amdgpu:add hang_limit for sched

2017-10-20 Thread Christian König
Am 20.10.2017 um 05:33 schrieb Monk Liu: since gpu_scheduler source domain cannot access amdgpu variable so need create the hang_limit membewr for sched, and it can refer it for the upcoming GPU RESET patches Change-Id: I977ae2717e55a8b87c59e58a288bffc3b458b653 Signed-off-by: Monk Liu --- dri

Re: [PATCH 4/5] drm/amdgpu:cleanup job reset routine

2017-10-20 Thread Christian König
Am 20.10.2017 um 05:33 schrieb Monk Liu: merge the setting guilty on context into this function to avoid implement extra routine. Change-Id: I7a0063464fdc85d5ac9080046380e745565ff540 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 4 ++-- drivers/gpu/drm/amd/sche

Re: [PATCH 3/5] drm/amdgpu:implement guilty pointer

2017-10-20 Thread Christian König
Am 20.10.2017 um 05:33 schrieb Monk Liu: for user context there will be a guilty pointer in entity that points to the guilty member of its context, thus we cant track if a given entity is not from kernel ctx and if it is already marked guilty. Change-Id: Ie0a30830d89f52a6c4a514e67206140698a46367

Re: [PATCH 5/5] drm/amdgpu:skip job for guilty ctx in parser_init

2017-10-20 Thread Christian König
Am 20.10.2017 um 05:33 schrieb Monk Liu: Change-Id: I44019f6475b1eaaba55633cf5f8bb84284f19a2c Signed-off-by: Monk Liu Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 1/5] drm/amdgpu: minor cleanup for amdgpu_ttm_bind

2017-10-20 Thread Christian König
From: Christian König Filter the placement mask before using it. In theory it could be that we have other flags set here as well. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH 3/5] drm/amdgpu: remove extra parameter from amdgpu_ttm_bind()

2017-10-20 Thread Christian König
From: Christian König We always use the BO mem now. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h| 2 +

[PATCH 5/5] drm/amdgpu: don't flush the TLB before initializing GART

2017-10-20 Thread Christian König
From: Christian König No point in doing this. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c index

[PATCH 4/5] drm/amdgpu: move GART recovery into GTT manager

2017-10-20 Thread Christian König
From: Christian König The GTT manager handles the GART address space anyway, so it is completely pointless to keep the same information around twice. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++---

[PATCH 2/5] drm/amdgpu: nuke amdgpu_ttm_is_bound()

2017-10-20 Thread Christian König
From: Christian König use amdgpu_gtt_mgr_is_allocated() instead. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 15 +-- drivers/gpu/drm/amd/amdgp

Re: [PATCH 1/5] drm/amdgpu: minor cleanup for amdgpu_ttm_bind

2017-10-20 Thread Michel Dänzer
On 20/10/17 11:20 AM, Christian König wrote: > From: Christian König > > Filter the placement mask before using it. In theory it could be that we > have other flags set here as well. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++- > 1 file changed, 2

RE: [PATCH 2/5] drm/amdgpu:add hang_limit for sched

2017-10-20 Thread Liu, Monk
> Don't set it directly, make it a parameter of amd_sched_init(). Okay the indent is somehow always looks incorrect in email, but it already aligned actually -Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: 2017年10月20日 17:03 To: Liu, Monk ; amd-

RE: [PATCH 4/5] drm/amdgpu:cleanup job reset routine

2017-10-20 Thread Liu, Monk
> You need to walk the list of entities (with lock held) and check if entity->fence_context == job->s_fence->scheduled.context and only if you found the right one set the guilty flag there. Yeah you remind me, I did this in the old gpu reset patch, will add them back ! BR Monk -Original Mes

[PATCH] drm/amdgpu: fix kernel hang when starting VNC server

2017-10-20 Thread Xiangliang . Yu
After starting VNC server or running CTS test, kernel will hang and can see below call trace: [961816] INFO: task khugepaged:42 blocked for more than 120 seconds. [968581] Tainted: G OE 4.13.0 #1 [973495] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this

Re: [PATCH] drm/amdgpu: fix kernel hang when starting VNC server

2017-10-20 Thread Christian König
Am 20.10.2017 um 11:45 schrieb Xiangliang.Yu: After starting VNC server or running CTS test, kernel will hang and can see below call trace: [961816] INFO: task khugepaged:42 blocked for more than 120 seconds. [968581] Tainted: G OE 4.13.0 #1 [973495] "echo 0 > /proc/sys/kernel/

[PATCH] Revert "drm/amd/display: Match actual state during S3 resume."

2017-10-20 Thread Rex Zhu
This reverts commit 7ae4acd21e9e264afb079e23d43bcf2238c7dbea. fix s3 hang issue. Change-Id: Iefb61cf8072b83146d867961b22f13ad83ab0106 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 38 --- 1 file changed, 38 deletions(-) diff --git a/drivers/

[PATCH 1/3] drm/amdgpu: Avoid accessing job->entity after the job is scheduled.

2017-10-20 Thread Andrey Grodzovsky
Bug: amdgpu_job_free_cb was accessing s_job->s_entity when the allocated amdgpu_ctx (and the entity inside it) were already deallocated from amdgpu_cs_parser_fini. Fix: Save job's priority on it's creation instead of accessing it from s_entity later on. Signed-off-by: Andrey Grodzovsky --- driv

[PATCH 2/3] drm/amdgpu: Add SPSC queue to scheduler.

2017-10-20 Thread Andrey Grodzovsky
It is intended to sabstitute the bounded fifo we are currently using. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/scheduler/spsc_queue.h | 120 + 1 file changed, 120 insertions(+) create mode 100644 drivers/gpu/drm/amd/scheduler/spsc_queue.h diff --git

[PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset.

2017-10-20 Thread Andrey Grodzovsky
Switch from kfifo to SPSC queue. Bug: Kfifo is limited at size, during GPU reset it would fill up to limit and the pushing thread (producer) would wait for the scheduler worker to consume the items in the fifo while holding reservation lock on a BO. The gpu reset thread on the other hand blocks th

Re: [PATCH 1/2] drm/amdgpu: delete duplicated code.

2017-10-20 Thread Alex Deucher
On Fri, Oct 20, 2017 at 3:21 AM, Rex Zhu wrote: > the variable ref_clock was assigned same > value twice in same function. > > Change-Id: Id26ec6c8265ba53e0cb84511c825c9a446cb18f9 > Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 -- > 1 fi

Re: [PATCH 2/2] drm/amd/powerplay: fix uninitialized variable

2017-10-20 Thread Alex Deucher
On Fri, Oct 20, 2017 at 3:21 AM, Rex Zhu wrote: > refresh_rate was not initialized when program > display gap. > this patch can fix vce ring test failed > when do S3 on Polaris10. > > Change-Id: Ie7bb363a44df0ea5dca3c03b8d884ac42a5db0a7 > Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher > ---

Re: [PATCH] Revert "drm/amd/display: Match actual state during S3 resume."

2017-10-20 Thread Alex Deucher
On Fri, Oct 20, 2017 at 6:52 AM, Rex Zhu wrote: > This reverts commit 7ae4acd21e9e264afb079e23d43bcf2238c7dbea. > > fix s3 hang issue. > > Change-Id: Iefb61cf8072b83146d867961b22f13ad83ab0106 > Signed-off-by: Rex Zhu I think the DAL guys may have a proper fix for this, but either way: Acked-by:

Re: [PATCH 00/28] DC Linux Patches Oct 19, 2017

2017-10-20 Thread Harry Wentland
Still looking for Reviewed-by for patches 2, 3, 22-24. Harry On 2017-10-19 01:46 PM, Harry Wentland wrote: > * Fixed hotplug issue (mainly on HDMI, but affected DP as well) > * Use new DRM state iterators > * Couple of Dave's cleanups rerolled on new DML > * Bunch of Raven work > > Anthony K

RE: [PATCH 1/2] drm/amd/powerplay: retrieve the real-time coreClock values - currently, the coreClock vaule for min/max performance level on raven is hard-coded. - use the real-time vaule retriev

2017-10-20 Thread Deucher, Alexander
> -Original Message- > From: Evan Quan [mailto:evan.q...@amd.com] > Sent: Friday, October 20, 2017 4:32 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex; Deucher, Alexander; Quan, Evan > Subject: [PATCH 1/2] drm/amd/powerplay: retrieve the real-time coreClock > values There should be

RE: [PATCH 2/2] drm/amdgpu/psp: prevent page fault by checking write_frame address(v3) - Prevent a possible buffer overflow when updating the ring buffer by bounds checking the command frame agai

2017-10-20 Thread Deucher, Alexander
> -Original Message- > From: Evan Quan [mailto:evan.q...@amd.com] > Sent: Friday, October 20, 2017 4:38 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex; Deucher, Alexander; Quan, Evan > Subject: [PATCH 2/2] drm/amdgpu/psp: prevent page fault by checking > write_frame address(v3) Nee

[PATCH libdrm 2/2] amdgpu: implement context priority for amdgpu_cs_ctx_create2 v3

2017-10-20 Thread Andres Rodriguez
Add a new context creation function that allows specifying the context priority. A high priority context has the potential of starving lower priority contexts. The current kernel driver implementation allows only apps that hold CAP_SYS_NICE or DRM_MASTER to acquire a priority above AMDGPU_CTX_PRIO

[PATCH libdrm 1/2] headers: Sync amdgpu_drm.h with drm-next

2017-10-20 Thread Andres Rodriguez
Generated using make headers_install from: airlied/drm-next 282dc83 Merge tag 'drm-intel-next-2017-10-12' ... Signed-off-by: Andres Rodriguez --- include/drm/amdgpu_drm.h | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/include/drm/amdgpu_drm.h

Re: [PATCH 00/28] DC Linux Patches Oct 19, 2017

2017-10-20 Thread Andrey Grodzovsky
Reviewed-by: Andrey Grodzovsky Also just a reminder to submit a follow up to patch 15 to fix memory leak. Thanks, Andrey On 2017-10-20 10:45 AM, Harry Wentland wrote: Still looking for Reviewed-by for patches 2, 3, 22-24. Harry On 2017-10-19 01:46 PM, Harry Wentland wrote: * Fixed hot

[PATCH xf86-video-ati 2/4] Free memory returned by xf86GetEntityInfo

2017-10-20 Thread Michel Dänzer
From: Michel Dänzer We were leaking it. (Ported from amdgpu commit cfccf4c4e7e5c73fe4040fabeb1b43283cf29b33) Signed-off-by: Michel Dänzer --- src/radeon_kms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index df438768c..f79af3415 100644 --- a/src/ra

[PATCH xf86-video-ati 1/4] Free pRADEONEnt memory in RADEONFreeRec

2017-10-20 Thread Michel Dänzer
From: Michel Dänzer We were leaking it. (Inspired by amdgpu commit 9d84934309e4ccd9a43c73d958b8ff10ef2fc990) Signed-off-by: Michel Dänzer --- src/radeon_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 9ef51693a..df438768c 1

[PATCH xf86-video-ati 4/4] Always call drmModeFreeProperty after drmModeGetProperty

2017-10-20 Thread Michel Dänzer
From: Michel Dänzer We were not doing so in all cases, leaking memory allocated by the latter. (Cherry picked from amdgpu commit f6b39bcd45cb06976ba8a3600df77fc471c63995) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH xf86-video-ati 3/4] Call TimerFree for timer created in LeaveVT

2017-10-20 Thread Michel Dänzer
From: Michel Dänzer We were leaking the memory allocated by TimerSet. (Ported from amdgpu commit 84aad09f18fed6b52b0c073f0bbd675a6de07807) Signed-off-by: Michel Dänzer --- src/radeon_kms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/radeon_kms.c b/src/radeon_kms.c index f79af3415.

RE: [PATCH xf86-video-ati 4/4] Always call drmModeFreeProperty after drmModeGetProperty

2017-10-20 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Friday, October 20, 2017 11:28 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-ati 4/4] Always call drmModeFreeProperty after > drmModeGetProperty >

[PATCH xf86-video-amdgpu] modesetting: Skip no-longer-present connectors when resetting BAD links

2017-10-20 Thread Michel Dänzer
From: Keith Packard Outputs may have NULL mode_output (connector) pointers if the connector disappears while the server is running. Skip these when resetting outputs with BAD link status. (Ported from xserver commit 37f4e7651a2fd51efa613a08a1e705553be33e76) Signed-off-by: Michel Dänzer --- sr

[PATCH xf86-video-ati] modesetting: Skip no-longer-present connectors when resetting BAD links

2017-10-20 Thread Michel Dänzer
From: Keith Packard Outputs may have NULL mode_output (connector) pointers if the connector disappears while the server is running. Skip these when resetting outputs with BAD link status. (Ported from xserver commit 37f4e7651a2fd51efa613a08a1e705553be33e76) Signed-off-by: Michel Dänzer --- sr

RE: [PATCH] drm/amdgpu: Sync KFD fence only for move/evict

2017-10-20 Thread Kasiviswanathan, Harish
-Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Friday, October 20, 2017 3:13 AM To: Kasiviswanathan, Harish ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: Sync KFD fence only for move/evict Am 19.10.2017 um 19:40 schrieb Haris

RE: [PATCH xf86-video-amdgpu] modesetting: Skip no-longer-present connectors when resetting BAD links

2017-10-20 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Friday, October 20, 2017 11:50 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-amdgpu] modesetting: Skip no-longer-present > connectors when resetting

RE: [PATCH xf86-video-ati] modesetting: Skip no-longer-present connectors when resetting BAD links

2017-10-20 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Friday, October 20, 2017 11:50 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH xf86-video-ati] modesetting: Skip no-longer-present > connectors when resetting BA

Re: [PATCH 1/3] drm/amdgpu: Avoid accessing job->entity after the job is scheduled.

2017-10-20 Thread Andres Rodriguez
On 2017-10-20 09:32 AM, Andrey Grodzovsky wrote: Bug: amdgpu_job_free_cb was accessing s_job->s_entity when the allocated amdgpu_ctx (and the entity inside it) were already deallocated from amdgpu_cs_parser_fini. Fix: Save job's priority on it's creation instead of accessing it from s_entity l

Re: [PATCH 1/3] drm/amdgpu: Avoid accessing job->entity after the job is scheduled.

2017-10-20 Thread Andrey Grodzovsky
On 2017-10-20 11:59 AM, Andres Rodriguez wrote: On 2017-10-20 09:32 AM, Andrey Grodzovsky wrote: Bug: amdgpu_job_free_cb was accessing s_job->s_entity when the allocated amdgpu_ctx (and the entity inside it) were already deallocated from amdgpu_cs_parser_fini. Fix: Save job's priority on it

Re: [PATCH 1/3] drm/amdgpu: Avoid accessing job->entity after the job is scheduled.

2017-10-20 Thread Andres Rodriguez
On 2017-10-20 12:19 PM, Andrey Grodzovsky wrote: On 2017-10-20 11:59 AM, Andres Rodriguez wrote: On 2017-10-20 09:32 AM, Andrey Grodzovsky wrote: Bug: amdgpu_job_free_cb was accessing s_job->s_entity when the allocated amdgpu_ctx (and the entity inside it) were already deallocated from am

Re: [PATCH 1/3] drm/amdgpu: Avoid accessing job->entity after the job is scheduled.

2017-10-20 Thread Andrey Grodzovsky
On 2017-10-20 12:26 PM, Andres Rodriguez wrote: On 2017-10-20 12:19 PM, Andrey Grodzovsky wrote: On 2017-10-20 11:59 AM, Andres Rodriguez wrote: On 2017-10-20 09:32 AM, Andrey Grodzovsky wrote: Bug: amdgpu_job_free_cb was accessing s_job->s_entity when the allocated amdgpu_ctx (and th

[PATCH v2] drm/amdgpu: Sync KFD fence only for move/evict

2017-10-20 Thread Harish Kasiviswanathan
A single KFD eviction fence is attached to all the BOs of a process including BOs imported. This fence ensures that all BOs belonging to that process stays resident when the process queues are active. Don't add this eviction fence to any sync object unless it is a move or evict job. These jobs are

[PATCH] drm/amd/display: Fix memoryleak during S3 resume.

2017-10-20 Thread sunpeng.li
From: "Leo (Sunpeng) Li" Do not create dc_state within display_resume, since it's being constructed within atomic check. Signed-off-by: Leo (Sunpeng) Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdg

Re: [PATCH 0/2] Some changes to fix performance drop on Vega10

2017-10-20 Thread Eric Huang
Ping. On 2017-10-19 03:14 PM, Eric Huang wrote: Eric Huang (2): drm/amd/powerplay: add one smc message for Vega10 drm/amd/powerplay: fix performance drop on Vega10 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 ++ drivers/gpu/drm/amd/powerplay/inc/vega10_ppsmc.h | 3 ++-

Re: [PATCH 1/3] drm/amdgpu: Avoid accessing job->entity after the job is scheduled.

2017-10-20 Thread Christian König
Am 20.10.2017 um 18:51 schrieb Andrey Grodzovsky: On 2017-10-20 12:26 PM, Andres Rodriguez wrote: On 2017-10-20 12:19 PM, Andrey Grodzovsky wrote: On 2017-10-20 11:59 AM, Andres Rodriguez wrote: On 2017-10-20 09:32 AM, Andrey Grodzovsky wrote: Bug: amdgpu_job_free_cb was accessing s_jo

Re: [PATCH] drm/amd/display: Fix memoryleak during S3 resume.

2017-10-20 Thread Harry Wentland
On 2017-10-20 01:59 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > Do not create dc_state within display_resume, since it's being > constructed within atomic check. > > Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgp

Re: [PATCH v2] drm/amdgpu: Sync KFD fence only for move/evict

2017-10-20 Thread Christian König
Am 20.10.2017 um 19:18 schrieb Harish Kasiviswanathan: A single KFD eviction fence is attached to all the BOs of a process including BOs imported. This fence ensures that all BOs belonging to that process stays resident when the process queues are active. Don't add this eviction fence to any syn

RE: [PATCH 0/2] Some changes to fix performance drop on Vega10

2017-10-20 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Eric Huang > Sent: Friday, October 20, 2017 2:10 PM > To: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH 0/2] Some changes to fix performance drop on Vega10 > > Ping. Series is: Acked-b

RE: [PATCH v2] drm/amdgpu: Sync KFD fence only for move/evict

2017-10-20 Thread Kasiviswanathan, Harish
-Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Friday, October 20, 2017 2:38 PM To: Kasiviswanathan, Harish ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH v2] drm/amdgpu: Sync KFD fence only for move/evict Am 20.10.2017 um 19:18 schrieb Ha

Re: [PATCH 1/3] drm/amdgpu: Avoid accessing job->entity after the job is scheduled.

2017-10-20 Thread Andres Rodriguez
On 2017-10-20 02:24 PM, Christian König wrote: Am 20.10.2017 um 18:51 schrieb Andrey Grodzovsky: On 2017-10-20 12:26 PM, Andres Rodriguez wrote: On 2017-10-20 12:19 PM, Andrey Grodzovsky wrote: On 2017-10-20 11:59 AM, Andres Rodriguez wrote: On 2017-10-20 09:32 AM, Andrey Grodzovsky

Re: [PATCH] drm/amd/display:: Fix NULL pointer in Raven hotplug

2017-10-20 Thread Harry Wentland
On 2017-10-20 04:45 PM, Jerry (Fangzhi) Zuo wrote: > Programming sequence to frontend and backend has been switched. > In such case, program_scaler() is getting called when programming > frontend, and should be removed from backend programming routine. > > Signed-off-by: Jerry (Fangzhi) Zuo Revi

[PATCH v3] drm/amdgpu: Sync KFD fence only for move/evict

2017-10-20 Thread Harish Kasiviswanathan
A single KFD eviction fence is attached to all the BOs of a process including BOs imported. This fence ensures that all BOs belonging to that process stays resident when the process queues are active. Don't add this eviction fence to any sync object unless it is a move or evict job. These jobs are

[PATCH 00/16] KFD interrupt and signal event handling improvements

2017-10-20 Thread Felix Kuehling
This patch series improves interrupt handling latency, signal event processing overhead and replaces some custom data structures with standard kernel data structures (idr, kfifo, waitqueue). It also increases the capacity of the number of signals that can be processed from 256 to 4096. This breaks

[PATCH 02/16] drm/amdkfd: Don't dereference kfd_process.mm

2017-10-20 Thread Felix Kuehling
The kfd_process doesn't own a reference to the mm_struct, so it can disappear without warning even while the kfd_process still exists. In fact, the delayed kfd_process teardown is triggered by an MMU notifier when the mm_struct is destroyed. Permanently holding a reference to the mm_struct would pr

[PATCH 01/16] drm/amdkfd: Add SDMA trap src id to the KFD isr wanted list

2017-10-20 Thread Felix Kuehling
From: Besar Wicaksono This enables SDMA signalling with event interrupt. Signed-off-by: Besar Wicaksono Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 3 +++ drivers/gpu/drm/amd/amdkfd/cik_int.h | 3 ++- 2 files changed, 5 insertions(+), 1 del

[PATCH 15/16] drm/amdkfd: wait only for IH work on IH exit

2017-10-20 Thread Felix Kuehling
From: Andres Rodriguez We don't need to wait for all work to complete in the IH exit function. We only need to make sure the interrupt_work has finished executing to guarantee that ih_kfifo is no longer in use. Signed-off-by: Andres Rodriguez --- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 4

[PATCH 03/16] drm/amdkfd: increase limit of signal events to 4096 per process

2017-10-20 Thread Felix Kuehling
From: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Ben Goz Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 +- include/uapi/linux/kfd_ioctl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_eve

[PATCH 13/16] drm/amdkfd: use standard kernel kfifo for IH

2017-10-20 Thread Felix Kuehling
From: Andres Rodriguez Replace our implementation of a lockless ring buffer with the standard linux kernel kfifo. We shouldn't maintain our own version of a standard data structure. Signed-off-by: Andres Rodriguez Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c |

[PATCH 06/16] drm/amdkfd: Clean up kfd_wait_on_events

2017-10-20 Thread Felix Kuehling
Cleaned up the code while resolving some potential bugs and inconsistencies in the process. Clean-ups: * Remove enum kfd_event_wait_result, which duplicates KFD_IOC_EVENT_RESULT definitions * alloc_event_waiters can be called without holding p->event_mutex * Return an error code from copy_signal

[PATCH 08/16] drm/amdkfd: remove redundant kfd_event_waiter.input_index

2017-10-20 Thread Felix Kuehling
This always identical with the index of the event_waiter in the array. No need to store it in the waiter record. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_e

[PATCH 04/16] drm/amdkfd: Short cut for kfd_wait_on_events without waiting

2017-10-20 Thread Felix Kuehling
From: Sean Keely If kfd_wait_on_events can return immediately, we don't need to populate the wait list and don't need to enter the sleep-loop. Signed-off-by: Sean Keely Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 43 ++--- 1 file cha

[PATCH 07/16] drm/amdkfd: Fix event destruction with pending waiters

2017-10-20 Thread Felix Kuehling
When an event with pending waiters is destroyed, those waiters may end up sleeping forever unless they are notified and woken up. Implement the notification by clearing the waiter->event pointer, which becomes invalid anyway, when the event is freed, and waking up the waiting tasks. Waiters on an

[PATCH 11/16] drm/amdkfd: Simplify event ID and signal slot management

2017-10-20 Thread Felix Kuehling
Signal slots are identical to event IDs. Replace the used_slot_bitmap and events hash table with an IDR to allocate and lookup event IDs and signal slots more efficiently. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 230 ++-- drivers/g

[PATCH 05/16] drm/amdkfd: Fix scheduler race in kfd_wait_on_events sleep loop

2017-10-20 Thread Felix Kuehling
From: Sean Keely Signed-off-by: Sean Keely Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c index 64cc42

[PATCH 10/16] drm/amdkfd: Simplify events page allocator

2017-10-20 Thread Felix Kuehling
The first event page is always big enough to handle all events. Handling of multiple events pages is not supported by user mode, and not necessary. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 197 +++- drivers/

[PATCH 16/16] drm/amdkfd: use a high priority workqueue for IH work

2017-10-20 Thread Felix Kuehling
From: Andres Rodriguez In systems under heavy load the IH work may experience significant scheduling delays. Under load + system workqueue: Max Latency: 7.023695 ms Avg Latency: 0.263994 ms Under load + high priority workqueue: Max Latency: 1.162568 ms Avg Latency: 0.163213 ms

[PATCH 09/16] drm/amdkfd: Use wait_queue_t to implement event waiting

2017-10-20 Thread Felix Kuehling
Signed-off-by: Kent Russell Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 53 +++-- drivers/gpu/drm/amd/amdkfd/kfd_events.h | 3 +- 2 files changed, 19 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c

[PATCH 12/16] drm/amdkfd: Use IH context ID for signal lookup

2017-10-20 Thread Felix Kuehling
This speeds up signal lookup when the IH ring entry includes a valid context ID or partial context ID. Only if the context ID is found to be invalid, fall back to an exhaustive search of all signaled events. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 7

[PATCH 14/16] drm/amdkfd: increase IH num entries to 8192

2017-10-20 Thread Felix Kuehling
From: Andres Rodriguez A larger buffer will let us accommodate applications with a large amount of semi-simultaneous event signals. Signed-off-by: Andres Rodriguez Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH] drm/amd/display:: Fix NULL pointer in Raven hotplug

2017-10-20 Thread Jerry (Fangzhi) Zuo
Programming sequence to frontend and backend has been switched. In such case, program_scaler() is getting called when programming frontend, and should be removed from backend programming routine. Signed-off-by: Jerry (Fangzhi) Zuo --- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c |