Re: [PATCH] drm/amd/display: Clean up some inconsistent indenting

2023-03-22 Thread Hamza Mahfooz
On 3/21/23 23:14, Jiapeng Chong wrote: No functional modification involved. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4585 Signed-off-by: Jiapeng Chong Applied, thanks! --- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 4 ++-- 1 file cha

Re: [PATCH resent] drm/amd/display: Fix exception handling in dm_validate_stream_and_context()

2023-03-24 Thread Hamza Mahfooz
Hi Markus, On 3/24/23 11:42, Markus Elfring wrote: Date: Sat, 18 Mar 2023 16:21:32 +0100 The label “cleanup” was used to jump to another pointer check despite of the detail in the implementation of the function “dm_validate_stream_and_context” that it was determined already that corresponding

Re: [PATCH resent] drm/amd/display: Fix exception handling in dm_validate_stream_and_context()

2023-03-24 Thread Hamza Mahfooz
On 3/24/23 14:19, Markus Elfring wrote: May longer identifiers (or even the complete SHA-1 ID) occasionally also be tolerated for the tag “Fixes”? How do you think about the proposed change possibilities? Well, the hash length is restricted by convention (see ./scripts/checkpatch.pl in the k

Re: [PATCH] drm/amd/display: Whitespace cleanup

2023-03-27 Thread Hamza Mahfooz
On 3/27/23 12:07, Uwe Kleine-König wrote: Commit 075e2099c32c ("drm/amd/display: Fix race condition in DPIA AUX transfer") was backported to stable, which I noticed because of git saying linux-6.1/.git/rebase-apply/patch:37154: space before tab in indent. while applying patch-6.1.21. Wh

Re: [PATCH 1/2] drm/amd/display: Remove unused variable 'scl_enable'

2023-03-29 Thread Hamza Mahfooz
On 3/28/23 18:09, Caio Novais wrote: Compiling AMD GPU drivers displays a warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c: In function ‘dml_rq_dlg_get_dlg_params’: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c:991:14: warni

Re: [PATCH 2/2] drm/amd/display: Add previous prototype to 'optc3_wait_drr_doublebuffer_pending_clear'

2023-03-29 Thread Hamza Mahfooz
On 3/28/23 18:09, Caio Novais wrote: Compiling AMD GPU drivers displays a warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:294:6: warning: no previous prototype for ‘optc3_wait_drr_doublebuffer_pending_clear’ [-Wmissing-prototypes] Get rid of it by adding a function prot

Re: [PATCH v2 2/2] drm/amd/display: Mark function 'optc3_wait_drr_doublebuffer_pending_clear' as static

2023-03-29 Thread Hamza Mahfooz
On 3/29/23 14:05, Caio Novais wrote: Compiling AMD GPU drivers displays a warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:294:6: warning: no previous prototype for ‘optc3_wait_drr_doublebuffer_pending_clear’ [-Wmissing-prototypes] Get rid of it by marking the function as

Re: [PATCH V3] drm/amdgpu/display: Enable DC_FP for LoongArch

2023-05-09 Thread Hamza Mahfooz
On 5/7/23 23:09, Huacai Chen wrote: LoongArch now provides kernel_fpu_begin() and kernel_fpu_end() that are used like the x86 counterparts in commit 2b3bd32ea3a22ea2d ("LoongArch: Provide kernel fpu functions"), so we can enable DC_FP on LoongArch for supporting more DCN devices. Signed-off-by:

Re: [PATCH] drm/amd/display: Simplify the calculation of variables

2023-05-12 Thread Hamza Mahfooz
On 5/12/23 03:04, Jiapeng Chong wrote: ./drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c:586:37-39: WARNING !A || A && B is equivalent to !A || B. ./drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c:595:37-39: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Link: h

[PATCH 1/3] drm/amd/display: drop redundant memset() in get_available_dsc_slices()

2023-05-17 Thread Hamza Mahfooz
ot;drm/amd/display: Add DSC support for Navi (v2)") Reported-by: Christophe JAILLET Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c b/drivers/gpu/drm/amd/display/dc/dsc

[PATCH 2/3] drm/amd/display: drop unused function set_abm_event()

2023-05-17 Thread Hamza Mahfooz
set_abm_event() is never actually used. So, drop it. Fixes: b46c01aa0329 ("drm/amd/display: Refactor ABM feature") Reported-by: kernel test robot Reported-by: Tom Rix Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c | 12 drivers/gpu/drm/a

[PATCH 3/3] drm/amd/display: drop unused count variable in create_eml_sink()

2023-05-17 Thread Hamza Mahfooz
ith edid from debugfs") Reported-by: kernel test robot Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd

Re: [PATCH] drm/amd/display: remove unused variables res_create_maximus_funcs and debug_defaults_diags

2023-05-23 Thread Hamza Mahfooz
On 5/23/23 07:49, Tom Rix wrote: gcc with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:1069:43: error: ‘res_create_maximus_funcs’ defined but not used [-Werror=unused-const-variable=] 1069 | static const struct resource_create_funcs res_create_maximus_funcs =

Re: [PATCH] drm/amd/display: avoid calling missing .resync_fifo_dccg_dio()

2023-05-23 Thread Hamza Mahfooz
On 5/23/23 04:34, Arnd Bergmann wrote: From: Arnd Bergmann The .resync_fifo_dccg_dio() callback pointer was added in an #ifdef block, but is called unconditionally: drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:2292:31: error: 'struct hwseq_private_funcs' has no member

Re: [PATCH -next 01/13] drm/amd/display: remove unused definition

2023-05-24 Thread Hamza Mahfooz
On 5/23/23 23:59, Yang Li wrote: Eliminate the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_resource.c:889:43: warning: unused variable 'res_create_maximus_funcs' Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5296 Fixes: 00df97e1df57

Re: [PATCH 1/2] drm/amd/display: clean up some inconsistent indenting

2023-05-24 Thread Hamza Mahfooz
On 5/24/23 04:57, Jiapeng Chong wrote: No functional modification involved. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/dcn314_fpu.c:269 dcn314_update_bw_bounding_box_fpu() warn: inconsistent indenting. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=53

[PATCH] drm/amd/display: enable more strict compile checks

2023-05-24 Thread Hamza Mahfooz
them. So, enable -Werror, -Wunused and -Wmisleading-indentation for all kernel builds. Cc: Alex Deucher Cc: Harry Wentland Cc: Kenny Ho Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/Makefile

[PATCH v2] drm/amd/display: enable more strict compile checks

2023-05-24 Thread Hamza Mahfooz
about them. So, enable -Werror, -Wunused and -Wmisleading-indentation for all kernel builds. Cc: Alex Deucher Cc: Harry Wentland Cc: Kenny Ho Signed-off-by: Hamza Mahfooz --- v2: fix grammatical error --- drivers/gpu/drm/amd/display/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a

Re: [PATCH v2] drm/amd/display: enable more strict compile checks

2023-05-24 Thread Hamza Mahfooz
On 5/24/23 15:22, Alex Deucher wrote: On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz wrote: Currently, there are quite a number of issues that are quite easy for the CI to catch, that slip through the cracks. Among them, there are unused variable and indentation issues. Also, we should

Re: [PATCH v2] drm/amd/display: enable more strict compile checks

2023-05-24 Thread Hamza Mahfooz
On 5/24/23 15:54, Harry Wentland wrote: On 5/24/23 15:27, Hamza Mahfooz wrote: On 5/24/23 15:22, Alex Deucher wrote: On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz wrote: Currently, there are quite a number of issues that are quite easy for the CI to catch, that slip through the cracks

Re: [PATCH v2] drm/amd/display: enable more strict compile checks

2023-05-24 Thread Hamza Mahfooz
ble more strict compile checks On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz wrote: Currently, there are quite a number of issues that are quite easy for the CI to catch, that slip through the cracks. Among them, there are unused variable and indentation issues. Also, we should consider all warning

[PATCH] drm/amd/amdgpu: introduce DRM_AMDGPU_WERROR

2023-05-25 Thread Hamza Mahfooz
the amdgpu kernel module and enable -Wextra while disabling all of the checks that are too noisy. Cc: Alex Deucher Cc: Kenny Ho Suggested-by: Jani Nikula Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/amdgpu/Kconfig | 10 ++ drivers/gpu/drm/amd/amdgpu/Makefile | 9 + 2

[PATCH] drm/amd/display: ensure async flips are only accepted for fast updates

2023-08-04 Thread Hamza Mahfooz
check() to amdgpu_dm_atomic_check() and check if the memory domain has changed in amdgpu_dm_atomic_check(). Cc: sta...@vger.kernel.org Fixes: 3f86b60691e6 ("drm/amd/display: only accept async flips for fast updates") Tested-by: Marcus Seyfarth Signed-off-by: Hamza Mahfooz --- ...

[PATCH v2] drm/amd/display: ensure async flips are only accepted for fast updates

2023-08-04 Thread Hamza Mahfooz
check() to amdgpu_dm_atomic_check() and check if the memory domain has changed in amdgpu_dm_atomic_check(). Cc: sta...@vger.kernel.org Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2733 Fixes: 3f86b60691e6 ("drm/amd/display: only accept async flips for fast updates") Signed-off-by: H

Re: [PATCH] drm/amd/amdgpu: introduce DRM_AMDGPU_WERROR

2023-05-30 Thread Hamza Mahfooz
On 5/25/23 12:38, Hamza Mahfooz wrote: We want to do -Werror builds on our CI. However, non-amdgpu breakages have prevented us from doing so thus far. Also, there are a number of additional checks that we should enable, that the community cares about and are hidden behind -Wextra. So, define

Re: [PATCH] drm/amd/amdgpu: introduce DRM_AMDGPU_WERROR

2023-05-30 Thread Hamza Mahfooz
On 5/30/23 11:50, Ho, Kenny wrote: [Public] On 5/30/23 11:24, Hamza Mahfooz wrote: I am able to get clean builds with this enabled on GCC 11-13 and Clang 15, at least as of commit e786aef0869c ("drm/amd/display: remove unused definition") on amd-staging-drm-next. Did you try int

Re: [PATCH] drm/amd/display: clean up some inconsistent indenting

2023-06-02 Thread Hamza Mahfooz
On 6/2/23 02:17, Jiapeng Chong wrote: No functional modification involved. drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dpms.c:2377 link_set_dpms_on() warn: inconsistent indenting. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5376 Signed-off-by: Jiapen

Re: [PATCH] drm/amd/display: fix compilation error due to shifting negative value

2023-06-02 Thread Hamza Mahfooz
On 6/2/23 06:12, GONG, Ruiqi wrote: Currently compiling linux-next with allmodconfig triggers the following error: ./drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h: In function ‘dc_fixpt_truncate’: ./drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:528:22: error: left shi

Re: PROBLEM: AMD Ryzen 9 7950X iGPU - Blinking Issue

2023-06-05 Thread Hamza Mahfooz
On 6/3/23 10:52, Felix Richter wrote: Hi Guys, sorry for the silence from my side. I had a lot of things to take care of after returning from vacation. Also I had to wait on the zfs modules to be updated to support kernel 6.3 for further testing. The bad news is that I am still experiencin

[PATCH 1/2] drm/amd/display: mark dml31's UseMinimumDCFCLK() as noinline_for_stack

2023-06-05 Thread Hamza Mahfooz
ull(struct display_mode_lib *mode_lib) | ^ 1 error generated. So, since UseMinimumDCFCLK() consumes a lot of stack space, mark it as noinline_for_stack to prevent it from blowing up dml31_ModeSupportAndSystemConfigurationFull()'s stack size. Signed-off-by: Hamza Mahfooz --- driv

[PATCH 2/2] drm/amd/display: mark dml314's UseMinimumDCFCLK() as noinline_for_stack

2023-06-05 Thread Hamza Mahfooz
ull(struct display_mode_lib *mode_lib) | ^ 1 error generated. So, since UseMinimumDCFCLK() consumes a lot of stack space, mark it as noinline_for_stack to prevent it from blowing up dml314_ModeSupportAndSystemConfigurationFull()'s stack size. Signed-off-by: Hamza Mahfooz ---

Re: [PATCH] drm/amdgpu: Wrap -Wunused-but-set-variable in cc-option

2023-06-08 Thread Hamza Mahfooz
On 6/8/23 13:01, Nathan Chancellor wrote: -Wunused-but-set-variable was only supported in clang starting with 13.0.0, so earlier versions will emit a warning, which is turned into a hard error for the kernel to mirror GCC: error: unknown warning option '-Wunused-but-set-variable'; did you mea

Re: [RESEND 11/15] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Move SYNAPTICS_DEVICE_ID into CONFIG_DRM_AMD_DC_DCN ifdef

2023-06-09 Thread Hamza Mahfooz
On 6/9/23 04:17, Lee Jones wrote: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:48:22: warning: ‘SYNAPTICS_DEVICE_ID’ defined but not used [-Wunused-const-variable=] Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira C

[PATCH] drm/amd/amdgpu: enable W=1 for amdgpu

2023-06-09 Thread Hamza Mahfooz
lex Deucher Cc: Nathan Chancellor Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/amdgpu/Makefile | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index 86b833085f19..8d16f280b695 10064

[PATCH] drm/amdgpu: register a dirty framebuffer callback for fbcon

2023-08-15 Thread Hamza Mahfooz
implement amdgpu_dirtyfb() and only enable it for fbcon framebuffers on devices that support atomic KMS. Cc: Aurabindo Pillai Cc: Mario Limonciello Cc: sta...@vger.kernel.org # 6.1+ Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2519 Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/a

[PATCH v2] drm/amdgpu: register a dirty framebuffer callback for fbcon

2023-08-15 Thread Hamza Mahfooz
implement amdgpu_dirtyfb() and only enable it for fbcon framebuffers on devices that support atomic KMS. Cc: Aurabindo Pillai Cc: Mario Limonciello Cc: sta...@vger.kernel.org # 6.1+ Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2519 Signed-off-by: Hamza Mahfooz --- v2: update varia

Re: [PATCH v2] drm/amdgpu: register a dirty framebuffer callback for fbcon

2023-08-16 Thread Hamza Mahfooz
On 8/16/23 01:55, Christian König wrote: Am 15.08.23 um 19:26 schrieb Hamza Mahfooz: fbcon requires that we implement &drm_framebuffer_funcs.dirty. Otherwise, the framebuffer might take a while to flush (which would manifest as noticeable lag). However, we can't enable this callbac

[PATCH] drm/amd/display: fix mode scaling (RMX_.*)

2023-08-18 Thread Hamza Mahfooz
sink") Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 3b27b7742854..e9aff5014e39 100

Re: [PATCH] drm/amd/display: fix mode scaling (RMX_.*)

2023-08-18 Thread Hamza Mahfooz
On 8/18/23 09:28, Alex Deucher wrote: On Fri, Aug 18, 2023 at 9:25 AM Hamza Mahfooz wrote: As made mention of in commit 4a2df0d1f28e ("drm/amd/display: Fixed non-native modes not lighting up"), we shouldn't call drm_mode_set_crtcinfo() once the crtc timings have been decided

[PATCH] drm/amd/display: register edp_backlight_control() for DCN301

2023-08-22 Thread Hamza Mahfooz
dp_backlight_control() function pointer to dce110_edp_backlight_control(). Cc: sta...@vger.kernel.org Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2765 Fixes: 9c75891feef0 ("drm/amd/display: rework recent update PHY state commit") Suggested-by: Swapnil Patel Signed-off-by: Hamza

Re: [PATCH v2] drm/amdgpu: register a dirty framebuffer callback for fbcon

2023-08-23 Thread Hamza Mahfooz
On 8/23/23 16:51, Alex Deucher wrote: @Mahfooz, Hamza can you respin with the NULL check? sure. Alex On Wed, Aug 16, 2023 at 10:25 AM Christian König wrote: Am 16.08.23 um 15:41 schrieb Hamza Mahfooz: On 8/16/23 01:55, Christian König wrote: Am 15.08.23 um 19:26 schrieb Hamza

Re: [PATCH (set 1) 00/20] Rid W=1 warnings from GPU

2023-08-24 Thread Hamza Mahfooz
On 8/24/23 08:07, Lee Jones wrote: On Thu, 24 Aug 2023, Jani Nikula wrote: On Thu, 24 Aug 2023, Lee Jones wrote: This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. The next question is, how

Re: [PATCH] amd/display: only accept async flips for fast updates

2023-07-11 Thread Hamza Mahfooz
On 6/21/23 16:24, André Almeida wrote: From: Simon Ser Up until now, amdgpu was silently degrading to vsync when user-space requested an async flip but the hardware didn't support it. The hardware doesn't support immediate flips when the update changes the FB pitch, the DCC state, the rotation

Re: [PATCH v2 65/86] drm/amdgpu: Run DRM default client setup

2024-08-22 Thread Hamza Mahfooz
lable video memory, with a default of 32. Adapt this for the new client interface. v2: - style changes Signed-off-by: Thomas Zimmermann Cc: Alex Deucher Cc: "Christian König" Cc: Xinhui Pan Tested-by: Hamza Mahfooz Acked-by: Hamza Mahfooz --- drivers/gpu/drm/amd/amdgpu/am

Re: [RESEND 3/3] drm/amd/display: switch to guid_gen() to generate valid GUIDs

2024-08-28 Thread Hamza Mahfooz
On 8/12/24 08:23, Jani Nikula wrote: Instead of just smashing jiffies into a GUID, use guid_gen() to generate RFC 4122 compliant GUIDs. Signed-off-by: Jani Nikula --- Acked-by: Hamza Mahfooz I would prefer to take this series through the amdgpu tree though, assuming nobody minds. Side

Re: [RESEND 3/3] drm/amd/display: switch to guid_gen() to generate valid GUIDs

2024-08-28 Thread Hamza Mahfooz
On 8/28/24 10:06, Jani Nikula wrote: On Wed, 28 Aug 2024, Hamza Mahfooz wrote: On 8/12/24 08:23, Jani Nikula wrote: Instead of just smashing jiffies into a GUID, use guid_gen() to generate RFC 4122 compliant GUIDs. Signed-off-by: Jani Nikula --- Acked-by: Hamza Mahfooz I would prefer

Re: [PATCH 3/3] drm/amdgpu: drop redundant W=1 warnings from Makefile

2024-09-03 Thread Hamza Mahfooz
On 5/23/24 09:37, Jani Nikula wrote: Since commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default across the subsystem"), most of the extra warnings in the driver Makefile are redundant. Remove them. Note that -Wmissing-declarations and -Wmissing-prototypes are always enabled by defaul

[PATCH] drm/amdgpu: enable -Wformat-truncation

2024-09-03 Thread Hamza Mahfooz
It is enabled by W=1 and amdgpu has a clean build with it enabled. So, to make sure we block future instances of it from showing up on our driver, enable it by default for the module. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/amdgpu/Makefile | 1 + 1 file changed, 1 insertion

[PATCH v3] drm/edid: add CTA Video Format Data Block support

2024-09-06 Thread Hamza Mahfooz
e OVT Algorithm, to extract all of the missing OVT modes. Suggested-by: Karol Herbst Signed-off-by: Hamza Mahfooz --- v3: move ovt stuff above add_cea_modes() and break up calculate_ovt_mode() to make it easier to read. --- drivers/gpu/drm/drm_edid.c | 443 +++

[PATCH] Revert "Revert "drm/amd/display: Implement zpos property""

2023-08-29 Thread Hamza Mahfooz
Link: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/cb77add45011b129e21f3cb2a4089a73dde56179 Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_

[PATCH] Revert "drm/amd/display: Remove v_startup workaround for dcn3+"

2023-08-29 Thread Hamza Mahfooz
...@vger.kernel.org Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2809 Signed-off-by: Hamza Mahfooz --- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 24 --- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c b

[PATCH v2 1/2] Revert "drm/amd/display: Remove v_startup workaround for dcn3+"

2023-08-31 Thread Hamza Mahfooz
Signed-off-by: Hamza Mahfooz --- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 24 --- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c index 0989a0152ae8

[PATCH v2 2/2] drm/amd/display: limit the v_startup workaround for ASICs older than DCN3.1

2023-08-31 Thread Hamza Mahfooz
igned-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c index 1bfdf0271fdf..a68fb45ed487 1

[PATCH] drm/amd/display: prevent potential division by zero errors

2023-09-05 Thread Hamza Mahfooz
Fixes: a463b263032f ("drm/amd/display: Fix frames_to_insert math") Fixes: ded6119e825a ("drm/amd/display: Reinstate LFC optimization") Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 9 ++--- 1 file changed, 6 insertions(+), 3 d

[PATCH v2 1/2] drm/amd/display: fix the white screen issue when >= 64GB DRAM

2023-09-08 Thread Hamza Mahfooz
upper_32_bits()/lower_32_bits() and AMDGPU_GPU_PAGE_SHIFT. Cc: sta...@vger.kernel.org Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2354 Fixes: 81d0bcf99009 ("drm/amdgpu: make display pinning more flexible (v2)") Signed-off-by: Yifan Zhang Signed-off-by: Hamza Mahfooz --- v2: use upp

[PATCH v2 2/2] Revert "drm/amd: Disable S/G for APUs when 64GB or more host memory"

2023-09-08 Thread Hamza Mahfooz
This reverts commit 5b7a256c982636ebc4f16b708b40ff56d33c8a86. Since, we now have an actual fix for this issue, we can get rid of this workaround as it can cause pin failures if enough VRAM isn't carved out by the BIOS. Cc: sta...@vger.kernel.org # 6.1+ Signed-off-by: Hamza Mahfooz --- v2

Re: [PATCH] drm/amd/display: clean up some inconsistent indenting

2023-09-11 Thread Hamza Mahfooz
On 9/8/23 03:54, Jiapeng Chong wrote: No functional modification involved. drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dpms.c:2476 link_set_dpms_on() warn: if statement not indented. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6502 Signed-off-by: Jia

Re: [PATCH] drm/amd/display: fix replay_mode kernel-doc warning

2023-09-11 Thread Hamza Mahfooz
On 9/10/23 19:44, Randy Dunlap wrote: Fix the typo in the kernel-doc for @replay_mode to prevent kernel-doc warnings: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:623: warning: Incorrect use of kernel-doc format: * @replay mode: Replay supported drivers/gpu/drm/amd/display/amdgpu_

Re: [PATCH v3 0/2] Merge all debug module parameters

2023-09-11 Thread Hamza Mahfooz
On 9/11/23 09:54, André Almeida wrote: Christian, Alex, I think this series is ready to be picked as well. Can you rebase this onto amd-staging-drm-next (https://gitlab.freedesktop.org/agd5f/linux)? Since it currently doesn't apply there. Em 31/08/2023 12:29, André Almeida escreveu: As su

Re: [PATCH v4 0/2] Merge all debug module parameters

2023-09-11 Thread Hamza Mahfooz
On 9/11/23 13:12, André Almeida wrote: As suggested by Christian at [0], this patchset merges all debug modules parameters and creates a new one for disabling soft recovery: Maybe we can overload the amdgpu_gpu_recovery module option with this. Or even better merge all the developer module para

Re: [PATCH] drm/amd/display: Fix -Wuninitialized in dm_helpers_dp_mst_send_payload_allocation()

2023-09-13 Thread Hamza Mahfooz
ctor the flow for payload allocation/removement") Signed-off-by: Nathan Chancellor Reviewed-by: Hamza Mahfooz Hm, seems like this was pushed through drm-misc-next and as such our CI didn't get a chance to test it. --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 ++

Re: [PATCH] drm/amd/display: Fix -Wuninitialized in dm_helpers_dp_mst_send_payload_allocation()

2023-09-13 Thread Hamza Mahfooz
On 9/13/23 12:10, Nathan Chancellor wrote: When building with clang, there is a warning (or error when CONFIG_WERROR is set): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:368:21: error: variable 'old_payload' is uninitialized when used here [-Werror,-Wuninitialized]

Re: [PATCH] drm/amd/display: Fix -Wuninitialized in dm_helpers_dp_mst_send_payload_allocation()

2023-09-13 Thread Hamza Mahfooz
On 9/13/23 15:54, Alex Deucher wrote: On Wed, Sep 13, 2023 at 12:17 PM Hamza Mahfooz wrote: On 9/13/23 12:10, Nathan Chancellor wrote: When building with clang, there is a warning (or error when CONFIG_WERROR is set): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm

Re: [PATCH] drm/amd/display: Fix -Wuninitialized in dm_helpers_dp_mst_send_payload_allocation()

2023-09-13 Thread Hamza Mahfooz
On 9/13/23 16:03, Alex Deucher wrote: On Wed, Sep 13, 2023 at 3:57 PM Hamza Mahfooz wrote: On 9/13/23 15:54, Alex Deucher wrote: On Wed, Sep 13, 2023 at 12:17 PM Hamza Mahfooz wrote: On 9/13/23 12:10, Nathan Chancellor wrote: When building with clang, there is a warning (or error when

[PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Hamza Mahfooz
connector_state to stream validation") Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/

Re: [PATCH 01/12] kbuild: make -Woverride-init warnings more consistent

2024-03-26 Thread Hamza Mahfooz
rs. Fixes: 2cd3271b7a31 ("kbuild: avoid duplicate warning options") Signed-off-by: Arnd Bergmann Acked-by: Hamza Mahfooz For the amdgpu changes. --- drivers/gpu/drm/amd/display/dc/dce110/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dce112/Makefile | 2 +- drivers/gpu/drm/a

Re: [PATCH RESEND v2 1/2] drm/print: Add drm_dbg_ratelimited

2023-10-10 Thread Hamza Mahfooz
On 10/10/23 08:15, Andi Shyti wrote: From: Nirmoy Das Add a function for ratelimitted debug print. Signed-off-by: Nirmoy Das Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Matthew Auld Reviewed-by: Andrzej Hajda Reviewed-by

[PATCH] drm/edid: add 8 bpc quirk to the BenQ GW2765

2023-10-12 Thread Hamza Mahfooz
The BenQ GW2765 reports that it supports higher (> 8) bpc modes, but when trying to set them we end up with a black screen. So, limit it to 8 bpc modes. Cc: sta...@vger.kernel.org # 6.5+ Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2610 Signed-off-by: Hamza Mahfooz --- drivers/gpu/

Re: [PATCH] drm/edid: add 8 bpc quirk to the BenQ GW2765

2023-10-13 Thread Hamza Mahfooz
On 10/13/23 06:30, Ville Syrjälä wrote: On Thu, Oct 12, 2023 at 02:49:27PM -0400, Hamza Mahfooz wrote: The BenQ GW2765 reports that it supports higher (> 8) bpc modes, but when trying to set them we end up with a black screen. So, limit it to 8 bpc modes. Bad cable/etc was ruled out as

Re: [PATCH] drm/amd/display: Respect CONFIG_FRAME_WARN=0 in DML2

2023-10-18 Thread Hamza Mahfooz
On 10/18/23 14:45, Nathan Chancellor wrote: display_mode_code.c is unconditionally built with -Wframe-larger-than=2048, which causes warnings even when CONFIG_FRAME_WARN has been set to 0, which should show no warnings. Use the existing $(frame_warn_flag) variable, which handles this situation.

Re: [PATCH v3] drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()

2023-10-24 Thread Hamza Mahfooz
On 10/15/23 10:27, Geert Uytterhoeven wrote: Currently drm_client_buffer_addfb() uses the legacy drm_mode_addfb(), which uses bpp and depth to guess the wanted buffer format. However, drm_client_buffer_addfb() already knows the exact buffer format, so there is no need to convert back and forth be

Re: [PATCH] drm/atomic: Spelling fix in comments

2023-10-25 Thread Hamza Mahfooz
Hi Kunwu, Can you make the tagline something along the lines of `drm/atomic helper: fix spelling mistake "preceeding" -> "preceding"`, in general to determine an appropriate prefix, you can see what previous commits used when making changes to files in your particular patch, e.g. using the follow

Re: [PATCH v2] drm/atomic-helper: Fix spelling mistake "preceeding" -> "preceding"

2023-10-27 Thread Hamza Mahfooz
On 10/26/23 22:44, chentao wrote: From: Kunwu Chan There is a typo in the kernel documentation for function drm_atomic_helper_wait_for_dependencies. Fix it. Signed-off-by: Kunwu Chan Applied, thanks! --- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 d

Re: [PATCH] drm/amdgpu: Fixes uninitialized variable usage in amdgpu_dm_setup_replay

2023-10-27 Thread Hamza Mahfooz
On 10/26/23 17:25, Yuran Pereira wrote: Since `pr_config` is not initialized after its declaration, the following operations with `replay_enable_option` may be performed when `replay_enable_option` is holding junk values which could possibly lead to undefined behaviour ``` ... pr_confi

Re: [PATCH] drm/amdgpu: Fixes uninitialized variable usage in amdgpu_dm_setup_replay

2023-10-27 Thread Hamza Mahfooz
Also, please write the tagline in present tense. On 10/27/23 11:53, Hamza Mahfooz wrote: On 10/26/23 17:25, Yuran Pereira wrote: Since `pr_config` is not initialized after its declaration, the following operations with `replay_enable_option` may be performed when `replay_enable_option` is

Re: [PATCH] drm/amdgpu: Fixes uninitialized variable usage in amdgpu_dm_setup_replay

2023-10-27 Thread Hamza Mahfooz
On 10/27/23 11:55, Lakha, Bhawanpreet wrote: [AMD Official Use Only - General] There was a consensus to use memset instead of {0}. I remember making changes related to that previously. Hm, seems like it's used rather consistently in the DM and in DC though. Bhawan --

[PATCH] MAINTAINERS: add an entry for AMD DC DML

2024-07-03 Thread Hamza Mahfooz
We want all DML changes to be reviewed by Chaitanya or Jun. So, add an entry for DML to MAINTAINERS. Suggested-by: Rodrigo Siqueira Signed-off-by: Hamza Mahfooz --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7fec8ddb8d5b..d2fb60fee7e8

[PATCH 2/2] drm/amd/display: use drm_crtc_set_vblank_offdelay()

2024-07-08 Thread Hamza Mahfooz
Hook up drm_crtc_set_vblank_offdelay() in amdgpu_dm, so that we can enable PSR more quickly for displays that support it. Signed-off-by: Hamza Mahfooz --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 30 ++- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a

[PATCH 1/2] drm/vblank: allow dynamic per-crtc vblank off delay

2024-07-08 Thread Hamza Mahfooz
: Hamza Mahfooz --- drivers/gpu/drm/drm_vblank.c | 31 ++- include/drm/drm_vblank.h | 7 +++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 702a12bc93bd..4f475131a092 100644 --- a

Re: [PATCH 2/2] drm/amd/display: use drm_crtc_set_vblank_offdelay()

2024-07-09 Thread Hamza Mahfooz
On 7/9/24 06:09, Daniel Vetter wrote: On Tue, Jul 09, 2024 at 11:32:11AM +0200, Daniel Vetter wrote: On Mon, Jul 08, 2024 at 04:29:07PM -0400, Hamza Mahfooz wrote: Hook up drm_crtc_set_vblank_offdelay() in amdgpu_dm, so that we can enable PSR more quickly for displays that support it. Signed

Re: [PATCH v4 0/2] Add support for 'power saving policy' property

2024-07-10 Thread Hamza Mahfooz
On 7/3/24 01:17, Mario Limonciello wrote: During the Display Next hackfest 2024 one of the topics discussed was the need for compositor to be able to relay intention to drivers that color fidelity is preferred over power savings. To accomplish this a new optional DRM property is being introduced

Re: [PATCH 2/2] drm/amd/display: use drm_crtc_set_vblank_offdelay()

2024-07-10 Thread Hamza Mahfooz
On 7/10/24 04:43, Daniel Vetter wrote: On Tue, Jul 09, 2024 at 10:02:08AM -0400, Hamza Mahfooz wrote: On 7/9/24 06:09, Daniel Vetter wrote: On Tue, Jul 09, 2024 at 11:32:11AM +0200, Daniel Vetter wrote: On Mon, Jul 08, 2024 at 04:29:07PM -0400, Hamza Mahfooz wrote: Hook up

Re: [PATCH AUTOSEL 6.9 11/22] drm/amd/display: Reset freesync config before update new state

2024-07-16 Thread Hamza Mahfooz
Hi Sasha, On 7/16/24 10:24, Sasha Levin wrote: From: Tom Chung [ Upstream commit 6b8487cdf9fc7bae707519ac5b5daeca18d1e85b ] [Why] Sometimes the new_crtc_state->vrr_infopacket did not sync up with the current state. It will affect the update_freesync_state_on_stream() does not update the state

[PATCH 1/2] drm/vblank: add dynamic per-crtc vblank configuration support

2024-07-25 Thread Hamza Mahfooz
for a given CRTC. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/drm_vblank.c | 57 ++-- include/drm/drm_vblank.h | 25 2 files changed, 66 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vbl

[PATCH 2/2] drm/amd/display: use drm_crtc_vblank_on_config()

2024-07-25 Thread Hamza Mahfooz
This also allows us to mimic how vblanking is handled by the windows amdgpu driver. Signed-off-by: Hamza Mahfooz --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 49 +-- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH] drm/edid: add CTA Video Format Data Block support

2024-07-30 Thread Hamza Mahfooz
e OVT Algorithm, to extract all of the missing OVT modes. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1442 Suggested-by: Karol Herbst Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/drm_edid.c | 426 include/drm/drm_connector.h | 12 + 2 files ch

Re: [PATCH] drm/edid: add CTA Video Format Data Block support

2024-07-31 Thread Hamza Mahfooz
On 7/31/24 04:36, Jani Nikula wrote: On Tue, 30 Jul 2024, Hamza Mahfooz wrote: Video Format Data Blocks (VFDBs) contain the necessary information that needs to be fed to the Optimized Video Timings (OVT) Algorithm. Also, we require OVT support to cover modes that aren't supported by ea

[PATCH v2] drm/edid: add CTA Video Format Data Block support

2024-07-31 Thread Hamza Mahfooz
e OVT Algorithm, to extract all of the missing OVT modes. Suggested-by: Karol Herbst Signed-off-by: Hamza Mahfooz --- v2: address comments from Jani --- drivers/gpu/drm/drm_edid.c | 456 ++--- 1 file changed, 428 insertions(+), 28 deletions(-) diff --git a/driver

[PATCH 1/2] Revert "drm: Introduce 'power saving policy' drm property"

2024-08-02 Thread Hamza Mahfooz
This reverts commit 76299a557f36d624ca32500173ad7856e1ad93c0. It was merged without meeting userspace requirements. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/drm_connector.c | 48 - include/drm/drm_connector.h | 2 -- include/drm/drm_mode_config.h

[PATCH 2/2] Revert "drm/amd: Add power_saving_policy drm property to eDP connectors"

2024-08-02 Thread Hamza Mahfooz
This reverts commit 9d8c094ddab05db88d183ba82e23be807848cad8. It was merged without meeting userspace requirements. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 -- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 52 ++- .../gpu/drm/amd

Re: [REGRESSION] Brightness at max level after waking up from sleep on AMD Laptop

2024-08-02 Thread Hamza Mahfooz
set to max level, ignoring previous value. With the help of Arch Linux team, we was able to track bad commit to this: https://gitlab.freedesktop.org/agd5f/linux/-/commit/63d0b87213a0ba241b3fcfba3fe7b0aed0cd1cc5 Hamza Mahfooz, in case you missed it, that is a patch of yours: 63d0b87213a0ba (&quo

Re: [PATCH v2] drm/edid: add CTA Video Format Data Block support

2024-08-02 Thread Hamza Mahfooz
On 8/1/24 03:35, Jani Nikula wrote: On Wed, 31 Jul 2024, Hamza Mahfooz wrote: Video Format Data Blocks (VFDBs) contain the necessary information that needs to be fed to the Optimized Video Timings (OVT) Algorithm. Also, we require OVT support to cover modes that aren't supported by ea

Re: [PATCH v2] drm/edid: add CTA Video Format Data Block support

2024-08-12 Thread Hamza Mahfooz
Ping? On 8/2/24 11:53, Hamza Mahfooz wrote: On 8/1/24 03:35, Jani Nikula wrote: On Wed, 31 Jul 2024, Hamza Mahfooz wrote: Video Format Data Blocks (VFDBs) contain the necessary information that needs to be fed to the Optimized Video Timings (OVT) Algorithm. Also, we require OVT support to

Re: [PATCH v2] kerneldoc: Fix two missing newlines in drm_connector.c

2024-08-12 Thread Hamza Mahfooz
On 8/8/24 23:23, Daniel Yang wrote: Fix the unexpected indentation errors. drm_connector.c has some kerneldoc comments that were missing newlines. This results in the following warnings when running make htmldocs: ./Documentation/gpu/drm-kms:538: ./drivers/gpu/drm/drm_connector.c:2344: WARNING:

Re: [PATCH v6 2/4] drm/rect: Add drm_rect_overlap()

2024-08-12 Thread Hamza Mahfooz
On 8/12/24 09:49, Jani Nikula wrote: On Mon, 12 Aug 2024, Jocelyn Falempe wrote: Check if two rectangles overlap. It's a bit similar to drm_rect_intersect() but this won't modify the rectangle. Simplifies a bit drm_panic. Based on the name, I'd expect drm_rect_overlap() to return true for *an

Re: [PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Hamza Mahfooz
On 9/14/23 16:40, Harry Wentland wrote: On 2023-09-14 13:53, Hamza Mahfooz wrote: On eDP we can receive invalid modes from dm_update_crtc_state() for entirely new streams for which drm_mode_set_crtcinfo() shouldn't be called on. So, instead of calling drm_mode_set_crtcinfo() from w

Re: [PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Hamza Mahfooz
On 9/14/23 17:04, Hamza Mahfooz wrote: On 9/14/23 16:40, Harry Wentland wrote: On 2023-09-14 13:53, Hamza Mahfooz wrote: On eDP we can receive invalid modes from dm_update_crtc_state() for entirely new streams for which drm_mode_set_crtcinfo() shouldn't be called on. So, instead of ca

[PATCH] Revert "drm/amd/display: Check all enabled planes in dm_check_crtc_cursor"

2023-09-29 Thread Hamza Mahfooz
From: Ivan Lipski This reverts commit 45e1ade04b4d60fe5df859076005779f27c4c9be. Since, it causes the following IGT tests to fail: kms_cursor_legacy@cursor-vs-flip.* kms_cursor_legacy@flip-vs-cursor.* Signed-off-by: Ivan Lipski Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display

Re: [PATCH 1/5] drm/amd/display: Remove migrate_en/dis from dc_fpu_begin().

2023-10-04 Thread Hamza Mahfooz
On 10/3/23 15:53, Harry Wentland wrote: On 2023-09-21 10:15, Sebastian Andrzej Siewior wrote: This is a revert of the commit mentioned below while it is not wrong, as in the kernel will explode, having migrate_disable() here it is complete waste of resources. Additionally commit message is plai

Re: [PATCH 0/5] drm/amd/display: Remove migrate-disable and move memory allocation.

2023-10-04 Thread Hamza Mahfooz
On 9/21/23 10:15, Sebastian Andrzej Siewior wrote: Hi, I stumbled uppon the amdgpu driver via a bugzilla report. The actual fix is #4 + #5 and the rest was made while looking at the code. Sebastian I have applied the series, thanks! -- Hamza

<    1   2   3   >