[PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

[PATCH 3/4] drm/scheduler: cleanup entity coding style

2018-08-14 Thread Christian König
Cleanup coding style in sched_entity.c Signed-off-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 167 --- 1 file changed, 110 insertions(+), 57 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c

RE: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Deng, Emily
>-Original Message- >From: Christian König >Sent: Tuesday, August 14, 2018 3:54 PM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do >invalidate tlb > >Am 14.08.2018 um 09:46 schrieb Emily Deng: >> To avoid the tlb

[PATCH 4/4] drm/scheduler: rename gpu_scheduler.c to sched_main.c

2018-08-14 Thread Christian König
Better match the naming of the other components. Signed-off-by: Christian König --- drivers/gpu/drm/scheduler/Makefile | 2 +- drivers/gpu/drm/scheduler/{gpu_scheduler.c => sched_main.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename

[PATCH 1/4] drm/scheduler: trivial error handling fix

2018-08-14 Thread Christian König
Return -ENOMEM when allocating the rq_list fails. Signed-off-by: Christian König --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index

Re: [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 09:35:50AM +0200, Christian König wrote: > Am 14.08.2018 um 09:24 schrieb Huang Rui: > >On Tue, Aug 14, 2018 at 02:45:22PM +0800, Koenig, Christian wrote: > >>Am 14.08.2018 um 05:05 schrieb Huang Rui: > >>>On Tue, Aug 14, 2018 at 10:26:43AM +0800, Zhang, Jerry wrote: >

Re: [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-14 Thread Christian König
Am 14.08.2018 um 05:05 schrieb Huang Rui: On Tue, Aug 14, 2018 at 10:26:43AM +0800, Zhang, Jerry wrote: On 08/13/2018 05:58 PM, Huang Rui wrote: I continue to work for bulk moving that based on the proposal by Christian. Background: amdgpu driver will move all PD/PT and PerVM BOs into idle

RE: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Deng, Emily
Hi all, Please ignore this patch, will send another patch. Best wishes Emily Deng -Original Message- From: amd-gfx On Behalf Of Emily Deng Sent: Tuesday, August 14, 2018 2:32 PM To: amd-gfx@lists.freedesktop.org Cc: Deng, Emily Subject: [PATCH] drm/amdgpu/sriov: For sriov runtime,

Re: [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-14 Thread Christian König
Am 14.08.2018 um 09:24 schrieb Huang Rui: On Tue, Aug 14, 2018 at 02:45:22PM +0800, Koenig, Christian wrote: Am 14.08.2018 um 05:05 schrieb Huang Rui: On Tue, Aug 14, 2018 at 10:26:43AM +0800, Zhang, Jerry wrote: On 08/13/2018 05:58 PM, Huang Rui wrote: I continue to work for bulk moving

Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Christian König
Am 14.08.2018 um 09:46 schrieb Emily Deng: To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. Well NAK, this just duplicates the TLB handling and moves it outside of the GMC code. Instead just lower the timeout and suppress the warning when

[PATCH 2/4] drm/scheduler: move entity handling into separate file

2018-08-14 Thread Christian König
This is complex enough on it's own. Move it into a separate C file. Signed-off-by: Christian König --- drivers/gpu/drm/scheduler/Makefile| 2 +- drivers/gpu/drm/scheduler/gpu_scheduler.c | 441 +--- drivers/gpu/drm/scheduler/sched_entity.c | 459

Re: [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 02:45:22PM +0800, Koenig, Christian wrote: > Am 14.08.2018 um 05:05 schrieb Huang Rui: > > On Tue, Aug 14, 2018 at 10:26:43AM +0800, Zhang, Jerry wrote: > >> On 08/13/2018 05:58 PM, Huang Rui wrote: > >>> I continue to work for bulk moving that based on the proposal by >

Re: [PATCH] drm/amdgpu: fix the null pointer to get timeline by scheduler fence

2018-08-14 Thread Christian König
That is fixed by "drm/scheduler: bind job earlier to scheduler". Christian. Am 13.08.2018 um 16:33 schrieb Andres Rodriguez: Any updates on this issue? Regards, Andres On 2018-08-08 03:10 AM, Christian König wrote: Yeah that is a known issue, but this solution is not correct either. See

[PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-14 Thread Christian König
Fix quite a number of bugs here. Unfortunately only compile tested. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 103 ++- 1 file changed, 46 insertions(+), 57 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

[PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 50 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 ++

Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Christian König
Am 14.08.2018 um 10:13 schrieb Deng, Emily: -Original Message- From: Christian König Sent: Tuesday, August 14, 2018 3:54 PM To: Deng, Emily ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb Am 14.08.2018 um 09:46

[PATCH 17/38] drm/amd/powerplay: correct force clock level related settings for vega20 (v2)

2018-08-14 Thread Alex Deucher
From: Evan Quan 1. The min/max level is determined by soft_min_level/soft_max_level. 2. Vega20 comes with pptable v3 which has no vdd related table(vdd_dep_on_socclk, vdd_dep_on_mclk) support. 3. Vega20 does not support separate fan feature control(enable or disable). v2: squash in fixes: - bug

[PATCH 15/38] drm/amd/powerplay: support workload profile query and setup for vega20

2018-08-14 Thread Alex Deucher
From: Evan Quan Support the power profile API. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 193 - 1 file changed, 192 insertions(+), 1 deletion(-) diff --git

[PATCH 18/38] drm/amd/powerplay: export vega20 stable pstate clocks

2018-08-14 Thread Alex Deucher
From: Evan Quan Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c

[PATCH 05/38] Revert "drm/amdgpu: Add nbio support for vega20 (v2)"

2018-08-14 Thread Alex Deucher
Revert this to add proper nbio 7.4 support. This reverts commit f5b2e1fa321eff20a9418ebd497d8a466f024a85. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 18 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- 2 files changed, 1 insertion(+), 19

[PATCH 08/38] drm/amd/powerplay: add vega20_inc.h (v2)

2018-08-14 Thread Alex Deucher
From: Evan Quan v2: use thm 11.0.2 headers Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_inc.h | 35 1 file changed, 35 insertions(+) create mode 100644

[PATCH 11/38] drm/amd/powerplay: add vega20_pptable.h (v2)

2018-08-14 Thread Alex Deucher
From: Evan Quan v2: squash in table size fixes Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher --- .../gpu/drm/amd/powerplay/hwmgr/vega20_pptable.h | 140 + 1 file changed, 140 insertions(+) create mode 100644

[PATCH 12/38] drm/amd/powerplay: add the smu manager for vega20 (v2)

2018-08-14 Thread Alex Deucher
From: Evan Quan v2: switch to SOC15 register access macros reserve space for ActivityMonitor table enable SMU fw loading Drop dead code from bringup Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/smumgr/Makefile

[PATCH 07/38] drm/amdgpu: update atomfirmware.h

2018-08-14 Thread Alex Deucher
From: Evan Quan Add struct atom_smc_dpm_info_v4_3 Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/atomfirmware.h | 86 ++ 1 file changed, 86 insertions(+) diff --git

[PATCH 06/38] drm/amdgpu: Add nbio 7.4 support for vega20 (v2)

2018-08-14 Thread Alex Deucher
From: Feifei Xu Some register offset in nbio v7.4 are different with v7.0. We need a seperate nbio_v7_4.c for vega20. v2: fix doorbell range for sdma (Alex) Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher ---

[PATCH 00/38] Vega20 Updates

2018-08-14 Thread Alex Deucher
This patch set implements SMU and PSP support for vega20. Patches 1-4 are huge register headers updates so I didn't send them to the list. The whole series can be viewed here: https://cgit.freedesktop.org/~agd5f/linux/log/?h=vega20_psp_smu Thanks, Alex Alex Deucher (2): Revert "drm/amdgpu:

[PATCH 13/38] drm/amd/powerplay: new interfaces for ActivityMonitor table with SMU

2018-08-14 Thread Alex Deucher
From: Evan Quan Vega20 has a new activity monitor table that is stored in memory. Add API to get and set the new table. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- .../gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c | 57 ++

[PATCH 19/38] drm/amd/powerplay: add vega20 pre_display_config_changed callback

2018-08-14 Thread Alex Deucher
From: Evan Quan fix possible handshake hang and video playback crash Corner cases: - Handshake between SMU and DCE causes hangs when CRTC is not enabled - System crash occurs when starting 4K playback with Movies and TV in an SLS configuration Signed-off-by: Evan Quan Reviewed-by:

[PATCH 22/38] drm/amd/powerplay: new interfaces for overdrive vega20 sclk and mclk

2018-08-14 Thread Alex Deucher
From: Evan Quan Add support for the new SMU firmware interface for clock adjustment. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 169 + 1 file changed, 169 insertions(+) diff

[PATCH 20/38] drm/amd/powerplay: conv the vega20 pstate sclk/mclk into necessary 10KHz unit

2018-08-14 Thread Alex Deucher
From: Evan Quan Powerplay uses 10KHz units. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c

[PATCH 25/38] drm/amdgpu: enable vega20 powerplay support

2018-08-14 Thread Alex Deucher
From: Evan Quan Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index

[PATCH 24/38] drm/amd/powerplay: update vega20 clocks threshold settings on power state adjust

2018-08-14 Thread Alex Deucher
From: Evan Quan UVD, VCE and SOC clocks need to be taken into consideration. Also, the thresholds need be updated correspondingly when stable power state is selected. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher ---

[PATCH 23/38] drm/amd/powerplay: revise vega20 PPSMC_MSG_SetSoftMin/[Max]ByFreq settings

2018-08-14 Thread Alex Deucher
From: Evan Quan UVD, VCE and Socclk also need to be taken into consideration when setting PPSMC_MSG_SetSoftMinByFreq and PPSMC_MSG_SetSoftMaxByFreq. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 109

[PATCH 16/38] drm/amd/powerplay: init vega20 uvd/vce powergate status on dpm setup

2018-08-14 Thread Alex Deucher
From: Evan Quan This is essentially necessary when uvd/vce dpm is not enabled yet. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 18 ++ 1 file changed, 18 insertions(+) diff --git

[PATCH 10/38] drm/amd/powerplay: add vega20_ppsmc.h (v2)

2018-08-14 Thread Alex Deucher
From: Evan Quan v2: update to latest. Signed-off-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.h | 127 +++ 1 file changed, 127 insertions(+) create mode 100644

[PATCH 38/38] drm/amdgpu: remove experimental flag for vega20

2018-08-14 Thread Alex Deucher
Now that PSP and SMU support is in place. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index

[PATCH 34/38] drm/amd/powerplay: added voltage boot time calibration

2018-08-14 Thread Alex Deucher
From: Evan Quan Run AFLL BTC after upload pptable and before enabling all smu features. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH 31/38] drm/amd/powerplay: correct the argument for PPSMC_MSG_SetUclkFastSwitch

2018-08-14 Thread Alex Deucher
From: Evan Quan The argument was set wrongly. Fast/slow switch was asked when there is actually a slow/fast switch needed. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 32/38] drm/amd/powerplay: allow slow switch only if NBPState enabled

2018-08-14 Thread Alex Deucher
From: Evan Quan Otherwise there may be potential SMU performance issues. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 29/38] drm/amd/powerplay: remove setting soc floor voltage before sending pptable

2018-08-14 Thread Alex Deucher
From: Evan Quan SOC voltage is not able to switch and forced to low 0.8V when running HEVC. Thus the test failed. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 9 +

[PATCH 33/38] drm/amd/powerplay: remove max DCEFCLK limitation

2018-08-14 Thread Alex Deucher
From: Evan Quan The latest SMU fw removes the limitation that required UCLK >= DCEFCLK. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH 28/38] drm/amd/powerplay: enable fclk ss by default

2018-08-14 Thread Alex Deucher
From: Evan Quan Set fclk ss as enabled on default. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 35/38] drm/amdgpu/gfx9: Update gfx9 golden settings.

2018-08-14 Thread Alex Deucher
From: Feifei Xu Update the goldensettings for vega20. Signed-off-by: Feifei Xu Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 30/38] drm/amd/powerplay: avoid enabling/disabling uvd/vce dpm twice

2018-08-14 Thread Alex Deucher
From: Evan Quan For vega20, there are two UVD rings which share one powerplay instance. Under some case(two rings used parallel), the uvd dpm is disabled twice which causes the SMC hang. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher ---

[PATCH 27/38] drm/amdgpu/vg20: Change the load type of vega20 to psp (v2)

2018-08-14 Thread Alex Deucher
From: Likun Gao Modified the vega20 load type to psp now that psp support is implemented. v2: squash in fixes history (Alex) Signed-off-by: Likun Gao Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher ---

[PATCH 26/38] drm/amdgpu: Add psp 11.0 support for vega20. (v2)

2018-08-14 Thread Alex Deucher
From: Feifei Xu Add psp 11.0 code for vega20 and enable it. PSP is the security processor for the GPU. It handles firmware loading and GPU resets among other things. v2: whitespace fix, enable support, adjust reg includes (Alex) Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher

[PATCH 21/38] drm/amd/powerplay: initialize vega20 overdrive settings

2018-08-14 Thread Alex Deucher
From: Evan Quan The initialized overdrive settings are taken from vbios and SMU( by PPSMC_MSG_TransferTableSmu2Dram). Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 293 +++--

[PATCH 37/38] drm/amdgpu/psp: Enlarge PSP TMR SIZE from 3M to 4M.

2018-08-14 Thread Alex Deucher
From: Feifei Xu Enlarge the PSP TMR SIZE to 4M for dual UVD fw front-door loading. Signed-off-by: Feifei Xu Reviewed-by: Evan Quan Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + 2 files changed, 5

[PATCH 36/38] drm/amdgpu: update vega20 sdma golden settings

2018-08-14 Thread Alex Deucher
From: Evan Quan Updated vega20 SDMA0 and SDMA1 golden settings. Signed-off-by: Evan Quan Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 68 -- 1 file

Re: [PATCH libdrm] amdgpu: Disable deadlock test suite for RV/RV2/PCO

2018-08-14 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of likun Gao Sent: Tuesday, August 14, 2018 7:10:10 AM To: amd-gfx@lists.freedesktop.org Cc: Gao, Likun Subject: [PATCH libdrm] amdgpu: Disable deadlock test suite for RV/RV2/PCO From: Likun Gao disable

Re: [PATCH 3/3] drm/amdgpu: Set clock ungate state before suspend/fini

2018-08-14 Thread Alex Deucher
On Tue, Aug 14, 2018 at 5:58 AM Rex Zhu wrote: > > After set power ungate state, set clock ungate state > before driver suspend or fini. > > Signed-off-by: Rex Zhu Nice cleanup! Series is: Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 56 >

Re: [PATCH 1/4] drm/scheduler: trivial error handling fix

2018-08-14 Thread Andrey Grodzovsky
Reviewed-by: Andrey Grodzovsky Andrey On 08/14/2018 04:23 AM, Huang Rui wrote: On Tue, Aug 14, 2018 at 10:12:23AM +0200, Christian König wrote: Return -ENOMEM when allocating the rq_list fails. Signed-off-by: Christian König Reviewed-by: Huang Rui ---

Re: [PATCH 3/3] drm/amdgpu:change VEGA booting with firmware loaded by PSP

2018-08-14 Thread Alex Deucher
On Tue, Aug 14, 2018 at 3:11 PM James Zhu wrote: > > From: Feifei Xu > > With PSP firmware loading, TMR mc address is supposed to be used. > > Signed-off-by: James Zhu Series is: Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 13 + > 1 file changed, 9

[PATCH 3/3] drm/amdgpu:change VEGA booting with firmware loaded by PSP

2018-08-14 Thread James Zhu
From: Feifei Xu With PSP firmware loading, TMR mc address is supposed to be used. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c

[PATCH 2/3] drm/amdgpu: added support 2nd UVD instance

2018-08-14 Thread James Zhu
From: Evan Quan Added psp fw loading support for vega20 2nd UVD instance. Change-Id: Ib1eeeb1308641c0d64ca2f8f465f17c567434c68 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 + drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 3 ++-

[PATCH 1/3] drm/amdgpu:Change VCE booting with firmware loaded by PSP

2018-08-14 Thread James Zhu
With PSP firmware loading, TMR mc address is supposed to be used. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c

Re: [PATCH] drm/amdgpu: fix amdgpu_amdkfd_remove_eviction_fence

2018-08-14 Thread Felix Kuehling
[+Harish] I think this looks good for the most part. See one comment inline below. But bear with me while I'm trying to understand what was wrong with the old code. Please correct me if I get this wrong or point out anything I'm missing. The reservation_object_list looks to be protected by a

Re: [PATCH] [v3] drm: amd: dc: don't use FP math when Kcov is enabled

2018-08-14 Thread Michel Dänzer
On 2018-08-13 05:23 PM, Arnd Bergmann wrote: > On Mon, Aug 13, 2018 at 4:49 PM Alex Deucher wrote: >> >> On Sun, Aug 12, 2018 at 3:55 AM Christian König >> wrote: >>> Adding Harry as well. >>> Am 11.08.2018 um 17:54 schrieb Arnd Bergmann: Fixes: bf2e2e2e0ea9 ("drm/amd/display: Limit

[PATCH] drm/amd/display: indent an if statement

2018-08-14 Thread Dan Carpenter
The if statement isn't indented and it makes static checkers complain. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index 4ca41d6e3bcf..d82ba58c720f 100644 ---

Re: [PATCH 2/4] drm/scheduler: move entity handling into separate file

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:12:24AM +0200, Christian König wrote: > This is complex enough on it's own. Move it into a separate C file. > > Signed-off-by: Christian König For series: Reviewed-by: Huang Rui > --- > drivers/gpu/drm/scheduler/Makefile| 2 +- >

Re: [PATCH libdrm 1/2] amdgpu: free flink bo in bo import

2018-08-14 Thread Christian König
Am 14.08.2018 um 05:00 schrieb Junwei Zhang: Fix potential memory leak when handle flink bo in bo import. Free the flink bo after bo import and in error handling. Signed-off-by: Junwei Zhang Reviewed-by: Christian König for the series. I assume you don't have commit rights to the upstream

RE: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Deng, Emily
>-Original Message- >From: Christian König >Sent: Tuesday, August 14, 2018 4:20 PM >To: Deng, Emily ; Koenig, Christian >; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do >invalidate tlb > >Am 14.08.2018 um 10:13 schrieb Deng, Emily:

[PATCH libdrm] amdgpu: Disable deadlock test suite for RV/RV2/PCO

2018-08-14 Thread likun Gao
From: Likun Gao disable deadlock test suite for RV/RV2/PCO Signed-off-by: Likun Gao --- tests/amdgpu/deadlock_tests.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c index 1eb5761..304482d 100644 ---

Re: [PATCH libdrm 1/2] amdgpu: free flink bo in bo import

2018-08-14 Thread Zhang, Jerry (Junwei)
On 08/14/2018 04:26 PM, Christian König wrote: Am 14.08.2018 um 05:00 schrieb Junwei Zhang: Fix potential memory leak when handle flink bo in bo import. Free the flink bo after bo import and in error handling. Signed-off-by: Junwei Zhang Reviewed-by: Christian König for the series. I

Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Christian König
Am 14.08.2018 um 10:35 schrieb Deng, Emily: -Original Message- From: amd-gfx On Behalf Of Christian König Sent: Tuesday, August 14, 2018 4:32 PM To: Deng, Emily ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb Am

RE: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Deng, Emily
>-Original Message- >From: Koenig, Christian >Sent: Tuesday, August 14, 2018 4:38 PM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do >invalidate tlb > >Am 14.08.2018 um 10:35 schrieb Deng, Emily: >>> -Original

Re: [PATCH] [v3] drm: amd: dc: don't use FP math when Kcov is enabled

2018-08-14 Thread Christian König
Am 14.08.2018 um 11:15 schrieb Arnd Bergmann: On Tue, Aug 14, 2018 at 10:54 AM Michel Dänzer wrote: On 2018-08-13 05:23 PM, Arnd Bergmann wrote: On Mon, Aug 13, 2018 at 4:49 PM Alex Deucher wrote: On Sun, Aug 12, 2018 at 3:55 AM Christian König wrote: Adding Harry as well. Am 11.08.2018

[PATCH libdrm 2/2] amdgpu: Use char* pointers in amdgpu_find_bo_by_cpu_mapping

2018-08-14 Thread Michel Dänzer
From: Michel Dänzer Arithmetic using void* pointers isn't defined by the C standard, only as a GCC extension. Avoids compiler warnings: ../../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’: ../../amdgpu/amdgpu_bo.c:554:48: warning: pointer of type ‘void *’ used in arithmetic

Re: [PATCH] drm/amdgpu: Cancel the delay work when suspend

2018-08-14 Thread Christian König
Am 14.08.2018 um 11:36 schrieb Rex Zhu: Cancel the delay work to avoid the corner case that ib test was not running when suspend Signed-off-by: Rex Zhu Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH libdrm 1/2] amdgpu: Use uint32_t i in amdgpu_find_bo_by_cpu_mapping

2018-08-14 Thread Michel Dänzer
From: Michel Dänzer The compiler points out that an int doesn't work as intended if dev->bo_handles.max_key > INT_MAX: ../../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’: ../../amdgpu/amdgpu_bo.c:550:16: warning: comparison of integer expressions of different signedness:

RE: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Deng, Emily
>-Original Message- >From: amd-gfx On Behalf Of >Christian König >Sent: Tuesday, August 14, 2018 4:32 PM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do >invalidate tlb > >Am 14.08.2018 um 10:26 schrieb Deng, Emily:

[PATCH] drm/amdgpu: Cancel the delay work when suspend

2018-08-14 Thread Rex Zhu
Cancel the delay work to avoid the corner case that ib test was not running when suspend Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 1/3] drm/amdgpu: Refine function name and function args

2018-08-14 Thread Rex Zhu
there is no logical change in this patch. 1. change function names: amdgpu_device_ip_late_set_pg/cg_state to amdgpu_device_set_pg/cg_state. 2. add a function argument cg/pg_state, so we can enable/disable cg/pg through those functions Signed-off-by: Rex Zhu ---

[PATCH 2/3] drm/amdgpu: Set power ungate state before suspend/fini

2018-08-14 Thread Rex Zhu
Unify to set power ungate state before suspend/fini. Remove the workaround code for gfx off feature in amdgpu_device.c. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 +-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4

[PATCH 3/3] drm/amdgpu: Set clock ungate state before suspend/fini

2018-08-14 Thread Rex Zhu
After set power ungate state, set clock ungate state before driver suspend or fini. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 56 +++--- 1 file changed, 5 insertions(+), 51 deletions(-) diff --git

[PATCH v2] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. v2: Add firmware version checking. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 63

Re: [PATCH 1/4] drm/scheduler: trivial error handling fix

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:12:23AM +0200, Christian König wrote: > Return -ENOMEM when allocating the rq_list fails. > > Signed-off-by: Christian König Reviewed-by: Huang Rui > --- > drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git

Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Christian König
Am 14.08.2018 um 10:26 schrieb Deng, Emily: -Original Message- From: Christian König Sent: Tuesday, August 14, 2018 4:20 PM To: Deng, Emily ; Koenig, Christian ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb Am

[PATCH 04/10] drm/amd/display: Create new i2c resource

2018-08-14 Thread Bhawanpreet Lakha
From: David Francis [Why] I2C code did not match dc resource model and was generally unpleasant [How] Move code into new svelte dce_i2c files, replacing various i2c objects with two structs: dce_i2c_sw and dce_i2c_hw. Fully split sw and hw code paths. Remove all redundant declarations. Use

[PATCH 01/10] drm/amd/display: implement EDID Emulation with nothing connected on link

2018-08-14 Thread Bhawanpreet Lakha
From: Samson Tam [Why] Implement full mode enumeration using emulated sink and nothing connected on link [How] Do not retrain link settings if lane count and link rate are both unknown. Causes driver to be stuck reading VBIOS register after removing emulated connection. Change-Id:

[PATCH 08/10] drm/amd/display: move edp fast boot optimization flag to stream

2018-08-14 Thread Bhawanpreet Lakha
From: Anthony Koo [Why] During S4/S3 stress test it is possible to resume from S4 without calling mode set on eDP, meaning high level optimization flag is not reset. If this is followed by an S3 resume call, driver will see optimization flag is set and consume it and think backend is powered on

[PATCH 02/10] drm/amd/display: fix dp_ss_control vbios flag parsing

2018-08-14 Thread Bhawanpreet Lakha
From: Dmytro Laktyushkin dp_ss_control = 0 means ss is off, we had a typo where we would double not dp_ss_control while setting dp_ss_off flag Change-Id: Ied5cd2132bdc269b9692ecb643798057524d380c Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha ---

[PATCH 00/12] DC Patches Aug 14, 2018

2018-08-14 Thread Bhawanpreet Lakha
Summary of Changes: * i2c refactor * Implement EDID emulation Anthony Koo (1): drm/amd/display: move edp fast boot optimization flag to stream David Francis (2): drm/amd/display: Create new i2c resource drm/amd/display: Combine dce80 and dce100 i2c hw functions Dmytro Laktyushkin (3):

[PATCH 05/10] drm/amd/display: Program csc matrix as part of stream update

2018-08-14 Thread Bhawanpreet Lakha
From: SivapiriyanKumarasamy Add csc_transform struct to dc_stream_update, and program if set when updating streams Change-Id: Ib98486736002327a67f60fa2e24879e3b8e765fd Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha ---

[PATCH 07/10] drm/amd/display: Combine dce80 and dce100 i2c hw functions

2018-08-14 Thread Bhawanpreet Lakha
From: David Francis [Why] There are two versions of the hw function pointers: one for dce80 and one for all other versions. These paired functions are nearly identical. dce80 and dce100 should not require different i2c access functions. [How] Combine each pair of functions into a single

[PATCH 06/10] drm/amd/display: Define registers for dcn10

2018-08-14 Thread Bhawanpreet Lakha
From: Nikola Cornij Define register for dcn10 for future changes Change-Id: Ia2d33f451c6464cd26345d1e56c5676bbc7cac1e Signed-off-by: Nikola Cornij Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h | 2 ++ 1 file changed, 2

[PATCH 09/10] drm/amd/display: implement DPMS DTN test v2

2018-08-14 Thread Bhawanpreet Lakha
From: Jun Lei [why] Existing DTN infrastructure in driver is hacky. It uses implicit log names, and also incorrect escape ID. [how] - Implement using generic DTN escape ID. - Move file logging functionality from driver to to script; driver now outputs to string/buffer - Move HWSS debug

[PATCH 03/10] drm/amd/display: make dp_ss_off optional

2018-08-14 Thread Bhawanpreet Lakha
From: Dmytro Laktyushkin dp_ss_off flag doesn't need to be set, so we create a link_init function if it is needed by an asic Change-Id: Ieb58532895bd01f1317ca13913211e63007ae9d8 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha ---

Re: [PATCH libdrm 2/2] amdgpu: Use char* pointers in amdgpu_find_bo_by_cpu_mapping

2018-08-14 Thread Zhang, Jerry (Junwei)
On 08/14/2018 05:58 PM, Michel Dänzer wrote: From: Michel Dänzer Arithmetic using void* pointers isn't defined by the C standard, only as a GCC extension. Avoids compiler warnings: ../../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’: ../../amdgpu/amdgpu_bo.c:554:48: warning:

RE: [PATCH v2] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Deng, Emily
Thanks for your review, will send a patch to review again as your suggestion. I think it will be better to use the amdgpu_sriov_vf(adev). As need to let somebody to test all your bare metal test cases, such as vega10, and other asics, as I don't have those environments, and only could test

Re: [PATCH libdrm 1/2] amdgpu: Use uint32_t i in amdgpu_find_bo_by_cpu_mapping

2018-08-14 Thread Zhang, Jerry (Junwei)
On 08/14/2018 05:58 PM, Michel Dänzer wrote: From: Michel Dänzer The compiler points out that an int doesn't work as intended if dev->bo_handles.max_key > INT_MAX: ../../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’: ../../amdgpu/amdgpu_bo.c:550:16: warning: comparison of

Re: [PATCH 1/3] drm/amdgpu:Change VCE booting with firmware loaded by PSP

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 02:53:51PM -0400, James Zhu wrote: > With PSP firmware loading, TMR mc address is supposed to be used. > Signed-off-by: James Zhu Series are Acked-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 13 + > 1 file changed, 9 insertions(+), 4

[PATCH] drm/amdgpu: add status checking after fw is loaded

2018-08-14 Thread Huang Rui
The status field must be 0 after FW is loaded. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 9f1a5bd..44bcd03 100644 ---

Re: [PATCH v2] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Christian König
Am 14.08.2018 um 12:56 schrieb Emily Deng: To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. v2: Add firmware version checking. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 63

Making a GDS Allocation for NGG

2018-08-14 Thread Jakub Okoński
Hi folks, I was trying to play around with NGG on Vega using the open source AMDVLK stack. After fetching all the code, I disabled an override in PAL, under gfx9SettingsLoader.cpp that disables the NGG setting. I've put a new option in my amdPalSettings.cfg: `NggMode,7` and that was enough to

Re: [PATCH] [v3] drm: amd: dc: don't use FP math when Kcov is enabled

2018-08-14 Thread Arnd Bergmann
On Tue, Aug 14, 2018 at 10:54 AM Michel Dänzer wrote: > > On 2018-08-13 05:23 PM, Arnd Bergmann wrote: > > On Mon, Aug 13, 2018 at 4:49 PM Alex Deucher wrote: > >> > >> On Sun, Aug 12, 2018 at 3:55 AM Christian König > >> wrote: > >>> Adding Harry as well. > >>> Am 11.08.2018 um 17:54 schrieb