Re: [PATCH] drm/amdgpu: use HMM mirror callback to replace mmu notifier v4

2018-09-28 Thread Koenig, Christian
No it definitely isn't. We have literally worked month on this with the core MM developers. Making sure that we have a consistent page array is absolutely vital for correct operation. Please also check Jerome's presentation from XDC it also perfectly explains why this approach won't work

Re: [PATCH] drm/amdgpu: use HMM mirror callback to replace mmu notifier v4

2018-09-28 Thread Philip Yang
For B path, we take mm->mmap_sem, then call hmm_vma_get_pfns() or get_user_pages(). This is obvious. For A path, mmu notifier mmu_notifier_invalidate_range_start()/mmu_notifier_invalidate_range_end() is called in many places, and the calling path is quit complicated inside mm, it's not

[PATCH libdrm v2 2/2] amdgpu/test: Fix deadlock tests for AI and RV v2

2018-09-28 Thread Andrey Grodzovsky
Seems like AI and RV requires uncashed memory mapping to be able to pickup value written to memory by CPU after the WAIT_REG_MEM command was already launched. . Enable the test for AI and RV. v2: Update commit description. Signed-off-by: Andrey Grodzovsky --- tests/amdgpu/deadlock_tests.c | 13

[PATCH libdrm v2 1/2] amdgpu/test: Allow BO mapping flags to be passed in tests

2018-09-28 Thread Andrey Grodzovsky
v2: Call amdgpu_bo_va_op_raw directly in amdgpu_bo_alloc_and_map_raw Move amdgpu_bo_alloc_and_map_raw into C file to avoid including unistd.h in amdgpu_test.h Signed-off-by: Andrey Grodzovsky --- tests/amdgpu/amdgpu_test.h | 59 +---

Re: [bug report] drm/amd/display: Build stream update and plane updates in dm

2018-09-28 Thread Bhawanpreet Lakha
I had a patch ready and was going to send it in the next promotion patches. Will send it soon. Bhawan On 2018-09-28 04:32 AM, Dan Carpenter wrote: Hello Bhawanpreet Lakha, The patch a87fa9938749: "drm/amd/display: Build stream update and plane updates in dm" from Aug 20, 2018, leads to the

Re: [PATCH v2] drm/amd/pp: Remove useless code in smu

2018-09-28 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Rex Zhu Sent: Friday, September 28, 2018 5:23:38 AM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: [PATCH v2] drm/amd/pp: Remove useless code in smu the condition always false and the code path

Re: [PATCH] drm/amdgpu: Fix comments error in sdma_v4_1_update_power_gating

2018-09-28 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Rex Zhu Sent: Friday, September 28, 2018 3:45:04 AM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: [PATCH] drm/amdgpu: Fix comments error in sdma_v4_1_update_power_gating Signed-off-by: Rex Zhu

Re: [PATCH] drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD

2018-09-28 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of Satyajit Sahu Sent: Wednesday, September 26, 2018 4:34:39 AM To: Deucher, Alexander; amd-gfx@lists.freedesktop.org Cc: Sahu, Satyajit; Agrawal, Akshu Subject: [PATCH] drm/amd/powerplay: Enable/Disable NBPSTATE

[PATCH] drm/amd/display: Work around race beetween hw_done and wait_for_flip

2018-09-28 Thread Harry Wentland
[Why] There is a race that between drm_crtc_commit_hw_done and drm_atomic_helper_wait_for_flip where the possibilty exist for the crtc->commit to be cleared after the null check in wait_for_flip_done but before the call to wait_for_completion_timeout on commit->flip_done. [How] Take a reference

[PATCH 2/2] drm/amdgpu: Change the gfx/sdma init/fini sequence

2018-09-28 Thread Rex Zhu
initialize gfx/sdma before dpm features enabled. and disable dpm features before gfx/sdma fini. Acked-by: Alex Deucher Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/cik.c | 17 + drivers/gpu/drm/amd/amdgpu/si.c| 13 +++-- drivers/gpu/drm/amd/amdgpu/soc15.c

[PATCH 1/2] drm/amd/pp: Export load_firmware interface

2018-09-28 Thread Rex Zhu
Export this interface for the AMDGPU_FW_LOAD_SMU type. This interface only be supported on VI. and gfx/sdma's firmware will be loaded together by smu. so in AMDGPU_FW_LOAD_SMU mode, the gfx and sdma ip can't be disabled by module parameter. Split the smu7/8_start_smu function into two functions

[PATCH 2/2] drm/amdgpu: Disable sysfs pwm1 if not in manual fan control

2018-09-28 Thread Rex Zhu
Following lm-sensors 3.0.0, Only enable pwm1 sysfs when fan control mode(pwm1_enable) in manual Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

[PATCH 1/2] drm/amdgpu: Add fan RPM setting via sysfs

2018-09-28 Thread Rex Zhu
Add fan1_target for get/set fan speed in RPM unit Add fan1_min/fan1_max for get min, max fan speed in RPM unit Add fan1_enable to enable/disable the fan1 sensor Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h| 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |

[PATCH v2] drm/amd/pp: Remove useless code in smu

2018-09-28 Thread Rex Zhu
the condition always false and the code path never be executed. so remove them. v2: add comments Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c| 1 - drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 5

[bug report] drm/amd/display: Build stream update and plane updates in dm

2018-09-28 Thread Dan Carpenter
Hello Bhawanpreet Lakha, The patch a87fa9938749: "drm/amd/display: Build stream update and plane updates in dm" from Aug 20, 2018, leads to the following static checker warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5190 dm_determine_update_type_for_commit()

[PATCH] drm/amdgpu: Fix comments error in sdma_v4_1_update_power_gating

2018-09-28 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index a3e2ed1..12e577c 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++

[PATCH] drm/amdgpu: Refine uvd_v6/7_0_enc_get_destroy_msg

2018-09-28 Thread Rex Zhu
1. make uvd_v7_0_enc_get_destroy_msg static 2. drop a function variable that always true Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 10 +++--- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 12 2 files changed, 7 insertions(+), 15 deletions(-) diff --git

RE: [PATCH 01/12] drm/amdgpu: add missing error handling

2018-09-28 Thread Huang, Ray
> -Original Message- > From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] > Sent: Thursday, September 27, 2018 7:26 PM > To: Huang, Ray > Cc: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH 01/12] drm/amdgpu: add missing error handling > > Am 27.09.2018 um 12:00 schrieb

[PATCH 1/2] drm/amdgpu: Refine uvd_v6/7_0_enc_get_destroy_msg

2018-09-28 Thread Rex Zhu
1. make uvd_v7_0_enc_get_destroy_msg static 2. drop a function variable that always true Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 10 +++--- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 12 2 files changed, 7 insertions(+), 15 deletions(-) diff --git