[PATCH 0/3] drm/amd/pm/powerplay: use bitwise or for bitmasks addition

2023-01-15 Thread Deepak R Varma
The patch series proposes usage of bitwise or "|" operator for addition of bitmasks instead of using numerial additions. The former is quicker and cleaner. The proposed change is compile tested. Deepak R Varma (3): drm/amd/pm/powerplay/smumgr: use bitwise or for addition drm/amd/pm/powerplay/

[PATCH] drm/amd/display: Simplify same effect if/else blocks

2023-01-15 Thread Deepak R Varma
The if / else block code has same effect irrespective of the logical evaluation. Hence, simply the implementation by removing the unnecessary conditional evaluation. While at it, also fix the long line checkpatch complaint. Issue identified using cond_no_effect.cocci Coccinelle semantic patch scri

[PATCH] drm/amd/display: use swap() helper macro in bios_parser

2023-01-15 Thread Deepak R Varma
Use swap() helper macro instead of open coded swap instructions. The change also facilitates code cleanup and realignment for improved readability. Issue identified using swap.cocci Coccinelle semantic patch script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/display/dc/bios/bios_pars

[PATCH 1/4] drm/amd/display: Use min()/max() macros in dcn_calc_math

2023-01-15 Thread Deepak R Varma
Use the standard min() / max() helper macros instead of direct variable comparison using if/else blocks or ternary operator. Change identified using minmax.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- .../gpu/drm/amd/display/dc/dml/calcs/dcn_calc_math.c | 10 +- 1

[PATCH 3/3] drm/amd/pm/powerplay/smumgr/ci: use bitwise or for bitmasks addition

2023-01-15 Thread Deepak R Varma
For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 2 +- 1 file cha

[PATCH] drm/amd/display: avoid variable reinitialization

2023-01-15 Thread Deepak R Varma
The member variable set_odm_combine is already initialized and hence the reinitialization instruction can be removed. Issue identified using the dubleinit.cocci Coccinelle semantic patch script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 1 - 1 file c

[PATCH] drm/amd/display: Fix warning caused by a bad fake property

2023-01-15 Thread Guilherme G. Piccoli
Commit 5468c36d6285 ("drm/amd/display: Filter Invalid 420 Modes for HDMI TMDS") added a validation on driver probe to prevent invalid TMDS modes. For that, it requires to fake some plane properties before submitting to the validation routines. Happens that one of such fake properties (swizzle) cau

[PATCH 3/4] drm/amd/display: dcn21: Use min()/max() helper macros

2023-01-15 Thread Deepak R Varma
Use the standard min() / max() helper macros instead of direct variable comparison using if/else blocks or ternary operator. Change identified using minmax.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- .../gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 5 + 1

[PATCH 4/4] drm/amd/display: dcn32: Use min()/max() helper macros

2023-01-15 Thread Deepak R Varma
Use the standard min() / max() helper macros instead of direct variable comparison using if/else blocks or ternary operator. Change identified using minmax.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 ++-- 1 file cha

[PATCH 2/3] drm/amd/pm/powerplay/hwmgr: use bitwise or for bitmasks addition

2023-01-15 Thread Deepak R Varma
For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 8 1 fi

[PATCH 0/4] drm/amd/display: Use min()/max() helper macros

2023-01-15 Thread Deepak R Varma
This patch series proposes using standard min() / max() helper macros instead of direct variable comparison using the ternary operator or if/else evaluations. I have tested the change using a dummy module and similar simulations on my x86 machine. Deepak R Varma (4): drm/amd/display: Use min()/m

[PATCH 1/3] drm/amd/pm/powerplay/smumgr: use bitwise or for addition

2023-01-15 Thread Deepak R Varma
For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 2 +- drive

[PATCH 2/4] drm/amd/display: dcn20: Use min()/max() helper macros

2023-01-15 Thread Deepak R Varma
Use the standard min() / max() helper macros instead of direct variable comparison using if/else blocks or ternary operator. Change identified using minmax.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- .../gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 5 + .

Re: [PATCH] drm/amd: Fix renoir/green sardine MP0 IP version detection

2023-01-15 Thread Alex Deucher
On Fri, Jan 13, 2023 at 10:02 PM Mario Limonciello wrote: > > The existing codebase never had a case for detecting MP0 version on > Renoir and instead relied upon hardcoded chip name. This was missed as > part of the changes to migrate all IP blocks to build filenames from > `amdgpu_ucode.c`. > >

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-15 Thread Christian König
Am 14.01.23 um 00:15 schrieb Felix Kuehling: On 2023-01-13 18:00, Chen, Xiaogang wrote: On 1/13/2023 4:26 PM, Felix Kuehling wrote: On 2023-01-12 17:41, Chen, Xiaogang wrote: On 1/11/2023 7:31 PM, Felix Kuehling wrote: Use proper amdgpu_gem_prime_import function to handle all kinds of im

Barco MXRT-5600 branded W5100 with PCI ID 664d

2023-01-15 Thread Matthias Reichl
I noticed some of the used HP Z240 workstations I recently bought had a Barco MXRT-5600 branded FirePro W5100 card installed - some others came with an unbranded W5100 (with the standard 6449 PCI ID). Except for a large Barco sticker on the top and Barco being mentioned on the barcode label on the

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-15 Thread Felix Kuehling
Am 2023-01-15 um 11:43 schrieb Christian König: Am 14.01.23 um 00:15 schrieb Felix Kuehling: On 2023-01-13 18:00, Chen, Xiaogang wrote: On 1/13/2023 4:26 PM, Felix Kuehling wrote: On 2023-01-12 17:41, Chen, Xiaogang wrote: On 1/11/2023 7:31 PM, Felix Kuehling wrote: Use proper amdgpu_gem

[PATCH 2/3] drm/amd: Remove needless break for legacy IP discovery MP0 9.0.0

2023-01-15 Thread Mario Limonciello
There is already a "default" case in the switch block, so there is no need to have a break after the switch block. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/driver

[PATCH 3/3] drm/amd: Evaluate early init for all IP blocks even if one fails

2023-01-15 Thread Mario Limonciello
If early init fails for a single IP block, then no further IP blocks are evaluated. This means that if a user was missing more than one firmware binary they would have to keep adding binaries and re-probing until they discovered the ones missing. To make this easier, run early init for each IP bl

[PATCH 1/3] drm/amd: Adjust legacy IP discovery for Picasso/Raven/Raven2

2023-01-15 Thread Mario Limonciello
The switch/case statement currently combines 10.0.0 and 10.0.1, but 10.0.1 is only used for Raven 2. So split the two cases up to make this clearer. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 12 1 file changed, 4 insertions(+), 8 deletions(-)

RE: [PATCH 1/3] drm/amd: Adjust legacy IP discovery for Picasso/Raven/Raven2

2023-01-15 Thread Liu, Aaron
[AMD Official Use Only - General] Reviewed-by: Aaron Liu > -Original Message- > From: amd-gfx On Behalf Of Mario > Limonciello > Sent: Monday, January 16, 2023 3:22 AM > To: amd-gfx@lists.freedesktop.org > Cc: Limonciello, Mario > Subject: [PATCH 1/3] drm/amd: Adjust legacy IP discover

RE: [PATCH 3/3] drm/amd: Evaluate early init for all IP blocks even if one fails

2023-01-15 Thread Liu, Aaron
[AMD Official Use Only - General] Series is Reviewed-by: Aaron Liu > -Original Message- > From: amd-gfx On Behalf Of Mario > Limonciello > Sent: Monday, January 16, 2023 3:22 AM > To: amd-gfx@lists.freedesktop.org > Cc: Limonciello, Mario > Subject: [PATCH 3/3] drm/amd: Evaluate early

RE: [PATCH 2/2] drm/amdgpu/pm: update hwmon power documentation

2023-01-15 Thread Liu, Aaron
[AMD Official Use Only - General] Reviewed-by: Aaron Liu > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Friday, January 13, 2023 12:25 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH 2/2] drm/amdgpu/pm: update hwmon power docu

RE: [PATCH 0/3] drm/amd/pm/powerplay: use bitwise or for bitmasks addition

2023-01-15 Thread Quan, Evan
[AMD Official Use Only - General] Series is reviewed-by: Evan Quan > -Original Message- > From: Deepak R Varma > Sent: Sunday, January 15, 2023 3:16 PM > To: Quan, Evan ; Deucher, Alexander > ; Koenig, Christian > ; Pan, Xinhui ; David > Airlie ; Daniel Vetter ; amd- > g...@lists.freede

Re: [PATCH 2/2] drm/ttm: Use debugfs_remove_recursive to remove ttm directory

2023-01-15 Thread Ma, Jun
On 1/13/2023 5:38 PM, Christian König wrote: > Am 13.01.23 um 06:34 schrieb Ma Jun: >> Use debugfs_remove_recursive to remove the /sys/kernel/debug/ttm >> directory for better compatibility. Becuase debugfs_remove fails >> on older kernel. > > Again NAK for upstreaming. > > The upstream kernel

Re: [PATCH 1/2] drm/ttm: Check ttm_debugfs_root before creating files under it

2023-01-15 Thread Ma, Jun
On 1/13/2023 5:37 PM, Christian König wrote: > Am 13.01.23 um 06:34 schrieb Ma Jun: >> Check the ttm_debugfs_root before creating files under it. >> If the ttm_debugfs_root is NULL, all the files created for >> ttm/ will be placed in the /sys/kerne/debug/ but not >> /sys/kernel/debug/ttm/ > > W

RE: [PATCH 2/2] drm/amdgpu/pm: update hwmon power documentation

2023-01-15 Thread Quan, Evan
[AMD Official Use Only - General] Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Friday, January 13, 2023 12:25 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH 2/2] drm/amdgpu/pm: update hwmon power > do

RE: [PATCH] drm/amdgpu: fix cleaning up reserved VMID on release

2023-01-15 Thread Li, Candice
[AMD Official Use Only - General] Tested-by: Candice Li Thanks, Candice -Original Message- From: Alex Deucher Sent: Saturday, January 14, 2023 12:48 AM To: Christian König Cc: amd-gfx@lists.freedesktop.org; Li, Candice Subject: Re: [PATCH] drm/amdgpu: fix cleaning up reserved VMID