Re: [PATCH] gpu: dc: fix enum conversion in display_mode_vba

2022-09-19 Thread Christian König
Am 19.09.22 um 03:41 schrieb Zeng Heng: Fix below compile warning when open enum-conversion option check (compiled with -Wenum-conversion): drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c: In function ‘dml20_ModeSupportAndSystemConfigurationFull’: drivers/gpu/drm/amd/amd

mainline build failure (new) for x86_64 allmodconfig with clang

2022-09-19 Thread Sudip Mukherjee (Codethink)
Hi All, The latest mainline kernel branch fails to build for x86_64 allmodconfig with clang. The errors are: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c:4020:6: error: stack frame size (2184) exceeds limit (2048) in 'dml314_ModeSupportAndSystemConfigurationFull' [

[PATCH] drm/amd/display: refactor CalculateWriteBackDelay to use vba_vars_st ptr

2022-09-19 Thread Tom Rix
Mimimize the function signature by passing a pointer and an index instead of passing several elements of the pointer. The dml2x,dml3x families uses the same algorithm. Remove the duplicates. Use dml20_ and dml30_ prefix to distinguish the two variants. Signed-off-by: Tom Rix --- .../dc/dml/dcn

[PATCH] gpu: dc: fix enum conversion in display_mode_vba

2022-09-19 Thread Zeng Heng
Fix below compile warning when open enum-conversion option check (compiled with -Wenum-conversion): drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c: In function ‘dml20_ModeSupportAndSystemConfigurationFull’: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_v

Re: [PATCH] gpu: dc: fix enum conversion in display_mode_vba

2022-09-19 Thread Wei Yongjun
On 2022/9/19 9:41, Zeng Heng wrote: > Fix below compile warning when open enum-conversion > option check (compiled with -Wenum-conversion): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c: > In function ‘dml20_ModeSupportAndSystemConfigurationFull’: > drivers/gpu/dr

Re: drm/amdgpu: use dirty framebuffer helper

2022-09-19 Thread Arthur Marsh
I have done a delayed load of amdgpu with the 6.0-rc6 kernel using: modprobe amdgpu si_support=1 and saved the dmesg output: [ 455.424263] udevd[414]: specified group 'sgx' unknown [ 455.514818] ACPI: bus type drm_connector registered [ 457.759316] [drm] amdgpu kernel modesetting enabled. [

[REGRESSION] Graphical issues on Lenovo Yoga 7 14ARB7 laptop since v6.0-rc1 (bisected)

2022-09-19 Thread August Wikerfors
Hi, with every kernel version since v6.0-rc1, including the latest git master, there are constant graphical issues on this laptop, such as heavy stuttering (this is especially noticeable while typing on the keyboard), parts of the screen showing random noise, and the entire desktop environment

Re: [PATCH] drm/amdgpu: use dirty framebuffer helper

2022-09-19 Thread root
Hi, I recently experienced lock-ups that only responded to magic sysreq reboots when the amdgpu module was loading on my pc (Athlon II X4 640 CPU, with Radeon R7 250 - Cape Verde). .config has: CONFIG_DRM_AMDGPU=m CONFIG_DRM_AMDGPU_SI=y # CONFIG_DRM_AMDGPU_CIK is not set # CONFIG_DRM_AMDGPU_USER

[PATCH] drm/amd/display: remove redundant CalculateTWait's

2022-09-19 Thread Tom Rix
There are several copies of CalculateTwait. Reduce to one instance and change local variable name to match common usage. Signed-off-by: Tom Rix --- .../dc/dml/dcn20/display_mode_vba_20.c| 16 +++--- .../dc/dml/dcn20/display_mode_vba_20v2.c | 21 ++- .../dc/dm

Re: [PATCH 1/2] drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpeedChangeSupport()

2022-09-19 Thread Tom Rix
On 9/16/22 2:06 PM, Nathan Chancellor wrote: Most of the arguments are identical between the two call sites and they can be accessed through the 'struct vba_vars_st' pointer. This reduces the total amount of stack space that dml314_ModeSupportAndSystemConfigurationFull() uses by 240 bytes with

Re: [PATCH] gpu: color: eliminate implicit conversion about enum type

2022-09-19 Thread Wei Yongjun
gpu: color: fix enum-conversion compile warning 标题我记得不跟你所过让你改的 On 2022/9/19 9:44, Zeng Heng wrote: > Fix below compile warning when open enum-conversion > option check: > > drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c: > In function ‘apply_degamma_for_user_regamma’: > drive

Re: mainline build failure (new) for x86_64 allmodconfig with clang

2022-09-19 Thread Sudip Mukherjee
Hi Nathan, On Sat, Sep 17, 2022 at 2:25 PM Nathan Chancellor wrote: > > Hi Sudip, > > On Sat, Sep 17, 2022 at 11:55:05AM +0100, Sudip Mukherjee (Codethink) wrote: > > Hi All, > > > > The latest mainline kernel branch fails to build for x86_64 allmodconfig > > with clang. The errors are: > > > > d

[PATCH] gpu: color: eliminate implicit conversion about enum type

2022-09-19 Thread Zeng Heng
Fix below compile warning when open enum-conversion option check: drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c: In function ‘apply_degamma_for_user_regamma’: drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c:1695:29: error: implicit conversion from ‘enum ’ to ‘

Re: [PATCH] gpu: dc: fix enum conversion in display_mode_vba

2022-09-19 Thread Zeng Heng
the correct prefix is "drm/amdgpu: " Got it, and I would notice that point at the next letter. 在 2022/9/19 15:44, Christian König 写道: Am 19.09.22 um 03:41 schrieb Zeng Heng: Fix below compile warning when open enum-conversion option check (compiled with -Wenum-conversion): drivers/gpu/dr

[v2] drm/amd: Add IMU fw version to fw version queries

2022-09-19 Thread David Francis
IMU is a new firmware for GFX11. There are four means by which firmware version can be queried from the driver: device attributes, vf2pf, debugfs, and the AMDGPU_INFO_FW_VERSION option in the amdgpu info ioctl. Add IMU as an option for those four methods. V2: Added debugfs CC: Likun Gao Signe

Re: [PATCH V2 4/7] drm/amd/pm: move SMU13.0.0 related pptable settings to smu_v13_0_0_ppt.c

2022-09-19 Thread Alex Deucher
On Sun, Sep 18, 2022 at 10:04 PM Evan Quan wrote: > > Separate those ASIC specific settings from common helpers. > > Signed-off-by: Evan Quan > Change-Id: Ie3224b8719d48c6e6936b738df379959bd1df4ad > --- > drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c| 1 - > .../gpu/drm/amd/pm/swsmu/smu13/s

Re: [PATCH V2 4/7] drm/amd/pm: move SMU13.0.0 related pptable settings to smu_v13_0_0_ppt.c

2022-09-19 Thread Alex Deucher
On Mon, Sep 19, 2022 at 9:48 AM Alex Deucher wrote: > > On Sun, Sep 18, 2022 at 10:04 PM Evan Quan wrote: > > > > Separate those ASIC specific settings from common helpers. > > > > Signed-off-by: Evan Quan > > Change-Id: Ie3224b8719d48c6e6936b738df379959bd1df4ad > > --- > > drivers/gpu/drm/amd/

Re: [PATCH 1/2] drm/amdgpu: fix deadlock caused by overflow

2022-09-19 Thread Andrey Grodzovsky
I don't know if issue still exist but it worth checking with Christian who wrote this patch. Andrey On 2022-09-16 23:31, Zhao, Victor wrote: [AMD Official Use Only - General] Hi Andrey, Yes, moving irq disable can fix the issue. Change in amdgpu_fence_process is just want to make sure driv

Re: [PATCH] drm/amdgpu: getting fan speed pwm for vega10 properly

2022-09-19 Thread Alex Deucher
Applied. Thanks! Alex On Sun, Sep 18, 2022 at 10:06 PM Quan, Evan wrote: > > [AMD Official Use Only - General] > > Reviewed-by: Evan Quan > > > -Original Message- > > From: amd-gfx On Behalf Of > > stalkerg > > Sent: Sunday, September 18, 2022 3:23 PM > > To: amd-gfx@lists.freedesktop

Re: [PATCH] gpu: color: eliminate implicit conversion about enum type

2022-09-19 Thread Alex Deucher
On Mon, Sep 19, 2022 at 3:19 AM Zeng Heng wrote: > > Fix below compile warning when open enum-conversion > option check: > > drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c: > In function ‘apply_degamma_for_user_regamma’: > drivers/gpu/drm/amd/amdgpu/../display/modules/color/colo

Re: [PATCH] gpu: color: eliminate implicit conversion about enum type

2022-09-19 Thread Alex Deucher
Add the relevant AMD developers to comment. On Mon, Sep 19, 2022 at 12:05 PM Alex Deucher wrote: > > On Mon, Sep 19, 2022 at 3:19 AM Zeng Heng wrote: > > > > Fix below compile warning when open enum-conversion > > option check: > > > > drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_ga

Re: [v2] drm/amd: Add IMU fw version to fw version queries

2022-09-19 Thread Alex Deucher
On Mon, Sep 19, 2022 at 9:42 AM David Francis wrote: > > IMU is a new firmware for GFX11. > > There are four means by which firmware version can be queried > from the driver: device attributes, vf2pf, debugfs, > and the AMDGPU_INFO_FW_VERSION option in the amdgpu info ioctl. > > Add IMU as an opti

Re: [PATCH] drm/amdgpu: use dirty framebuffer helper

2022-09-19 Thread Alex Deucher
On Mon, Sep 19, 2022 at 2:44 AM Thomas Zimmermann wrote: > > Hi > > Am 06.09.22 um 21:57 schrieb Hamza Mahfooz: > > Currently, we aren't handling DRM_IOCTL_MODE_DIRTYFB. So, use > > drm_atomic_helper_dirtyfb() as the dirty callback in the amdgpu_fb_funcs > > struct. > > drm_atomic_helper_dirtyfb()

RE: [PATCH] gpu: color: eliminate implicit conversion about enum type

2022-09-19 Thread Kovac, Krunoslav
[AMD Official Use Only - General] > I think the proper fix is to set it to: > build_coefficients(&coeff, TRANSFER_FUNCTION_SRGB); I agree, default arg should be TRANSFER_FUNCTION_SRGB. Even though it's a change in behaviour, previous behaviour was wrong. Ideally it would be based on input TF, but

Re: [PATCH] drm/amdgpu: use dirty framebuffer helper

2022-09-19 Thread Alex Deucher
On Sun, Sep 18, 2022 at 8:09 AM root wrote: > > Hi, I recently experienced lock-ups that only responded to magic sysreq > reboots when the amdgpu module was loading on my pc (Athlon II X4 640 CPU, > with Radeon R7 250 - Cape Verde). > > .config has: > > CONFIG_DRM_AMDGPU=m > CONFIG_DRM_AMDGPU_SI=y

[PATCH] drm/amd/display: fix transfer function passed to build_coefficients()

2022-09-19 Thread Alex Deucher
The default argument should be enum TRANSFER_FUNCTION_SRGB rather than the current boolean value which improperly maps to TRANSFER_FUNCTION_BT709. Commit 9b3d76527f6e ("drm/amd/display: Revert adding degamma coefficients") looks to have improperly reverted commit d02097095916 ("drm/amd/display: Ad

[PATCH v2 1/7] drm/amdgpu: Rename vm invalidate lock to status_lock

2022-09-19 Thread Philip Yang
The vm status_lock will be used to protect all vm status lists. Signed-off-by: Philip Yang Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 30 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 +++- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git

[PATCH v2 6/7] drm/amdgpu: Use vm status_lock to protect pt free

2022-09-19 Thread Philip Yang
Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c index 88de9f0d4728..61a4b7182d44 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm

[PATCH v2 3/7] drm/amdgpu: Use vm status_lock to protect vm idle list

2022-09-19 Thread Philip Yang
Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 4a1cb20deb2d..c3412709e626 100644 --- a/drivers/gpu/drm/amd/amdgpu/am

[PATCH v2 5/7] drm/amdgpu: Use vm status_lock to protect vm evicted list

2022-09-19 Thread Philip Yang
Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 27 +- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 168875115538..b2e96682b9bb 100644 --- a/driv

[PATCH v2 0/7] Fix amdgpu_vm_pt_free warning

2022-09-19 Thread Philip Yang
When SVM range is unmapped from CPU, the mmu notifier callback update GPU page table to unmap the SVM range from GPU, this is the unlocked page table update context as we cannot take vm reservation lock. If unmapping from GPU free pt bo, this cause warning as vm reservation lock is not hold. T

[PATCH v2 4/7] drm/amdgpu: Use vm status_lock to protect vm moved list

2022-09-19 Thread Philip Yang
Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index c3412709e626..168875115538 100644 --- a/drivers/gpu/drm

[PATCH v2 7/7] drm/amdgpu: Fix amdgpu_vm_pt_free warning

2022-09-19 Thread Philip Yang
Free page table BO from vm resv unlocked context generate below warnings. Add a pt_free_work in vm to free page table BO from vm->pt_freed list. pass vm resv unlock status from page table update caller, and add vm_bo entry to vm->pt_freed list and schedule the pt_free_work if calling with vm resv

[PATCH v2 2/7] drm/amdgpu: Use vm status_lock to protect relocated list

2022-09-19 Thread Philip Yang
Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 596f1ea8babc..4a1cb20deb2d 100644 --- a/drivers

[PATCH] drm/amd/display: remove redundant CalculateRemoteSurfaceFlipDelay's

2022-09-19 Thread Tom Rix
There are several copies of CalculateRemoteSurfaceFlipDelay. Reduce to one instance. Signed-off-by: Tom Rix --- .../dc/dml/dcn20/display_mode_vba_20.c| 4 +- .../dc/dml/dcn20/display_mode_vba_20v2.c | 40 +-- .../dc/dml/dcn21/display_mode_vba_21.c| 40 +-

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v4)

2022-09-19 Thread Luben Tuikov
Hi, You can still use "writep" and "readp" in the function name. Make code sustainable for the next programmer in the future. Regards, Luben On 2022-09-15 01:30, Zhu, Jiadong wrote: > [AMD Official Use Only - General] > >> So, between the function names of "amdgpu_ring_get_rptr_from_mux()" and

Re: [PATCH] drm/amd/display: refactor CalculateWriteBackDelay to use vba_vars_st ptr

2022-09-19 Thread Maíra Canal
Hi Tom Nice to see this patch coming to the DML! Some small nits inline. On 9/17/22 15:37, Tom Rix wrote: > Mimimize the function signature by passing a pointer and an index instead > of passing several elements of the pointer. > > The dml2x,dml3x families uses the same algorithm. Remove the du

Re: [PATCH] drm/amd/display: remove redundant CalculateTWait's

2022-09-19 Thread Maíra Canal
Hi Tom, On 9/18/22 23:37, Tom Rix wrote: > There are several copies of CalculateTwait. > Reduce to one instance and change local variable name to match common usage. > > Signed-off-by: Tom Rix Reviewed-by: Maíra Canal Although, it would be nice to put this function on the display_mode_vba.h f

Re: [PATCH] drm/amd/display: remove redundant CalculateRemoteSurfaceFlipDelay's

2022-09-19 Thread Maíra Canal
Hi Tom On 9/19/22 14:27, Tom Rix wrote: > There are several copies of CalculateRemoteSurfaceFlipDelay. > Reduce to one instance. > > Signed-off-by: Tom Rix Reviewed-by: Maíra Canal Just a minor comment below. > --- > .../dc/dml/dcn20/display_mode_vba_20.c| 4 +- > .../dc/dml/dcn20/

Re: [BUG][5.20] refcount_t: underflow; use-after-free

2022-09-19 Thread Mikhail Gavrilov
Hi! Unfortunately the use-after-free issue still happens on the 6.0-rc5 kernel. The issue became hard to repeat. I spent the whole day at the computer when use-after-free again happened, I was playing the game Tiny Tina's Wonderlands. Therefore, forget about repeatability. It remains only to hope f

Re: [PATCH] drm/amdgpu: Introduce gfx software ring(v5)

2022-09-19 Thread Luben Tuikov
Perhaps this patch should be marked with 1/4 and there should be a space in "ring (v5)". Also please run your patches through checkpatch.pl with the following options: "--strict --show-types". Inlined: On 2022-09-15 02:48, jiadong@amd.com wrote: > From: "Jiadong.Zhu" > > The software ring

RE: [PATCH V2 2/7] drm/amd/pm: drop the pptable related workarounds for SMU 13.0.0

2022-09-19 Thread Quan, Evan
[AMD Official Use Only - General] @Deucher, Alexander @Lazar, Lijo Can I have your RB for the first two patches of this series? I know there is some arguments for other patches. As that(missing of the first two patches) is gating the integration of the new IFWIs for SMU13.0.0 ASIC. BR Evan > --

Re: [PATCH 4/4] drm/amdgpu: Implement OS triggered MCBP(v4)

2022-09-19 Thread Luben Tuikov
Inline: On 2022-09-15 04:16, jiadong@amd.com wrote: > From: "Jiadong.Zhu" > > Trigger Mid-Command Buffer Preemption according to the priority of the > software > rings and the hw fence signalling condition. > > The muxer saves the locations of the indirect buffer frames from the software >

[PATCH] drm/amdgpu: Fixed ras warning when uninstalling amdgpu

2022-09-19 Thread YiPeng Chai
For the asic using smu v13_0_2, there is the following warning when uninstalling amdgpu: amdgpu: ras disable gfx failed poison:1 ret:-22. [Why]: For the asic using smu v13_0_2, the psp .suspend and mode1reset is called before amdgpu_ras_pre_fini during amdgpu uninstall, it has disabled a

RE: [v2] drm/amd: Add IMU fw version to fw version queries

2022-09-19 Thread Gao, Likun
[AMD Official Use Only - General] Reviewed-by: Likun Gao . Regards, Likun -Original Message- From: Francis, David Sent: Monday, September 19, 2022 9:42 PM To: amd-gfx@lists.freedesktop.org Cc: Francis, David ; Gao, Likun Subject: [v2] drm/amd: Add IMU fw version to fw version queries

Re: [PATCH v3] drm/sched: Add FIFO sched policy to run queue v3

2022-09-19 Thread Luben Tuikov
Please run this patch through checkpatch.pl, as it shows 12 warnings with it. Use these command line options: "--strict --show-types". Inlined: On 2022-09-13 16:40, Andrey Grodzovsky wrote: > Given many entities competing for same run queue on > the same scheduler and unacceptably long wait time

Re: [PATCH V2 1/7] drm/amd/pm: add support for 3794 pptable for SMU13.0.0

2022-09-19 Thread Lazar, Lijo
On 9/19/2022 7:32 AM, Evan Quan wrote: Enable 3794 pptable support for SMU13.0.0. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Thanks, Lijo Change-Id: Ia208531c9eb96611b6136975bcbd8d27007b9e14 --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 1 + 1 file changed, 1 inse

Re: [PATCH V2 2/7] drm/amd/pm: drop the pptable related workarounds for SMU 13.0.0

2022-09-19 Thread Lazar, Lijo
On 9/19/2022 7:32 AM, Evan Quan wrote: The pptable in the vbios is fully ready. The related workarounds in driver are not needed any more. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Thanks, Lijo Change-Id: I2549cd1acd6eebde361ed8e27d5631bd57644e52 -- v1->v2: - drop unrelated a