* [PATCH v2] drm/amd/display: only fill dirty rectangles when PSR is enabled
@ 2022-11-09 18:20 Hamza Mahfooz
2022-11-09 19:25 ` Leo Li
0 siblings, 1 reply; 2+ messages in thread
From: Hamza Mahfooz @ 2022-11-09 18:20 UTC (permalink / raw)
To: amd-gfx
Cc: Hamza Mahfooz, Harry Wentland, Leo Li, Rodrigo Siqueira,
Alex Deucher, Christian König, Pan, Xinhui, David Airlie,
Daniel Vetter, Nicholas Kazlauskas, Roman Li, Fangzhi Zuo,
Aurabindo Pillai, dri-devel, linux-kernel
Currently, we are calling fill_dc_dirty_rects() even if PSR isn't
supported by the relevant link in amdgpu_dm_commit_planes(), this is
undesirable especially because when drm.debug is enabled we are printing
messages in fill_dc_dirty_rects() that are only useful for debugging PSR
(and confusing otherwise). So, we can instead limit the filling of dirty
rectangles to only when PSR is enabled.
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
---
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 --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 66eb16fbe09f..956a6e494709 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -7697,9 +7697,10 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
bundle->surface_updates[planes_count].plane_info =
&bundle->plane_infos[planes_count];
- fill_dc_dirty_rects(plane, old_plane_state, new_plane_state,
- new_crtc_state,
- &bundle->flip_addrs[planes_count]);
+ if (acrtc_state->stream->link->psr_settings.psr_feature_enabled)
+ fill_dc_dirty_rects(plane, old_plane_state,
+ new_plane_state, new_crtc_state,
+ &bundle->flip_addrs[planes_count]);
/*
* Only allow immediate flips for fast updates that don't
--
2.38.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] drm/amd/display: only fill dirty rectangles when PSR is enabled
2022-11-09 18:20 [PATCH v2] drm/amd/display: only fill dirty rectangles when PSR is enabled Hamza Mahfooz
@ 2022-11-09 19:25 ` Leo Li
0 siblings, 0 replies; 2+ messages in thread
From: Leo Li @ 2022-11-09 19:25 UTC (permalink / raw)
To: Hamza Mahfooz, amd-gfx
Cc: Harry Wentland, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
Nicholas Kazlauskas, Roman Li, Fangzhi Zuo, Aurabindo Pillai,
dri-devel, linux-kernel
On 11/9/22 13:20, Hamza Mahfooz wrote:
> Currently, we are calling fill_dc_dirty_rects() even if PSR isn't
> supported by the relevant link in amdgpu_dm_commit_planes(), this is
> undesirable especially because when drm.debug is enabled we are printing
> messages in fill_dc_dirty_rects() that are only useful for debugging PSR
> (and confusing otherwise). So, we can instead limit the filling of dirty
> rectangles to only when PSR is enabled.
>
> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Thanks
> ---
> 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 --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 66eb16fbe09f..956a6e494709 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -7697,9 +7697,10 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
> bundle->surface_updates[planes_count].plane_info =
> &bundle->plane_infos[planes_count];
>
> - fill_dc_dirty_rects(plane, old_plane_state, new_plane_state,
> - new_crtc_state,
> - &bundle->flip_addrs[planes_count]);
> + if (acrtc_state->stream->link->psr_settings.psr_feature_enabled)
> + fill_dc_dirty_rects(plane, old_plane_state,
> + new_plane_state, new_crtc_state,
> + &bundle->flip_addrs[planes_count]);
>
> /*
> * Only allow immediate flips for fast updates that don't
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-09 19:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09 18:20 [PATCH v2] drm/amd/display: only fill dirty rectangles when PSR is enabled Hamza Mahfooz
2022-11-09 19:25 ` Leo Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®