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

2018-08-13 Thread 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 list. Then move > > all of > >

[PATCH libdrm 2/2] amdgpu: add a function to create amdgpu bo internally (v4)

2018-08-13 Thread Junwei Zhang
a helper function to create and initialize amdgpu bo v2: update error handling: add label and free bo v3: update error handling: separate each error label v4: update error handling and rebase Signed-off-by: Junwei Zhang Reviewed-by: Christian König --- amdgpu/amdgpu_bo.c | 211

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

2018-08-13 Thread 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 --- amdgpu/amdgpu_bo.c | 5 + 1 file changed, 5 insertions(+) diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c index b790e9b..d9556ec 100644

Re: [PATCH libdrm] amdgpu: add a function to create amdgpu bo internally (v4)

2018-08-13 Thread Zhang, Jerry (Junwei)
On 08/13/2018 06:14 PM, Christian König wrote: Am 13.08.2018 um 12:06 schrieb Junwei Zhang: a helper function to create and initialize amdgpu bo v2: update error handling: add label and free bo v3: update error handling: separate each error label v4: update error handling and free flink bo in

Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:22:34AM +0800, Zhang, Jerry (Junwei) wrote: > On 08/13/2018 06:16 PM, Christian König wrote: > >Am 13.08.2018 um 11:58 schrieb Huang Rui: > >>From: Christian König > >> > >>Add bulk move pos to store the pointer of first and last buffer object. > >>The list in between

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

2018-08-13 Thread Zhang, Jerry (Junwei)
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 list. Then move all of them on the end of LRU list one by one. Thus, that cause so many BOs moved to the end

Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:02:00AM +0800, Zhou, David(ChunMing) wrote: > > > On 2018年08月13日 18:16, Christian König wrote: > > Am 13.08.2018 um 11:58 schrieb Huang Rui: > >> From: Christian König > >> > >> Add bulk move pos to store the pointer of first and last buffer object. > >> The list in

Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Zhang, Jerry (Junwei)
On 08/13/2018 06:16 PM, Christian König wrote: Am 13.08.2018 um 11:58 schrieb Huang Rui: From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui

Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread zhoucm1
On 2018年08月13日 18:16, Christian König wrote: Am 13.08.2018 um 11:58 schrieb Huang Rui: From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui

Re: [PATCH v3] drm/radeon,amdgpu,dc: enable ABGR and XBGR formats

2018-08-13 Thread Alex Deucher
On Sun, Aug 12, 2018 at 3:46 PM Mauro Rossi wrote: > > Sending PATCH v3 series for support of {A,X}RGB pixel formats > in DCE1/R5xx and later, with separated patches for amd dc, > amdgpu and radeon, based on Alexander Deucher comments > > Tested and working on R5xx (X1300), R6xx (HD2400), R7xx

Re: [PATCH] drm/amd/pp: OverDrive gfx domain voltage on Tonga

2018-08-13 Thread Alex Deucher
On Mon, Aug 13, 2018 at 7:16 AM Rex Zhu wrote: > > Also ajust the gfx donamin voltage on Tonga when user overdriver > the voltage. Typo "domain" > > For Tonga, Driver do not update user's setting to voltage table > in smu, we only pick up a minimum value from voltage table that > not less than

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

2018-08-13 Thread Arnd Bergmann
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 DCN to x86 arch") > > > Fixes: 4841203102a3

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

2018-08-13 Thread Alex Deucher
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: > > Building the DCN 1.0 Raven display driver with CONFIG_KCOV_INSTRUMENT_ALL=y > > and CONFIG_KCOV_ENABLE_COMPARISONS=y results in warnings about many > > functions

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

2018-08-13 Thread 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 the scheduler where the job is execute on is simply not determined yet when we want to trace it. So using the scheduler name

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

2018-08-13 Thread Arnd Bergmann
Building the DCN 1.0 Raven display driver with CONFIG_KCOV_INSTRUMENT_ALL=y and CONFIG_KCOV_ENABLE_COMPARISONS=y results in warnings about many functions that do a comparison of floating-point variables: drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.o: In function `dcn_bw_calc_rq_dlg_ttu':

Re: [PATCH 0/2] Provide init/release functions for struct ttm_bo_global

2018-08-13 Thread Thomas Hellstrom
On 08/13/2018 02:28 PM, Thomas Zimmermann wrote: Hi Am 13.08.2018 um 12:33 schrieb Christian König: Yes, please! I had it on my TODO list to clean that up for an eternity. On top of these patches, I have a patch set that provides a single init/release interface for TTM global data. I'll post

Re: [PATCH v2 5/5] drm/amdgpu:add VCN booting with firmware loaded by PSP

2018-08-13 Thread James Zhu
PSP engine only allocate space for firmware. mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW/HIGH is for firmware TMR address. The other two address are for HEAP/Session. Regards! James Zhu On 2018-08-13 12:16 AM, Quan, Evan wrote: Why only the mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW/HIGH use the new

Re: [PATCH 0/2] Provide init/release functions for struct ttm_bo_global

2018-08-13 Thread Thomas Zimmermann
Hi Am 13.08.2018 um 12:33 schrieb Christian König: > Yes, please! I had it on my TODO list to clean that up for an eternity. On top of these patches, I have a patch set that provides a single init/release interface for TTM global data. I'll post it when the current patches got some feed back.

[PATCH] drm/amd/pp: OverDrive gfx domain voltage on Tonga

2018-08-13 Thread Rex Zhu
Also ajust the gfx donamin voltage on Tonga when user overdriver the voltage. For Tonga, Driver do not update user's setting to voltage table in smu, we only pick up a minimum value from voltage table that not less than the user's setting. Signed-off-by: Rex Zhu ---

Re: [PATCH 0/2] Provide init/release functions for struct ttm_bo_global

2018-08-13 Thread Christian König
Yes, please! I had it on my TODO list to clean that up for an eternity. Actually I never understood why that should be driver work to setup TTM? I mean can't we just have a module_init/module_exit for TTM? Thanks, Christian. Am 13.08.2018 um 12:24 schrieb Thomas Zimmermann: TTM uses global

[PATCH 1/2] drm/ttm: Rename ttm_bo_global_{init, release}() to ttm_bo_global_ref_*()

2018-08-13 Thread Thomas Zimmermann
The functions ttm_bo_global_init() and ttm_bo_global_release() do not receive an argument of type struct ttm_bo_global. Both take a struct drm_global_reference that contains points to a struct ttm_bo_global_ref. Renaming them reflects this. Signed-off-by: Thomas Zimmermann ---

[PATCH 0/2] Provide init/release functions for struct ttm_bo_global

2018-08-13 Thread Thomas Zimmermann
TTM uses global memory and BO for backing graphics buffers. These are represented by struct ttm_mem_global and struct ttm_bo_global. Currently, struct ttm_bo_global can only be initialized and released through struct ttm_bo_global_ref. This is a workaround for passing an instance of

[PATCH 2/2] drm/ttm: Provide ttm_bo_global_{init/release}() for struct ttm_bo_global

2018-08-13 Thread Thomas Zimmermann
So far, struct ttm_bo_global_ref was the only way of initializing a struct ttm_bo_global. Providing separate initializer and release functions for struct ttm_bo_global gives drivers the option of implementing their own init and release callbacks for drm_global_references of type DRM_GLOBAL_TTM_BO.

Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Christian König
Am 13.08.2018 um 11:58 schrieb Huang Rui: From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian If you ask me that

Re: [PATCH libdrm] amdgpu: add a function to create amdgpu bo internally (v4)

2018-08-13 Thread Christian König
Am 13.08.2018 um 12:06 schrieb Junwei Zhang: a helper function to create and initialize amdgpu bo v2: update error handling: add label and free bo v3: update error handling: separate each error label v4: update error handling and free flink bo in bo import Signed-off-by: Junwei Zhang A

Re: [PATCH libdrm 2/2] [RFC] amdgpu: do not free flink bo for flink_fd

2018-08-13 Thread Christian König
Am 13.08.2018 um 12:08 schrieb Zhang, Jerry (Junwei): On 08/13/2018 04:29 PM, Christian König wrote: Am 13.08.2018 um 08:43 schrieb Zhang, Jerry (Junwei): On 08/13/2018 11:03 AM, Zhang, Jerry (Junwei) wrote: On 08/10/2018 10:20 PM, Christian König wrote: Am 10.08.2018 um 07:05 schrieb Junwei

Re: [PATCH libdrm 2/2] [RFC] amdgpu: do not free flink bo for flink_fd

2018-08-13 Thread Zhang, Jerry (Junwei)
On 08/13/2018 04:29 PM, Christian König wrote: Am 13.08.2018 um 08:43 schrieb Zhang, Jerry (Junwei): On 08/13/2018 11:03 AM, Zhang, Jerry (Junwei) wrote: On 08/10/2018 10:20 PM, Christian König wrote: Am 10.08.2018 um 07:05 schrieb Junwei Zhang: the flink bo is used to export Why should we

[PATCH libdrm] amdgpu: add a function to create amdgpu bo internally (v4)

2018-08-13 Thread Junwei Zhang
a helper function to create and initialize amdgpu bo v2: update error handling: add label and free bo v3: update error handling: separate each error label v4: update error handling and free flink bo in bo import Signed-off-by: Junwei Zhang --- amdgpu/amdgpu_bo.c | 208

[PATCH v3 5/5] drm/amdgpu: move PD/PT bos on LRU again

2018-08-13 Thread Huang Rui
The new bulk moving functionality is ready, the overhead of moving PD/PT bos to LRU is fixed. So move them on LRU again. Signed-off-by: Huang Rui Tested-by: Mike Lothian --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 3/5] drm/ttm: add bulk move function on LRU

2018-08-13 Thread Huang Rui
This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian --- drivers/gpu/drm/ttm/ttm_bo.c | 52

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

2018-08-13 Thread Huang Rui
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 list. Then move all of them on the end of LRU list one by one. Thus, that cause so many BOs moved to the end of the LRU, and impact performance

[PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Huang Rui
From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian --- include/drm/ttm/ttm_bo_driver.h | 28

[PATCH v3 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality

2018-08-13 Thread Huang Rui
The idea and proposal is originally from Christian, and I continue to work to deliver it. Background: amdgpu driver will move all PD/PT and PerVM BOs into idle list. Then move all of them on the end of LRU list one by one. Thus, that cause so many BOs moved to the end of the LRU, and impact

[PATCH v3 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves

2018-08-13 Thread Huang Rui
From: Christian König When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian ---

Re: [PATCH libdrm 2/2] [RFC] amdgpu: do not free flink bo for flink_fd

2018-08-13 Thread Christian König
Am 13.08.2018 um 08:43 schrieb Zhang, Jerry (Junwei): On 08/13/2018 11:03 AM, Zhang, Jerry (Junwei) wrote: On 08/10/2018 10:20 PM, Christian König wrote: Am 10.08.2018 um 07:05 schrieb Junwei Zhang: the flink bo is used to export Why should we do this? That makes no sense, this way we would

Re: [PATCH v2 0/5] drm/ttm, amdgpu: Introduce LRU bulk move functionality

2018-08-13 Thread Huang Rui
On Sun, Aug 12, 2018 at 10:12:56PM +0100, Mike Lothian wrote: > Hi > > I've been testing these patches over the weekend on my Tonga and Raven > systems > > Tested-by: Mike Lothian > Thanks so much, Mike. I will add your tested-by in my next version. Thanks, Ray > Cheers > > Mike > > On

Re: [PATCH libdrm 2/2] [RFC] amdgpu: do not free flink bo for flink_fd

2018-08-13 Thread Zhang, Jerry (Junwei)
On 08/13/2018 11:03 AM, Zhang, Jerry (Junwei) wrote: On 08/10/2018 10:20 PM, Christian König wrote: Am 10.08.2018 um 07:05 schrieb Junwei Zhang: the flink bo is used to export Why should we do this? That makes no sense, this way we would create a memory leak. Get the thought from

Re: [PATCH 1/3] drm/amdgpu: add AVFS control to PP_FEATURE_MASK

2018-08-13 Thread Huang Rui
On Fri, Aug 10, 2018 at 01:24:52PM -0500, Alex Deucher wrote: > Add a ppfeaturemask flag to disable AVFS control. > > Signed-off-by: Alex Deucher Series are Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/include/amd_shared.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH 1/2] drm/amdgpu/uvd: UVD entity initialization relys on ring initialization

2018-08-13 Thread Christian König
Am 13.08.2018 um 05:10 schrieb Emily Deng: Entity init should after ring init, as the entity's sched_rq's initialization is in ring init. SWDEV-161495 Signed-off-by: Emily Deng Reviewed-by: Christian König for the whole series. --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 32

Re: [PATCH] drm/amdgpu/sriov: sriov won't support gfx off

2018-08-13 Thread Huang Rui
On Mon, Aug 13, 2018 at 02:03:22PM +0800, Tiecheng Zhou wrote: > Signed-off-by: Tiecheng Zhou gfxoff feature is only able to be enabled after configure PP_GFXOFF_MASK to ppfeaturemask. In other words, it isn't enabled by default. It doesn't need this checking and just bypass amdgpu_gfx_off_ctrl

[PATCH] drm/amdgpu/sriov: sriov won't support gfx off

2018-08-13 Thread Tiecheng Zhou
Signed-off-by: Tiecheng Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index 790fd54..e67ab25 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++