RE: [PATCH 01/10] drm/amdgpu: bump version for new power profile sysfs

2018-02-25 Thread Zhu, Rex
We have added new sysfs pp_power_profile_mode. The old sysfs (pp_compute_power_profile and pp_gfx_power_profile) were used internally currently by ROCM tool and KFD to switch mode between gfx and compute only on VI/CI asics. We can't extend more modes for other workloads, for example: video,

Re: [PATCH libdrm 2/2] libdrm: clean up non list code path for vamgr

2018-02-25 Thread Chunming Zhou
Thanks for fix. Regards, David Zhou On 2018年02月19日 15:50, Christian König wrote: Patch is Acked-by: Christian König Regards, Christian. Am 19.02.2018 um 08:25 schrieb Andrey Grodzovsky: Found time to do some debugging and found error in assigning   of initial

[PATCH 01/22] drm/amdgpu: fix for wb_clear

2018-02-25 Thread Monk Liu
fix: should do right shift on wb before clearing cleanups: 1,should memset all wb buffer 2,set max wb number to 128 (total 4KB) is big enough Change-Id: I43832245c875ce039e7709dc049828e21c50c81f Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 +-

[PATCH 00/22] *** bug fixing serials ***

2018-02-25 Thread Monk Liu
*** those patches are mainly bug fixing for SR-iov and couple bare-metal case *** Emily Deng (2): drm/amdgpu: Remove the memory leak after unload amdgpu driver drm/amdgpu: Correct sdma_v4 get_wptr Monk Liu (20): drm/amdgpu: fix for wb_clear drm/amdgpu: remove duplicated

[PATCH 02/22] drm/amdgpu: remove duplicated job_free_resources

2018-02-25 Thread Monk Liu
if a job is go through scheduler, it is forbidden to call job_free_resources after ib_schedule, becaust that would assign wild pointer of fence on the sa_bo->fence which could lead to weird bug Change-Id: Iad7ee011c641cb7357569cbce36fdc10f0ed911d Signed-off-by: Monk Liu ---

[PATCH 03/22] drm/amdgpu: skip ECC for SRIOV in gmc late_init

2018-02-25 Thread Monk Liu
Change-Id: I2865a11d1dded214de289787d334ec4a22b5db19 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index

[PATCH 04/22] drm/amdgpu: only flush hotplug work without DC

2018-02-25 Thread Monk Liu
since hotplug_work is initialized under the case of no dc support Change-Id: I0d417a5b9f8dfb1863eafc95b6802be9e5c74720 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 05/22] drm/amdgpu: cond_exec only for schedule with a job

2018-02-25 Thread Monk Liu
issue: under SR-IOV sometimes the iB test will fail on gfx ring fix: with cond_exec inserted in RB the gfx engine would skip part packets if RLCV issue PREEMPT on gfx engine if gfx engine is prior to COND_EXEC packet, this is okay for regular command from UMD, but for the ib test since the whole

[PATCH 06/22] drm/amdgpu: don't use MM idle_work for SRIOV

2018-02-25 Thread Monk Liu
two reason for this patch: 1) SRIOV doesn't give VF cg/pg feature so the idle_work is useless 2) VCE's idle work would cause "KMD reload" test failed and trigger KERNEL PANIC, this is because the idle work is triggered after VCE ib test and KMD removed right after loaded, which can hit page fault

[PATCH 08/22] drm/amdgpu: cleanups VCE/UVD ib test part

2018-02-25 Thread Monk Liu
1)amdgpu_vce_get_create_msg is only used in ib test so no reason no to use a static routine for it, and add a timeout parameter for it. 2)fence handling of MM's ib test part is a little messy clean it make it easier to read Change-Id: Ic9bfd9971457600266096e114210e84ce9b4347d Signed-off-by: Monk

[PATCH 10/22] drm/amdgpu: no need to count emitted for SRIOV

2018-02-25 Thread Monk Liu
Change-Id: I370966acd0f1925a99dfde888678e6e0fd093b15 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c

[PATCH 09/22] drm/amdgpu: fix kmd reload bug on bare-metal

2018-02-25 Thread Monk Liu
issue: on bare-metal when doing kmd reload test, there are chance that kernel hit fatal error afer driver unloaded/reloaded fix: the cause is that those "idle work" not really stopped and if kmd was is unloaded too quick that were chance that "idle work" run after driver structures already

[PATCH 11/22] drm/amdgpu: Remove the memory leak after unload amdgpu driver

2018-02-25 Thread Monk Liu
From: Emily Deng Need to call function amdgpu_ucode_fini_bo to release ucode bo for psp firmware load type. Change-Id: I1c7be8135993e11076c9d46b3cd87615514a9abb Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file

[PATCH 12/22] drm/amdgpu: send rel event first after init failed

2018-02-25 Thread Monk Liu
and later send req_fini and rel_fini to host for the finish routine Change-Id: Ib0347a305ab5f7712d2d76b1a843bb2429acbf3d Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff

[PATCH 13/22] drm/amdgpu: fix vce_ring test memleak

2018-02-25 Thread Monk Liu
Change-Id: I35a343b21a007716fc7811781650264339c94273 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c

[PATCH 14/22] drm/amdgpu: change gfx9 ib test to use WB

2018-02-25 Thread Monk Liu
two reasons to switch SCRATCH reg method to WB method: 1)Because when doing IB test we don't want to involve KIQ health status affect, and since SCRATCH register access is go through KIQ that way GFX IB test would failed due to KIQ fail. 2)acccessing SCRATCH register cost much more time than WB

[PATCH 17/22] drm/amdgpu: disable GFX ring and disable PQ wptr in hw_fini

2018-02-25 Thread Monk Liu
otherwise there will be DMAR reading error comes out from CP since GFX is still alive and CPC's WPTR_POLL is still enabled, which would lead to DMAR read error. fix: we can hault CPG after hw_fini, but cannot halt CPC becaues KIQ stil need to be alive to let RLCV invoke, but its WPTR_POLL could

[PATCH 19/22] drm/amdgpu: adjust timeout for ib_ring_tests

2018-02-25 Thread Monk Liu
issue: sometime GFX/MM ib test hit timeout under SRIOV env, root cause is that engine doesn't come back soon enough so the current IB test considered as timed out. fix: for SRIOV GFX IB test wait time need to be expanded a lot during SRIOV runtimei mode since it couldn't really begin before GFX

[PATCH 18/22] drm/amdgpu: Correct sdma_v4 get_wptr

2018-02-25 Thread Monk Liu
From: Emily Deng the original method will change the wptr value in wb. Change-Id: I984fabca35d9dcf1f5fa8ef7779b2afb7f7d7370 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 20/22] drm/amdgpu: increase gart size to 512MB

2018-02-25 Thread Monk Liu
256MB is too small consider PTE/PDE shadow and TTM eviction activity Change-Id: Ifaa30dc730eec36af47fbdeb3cce30de9067b17f Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 21/22] dma-buf/reservation: shouldn't kfree staged when slot available

2018-02-25 Thread Monk Liu
issue: kernel oops or vmc page fault occured during vk_example/vk_cts test. root cause: previously reservation object would kfree the staged when slot checked available during reserve_shared(), which is incorrect becasue this way reservation_object->fence will be a wild pointer referenced by

[PATCH 22/22] drm/amdgpu: fix reservation obj shared count bug

2018-02-25 Thread Monk Liu
should call reservation_object_reserve_shared before amdgpu_bo_fence(), otherwise there are odds kernel hit BUG in reversation.c bug: [12622.076435] [ cut here ] [12622.076438] kernel BUG at drivers/dma-buf/reservation.c:233! [12622.078046] invalid opcode: [#1] SMP

Re: [PATCH 01/10] drm/amdgpu: bump version for new power profile sysfs

2018-02-25 Thread Christian König
To avoid conflicts and confusion, I think better remove two old sysfs. Well that is not a matter of personal opinion. The rule is simply that sysfs needs to be stable, otherwise we can't upstream a sysfs interface. Especially since you already noted that current ROCM tool and KFD depend on

[PATCH 09/10] drm/amd/pp: Implement auto wattman feature on Smu7

2018-02-25 Thread Rex Zhu
Adjust dpm optimization settings on smu7 based on the activity level read from SMU. in manual dpm mode, auto wattman will be disabled. Change-Id: I68396f04be76793ece3b07f0ac1b646981ca1e29 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu ---

Re: [PATCH] fix double ;;s in code

2018-02-25 Thread Pavel Machek
Hi! > > diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c > > index 53f7275..cfb42f5 100644 > > --- a/drivers/soc/imx/gpc.c > > +++ b/drivers/soc/imx/gpc.c > > @@ -348,7 +348,7 @@ static int imx_gpc_old_dt_init(struct device *dev, > > struct regmap *regmap, > > if (i == 1) {

[PATCH 03/10] drm/amd/pp: Add new hw interface for auto wattman feature.

2018-02-25 Thread Rex Zhu
Auto wattman feature was used for adjust dpm optimization settings based on workloads Change-Id: I6e747beb7786c45f733c3c0f9ef9b48c98f0484c Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 ++ 1 file

[PATCH 02/10] drm/amd/pp: Remove old gfx/compute profile sysfs

2018-02-25 Thread Rex Zhu
Change-Id: I4c3e70a5bff3855e0195d77eb12932dc08063ef2 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h| 8 - drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 180 --- drivers/gpu/drm/amd/amdgpu/ci_dpm.c| 256

[PATCH 01/10] drm/amdgpu: bump version for new power profile sysfs

2018-02-25 Thread Rex Zhu
Add new power profile sysfs: pp_power_profile_mode old sysfs: pp_compute_power_profile/pp_gfx_power_profile will be removed Change-Id: Ief35efb81b313115b33c430dfb328ad83ce7975d Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + 1 file changed, 1

[PATCH 08/10] drm/amd/pp: Implement AutoWattman feature on Vega10

2018-02-25 Thread Rex Zhu
based on the engine activity read from smu, driver will notify smu to adjust the behaviour of natural DPM. Change-Id: I951390cae82eeacfdaea3917eb570aa57216cbd7 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 65 +-

[PATCH 04/10] drm/amd/pp: Add a work queue for autowattman feature

2018-02-25 Thread Rex Zhu
driver need to monitor the gfx activity and notify smu to change the dpm policy Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 17 + drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 +++ 2 files changed, 20 insertions(+) diff --git

[PATCH 06/10] drm/amd/pp: Unified to ctrl autowattman/profile mode

2018-02-25 Thread Rex Zhu
Add a common hw interface to ctrl autowattman feature and restore power profile mode. when autowattman enabled, start the wattman queue when power state is set. disable this feature when suspend/ enter manual mode. when autowattman not support, just restore default power profile mode in auto dpm

[PATCH 07/10] drm/amd/PP: Delete dead code in vega10

2018-02-25 Thread Rex Zhu
Do not need to restore default power profile mode when force dpm level. Change-Id: Ib9cabf5efe2bbacd5987598acb79221b4ad4d567 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH] drm/amd/pp: Print more info when smu message failed on Vega10

2018-02-25 Thread Rex Zhu
Change-Id: Ifaa7058a4682bafeeef68e78bfcff26012ba71c1 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c

[PATCH 05/10] drm/amd/pp: Expose new interface to DC to ctrl auto wattman

2018-02-25 Thread Rex Zhu
AutoWattman changes clocks quite aggressively which can make framerates jump significantly and lead to a subpar experience when using Freesync. Disable AutoWattman (if enabled) when FreeSync is enabled. Change-Id: I1c8e6b6d0d77b8bb3aa5250d4f5aec81270c27f1 Signed-off-by: Rex Zhu

[PATCH 10/10] drm/amd/pp: Enable auto automan feature on Vega10

2018-02-25 Thread Rex Zhu
Change-Id: I7bd4dc5b255ed3edcb28f6c770e7b0199d0662d4 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c index

Re: [PATCH] drm/amdkfd: Delete an error message for a failed memory allocation in kfd_topology_init()

2018-02-25 Thread Oded Gabbay
On Thu, Feb 8, 2018 at 11:33 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 8 Feb 2018 22:23:57 +0100 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using

Re: [PATCH 01/10] drm/amdgpu: bump version for new power profile sysfs

2018-02-25 Thread Christian König
Am 24.02.2018 um 14:55 schrieb Rex Zhu: Add new power profile sysfs: pp_power_profile_mode old sysfs: pp_compute_power_profile/pp_gfx_power_profile will be removed Well sysfs is supposed to be stable, so removing the old interface won't be allowed. Change-Id: