[PATCH] fbcon: garbage collect fbdev scrolling acceleration

2021-07-08 Thread Hamza Mahfooz
As per commit 39aead8373b3 ("fbcon: Disable accelerated scrolling"), we can now remove all of the code that was made redundant by disabling scrolling acceleration. Signed-off-by: Hamza Mahfooz --- drivers/video/fbdev/core/bitblit.c | 16 - drivers/video/fbdev/core/fbcon.c

Re: [PATCH] fbcon: garbage collect fbdev scrolling acceleration

2021-07-09 Thread Hamza Mahfooz
On Fri, Jul 9 2021 at 09:49:02 AM +0200, Geert Uytterhoeven wrote: Bummer, more code to revert to re-enable acceleration in the _56_ fbdev drivers using acceleration (some of them unusable without), despite commit 39aead8373b3 claiming "No other driver supportes accelerated fbcon"... Should t

[PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port

2022-08-05 Thread Hamza Mahfooz
Currently, there is no way to identify if DSC pass-through can be enabled and what aux DSC pass-through requests ought to be sent to. So, add a variable to struct drm_dp_mst_port that keeps track of the aforementioned information. Signed-off-by: Hamza Mahfooz --- v2: define

[PATCH v2 2/3] drm/amd/display: consider DSC pass-through during mode validation

2022-08-05 Thread Hamza Mahfooz
the end to end link bandwidth constraint, and check if the maximum DSC decompression bandwidth can fit. Co-authored-by: Fangzhi Zuo Signed-off-by: Hamza Mahfooz --- v2: use multi-line comments, use a temp variable in kbps_from_pbn() and add a debug print statement in

[PATCH v2 3/3] drm/amd/display: implement DSC pass-through support

2022-08-05 Thread Hamza Mahfooz
support into the DSC enable sequence. Signed-off-by: Hamza Mahfooz --- v2: print the correct type of port that we are writing to using dsc_aux in dm_helpers_dp_write_dsc_enable(). --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 45 +-- 1 file changed, 41 insertions(+), 4

[PATCH] drm/amd/display: include soc._clock_tmp[] into DC's scratch region

2022-08-08 Thread Hamza Mahfooz
sons, we should get rid of soc._clock_tmp[] by defining a struct scratch within struct dc that, contains within it all of the temporary varibles (including _clock_tmp[]) such that it is obvious how they are intended to be used. Co-authored-by: Leo Li Signed-off-by: Hamza Mahfooz --- drivers/gpu/

Re: [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port

2022-08-09 Thread Hamza Mahfooz
Hey Lyude, On 2022-08-05 17:17, Lyude Paul wrote: lgtm! Any chance you can apply this to drm-misc-next? Reviewed-by: Lyude Paul On Fri, 2022-08-05 at 17:13 -0400, Hamza Mahfooz wrote: Currently, there is no way to identify if DSC pass-through can be enabled and what aux DSC pass-through

Re: [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port

2022-08-10 Thread Hamza Mahfooz
whole series through there? If you'd rather just merge this through amd's branch I'm fine with that as well In that case, it is preferable to have all of the patches in this series to get merged through amd's branch. On Tue, 2022-08-09 at 11:15 -0400, Hamza Mahfooz wrote:

[PATCH] drm/amd/display: fix DSC related non-x86/PPC64 compilation issue

2022-08-11 Thread Hamza Mahfooz
amdgpu.ko] undefined! Fixes: 0087990a9f57 ("drm/amd/display: consider DSC pass-through during mode validation") Reported-by: Anders Roxell Signed-off-by: Hamza Mahfooz --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c| 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)

[PATCH v2] drm/amd/display: fix DSC related non-x86/PPC64 compilation issue

2022-08-11 Thread Hamza Mahfooz
amdgpu.ko] undefined! Fixes: 0087990a9f57 ("drm/amd/display: consider DSC pass-through during mode validation") Reported-by: Anders Roxell Signed-off-by: Hamza Mahfooz --- v2: Fix WERROR build failure by guarding unused variables --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

[PATCH] drm/amd/display: fix i386 frame size warning

2022-08-18 Thread Hamza Mahfooz
rationFull(struct display_mode_lib *mode_lib) ^ UseMinimumDCFCLK() is eating away at dml30_ModeSupportAndSystemConfigurationFull()'s stack space, so use a pointer to struct vba_vars_st instead of passing lots of large arrays as parameters by value. Signed-off-by: Hamza Mahfooz --- .

[PATCH] drm/amd/display: fix indentation in commit_planes_for_stream()

2022-08-31 Thread Hamza Mahfooz
: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 3510 | if (update_type != UPDATE_TYPE_FAST) | ^~ Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/core/dc.c | 8 1 file changed, 4

[PATCH v2] drm/amd/display: fix indentation in commit_planes_for_stream()

2022-09-01 Thread Hamza Mahfooz
: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 3510 | if (update_type != UPDATE_TYPE_FAST) | ^~ Signed-off-by: Hamza Mahfooz --- v2: implement feedback from Alvin --- drivers/gpu/drm/amd/display/dc/core/dc.c

[PATCH] drm/amdgpu: use dirty framebuffer helper

2022-09-06 Thread 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. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/dr

[PATCH] drm/bridge: it6505: use drm_debug_enabled() in it6505_debug_print()

2022-09-10 Thread Hamza Mahfooz
As made mention of in commit 9f0ac028410f ("drm/print: rename drm_debug to __drm_debug to discourage use"), we shouldn't explicitly refer to __drm_debug in this context. So, use drm_debug_enabled() instead. Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Sig

[PATCH 1/3] drm/amd/display: fix HDCP drm prop update for MST

2022-09-23 Thread Hamza Mahfooz
ENABLED. So, to ensure that all of the connectors switch from DESIRED to ENABLED keep track of each connector's status in an array instead of only keeping track of the status of the most recent connector that userspace has interacted with. Signed-off-by: Hamza Mahfooz --- .../amd/display/amdg

[PATCH 3/3] drm/amd/display: fix a crash caused by hot plugging on certain MST hubs

2022-09-23 Thread Hamza Mahfooz
Currently we aren't considering the mode_changed property of struct drm_crtc_state, which can mean that we might not update the display when it is otherwise necessary, and cause a crash. So, consider mode_changed in is_content_protection_different(). Signed-off-by: Hamza Mahfooz --- driver

[PATCH 2/3] drm/amd/display: save and restore a connector's HDCP properties

2022-09-23 Thread Hamza Mahfooz
display is plugged back in with the same display index, restore its HDCP properties from hdcp_work in dm_dp_mst_get_modes(). Signed-off-by: Hamza Mahfooz --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 56 +-- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.h| 13 + .../display

[PATCH] drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()

2022-09-27 Thread Hamza Mahfooz
encing ‘writeback_info’ 241 | struct dc_writeback_info writeback_info[MAX_DWB_PIPES]; | Currently, we aren't checking to see if j remains within writeback_info[]'s bounds. So, add a check to make sure that we aren't overflowing the buffer. Signed-off-by: Hamza Mahfooz

Re: [PATCH] drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()

2022-09-29 Thread Hamza Mahfooz
  241 | struct dc_writeback_info writeback_info[MAX_DWB_PIPES];   | Currently, we aren't checking to see if j remains within writeback_info[]'s bounds. So, add a check to make sure that we aren't overflowing the buffer. Signed-off-by: Hamza Mahfooz ---  drivers/gpu/drm/amd/display/dc/co

Re: [PATCH] drm/amd/display: Fix mutex lock in dcn10

2022-09-30 Thread Hamza Mahfooz
Applied. Thanks! On 2022-09-25 17:53, Daniel Gomez wrote: Removal of DC_FP_* wrappers from dml (9696679bf7ac) provokes a mutex lock [2] on the amdgpu driver. Re-arrange the dcn10 code to avoid locking the mutex by placing the DC_FP_* wrappers around the proper functions. This fixes the followin

[PATCH] drm/i915/display: replace boilerplate code with helper macros

2021-06-28 Thread Hamza Mahfooz
per macros. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/i915/display/intel_display.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 64e9107d70f7..e8cb2881d

[PATCH v2] drm/i915/display: replace boilerplate code with helper macros

2021-06-28 Thread Hamza Mahfooz
per macros. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/i915/display/intel_display.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 64e9107d70f7..e8cb2881d

Re: [PATCH] drm/amdgpu/display/mst: fix an unused-variable warning

2023-01-26 Thread Hamza Mahfooz
On 1/26/23 11:35, Arnd Bergmann wrote: From: Arnd Bergmann The newly added code is in an #ifdef, so the variables that are only used in there cause a warning if CONFIG_DRM_AMD_DC_DCN is disabled: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_check'

Re: [PATCH] Revert "drm/display/dp_mst: Move all payload info into the atomic state"

2023-01-27 Thread Hamza Mahfooz
Hey Greg, On 1/27/23 02:39, Greg KH wrote: On Fri, Jan 20, 2023 at 11:51:04AM -0600, Limonciello, Mario wrote: On 1/20/2023 11:46, Guenter Roeck wrote: On Thu, Jan 12, 2023 at 04:50:44PM +0800, Wayne Lin wrote: This reverts commit 4d07b0bc403403438d9cf88450506240c5faf92f. [Why] Changes cause

[PATCH] drm/amd/display: fix read errors pertaining to dp_lttpr_status_show()

2023-02-03 Thread Hamza Mahfooz
provided to us by DC. Signed-off-by: Hamza Mahfooz --- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 72 ++- 1 file changed, 22 insertions(+), 50 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH] drm/amd/display: don't call dc_interrupt_set() for disabled crtcs

2023-02-08 Thread Hamza Mahfooz
nable/disable_vblank hooks") Fixes: d2574c33bb71 ("drm/amd/display: In VRR mode, do DRM core vblank handling at end of vblank. (v2)") Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/dr

[PATCH] drm/amd/display: only warn once in dce110_edp_wait_for_hpd_ready()

2023-02-14 Thread Hamza Mahfooz
Since, hot plugging eDP displays isn't supported, it is sufficient for us to warn about the lack of a connected display once. So, use ASSERT() in dce110_edp_wait_for_hpd_ready() instead of DC_LOG_WARNING(). Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/d

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

2023-03-03 Thread Hamza Mahfooz
On 1/15/23 05:00, Deepak R Varma wrote: 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_e

[PATCH] drm/amd/display: fix possible buffer overflow relating to secure display

2023-01-11 Thread Hamza Mahfooz
tiple secure display") Fixes: 65a2fbe75cd5 ("drm/amd/display: Fix when disabling secure_display") Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 8 +--- 2 files changed, 6

[PATCH] drm/amd/display: fix issues with driver unload

2023-01-17 Thread Hamza Mahfooz
alled from amdgpu_dm_encoder_destroy(). Also, we don't need to free in amdgpu_dm_encoder_destroy() since mst_encoders[] isn't explicitly allocated by the slab allocater. Fixes: f74367e492ba ("drm/amdgpu/display: create fake mst encoders ahead of time (v4)") Signed-off-by: Hamza

[PATCH] drm/amd/display: use a more appropriate return value in dp_retrieve_lttpr_cap()

2023-01-20 Thread Hamza Mahfooz
Not all ASICs support LTTPR, however if they don't it doesn't mean that we have encountered unexpected behaviour. So, use DC_NOT_SUPPORTED instead of DC_ERROR_UNEXPECTED. Reviewed-by: Wenjing Liu Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/link/link_dp_capabi

Re: linux-next: build failure after merge of the drm tree

2022-10-05 Thread Hamza Mahfooz
On 2022-10-05 11:30, Alex Deucher wrote: @Mahfooz, Hamza @Aurabindo Pillai can you get this fixed up? Seems like this is a false positive for GCC versions pre-12, because I'm not seeing this warning on GCC 12.2. However, we can fix this for older GCC versions with the following: diff --git

Re: linux-next: build failure after merge of the drm tree

2022-10-06 Thread Hamza Mahfooz
On 2022-10-06 04:12, Stephen Rothwell wrote: Hi all, On Thu, 6 Oct 2022 09:28:10 +1100 Stephen Rothwell wrote: I have applied the following hack for today: From: Stephen Rothwell Date: Thu, 6 Oct 2022 09:14:26 +1100 Subject: [PATCH] fix up for drivers/gpu/drm/amd/display/dc/core/dc_stream.

Re: mainline build failure due to 5d8c3e836fc2 ("drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()")

2022-10-06 Thread Hamza Mahfooz
Hey Linus, On 2022-10-06 15:39, Linus Torvalds wrote: On Thu, Oct 6, 2022 at 1:51 AM Sudip Mukherjee (Codethink) wrote: This is only seen with gcc-11, gcc-12 builds are ok. Hmm. This seems to be some odd gcc issue. I *think* that what is going on is that the test j = 0 ; j < MAX_

[PATCH] drm/amd/display: add a WARN() to irq service functions

2022-10-14 Thread Hamza Mahfooz
() and dal_irq_service_set() that only triggers when we encounter an unimplemented function. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/irq

[PATCH] drm/framebuffer: break out of loop, if the requested element is found

2022-10-16 Thread Hamza Mahfooz
We can stop searching through the linked-list after we have found the element we are looking for. So, break out of list_for_each_entry() after we have found the element we are looking for in drm_mode_rmfb(). Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/drm_framebuffer.c | 5 - 1 file

Re: [PATCH] drm/amd/display: add a WARN() to irq service functions

2022-10-17 Thread Hamza Mahfooz
On 2022-10-17 09:06, Rodrigo Siqueira wrote: Hi Hamza, On 10/14/22 11:31, Hamza Mahfooz wrote: Currently, if we encounter unimplemented functions, it is difficult to tell what caused them just by looking at dmesg and that is compounded by the fact that it is often hard to reproduce said issues

[PATCH v2] drm/amd/display: add an ASSERT() to irq service functions

2022-10-17 Thread Hamza Mahfooz
display that is setup in mirror mode and is connected using usb-c. So, to have access to more detailed debugging information, add an ASSERT() to dal_irq_service_ack() and dal_irq_service_set() that only triggers when we encounter an unimplemented function. Signed-off-by: Hamza Mahfooz --- v2: detail

[PATCH v3] drm/amd/display: add an ASSERT() to irq service functions

2022-10-17 Thread Hamza Mahfooz
display that is setup in mirror mode and is connected using usb-c. So, to have access to more detailed debugging information, add an ASSERT() to dal_irq_service_ack() and dal_irq_service_set() that only triggers when we encounter an unimplemented function. Signed-off-by: Hamza Mahfooz --- v2: detail

[PATCH] drm/amd/display: don't print messages that contain %f in dml

2022-10-21 Thread Hamza Mahfooz
oblematic print statements at compile time. Reported-by: Jim Cromie Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/include/logger_types.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/include/logger_types.h b/drivers/gpu/drm/amd/

[PATCH 1/3] drm/edid: add a quirk for two LG monitors to get them to work on 10bpc

2022-10-24 Thread Hamza Mahfooz
The LG 27GP950 and LG 27GN950 have visible display corruption when trying to use 10bpc modes. So, to fix this, cap their maximum DSC target bitrate to 15bpp. Suggested-by: Roman Li Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/drm_edid.c | 12 include/drm/drm_connector.h | 6

[PATCH 2/3] drm/amd/display: use max_dsc_bpp in amdgpu_dm

2022-10-24 Thread Hamza Mahfooz
Since, the quirk is handled in the DRM core now, we can use that value instead of the internal value. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 11 +-- 2 files changed, 11

[PATCH 3/3] Revert "drm/amd/display: Limit max DSC target bpp for specific monitors"

2022-10-24 Thread Hamza Mahfooz
This reverts commit 55eea8ef98641f6e1e1c202bd3a49a57c1dd4059. This quirk is now handled in the DRM core, so we can drop all of the internal code that was added to handle it. Signed-off-by: Hamza Mahfooz --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 35 --- 1 file changed

[PATCH] drm/amd/display: add FB_DAMAGE_CLIPS support

2022-11-15 Thread Hamza Mahfooz
Currently, userspace doesn't have a way to communicate selective updates to displays. So, enable support for FB_DAMAGE_CLIPS for DCN ASICs newer than DCN301, convert DRM damage clips to dc dirty rectangles and fill them into dirty_rects in fill_dc_dirty_rects(). Signed-off-by: Hamza Ma

Re: [PATCH] drm/amd/display: add FB_DAMAGE_CLIPS support

2022-11-18 Thread Hamza Mahfooz
Hey Leo, On 11/17/22 12:31, Leo Li wrote: On 11/15/22 15:24, Hamza Mahfooz wrote: Currently, userspace doesn't have a way to communicate selective updates to displays. So, enable support for FB_DAMAGE_CLIPS for DCN ASICs newer than DCN301, convert DRM damage clips to dc dirty rectangle

[PATCH v2] drm/amd/display: add FB_DAMAGE_CLIPS support

2022-11-18 Thread Hamza Mahfooz
Currently, userspace doesn't have a way to communicate selective updates to displays. So, enable support for FB_DAMAGE_CLIPS for DCN ASICs newer than DCN301, convert DRM damage clips to dc dirty rectangles and fill them into dirty_rects in fill_dc_dirty_rects(). Signed-off-by: Hamza Ma

[PATCH] drm/amd/display: fix PSR-SU/DSC interoperability support

2022-11-25 Thread Hamza Mahfooz
. Signed-off-by: Hamza Mahfooz --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 38 +++ 1 file changed, 38 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c index 26291db0a3cf..55acadf0b63f

[PATCH] drm/amd/display: drop vblank_lock from struct amdgpu_display_manager

2022-10-28 Thread Hamza Mahfooz
As of commit 09a5df6c444c ("drm/amd/display: Fix multi-display support for idle opt workqueue"), vblank_lock is no longer being used. So, don't init it in amdgpu_dm_init() and remove it from struct amdgpu_display_manager. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/di

[PATCH] drm/amd/display: only fill dirty rectangles when PSR is enabled

2022-11-09 Thread Hamza Mahfooz
Currently, we are calling fill_dc_dirty_rects() even if PSR isn't supported by the relevant link in amdgpu_dm_commit_planes(). So, we can instead limit the filling of dirty rectangles to only when PSR is enabled. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu

[PATCH v2] drm/amd/display: only fill dirty rectangles when PSR is enabled

2022-11-09 Thread Hamza Mahfooz
using otherwise). So, we can instead limit the filling of dirty rectangles to only when PSR is enabled. Signed-off-by: Hamza Mahfooz --- v2: give a more concrete reason. --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --

Re: [PATCH] drm/amd/display: Fix spelling mistake: "dram_clk_chanage" -> "dram_clk_change"

2022-12-08 Thread Hamza Mahfooz
On 12/8/22 07:18, Colin Ian King wrote: There is a spelling mistake in the struct field dram_clk_chanage. Fix it. Signed-off-by: Colin Ian King Applied. Thanks! --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 8 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_seque

Re: [PATCH] drm: amd: display: fix dc/core/dc.c kernel-doc

2022-12-30 Thread Hamza Mahfooz
in 'dc_enable_dmub_outbox' dc.c:4926: warning: Function parameter or member 'dc' not described in 'dc_process_dmub_dpia_hpd_int_enable' dc.c:4926: warning: Function parameter or member 'hpd_int_enable' not described in 'dc_process_dmub_dpia_hpd_int_e

Re: [PATCH] drm/amd/display: fix array-bounds errors in dc_stream_remove_writeback()

2023-01-04 Thread Hamza Mahfooz
fer. Fixes: 6fbefb84a98e ("drm/amd/display: Add DC core changes for DCN2") Signed-off-by: Wen Yang Cc: Aurabindo Pillai Cc: Hamza Mahfooz Cc: Guenter Roeck Cc: Alex Deucher Cc: Harry Wentland  Cc: Leo Li  Cc: amd-...@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-k

[PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Hamza Mahfooz
. Signed-off-by: Hamza Mahfooz --- v2: move code to modules/power. --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 3 ++ .../amd/display/modules/power/power_helpers.c | 35 +++ .../amd/display/modules/power/power_helpers.h | 3 ++ 3 files changed, 41 insertions(+) diff --git a

Re: [PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Hamza Mahfooz
On 1/5/23 13:29, Harry Wentland wrote: On 1/5/23 12:38, Hamza Mahfooz wrote: Currently, there are issues with enabling PSR-SU + DSC. This stems from the fact that DSC imposes a slice height on transmitted video data and we are not conforming to that slice height in PSR-SU regions. So, pass

[PATCH v3] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Hamza Mahfooz
. Signed-off-by: Hamza Mahfooz --- v2: move code to modules/power. v3: use ASSERT() instead of WARN() and add a condition that clarifies that PSR-SU + DSC can only be enabled on an eDP connection. --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 3 ++ .../amd/display/modules/power

[PATCH v4] drm/amd/display: fix PSR-SU/DSC interoperability support

2023-01-05 Thread Hamza Mahfooz
. Signed-off-by: Hamza Mahfooz --- v2: move code to modules/power. v3: use ASSERT() instead of WARN() and add a condition that clarifies that PSR-SU + DSC can only be enabled on an eDP connection. v4: change the logic again to allow non-eDP links to pass the first filter in

Re: [PATCH] drm/amd/display: fix flickering caused by S/G mode

2023-04-17 Thread Hamza Mahfooz
On 4/17/23 01:59, Christian König wrote: Am 14.04.23 um 21:33 schrieb Hamza Mahfooz: Currently, we allow the framebuffer for a given plane to move between memory domains, however when that happens it causes the screen to flicker, it is even possible for the framebuffer to change memory

Re: [PATCH] drm/amd/display: set variable dccg314_init storage-class-specifier to static

2023-04-17 Thread Hamza Mahfooz
On 4/15/23 11:17, Tom Rix wrote: smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: warning: symbol 'dccg314_init' was not declared. Should it be static? This variable is only used in one file so should be static. Signed-off-by: Tom Rix Applied, thanks!

Re: [PATCH] drm/amd/display: fix flickering caused by S/G mode

2023-04-17 Thread Hamza Mahfooz
On 4/17/23 11:03, Christian König wrote: Am 17.04.23 um 16:51 schrieb Hamza Mahfooz: On 4/17/23 01:59, Christian König wrote: Am 14.04.23 um 21:33 schrieb Hamza Mahfooz: Currently, we allow the framebuffer for a given plane to move between memory domains, however when that happens it

Re: [PATCH] drm/amd/display: fix flickering caused by S/G mode

2023-04-17 Thread Hamza Mahfooz
caused by S/G mode On 4/17/23 11:03, Christian König wrote: Am 17.04.23 um 16:51 schrieb Hamza Mahfooz: On 4/17/23 01:59, Christian König wrote: Am 14.04.23 um 21:33 schrieb Hamza Mahfooz: Currently, we allow the framebuffer for a given plane to move between memory domains, however when that

[PATCH v2] drm/amd/display: fix flickering caused by S/G mode

2023-04-17 Thread Hamza Mahfooz
't perform an immediate flip in the aforementioned case. 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: Hamza Mahfooz --- v2: make a number of cla

Re: [PATCH 1/2] drm/amd/display: mark dccg314_init() static

2023-04-17 Thread Hamza Mahfooz
On 4/17/23 17:05, Arnd Bergmann wrote: From: Arnd Bergmann The newly introduced global function is not declared in a header or called from another file, causing a harmless warning with sparse or W=1 builds: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: error: no previ

Re: [PATCH 2/2] drm/amd/display: fix missing=prototypes warnings

2023-04-17 Thread Hamza Mahfooz
On 4/17/23 17:05, Arnd Bergmann wrote: From: Arnd Bergmann Three functions in the amdgpu display driver cause -Wmissing-prototype warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1858:6: error: no previous prototype for 'is_timing_changed' [-Werror=missing-prototypes] dri

Re: [PATCH] [v2] drm/amd/display: fix is_timing_changed() prototype

2023-04-18 Thread Hamza Mahfooz
On 4/17/23 18:07, Arnd Bergmann wrote: From: Arnd Bergmann Three functions in the amdgpu display driver cause -Wmissing-prototype warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1858:6: error: no previous prototype for 'is_timing_changed' [-Werror=missing-prototypes] is

[PATCH v3] drm/amd/display: fix flickering caused by S/G mode

2023-04-20 Thread Hamza Mahfooz
't perform an immediate flip in the aforementioned case. 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: Hamza Mahfooz --- v2: make a number of cla

Re: [PATCH] drm/amd/display: remove unused variables otg_inst and cmd

2023-04-20 Thread Hamza Mahfooz
On 4/19/23 22:04, Tom Rix wrote: gcc reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c: In function ‘dcn21_set_backlight_level’: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:229:18: error: unused variable ‘otg_inst’ [-Werror=unused-variable] 229 |

Re: [PATCH 3/3] drm/amd/display: remove unused variables in dcn21_set_backlight_level

2023-04-20 Thread Hamza Mahfooz
On 4/20/23 04:47, Arnd Bergmann wrote: From: Arnd Bergmann The only references to these variables were removed, so they now cause warnings and have to be removed as well: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:226:20: error: unused variable 'cmd' [-Werror,-Wunused-vari

Re: [PATCH 2/3] drm/amd/display: dumb_abm_lcd: avoid missing-prototype warnings

2023-04-20 Thread Hamza Mahfooz
On 4/20/23 04:47, Arnd Bergmann wrote: From: Arnd Bergmann The dmub_abm_set_ambient_level() function has no caller and can just be removed, the other ones have a declaration in the header file and just need to see the prototype: drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm_lcd.c:122:1

Re: [PATCH] drm/amd/display: remove unused variables dispclk_delay_subtotal and dout

2023-04-24 Thread Hamza Mahfooz
On 4/20/23 14:07, Tom Rix wrote: clang with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c:1003:15: error: variable 'dispclk_delay_subtotal' set but not used [-Werror,-Wunused-but-set-variable] unsigned int dispclk_delay_subtotal;

Re: [PATCH] drm/amd/display: return status of abm_feature_support

2023-04-24 Thread Hamza Mahfooz
On 4/20/23 09:21, Tom Rix wrote: gcc with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm.c: In function ‘dmub_abm_set_event_ex’: drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_abm.c:138:22: error: variable ‘feature_support’ set but not used [-Werror=unused-but-set-va

Re: [PATCH] drm/amd/display: return status of dmub_srv_get_fw_boot_status

2023-04-24 Thread Hamza Mahfooz
On 4/20/23 09:59, Tom Rix wrote: gcc with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c: In function ‘dc_dmub_srv_optimized_init_done’: drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:184:26: error: variable ‘dmub’ set but not used [-Werror=unused-but-set-varia

Re: [PATCH] drm/amd/display: Fix a test CalculatePrefetchSchedule()

2023-04-24 Thread Hamza Mahfooz
On 4/17/23 17:35, Christophe JAILLET wrote: It is likely Height was expected here, instead of Width. Test the correct variable. Fixes: 17529ea2acfa ("drm/amd/display: Optimizations for DML math") Signed-off-by: Christophe JAILLET Applied, thanks! --- drivers/gpu/drm/amd/display/dc/dml/dc

Re: [PATCH] drm/amd/display: Fix a test dml32_rq_dlg_get_rq_reg()

2023-04-24 Thread Hamza Mahfooz
On 4/17/23 17:41, Christophe JAILLET wrote: It is likely p1_min_meta_chunk_bytes was expected here, instead of min_meta_chunk_bytes. Test the correct variable. Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321") Signed-off-by: Christophe JAILLET Applied, thanks! --- .../gp

Re: [PATCH] drm/amd/display: set variable custom_backlight_curve0 storage-class-specifier to static

2023-04-26 Thread Hamza Mahfooz
On 4/26/23 07:18, Tom Rix wrote: smatch reports drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.c:119:31: warning: symbol 'custom_backlight_curve0' was not declared. Should it be static? This variable is only used in its defining file, so it should be static Signed-off-by:

Re: [PATCH] drm/amd/display: Correctly initialize some memory in get_available_dsc_slices()

2023-04-26 Thread Hamza Mahfooz
On 4/25/23 03:53, Christophe JAILLET wrote: The intent here is to clear the 'available_slices' buffer before setting some values in it. This is an array of int, so in order to fully initialize it, we must clear MIN_AVAILABLE_SLICES_SIZE * sizeof(int) bytes. Compute the right length of the buffe

Re: [PATCH] drm/amd/display: return status of dmub_srv_get_fw_boot_status

2023-04-26 Thread Hamza Mahfooz
On 4/20/23 09:59, Tom Rix wrote: gcc with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c: In function ‘dc_dmub_srv_optimized_init_done’: drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:184:26: error: variable ‘dmub’ set but not used [-Werror=unused-but-set-variabl

Re: [PATCH next] drm/amd/display: Fix possible NULL dereference in dc_dmub_srv_cmd_run_list()

2023-04-26 Thread Hamza Mahfooz
On 4/26/23 15:24, Harshit Mogalapalli wrote: We have a NULL check for 'dc_dmub_srv' in dc_dmub_srv_cmd_run_list() but we are dereferencing it before checking. Fix this moving the dereference next to NULL check. This issue is found with Smatch(static analysis tool). Fixes: e97cc04fe0fb ("drm/am

Re: [PATCH] drm/amd/display: mark amdgpu_dm_connector_funcs_force static

2023-05-02 Thread Hamza Mahfooz
On 5/1/23 10:31, Arnd Bergmann wrote: From: Arnd Bergmann A global function without a header prototype has made it into linux-next during the merge window: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6339:6: error: no previous prototype for 'amdgpu_dm_connector_funcs_force' [

[PATCH] drm/amdgpu: fix an amdgpu_irq_put() issue in gmc_v9_0_hw_fini()

2023-05-02 Thread Hamza Mahfooz
rom gmc_v9_0_hw_fini(). Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2522 Fixes: 3029c855d79f ("drm/amdgpu: Fix desktop freezed after gpu-reset") Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gp

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

2023-05-05 Thread Hamza Mahfooz
Hey Huacai, On 5/5/23 07:32, Huacai Chen wrote: Now LoongArch provides kernel_fpu_begin() and kernel_fpu_end() in commit 2b3bd32ea3a22ea2d ("LoongArch: Provide kernel fpu functions"), so we can enable DC_FP for DCN devices. Have you had the chance to test how well this is working on actual h

Re: [PATCH] drm/amd/display: remove unused average_render_time_in_us and i variables

2023-03-31 Thread Hamza Mahfooz
On 3/30/23 20:10, Tom Rix wrote: clang with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.c:1132:15: error: variable 'average_render_time_in_us' set but not used [-Werror,-Wunused-but-set-variable] unsigned int average_render_time_in_us = 0;

Re: [PATCH] drm/amd/display: Fix potential null dereference

2023-04-05 Thread Hamza Mahfooz
On 4/3/23 09:10, Igor Artemiev wrote: The adev->dm.dc pointer can be NULL and dereferenced in amdgpu_dm_fini() without checking. Add a NULL pointer check before calling dc_dmub_srv_destroy(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 9a71c7d31734 ("drm/amd/displa

Re: [PATCH] drm/amd/display: remove unused matching_stream_ptrs variable

2023-04-10 Thread Hamza Mahfooz
On 3/25/23 09:45, Tom Rix wrote: clang with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_enc_cfg.c:625:6: error: variable 'matching_stream_ptrs' set but not used [-Werror,-Wunused-but-set-variable] int matching_stream_ptrs = 0; ^ This variable is not

Re: [PATCH] drm/amd/display: set variable dcn3_14_soc storage-class-specifier to static

2023-04-10 Thread Hamza Mahfooz
On 4/6/23 14:44, Tom Rix wrote: smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/dcn314_fpu.c:100:37: warning: symbol 'dcn3_14_soc' was not declared. Should it be static? This variable is only used in one file so should be static. Signed-off-by: Tom Rix Applied, thanks!

Re: [PATCH] drm/amd/display: set variables aperture_default_system and context0_default_system storage-class-specifier to static

2023-04-10 Thread Hamza Mahfooz
On 4/6/23 15:58, Tom Rix wrote: smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hubp.c:758:10: warning: symbol 'aperture_default_system' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hubp.c:759:10: warning: symbol 'context0

Re: [PATCH] drm/amd/display: set variables dml*_funcs storage-class-specifier to static

2023-04-10 Thread Hamza Mahfooz
On 4/8/23 09:43, Tom Rix wrote: smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:44:24: warning: symbol 'dml20_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:51:24: warning: symbol 'dml20v2_funcs'

Re: [PATCH v2 1/2] drm: Spelling s/sempahore/semaphore/

2023-04-11 Thread Hamza Mahfooz
On 4/11/23 06:52, Geert Uytterhoeven wrote: Fix misspellings of "semaphore". Signed-off-by: Geert Uytterhoeven Series is Reviewed-by: Hamza Mahfooz --- drivers/gpu/drm/i915/i915_request.c | 2 +- drivers/gpu/drm/radeon/cik.c| 2 +- drivers/gpu/drm/radeon/r600.c

[PATCH] drm/amd/display: fix flickering caused by S/G mode

2023-04-14 Thread Hamza Mahfooz
x27;t perform an immediate flip in the aforementioned case. Cc: sta...@vger.kernel.org Fixes: 81d0bcf99009 ("drm/amdgpu: make display pinning more flexible (v2)") Signed-off-by: Hamza Mahfooz --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 41 ++- 1 file changed, 39 i

Re: [PATCH 1/2] drm/vc4: Fix build error with undefined label

2023-03-08 Thread Hamza Mahfooz
+ vc4 maintainers On 3/8/23 04:34, Qingqing Zhuo wrote: [Why] drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’: drivers/gpu/drm/vc4/vc4_hdmi.c:3448:17: error: label ‘err_disable_runtime_pm’ used but not defined [How] update err_disable_runtime_pm to err_put_runtime_pm. Signed-off-b

Re: [PATCH 1/2] drm/vc4: Fix build error with undefined label

2023-03-08 Thread Hamza Mahfooz
On 3/8/23 11:39, Alex Deucher wrote: On Wed, Mar 8, 2023 at 11:32 AM Maxime Ripard wrote: On Wed, Mar 08, 2023 at 04:27:01PM +, Zhuo, Qingqing (Lillian) wrote: [AMD Official Use Only - General] Hi, On Wed, Mar 08, 2023 at 11:11:22AM -0500, Hamza Mahfooz wrote: + vc4 maintainers

Re: [PATCH] drm/amd/display: Use swap() instead of open coding it

2023-03-09 Thread Hamza Mahfooz
On 3/8/23 21:52, Jiapeng Chong wrote: Swap is a function interface that provides exchange function. To avoid code duplication, we can use swap function. ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:359:57-58: WARNING opportunity for swap(). Reported-by: Abaci Robot Link: https://bugzil

[PATCH] drm/amd/display: use a more accurate check in dm_helpers_dp_read_dpcd()

2023-03-09 Thread Hamza Mahfooz
drm_dp_dpcd_read() to size and WARN_ON() if they aren't equal. Signed-off-by: Hamza Mahfooz --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/dr

[PATCH v2] drm/amd/display: use a more accurate check in dm_helpers_dp_read_dpcd()

2023-03-10 Thread Hamza Mahfooz
We should be checking if drm_dp_dpcd_read() returns the size that we are asking it to read instead of just checking if it is greater than zero. So, compare the return value of drm_dp_dpcd_read() to the requested read size. Signed-off-by: Hamza Mahfooz --- v2: drop the WARN_ON(). --- drivers/gpu

Re: [PATCH] drm/amd/display: Write to correct dirty_rect

2023-03-13 Thread Hamza Mahfooz
On 3/12/23 20:47, Benjamin Cheng wrote: When FB_DAMAGE_CLIPS are provided in a non-MPO scenario, the loop does not use the counter i. This causes the fill_dc_dity_rect() to always fill dirty_rects[0], causing graphical artifacts when a damage clip aware DRM client sends more than 1 damage clip.

Re: [PATCH 1/2] drm/amd/display: make is_synaptics_cascaded_panamera static

2023-03-16 Thread Hamza Mahfooz
On 3/16/23 05:51, Jiapeng Chong wrote: This symbol is not used outside of amdgpu_dm_mst_types.c, so marks it static. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:211:6: warning: no previous prototype for ‘is_synaptics_cascaded_panamera’. Reported-by: Abaci Robot Link:

Re: [PATCH 28/37] drm/amd/display/dc/core/dc_stat: Convert a couple of doc headers to kerneldoc format

2023-03-20 Thread Hamza Mahfooz
On 3/17/23 04:17, Lee Jones wrote: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.c:38: warning: Cannot understand * drivers/gpu/drm/amd/amdgpu/../display/dc

Re: [PATCH] drm/amd/display: Slightly optimize dm_dmub_outbox1_low_irq()

2023-03-22 Thread Hamza Mahfooz
On 3/21/23 13:58, Christophe JAILLET wrote: A kzalloc()+memcpy() can be optimized in a single kmemdup(). This saves a few cycles because some memory doesn't need to be zeroed. Signed-off-by: Christophe JAILLET Applied, thanks! --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--

Re: [PATCH] drm/amd/display: Remove the unused variable dppclk_delay_subtotal

2023-03-22 Thread Hamza Mahfooz
On 3/21/23 21:59, Jiapeng Chong wrote: Variable dppclk_delay_subtotal is not effectively used, so delete it. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c:1004:15: warning: variable 'dppclk_delay_subtotal' set but not used. Reported-by: Abaci Robot Link: https:

  1   2   3   >