[PATCH 17/19] drm/amd/display: Don't commit surfaces if no stream
Harry Wentland
harry.wentland at amd.com
Wed May 31 15:52:16 UTC 2017
Change-Id: Id369865feb28818a62f8eb26ce4b2dee097a7bcb
Signed-off-by: Harry Wentland <harry.wentland at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Harry Wentland <Harry.Wentland at amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
index 574806504bec..939ea8df3440 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
@@ -2728,6 +2728,9 @@ void amdgpu_dm_atomic_commit_tail(
WARN_ON(!status);
WARN_ON(!status->surface_count);
+ if (!acrtc->stream)
+ continue;
+
/*TODO How it works with MPO ?*/
if (!dc_commit_surfaces_to_stream(
dm->dc,
@@ -2785,8 +2788,12 @@ void amdgpu_dm_atomic_commit_tail(
}
/* update planes when needed per crtc*/
- for_each_crtc_in_state(state, pcrtc, old_crtc_state, j)
- amdgpu_dm_commit_surfaces(state, dev, dm, pcrtc, &wait_for_vblank);
+ for_each_crtc_in_state(state, pcrtc, old_crtc_state, j) {
+ struct amdgpu_crtc *acrtc = to_amdgpu_crtc(pcrtc);
+
+ if (acrtc->stream)
+ amdgpu_dm_commit_surfaces(state, dev, dm, pcrtc, &wait_for_vblank);
+ }
for (i = 0; i < new_crtcs_count; i++) {
/*
--
2.11.0
More information about the amd-gfx
mailing list