[PATCH] drm/amdgpu: move xgmi init/fini to xgmi_add/remove_device call

2020-01-28 Thread Frank . Min
From: Hawking Zhang For sriov, psp ip block has to be initialized before ih block for the dynamic register programming interface that needed for vf ih ring buffer. On the other hand, current psp ip block hw_init function will initialize xgmi session which actaully depends on interrupt to return s

[PATCH] drm/amdgpu: move xgmi init/fini to xgmi_add/remove_device call

2020-01-28 Thread Frank . Min
From: Hawking Zhang For sriov, psp ip block has to be initialized before ih block for the dynamic register programming interface that needed for vf ih ring buffer. On the other hand, current psp ip block hw_init function will initialize xgmi session which actaully depends on interrupt to return s

Re: [Patch v1 4/5] drm/amdkfd: show warning when kfd is locked

2020-01-28 Thread Felix Kuehling
On 2020-01-27 20:29, Rajneesh Bhardwaj wrote: During system suspend the kfd driver aquires a lock that prohibits further kfd actions unless the gpu is resumed. This adds some info which can be useful while debugging. Signed-off-by: Rajneesh Bhardwaj --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.

[PATCH] drm/amdgpu/smu_v11_0: Correct behavior of restoring default tables

2020-01-28 Thread Matt Coffin
Previously, the syfs functionality for restoring the default powerplay table was sourcing it's information from the currently-staged powerplay table. This patch adds a step to cache the first overdrive table that we see on boot, so that it can be used later to "restore" the powerplay table Signed

Re: [PATCH] drm/amdgpu/smu_v11_0: Correct behavior of restoring default tables

2020-01-28 Thread Alex Deucher
On Tue, Jan 28, 2020 at 3:10 PM Matt Coffin wrote: > > Previously, the syfs functionality for restoring the default powerplay > table was sourcing it's information from the currently-staged powerplay > table. > > This patch adds a step to cache the first overdrive table that we see on > boot, so t

Re: [PATCH] drm/amd/display: Move drm_dp_mst_atomic_check() to the front of dc_validate_global_state()

2020-01-28 Thread Mikita Lipski
Reviewed-by: Mikita Lipski Thanks! Mikita On 1/28/20 4:44 PM, Zhan Liu wrote: [Why] Need to do atomic check first, then validate global state. If not, when connecting both MST and HDMI displays and set a bad mode via xrandr, system will hang. [How] Move drm_dp_mst_atomic_check() to the front

[PATCH] drm/amd/display: Move drm_dp_mst_atomic_check() to the front of dc_validate_global_state()

2020-01-28 Thread Zhan Liu
[Why] Need to do atomic check first, then validate global state. If not, when connecting both MST and HDMI displays and set a bad mode via xrandr, system will hang. [How] Move drm_dp_mst_atomic_check() to the front of dc_validate_global_state(). Signed-off-by: Zhan Liu --- drivers/gpu/drm/amd/d

Re: [PATCH] drm/amd/display: fix spelling mistake link_integiry_check -> link_integrity_check

2020-01-28 Thread Alex Deucher
On Tue, Jan 28, 2020 at 6:28 AM Colin King wrote: > > From: Colin Ian King > > There is a spelling mistake on the struct field name link_integiry_check, > fix this by renaming it. > > Signed-off-by: Colin Ian King Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h

Re: [PATCH] drm/amdgpu/navi10: add mclk to navi10_get_clock_by_type_with_latency

2020-01-28 Thread Alex Deucher
On Tue, Jan 28, 2020 at 1:50 PM Matt Coffin wrote: > > Let me know if I'm not doing this correctly since I'm still new. > > > > Patch is > > Reviewed-by: Matt Coffin Thanks! Alex > > On 1/25/20 11:33 AM, Alex Deucher wrote: > > Doesn't seem to be used, but add it just in case. > > > > Signed-o

Re: [Patch v1 3/5] drm/amdkfd: Introduce debugfs option to disable baco

2020-01-28 Thread Alex Deucher
On Mon, Jan 27, 2020 at 8:30 PM Rajneesh Bhardwaj wrote: > > When BACO is enabled by default, sometimes it can cause additional > trouble to debug KFD issues. This debugfs override allows to temporarily > disable BACO for debug purpose without having to reboot the machine. > > However, in some cas

Re: [Patch v1 2/5] drm/amdgpu: Fix missing error check in suspend

2020-01-28 Thread Alex Deucher
On Mon, Jan 27, 2020 at 8:30 PM Rajneesh Bhardwaj wrote: > > amdgpu_device_suspend might return an error code since it can be called > from both runtime and system suspend flows. Add the missing return code > in case of a failure. > > Signed-off-by: Rajneesh Bhardwaj Reviewed-by: Alex Deucher

Re: [Patch v1 1/5] drm/amdgpu: always enable runtime power management

2020-01-28 Thread Alex Deucher
On Mon, Jan 27, 2020 at 8:30 PM Rajneesh Bhardwaj wrote: > > This allows runtime power management to kick in on amdgpu driver when > the underlying hardware supports either BOCO or BACO. This can still be > avoided if boot arg amdgpu.runpm = 0 is supplied. > > BOCO: Bus Off, Chip Off >

Re: [Patch v1 0/5] Enable BACO with KFD

2020-01-28 Thread Alex Deucher
On Tue, Jan 28, 2020 at 12:39 PM Mike Lothian wrote: > > Is this designed to work with PRIME laptops too? > Yes. The title should really be runtime pm rather than BACO specifically. The underlying power savings mechanism (BOCO, BACO, etc.) varies from platform to platform. Alex > On Tue, 28 J

[PATCH] drm/amdgpu/smu_v11_0: Correct behavior of restoring default tables

2020-01-28 Thread Matt Coffin
Previously, the syfs functionality for restoring the default powerplay table was sourcing it's information from the currently-staged powerplay table. This patch adds a step to cache the first overdrive table that we see on boot, so that it can be used later to "restore" the powerplay table --- ..

RE: [Patch v1 5/5] drm/amdkfd: refactor runtime pm for baco

2020-01-28 Thread Zeng, Oak
[AMD Official Use Only - Internal Distribution Only] Regards, Oak -Original Message- From: amd-gfx On Behalf Of Rajneesh Bhardwaj Sent: Monday, January 27, 2020 8:29 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Kuehling, Felix ; Bhardwaj, Rajneesh Subject: [Patch v1

Re: [PATCH 3/3] drm/amdgpu/navi10: add OD support for restoring default table

2020-01-28 Thread Alex Deucher
On Tue, Jan 28, 2020 at 1:49 PM Matt Coffin wrote: > > > > On 1/28/20 10:26 AM, Alex Deucher wrote: > > On Tue, Jan 28, 2020 at 11:44 AM Matt Coffin wrote: > > > I just copied that vega20 did. You may be right. I haven't paged the > > recent SMU interface stuff into my head in a while. If so,

Re: [PATCH] drm/amdgpu: correct vram mgr node size calculation

2020-01-28 Thread Christian König
Am 28.01.20 um 20:55 schrieb Philip Yang: Use pages_per_node instead of mem->num_pages to alloc vram, this will increase the chance to get vram node after vram fragments. NAK, this is intentional to aid TLB with continuous allocations. The fallback to using pages_per_node is directly below, so

[PATCH] drm/amdgpu: correct vram mgr node size calculation

2020-01-28 Thread Philip Yang
Use pages_per_node instead of mem->num_pages to alloc vram, this will increase the chance to get vram node after vram fragments. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu

[PATCH 1/2] drm/amdgpu/display: handle multiple numbers of fclks in dcn_calcs.c

2020-01-28 Thread Alex Deucher
We might get different numbers of clocks from powerplay depending on what the OEM has populated. Bug: https://gitlab.freedesktop.org/drm/amd/issues/963 Signed-off-by: Alex Deucher --- .../gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 31 --- 1 file changed, 20 insertions(+), 11 del

[PATCH 2/2] drm/amdgpu/smu10: fix smu10_get_clock_by_type_with_latency

2020-01-28 Thread Alex Deucher
Only send non-0 clocks to DC for validation. This mirrors what the windows driver does. Bug: https://gitlab.freedesktop.org/drm/amd/issues/963 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-)

Re: [PATCH] drm/amdgpu/navi10: add mclk to navi10_get_clock_by_type_with_latency

2020-01-28 Thread Matt Coffin
Let me know if I'm not doing this correctly since I'm still new. Patch is Reviewed-by: Matt Coffin On 1/25/20 11:33 AM, Alex Deucher wrote: > Doesn't seem to be used, but add it just in case. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 ++ > 1 fil

Re: [PATCH 3/3] drm/amdgpu/navi10: add OD support for restoring default table

2020-01-28 Thread Matt Coffin
On 1/28/20 10:26 AM, Alex Deucher wrote: > On Tue, Jan 28, 2020 at 11:44 AM Matt Coffin wrote: > I just copied that vega20 did. You may be right. I haven't paged the > recent SMU interface stuff into my head in a while. If so, we should > also fix the vega20_ppt.c code. The vega20_ppt code

Re: [Patch v1 0/5] Enable BACO with KFD

2020-01-28 Thread Mike Lothian
Is this designed to work with PRIME laptops too? On Tue, 28 Jan 2020 at 01:29, Rajneesh Bhardwaj wrote: > > This series aims to enable BACO by default on supported AMD platforms > and ensures that the AMD Kernel Fusion Driver can co-exist with this > feature when the GPU devices are runtime suspe

Re: [PATCH 3/3] drm/amdgpu/navi10: add OD support for restoring default table

2020-01-28 Thread Alex Deucher
On Tue, Jan 28, 2020 at 11:44 AM Matt Coffin wrote: > > For this, I believe we're updating `table_context->overdrive_table` with > the values set by the user, wouldn't the intended behavior here be to > restore the settings that were there on boot? > Correct. > > > If so, I think we'd have to ca

Re: [PATCH 3/3] drm/amdgpu/navi10: add OD support for restoring default table

2020-01-28 Thread Matt Coffin
For this, I believe we're updating `table_context->overdrive_table` with the values set by the user, wouldn't the intended behavior here be to restore the settings that were there on boot? If so, I think we'd have to cache the overdrive table that was there on boot, and use that in the response

Re: [PATCH] drm/radeon: avoid page fault during gpu reset

2020-01-28 Thread Christian König
Am 28.01.20 um 14:15 schrieb Andreas Messer: On Sat, Jan 25, 2020 at 07:01:36PM +, Koenig, Christian wrote: Am 25.01.2020 19:47 schrieb Andreas Messer : When backing up a ring, validate pointer to avoid page fault. [ cut description / kernel messages ] NAK, that was suggested multiple time

[PATCH] drm/amd/display: fix spelling mistake link_integiry_check -> link_integrity_check

2020-01-28 Thread Colin King
From: Colin Ian King There is a spelling mistake on the struct field name link_integiry_check, fix this by renaming it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h | 2 +- .../gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c| 8 ..

Re: [PATCH] drm/radeon: avoid page fault during gpu reset

2020-01-28 Thread Andreas Messer
On Sat, Jan 25, 2020 at 07:01:36PM +, Koenig, Christian wrote: > > > Am 25.01.2020 19:47 schrieb Andreas Messer : > When backing up a ring, validate pointer to avoid page fault. > [ cut description / kernel messages ] > > NAK, that was suggested multiple times now and is essentially the wro

Re: [PATCH] drm/amdgpu: allocate entities on demand

2020-01-28 Thread Christian König
Patch is Reviewed-by: Christian König Regards, Christian. Am 28.01.20 um 11:13 schrieb Nirmoy: Gentle reminder ! On 1/24/20 5:31 PM, Nirmoy Das wrote: Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch t

Re: [PATCH] drm/amdgpu: allocate entities on demand

2020-01-28 Thread Nirmoy
Gentle reminder ! On 1/24/20 5:31 PM, Nirmoy Das wrote: Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entity only when needed. v2: allocate memory for