[PATCH] drm/amd/pm: avoid duplicate powergate/ungate setting

2021-11-10 Thread Evan Quan
Just bail out if the target IP block is already in the desired powergate/ungate state. This can avoid some duplicate settings which sometimes may cause unexpected issues. Link: https://lore.kernel.org/all/yv81vidwqlwva...@zn.tnic/ Change-Id: I66346c69f121df0f5ee20182451313ae4fda2d04 Signed-off-by

RE: [PATCH] drm/amdgpu: add error print when failing to add IP block(v2)

2021-11-10 Thread Chen, Guchun
[Public] Thanks Lijo and Christian for your review, this patch has been pushed with Alex's RB:( Regards, Guchun -Original Message- From: Lazar, Lijo Sent: Thursday, November 11, 2021 3:22 PM To: Chen, Guchun ; amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Koenig, Christian ; P

Re: [PATCH] drm/amdgpu: add error print when failing to add IP block(v2)

2021-11-10 Thread Lazar, Lijo
On 11/11/2021 9:41 AM, Guchun Chen wrote: Driver initialization is driven by IP version from IP discovery table. So add error print when failing to add ip block during driver initialization, this will be more friendly to user to know which IP version is not correct. [ 40.467361] [drm] host

Re: [PATCH] drm/amdgpu: add error print when failing to add IP block(v2)

2021-11-10 Thread Christian König
Am 11.11.21 um 05:11 schrieb Guchun Chen: Driver initialization is driven by IP version from IP discovery table. So add error print when failing to add ip block during driver initialization, this will be more friendly to user to know which IP version is not correct. [ 40.467361] [drm] host

Re: [PATCH 1/5] drm/amdgpu: handle IH ring1 overflow

2021-11-10 Thread Christian König
Am 11.11.21 um 00:36 schrieb Felix Kuehling: On 2021-11-10 9:31 a.m., Christian König wrote: Am 10.11.21 um 14:59 schrieb philip yang: On 2021-11-10 5:15 a.m., Christian König wrote: [SNIP] It is hard to understand, this debug log can explain more details, with this debug message patch

Re: [RFC 2/2] drm/amd/pm: Add support for reacting to platform profile notification

2021-11-10 Thread Lazar, Lijo
On 11/10/2021 11:01 PM, Limonciello, Mario wrote: [Public] I don't think we want to force the performance level.  This interface forces various fixed clock configurations for debugging and profiling. Ah got it. I think what we'd want to select here is the power profile (see amdgpu_set_p

[PATCH] drm/amdgpu: add error print when failing to add IP block(v2)

2021-11-10 Thread Guchun Chen
Driver initialization is driven by IP version from IP discovery table. So add error print when failing to add ip block during driver initialization, this will be more friendly to user to know which IP version is not correct. [ 40.467361] [drm] host supports REQ_INIT_DATA handshake [ 40.474076]

Re: [PATCH] drm/amdgpu: add error print when failing to add IP block

2021-11-10 Thread Alex Deucher
On Wed, Nov 10, 2021 at 10:21 PM Guchun Chen wrote: > > Driver initialization is driven by IP version from IP > discovery table. So add error print when failing to add > ip block during driver initialization, this will be more > friendly to user to know which IP version is not correct. > > [ 40.

[PATCH] drm/amdgpu: fix set scaling mode Full/Full aspect/Center not works on vga and dvi connectors

2021-11-10 Thread hongao
amdgpu_connector_vga_get_modes missed function amdgpu_get_native_mode which assign amdgpu_encoder->native_mode with *preferred_mode result in amdgpu_encoder->native_mode.clock always be 0. That will cause amdgpu_connector_set_property returned early on: if ((rmx_type != DRM_MODE_SCALE_NONE) &&

[PATCH] drm/amdgpu: add error print when failing to add IP block

2021-11-10 Thread Guchun Chen
Driver initialization is driven by IP version from IP discovery table. So add error print when failing to add ip block during driver initialization, this will be more friendly to user to know which IP version is not correct. [ 40.467361] [drm] host supports REQ_INIT_DATA handshake [ 40.474076]

Re: [PATCH] drm/amdkfd: replace asic_family with asic_type

2021-11-10 Thread Felix Kuehling
On 2021-11-10 6:25 p.m., Graham Sider wrote: asic_family was a duplicate of asic_type, both of type amd_asic_type. Replace all instances of device_info->asic_family with adev->asic_type and remove asic_family from device_info. Signed-off-by: Graham Sider Reviewed-by: Felix Kuehling ---

Re: [PATCH v3 3/3] drm/amdkfd: convert misc checks to IP version checking

2021-11-10 Thread Felix Kuehling
On 2021-11-10 6:07 p.m., Graham Sider wrote: Switch to IP version checking instead of asic_type on various KFD version checks. Reviewed-by: Alex Deucher Signed-off-by: Graham Sider Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/a

Re: [PATCH 1/5] drm/amdgpu: handle IH ring1 overflow

2021-11-10 Thread Felix Kuehling
On 2021-11-10 9:31 a.m., Christian König wrote: Am 10.11.21 um 14:59 schrieb philip yang: On 2021-11-10 5:15 a.m., Christian König wrote: [SNIP] It is hard to understand, this debug log can explain more details, with this debug message patch diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH] drm/amdkfd: replace asic_family with asic_type

2021-11-10 Thread Graham Sider
asic_family was a duplicate of asic_type, both of type amd_asic_type. Replace all instances of device_info->asic_family with adev->asic_type and remove asic_family from device_info. Signed-off-by: Graham Sider --- .../gpu/drm/amd/amdkfd/cik_event_interrupt.c | 2 +- drivers/gpu/drm/amd/amdkfd/

[PATCH v3 3/3] drm/amdkfd: convert misc checks to IP version checking

2021-11-10 Thread Graham Sider
Switch to IP version checking instead of asic_type on various KFD version checks. Reviewed-by: Alex Deucher Signed-off-by: Graham Sider --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c

[pull] amdgpu, amdkfd drm-fixes-5.16

2021-11-10 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.16. The following changes since commit 78469728809b8604dc37ae4e6b12ae12decac5be: drm/amd/display: 3.2.160 (2021-11-03 12:32:34 -0400) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-5.16-2021-11-10 for

Re: [PATCH] drm/amd/pm: Enhanced reporting also for a stuck command

2021-11-10 Thread Alex Deucher
On Wed, Nov 10, 2021 at 4:02 PM Luben Tuikov wrote: > > Also print the message index and parameter of the stuck command. > > Cc: Alex Deucher > Signed-off-by: Luben Tuikov Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 ++-- > 1 file changed, 6 insertions(+), 2

[PATCH] drm/amd/pm: Enhanced reporting also for a stuck command

2021-11-10 Thread Luben Tuikov
Also print the message index and parameter of the stuck command. Cc: Alex Deucher Signed-off-by: Luben Tuikov --- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/s

Re: [PATCH] drm/amd/pm: Enhanced reporting also for a stuck command

2021-11-10 Thread Luben Tuikov
Never mind--the index and param are for the new command we want to submit not the last. Ignore. Regards, Luben On 2021-11-10 15:12, Luben Tuikov wrote: > Also print the message index, parameter and message > type on a stuck command. > > Cc: Alex Deucher > Signed-off-by: Luben Tuikov > --- > d

[PATCH] drm/amd/pm: Enhanced reporting also for a stuck command

2021-11-10 Thread Luben Tuikov
Also print the message index, parameter and message type on a stuck command. Cc: Alex Deucher Signed-off-by: Luben Tuikov --- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/am

Re: [PATCH 2/2] drm/sched: serialize job_timeout and scheduler

2021-11-10 Thread Rob Clark
On Wed, Nov 10, 2021 at 1:50 AM Daniel Vetter wrote: > > On Tue, Nov 09, 2021 at 08:17:01AM -0800, Rob Clark wrote: > > On Tue, Nov 9, 2021 at 1:07 AM Daniel Vetter wrote: > > > > > > On Mon, Nov 08, 2021 at 03:39:17PM -0800, Rob Clark wrote: > > > > I stumbled across this thread when I ran into

Re: [RFC 2/2] drm/amd/pm: Add support for reacting to platform profile notification

2021-11-10 Thread Alex Deucher
On Wed, Nov 10, 2021 at 12:31 PM Limonciello, Mario wrote: > > [Public] > > > > > I don't think we want to force the performance level. This interface > forces various fixed clock configurations for debugging and profiling. > > Ah got it. > > > > >I think what we'd want to select here is the powe

RE: [RFC 2/2] drm/amd/pm: Add support for reacting to platform profile notification

2021-11-10 Thread Limonciello, Mario
[Public] > I don't think we want to force the performance level. This interface forces various fixed clock configurations for debugging and profiling. Ah got it. >I think what we'd want to select here is the power profile (see amdgpu_set_pp_power_profile_mode()). For this interface you can sele

RE: [PATCH v2 3/3] drm/amdkfd: convert misc checks to IP version checking

2021-11-10 Thread Sider, Graham
[AMD Official Use Only] > Am 2021-11-09 um 5:42 p.m. schrieb Graham Sider: > > Switch to IP version checking instead of asic_type on various KFD > > version checks. > > > > Signed-off-by: Graham Sider > > --- > > drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- > > drivers/gpu/drm/amd/amdk

Re: [PATCH] drm/amdgpu: remove unneeded variable

2021-11-10 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Nov 10, 2021 at 12:53 AM wrote: > > From: ran jianping > > Fix the following coccicheck review: > ./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:1174:14-18 > :Unneeded variable > > Remove unneeded variable used to store return value. > > Reported-by: Ze

Re: [PATCH] drm/radeon: correct indentation

2021-11-10 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Nov 10, 2021 at 11:08 AM Xu Wang wrote: > > Correct indentation in radeon_driver_load_kms. > > Signed-off-by: Xu Wang > --- > drivers/gpu/drm/radeon/radeon_kms.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/radeo

Re: [PATCH v2 1/1] drm/amdgpu: Fix MMIO HDP flush on SRIOV

2021-11-10 Thread Felix Kuehling
Am 2021-11-10 um 11:11 a.m. schrieb Lazar, Lijo: > > [Public] > > > >(... && !amdgpu_sriov_vf(adev)) > > This kind of closes the door for all versions. My thought was - having > it in the same function provides a logical grouping for how it's > handled for different cases - VF vs non-VF - for a par

Re: [PATCH v2 1/3] drm/amdkfd: convert KFD_IS_SOC to IP version checking

2021-11-10 Thread Felix Kuehling
Am 2021-11-09 um 5:42 p.m. schrieb Graham Sider: > Defined as GC HWIP >= IP_VERSION(9, 0, 1). > > Also defines KFD_GC_VERSION to return GC HWIP version. > > Signed-off-by: Graham Sider Patches 1 and 2 are Reviewed-by: Felix Kuehling Comments on Patch 3 in a separate mail. Regards,   Felix

Re: [PATCH v2 3/3] drm/amdkfd: convert misc checks to IP version checking

2021-11-10 Thread Felix Kuehling
Am 2021-11-09 um 5:42 p.m. schrieb Graham Sider: > Switch to IP version checking instead of asic_type on various KFD > version checks. > > Signed-off-by: Graham Sider > --- > drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- > drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +- > drivers/

Re: [PATCH v2 1/1] drm/amdgpu: Fix MMIO HDP flush on SRIOV

2021-11-10 Thread Lazar, Lijo
[Public] >(... && !amdgpu_sriov_vf(adev)) This kind of closes the door for all versions. My thought was - having it in the same function provides a logical grouping for how it's handled for different cases - VF vs non-VF - for a particular IP version. Thanks, Lijo _

[PATCH] drm/radeon: correct indentation

2021-11-10 Thread Xu Wang
Correct indentation in radeon_driver_load_kms. Signed-off-by: Xu Wang --- drivers/gpu/drm/radeon/radeon_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 482fb0ae6cb5..7afe28408085 100644 ---

[PATCH] drm/amdgpu: remove unneeded variable

2021-11-10 Thread cgel . zte
From: ran jianping Fix the following coccicheck review: ./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:1174:14-18 :Unneeded variable Remove unneeded variable used to store return value. Reported-by: Zeal Robot Signed-off-by: ran jianping --- drivers/gpu/drm/amd/pm/swsmu/smu11/sien

Re: [RFC 2/2] drm/amd/pm: Add support for reacting to platform profile notification

2021-11-10 Thread Lazar, Lijo
[Public] I feel it's better to leave to platform vendors. For ex: for APU cases they may have implementations in which their BIOSes talk to PMFW and this might be driving something else here. Also, not sure how to handle a case like, say a laptop with Intel CPU and AMD dgpu. Thanks, Lijo ___

Re: [PATCH v2 1/1] drm/amdgpu: Fix MMIO HDP flush on SRIOV

2021-11-10 Thread Felix Kuehling
Am 2021-11-10 um 4:14 a.m. schrieb Lazar, Lijo: > > > On 11/10/2021 8:00 AM, Felix Kuehling wrote: >> Disable HDP register remapping on SRIOV and set rmmio_remap.reg_offset >> to the fixed address of the VF register for hdp_v*_flush_hdp. >> >> Signed-off-by: Felix Kuehling >> --- >>   drivers/gpu/

Re: [PATCH 1/5] drm/amdgpu: handle IH ring1 overflow

2021-11-10 Thread Christian König
Am 10.11.21 um 16:45 schrieb philip yang: On 2021-11-10 9:54 a.m., Christian König wrote: Am 10.11.21 um 15:44 schrieb philip yang: On 2021-11-10 9:31 a.m., Christian König wrote: Am 10.11.21 um 14:59 schrieb philip yang: On 2021-11-10 5:15 a.m., Christian König wrote: [SNIP] It is h

Re: [PATCH 1/5] drm/amdgpu: handle IH ring1 overflow

2021-11-10 Thread philip yang
On 2021-11-10 9:54 a.m., Christian König wrote: Am 10.11.21 um 15:44 schrieb philip yang: On 2021-11-10 9:31 a.m., Christian König wrote: Am 10.11.21 um 14:59 schrieb philip yang:

Re: [PATCH] drm/amdgpu/display: set vblank_disable_immediate for DC

2021-11-10 Thread Harry Wentland
On 2021-11-10 10:26, Alex Deucher wrote: > Disable vblanks immediately to save power. I think this was > missed when we merged DC support. > > Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1781 > Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/am

[PATCH] drm/amdgpu/display: set vblank_disable_immediate for DC

2021-11-10 Thread Alex Deucher
Disable vblanks immediately to save power. I think this was missed when we merged DC support. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1781 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3

Re: [RFC 2/2] drm/amd/pm: Add support for reacting to platform profile notification

2021-11-10 Thread Alex Deucher
On Wed, Nov 10, 2021 at 1:24 AM Mario Limonciello wrote: > > Various drivers provide platform profile support to let users set a hint > in their GUI whether they want to run in a high performance, low battery > life or balanced configuration. > > Drivers that provide this typically work with the f

Re: [PATCH 1/5] drm/amdgpu: handle IH ring1 overflow

2021-11-10 Thread Christian König
Am 10.11.21 um 15:44 schrieb philip yang: On 2021-11-10 9:31 a.m., Christian König wrote: Am 10.11.21 um 14:59 schrieb philip yang: On 2021-11-10 5:15 a.m., Christian König wrote: [SNIP] It is hard to understand, this debug log can explain more details, with this debug message patch d

Re: [PATCH 1/5] drm/amdgpu: handle IH ring1 overflow

2021-11-10 Thread philip yang
On 2021-11-10 9:31 a.m., Christian König wrote: Am 10.11.21 um 14:59 schrieb philip yang: On 2021-11-10 5:15 a.m., Christian König wrote: [SNIP] It is hard to underst

Re: [PATCH 1/5] drm/amdgpu: handle IH ring1 overflow

2021-11-10 Thread Christian König
Am 10.11.21 um 14:59 schrieb philip yang: On 2021-11-10 5:15 a.m., Christian König wrote: [SNIP] It is hard to understand, this debug log can explain more details, with this debug message patch diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c

Re: [PATCH 1/5] drm/amdgpu: handle IH ring1 overflow

2021-11-10 Thread philip yang
On 2021-11-10 5:15 a.m., Christian König wrote: Am 10.11.21 um 00:04 schrieb Philip Yang: IH ring1 is used to process GPU retry fault, overflow is enabled to drain retry fault before unmapping the range, wptr may pass

Re: [PATCH v2 3/3] drm/amdkfd: convert misc checks to IP version checking

2021-11-10 Thread Deucher, Alexander
[AMD Official Use Only] Series is: Reviewed-by: Alex Deucher From: amd-gfx on behalf of Graham Sider Sent: Tuesday, November 9, 2021 5:42 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Kasiviswanathan, Harish ; Sider, Graham Subject: [PATCH v2 3/

Re: [PATCH 2/2] drm/sched: serialize job_timeout and scheduler

2021-11-10 Thread Daniel Vetter
On Wed, Nov 10, 2021 at 11:09:50AM +0100, Christian König wrote: > Am 10.11.21 um 10:50 schrieb Daniel Vetter: > > On Tue, Nov 09, 2021 at 08:17:01AM -0800, Rob Clark wrote: > > > On Tue, Nov 9, 2021 at 1:07 AM Daniel Vetter wrote: > > > > On Mon, Nov 08, 2021 at 03:39:17PM -0800, Rob Clark wrote:

Re: [PATCH 2/2] drm/sched: serialize job_timeout and scheduler

2021-11-10 Thread Andrey Grodzovsky
On 2021-11-10 5:09 a.m., Christian König wrote: Am 10.11.21 um 10:50 schrieb Daniel Vetter: On Tue, Nov 09, 2021 at 08:17:01AM -0800, Rob Clark wrote: On Tue, Nov 9, 2021 at 1:07 AM Daniel Vetter wrote: On Mon, Nov 08, 2021 at 03:39:17PM -0800, Rob Clark wrote: I stumbled across this threa

Re: [PATCH 1/5] drm/amdgpu: handle IH ring1 overflow

2021-11-10 Thread Christian König
Am 10.11.21 um 00:04 schrieb Philip Yang: IH ring1 is used to process GPU retry fault, overflow is enabled to drain retry fault before unmapping the range, wptr may pass rptr, amdgpu_ih_process should check rptr equals to the latest wptr to exit, otherwise it will continue to recover outdatad ret

Re: [PATCH 2/2] drm/sched: serialize job_timeout and scheduler

2021-11-10 Thread Christian König
Am 10.11.21 um 10:50 schrieb Daniel Vetter: On Tue, Nov 09, 2021 at 08:17:01AM -0800, Rob Clark wrote: On Tue, Nov 9, 2021 at 1:07 AM Daniel Vetter wrote: On Mon, Nov 08, 2021 at 03:39:17PM -0800, Rob Clark wrote: I stumbled across this thread when I ran into the same issue, while working out

Re: [PATCH 2/2] drm/sched: serialize job_timeout and scheduler

2021-11-10 Thread Daniel Vetter
On Tue, Nov 09, 2021 at 08:17:01AM -0800, Rob Clark wrote: > On Tue, Nov 9, 2021 at 1:07 AM Daniel Vetter wrote: > > > > On Mon, Nov 08, 2021 at 03:39:17PM -0800, Rob Clark wrote: > > > I stumbled across this thread when I ran into the same issue, while > > > working out how to move drm/msm to use

Re: [PATCH] drm/amd/pm: avoid duplicate powergate/ungate setting

2021-11-10 Thread Lazar, Lijo
On 11/9/2021 2:15 PM, Quan, Evan wrote: [AMD Official Use Only] -Original Message- From: Lazar, Lijo Sent: Tuesday, November 9, 2021 12:15 PM To: Quan, Evan ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Borislav Petkov Subject: Re: [PATCH] drm/amd/pm: avoid duplicate p

Re: [PATCH v2 1/1] drm/amdgpu: Fix MMIO HDP flush on SRIOV

2021-11-10 Thread Lazar, Lijo
On 11/10/2021 8:00 AM, Felix Kuehling wrote: Disable HDP register remapping on SRIOV and set rmmio_remap.reg_offset to the fixed address of the VF register for hdp_v*_flush_hdp. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 4 drivers/gpu/drm/amd/amdgpu/n