[PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

2020-02-11 Thread Alex Deucher
It's used by more than just DCN2.0. Fixes missing symbol when amdgpu is built without DCN support. Signed-off-by: Alex Deucher --- .../gpu/drm/amd/display/dc/core/dc_resource.c| 16 .../drm/amd/display/dc/dcn20/dcn20_resource.c| 16

[PATCH 2/3] drm/amdgpu/display: extend DCN guards

2020-02-11 Thread Alex Deucher
to cover dcn2.x related headers. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 2 +- drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)

[PATCH 1/3] drm/amdgpu/display: extend DCN guard in dal_bios_parser_init_cmd_tbl_helper2

2020-02-11 Thread Alex Deucher
To cover DCN 2.x. Signed-off-by: Alex Deucher --- .../drm/amd/display/dc/bios/command_table_helper2.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-11 Thread Luben Tuikov
On 2020-02-11 4:27 p.m., Andrey Grodzovsky wrote: > > On 2/11/20 10:55 AM, Andrey Grodzovsky wrote: >> On 2/10/20 4:50 PM, Luben Tuikov wrote: >>> Hi Lucas, >>> >>> Thank you for bringing awareness of this issue, publicly. >>> >>> As soon as this patch showed up back in November of 2019, >>> I

Re: [PATCH] drm/ttm: replace dma_resv object on deleted BOs v3

2020-02-11 Thread Pan, Xinhui
> 2020年2月11日 23:43,Christian König 写道: > > When non-imported BOs are resurrected for delayed delete we replace > the dma_resv object to allow for easy reclaiming of the resources. > > v2: move that to ttm_bo_individualize_resv > v3: add a comment to explain what's going on > > Signed-off-by:

RE: [PATCH] drm/amd/powerplay: always refetch the enabled features status on dpm enablement

2020-02-11 Thread Feng, Kenneth
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Kenneth Feng -Original Message- From: amd-gfx On Behalf Of Evan Quan Sent: Tuesday, February 11, 2020 1:41 PM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH] drm/amd/powerplay: always refetch the

RE: [PATCH] drm/amdgpu/soc15: fix xclk for raven

2020-02-11 Thread Quan, Evan
Acked-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Wednesday, February 12, 2020 2:51 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH] drm/amdgpu/soc15: fix xclk for raven > > It's 25 Mhz (refclk / 4). This

[PATCH] drm/amd/powerplay: correct the way for checking SMU_FEATURE_BACO_BIT support

2020-02-11 Thread Evan Quan
Since 'smu_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT)' will always return false considering the 'smu_system_features_control(smu, false)' disabled all SMU features. Change-Id: I73956ffa51d6da8375c7c377895a221e13d31594 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c |

[PATCH] drm/amdgpu/soc15: fix xclk for raven

2020-02-11 Thread Alex Deucher
It's 25 Mhz (refclk / 4). This fixes the interpretation of the rlc clock counter. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c

[RFC PATCH] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Nirmoy Das
GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 4 +-

Re: [PATCH] drm/amdgpu: Do not move root PT bo to relocated list

2020-02-11 Thread Christian König
Am 11.02.20 um 03:32 schrieb xinhui pan: As root PD has no parent, we just need move its status to idle. Suggested-by: Christian König Signed-off-by: xinhui pan CC: Christian König Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 +-

Re: [PATCH libdrm 0/4] amdgpu: use amdgpu_cs_submit_raw2 for amdgpu tests

2020-02-11 Thread Christian König
Looks good on first glance, but Marek and/or Pierre can probably better judge than me. Christian. Am 11.02.20 um 12:22 schrieb Huang Rui: So far, the amdgpu_cs_submit_raw2 is used for MesaGL, however the amdgpu tests still use the legacy interface. So we would like to make amdgpu tests verify

[PATCH libdrm 0/4] amdgpu: use amdgpu_cs_submit_raw2 for amdgpu tests

2020-02-11 Thread Huang Rui
So far, the amdgpu_cs_submit_raw2 is used for MesaGL, however the amdgpu tests still use the legacy interface. So we would like to make amdgpu tests verify the amdgpu_cs_submit_raw2 API. Thanks, Ray Huang Rui (4): amdgpu: use alloca for dependencies and sem_dependencies amdgpu: use

[PATCH libdrm 4/4] amdgpu: clean up the cs structure variable

2020-02-11 Thread Huang Rui
This patch is to use generic variables as the input of amdgpu_cs_submit_raw2. Because amdgpu_cs_submit_one won't handle IOCTL directly. Signed-off-by: Huang Rui --- amdgpu/amdgpu_cs.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/amdgpu/amdgpu_cs.c

[PATCH libdrm 2/4] amdgpu: use amdgpu_cs_submit_raw2 in amdgpu_cs_submit

2020-02-11 Thread Huang Rui
So far, amdgpu_cs_submit_raw2 is mainly used for upper layer (Mesa), however, amdgpu_cs_submit is used for current all unit tests. Our intention is that the unit tests can actually verify the API which is really used. Signed-off-by: Huang Rui --- amdgpu/amdgpu_cs.c | 8 +--- 1 file changed,

[PATCH libdrm 1/4] amdgpu: use alloca for dependencies and sem_dependencies

2020-02-11 Thread Huang Rui
Use alloca instead of malloc, then we don't need free them at the end of this function. Signed-off-by: Huang Rui --- amdgpu/amdgpu_cs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index 1bd974f..aaa1f7b 100644 ---

[PATCH libdrm 3/4] amdgpu: remove the un-used chunk_array

2020-02-11 Thread Huang Rui
This array won't be used. Signed-off-by: Huang Rui --- amdgpu/amdgpu_cs.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index 864a76a..1772dbf 100644 --- a/amdgpu/amdgpu_cs.c +++ b/amdgpu/amdgpu_cs.c @@ -221,7 +221,6 @@ static int

Re: Cleanup TTMs delayed delete handling

2020-02-11 Thread Daniel Vetter
On Tue, Feb 11, 2020 at 11:06:53AM +, Pan, Xinhui wrote: > [AMD Official Use Only - Internal Distribution Only] Uh might want to fix your email setup. -Daniel > > For patch 1/2/3/5/6 > Reviewed-by: xinhui pan > > From: Christian König > Sent: Monday,

Re: Cleanup TTMs delayed delete handling

2020-02-11 Thread Pan, Xinhui
[AMD Official Use Only - Internal Distribution Only] For patch 1/2/3/5/6 Reviewed-by: xinhui pan From: Christian König Sent: Monday, February 10, 2020 11:09:01 PM To: Pan, Xinhui ; amd-gfx@lists.freedesktop.org ; dri-de...@lists.freedesktop.org Subject:

Re: [RFC PATCH] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Christian König
Am 11.02.20 um 13:06 schrieb Nirmoy: Hi Christian On 2/11/20 12:50 PM, Christian König wrote: Am 11.02.20 um 12:17 schrieb Nirmoy Das: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Actually for

Re: [RFC PATCH] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Nirmoy
On 2/11/20 1:17 PM, Christian König wrote: Am 11.02.20 um 13:06 schrieb Nirmoy: Hi Christian On 2/11/20 12:50 PM, Christian König wrote: Am 11.02.20 um 12:17 schrieb Nirmoy Das: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset

[RFC PATCH v2] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Nirmoy Das
GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 22 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 +

Re: [PATCH] drm/ttm: rework BO delayed delete. v2

2020-02-11 Thread Pan, Xinhui
Reviewed-by: xinhui pan > 2020年2月11日 21:43,Christian König 写道: > > This patch reworks the whole delayed deletion of BOs which aren't idle. > > Instead of having two counters for the BO structure we resurrect the BO > when we find that a deleted BO is not idle yet. > > This has many

Re: [RFC PATCH] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Huang Rui
On Tue, Feb 11, 2020 at 12:17:22PM +0100, Nirmoy Das wrote: > GPU address should belong to driver not in memory management. > This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. > Looks good for me. Yes, agree, the mc address should be got from amdgpu_bo. Acked-by: Huang

Re: [RFC PATCH v2] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Christian König
Am 11.02.20 um 15:06 schrieb Nirmoy Das: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 22 +++--

Re: [PATCH 4/6] drm/ttm: rework BO delayed delete.

2020-02-11 Thread Christian König
[SNIP] + /* +* Make NO_EVICT bos immediately available to +* shrinkers, now that they are queued for +* destruction. +*/ + if (bo->mem.placement & TTM_PL_FLAG_NO_EVICT) { +

Re: [PATCH] drm/amd/powerplay: always refetch the enabled features status on dpm enablement

2020-02-11 Thread Deucher, Alexander
[AMD Public Use] Acked-by: Alex Deucher From: amd-gfx on behalf of Evan Quan Sent: Tuesday, February 11, 2020 12:41 AM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH] drm/amd/powerplay: always refetch the enabled features status on dpm

Re: [PATCH libdrm 0/4] amdgpu: use amdgpu_cs_submit_raw2 for amdgpu tests

2020-02-11 Thread Deucher, Alexander
[AMD Public Use] Also, libdrm changes should go through a gitlab MR now. Alex From: Christian König Sent: Tuesday, February 11, 2020 6:39 AM To: Huang, Ray ; amd-gfx@lists.freedesktop.org Cc: Pelloux-prayer, Pierre-eric ; Olsak, Marek ; Liu, Aaron ; Tuikov,

Re: [RFC PATCH] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Christian König
Am 11.02.20 um 12:17 schrieb Nirmoy Das: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Actually for amdgpu we should be able to get completely rid of bo->offset. All we need to do is to change

Re: [RFC PATCH] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Nirmoy
Hi Christian On 2/11/20 12:50 PM, Christian König wrote: Am 11.02.20 um 12:17 schrieb Nirmoy Das: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Actually for amdgpu we should be able to get completely

Re: [RFC PATCH] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Christian König
Am 11.02.20 um 13:11 schrieb Nirmoy: On 2/11/20 12:57 PM, Huang Rui wrote: On Tue, Feb 11, 2020 at 12:17:22PM +0100, Nirmoy Das wrote: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Looks good for

RE: [PATCH libdrm 0/4] amdgpu: use amdgpu_cs_submit_raw2 for amdgpu tests

2020-02-11 Thread Huang, Ray
[AMD Public Use] Hi Alex, MR = merge request? Should I create account to send merge request in the freedesktop gitlab? Thanks, Ray From: Deucher, Alexander Sent: Tuesday, February 11, 2020 10:30 PM To: Christian König ; Huang, Ray ; amd-gfx@lists.freedesktop.org Cc: Pelloux-prayer,

Re: [RFC PATCH] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Nirmoy
On 2/11/20 12:57 PM, Huang Rui wrote: On Tue, Feb 11, 2020 at 12:17:22PM +0100, Nirmoy Das wrote: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Looks good for me. Yes, agree, the mc address should be

[PATCH] drm/ttm: rework BO delayed delete. v2

2020-02-11 Thread Christian König
This patch reworks the whole delayed deletion of BOs which aren't idle. Instead of having two counters for the BO structure we resurrect the BO when we find that a deleted BO is not idle yet. This has many advantages, especially that we don't need to increment/decrement the BOs reference counter

Re: [PATCH 5/6] drm/ttm: replace dma_resv object on deleted BOs v2

2020-02-11 Thread Daniel Vetter
On Mon, Feb 10, 2020 at 04:09:06PM +0100, Christian König wrote: > When non-imported BOs are resurrected for delayed delete we replace > the dma_resv object to allow for easy reclaiming of the resources. > > v2: move that to ttm_bo_individualize_resv > > Signed-off-by: Christian König > --- >

Re: [PATCH 5/6] drm/ttm: replace dma_resv object on deleted BOs v2

2020-02-11 Thread Pan, Xinhui
> 2020年2月11日 22:14,Daniel Vetter 写道: > > On Mon, Feb 10, 2020 at 04:09:06PM +0100, Christian König wrote: >> When non-imported BOs are resurrected for delayed delete we replace >> the dma_resv object to allow for easy reclaiming of the resources. >> >> v2: move that to

Re: [RFC PATCH v2] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Nirmoy
On 2/11/20 3:09 PM, Christian König wrote: Am 11.02.20 um 15:06 schrieb Nirmoy Das: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das ---  

Re: [PATCH libdrm 0/4] amdgpu: use amdgpu_cs_submit_raw2 for amdgpu tests

2020-02-11 Thread Deucher, Alexander
Yes, correct. Alex From: Huang, Ray Sent: Tuesday, February 11, 2020 9:35 AM To: Deucher, Alexander ; Christian König ; amd-gfx@lists.freedesktop.org Cc: Pelloux-prayer, Pierre-eric ; Olsak, Marek ; Liu, Aaron ; Tuikov, Luben ; Koenig, Christian Subject:

[PATCH] drm/ttm: replace dma_resv object on deleted BOs v3

2020-02-11 Thread Christian König
When non-imported BOs are resurrected for delayed delete we replace the dma_resv object to allow for easy reclaiming of the resources. v2: move that to ttm_bo_individualize_resv v3: add a comment to explain what's going on Signed-off-by: Christian König Reviewed-by: xinhui pan ---

Re: [PATCH] drm/ttm: replace dma_resv object on deleted BOs v3

2020-02-11 Thread Daniel Vetter
On Tue, Feb 11, 2020 at 04:43:26PM +0100, Christian König wrote: > When non-imported BOs are resurrected for delayed delete we replace > the dma_resv object to allow for easy reclaiming of the resources. > > v2: move that to ttm_bo_individualize_resv > v3: add a comment to explain what's going on

[PATCH V7] drm: Add support for DP 1.4 Compliance edid corruption test

2020-02-11 Thread Jerry (Fangzhi) Zuo
Unlike DP 1.2 edid corruption test, DP 1.4 requires to calculate real CRC value of the last edid data block, and write it back. Current edid CRC calculates routine adds the last CRC byte, and check if non-zero. This behavior is not accurate; actually, we need to return the actual CRC value when

[RFC PATCH v3] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Nirmoy Das
GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 28 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 +

Re: [PATCH 5/6] drm/ttm: replace dma_resv object on deleted BOs v2

2020-02-11 Thread Daniel Vetter
On Tue, Feb 11, 2020 at 4:23 PM Christian König wrote: > > Am 11.02.20 um 16:02 schrieb Pan, Xinhui: > > > >> 2020年2月11日 22:14,Daniel Vetter 写道: > >> > >> On Mon, Feb 10, 2020 at 04:09:06PM +0100, Christian König wrote: > >>> When non-imported BOs are resurrected for delayed delete we replace >

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-11 Thread Andrey Grodzovsky
On 2/10/20 4:50 PM, Luben Tuikov wrote: Hi Lucas, Thank you for bringing awareness of this issue, publicly. As soon as this patch showed up back in November of 2019, I objected to it, privately. I didn't find this objection in my mail actually I suggested to instead use a _list_ to

Re: [RFC PATCH -next] drm/amd/display: Remove set but not unused variable 'stream_status'

2020-02-11 Thread Alex Deucher
On Mon, Feb 10, 2020 at 10:38 AM YueHaibing wrote: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: > In function dcn10_post_unlock_program_front_end: > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2623:29: > warning: variable stream_status set but

Re: [Patch v4 4/4] drm/amdgpu/runpm: enable runpm on baco capable VI+ asics

2020-02-11 Thread Alex Deucher
On Mon, Feb 10, 2020 at 1:48 PM Rajneesh Bhardwaj wrote: > > From: Alex Deucher > > Seems to work reliably on VI+ except for a few so enable runpm barring > those where baco for runtime power management is not supported. > > [rajneesh] Picked https://patchwork.freedesktop.org/patch/335402/ to >

Re: [RFC PATCH v2] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Christian König
Am 11.02.20 um 15:54 schrieb Nirmoy: On 2/11/20 3:09 PM, Christian König wrote: Am 11.02.20 um 15:06 schrieb Nirmoy Das: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das ---

Re: [RFC PATCH v3] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 Thread Christian König
Am 11.02.20 um 15:57 schrieb Nirmoy Das: GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das Two more suggestions below, with those fixed the patch is Reviewed-by: Christian König

Re: [PATCH 5/6] drm/ttm: replace dma_resv object on deleted BOs v2

2020-02-11 Thread Christian König
Am 11.02.20 um 15:14 schrieb Daniel Vetter: On Mon, Feb 10, 2020 at 04:09:06PM +0100, Christian König wrote: When non-imported BOs are resurrected for delayed delete we replace the dma_resv object to allow for easy reclaiming of the resources. v2: move that to ttm_bo_individualize_resv

Re: [PATCH 5/6] drm/ttm: replace dma_resv object on deleted BOs v2

2020-02-11 Thread Christian König
Am 11.02.20 um 16:02 schrieb Pan, Xinhui: 2020年2月11日 22:14,Daniel Vetter 写道: On Mon, Feb 10, 2020 at 04:09:06PM +0100, Christian König wrote: When non-imported BOs are resurrected for delayed delete we replace the dma_resv object to allow for easy reclaiming of the resources. v2: move that

Re: [PATCH 13/15] drm/amdgpu/display: split dp connector registration (v3)

2020-02-11 Thread Alex Deucher
Ping? Alex On Fri, Feb 7, 2020 at 4:17 PM Alex Deucher wrote: > > Split into init and register functions to avoid a segfault > in some configs when the load/unload callbacks are removed. > > v2: > - add back accidently dropped has_aux setting > - set dev in late_register > > v3: > - fix dp cec

Re: Raven: freeze at 'modprobe amdgpu' in early console with android-x86

2020-02-11 Thread Mauro Rossi
Hi Felix, On Mon, Jan 27, 2020 at 10:34 AM Felix Kuehling wrote: > > I've seen hangs on a Raven AM4 system after the Ubuntu upgrade to kernel > 5.3. I am able to work around it by disabling stutter mode with the > module parameter amdgpu.ppfeaturemask=0xfffdbfff. If that doesn't help, > you

Re: [PATCH libdrm 0/4] amdgpu: use amdgpu_cs_submit_raw2 for amdgpu tests

2020-02-11 Thread Luben Tuikov
Looks fine to me as well. Just as Christian said, would have to be approved by Marek. Regards, Luben On 2020-02-11 9:57 a.m., Deucher, Alexander wrote: > Yes, correct. > > Alex >

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-11 Thread Andrey Grodzovsky
On 2/11/20 10:55 AM, Andrey Grodzovsky wrote: On 2/10/20 4:50 PM, Luben Tuikov wrote: Hi Lucas, Thank you for bringing awareness of this issue, publicly. As soon as this patch showed up back in November of 2019, I objected to it, privately. I didn't find this objection in my mail actually