[PATCH 09/27] drm/amd/display: Don't update surface if dimensions are 0
Harry Wentland
harry.wentland at amd.com
Fri Jun 9 20:11:22 UTC 2017
From: Corbin McElhanney <corbin.mcelhanney at amd.com>
Change-Id: I787bcc4f2b4b3c5a13108c2451cd9f99d67d931f
Signed-off-by: Corbin McElhanney <corbin.mcelhanney 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/dc/core/dc.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 323a5e706908..976229eb2492 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1250,8 +1250,15 @@ void dc_update_surfaces_and_stream(struct dc *dc,
}
}
- /* only proceed if we need to make a surface update */
- if (!srf_updates)
+ /* do not perform surface update if surface has invalid dimensions
+ * (all zero) and no scaling_info is provided
+ */
+ if (surface_count > 0 &&
+ srf_updates->surface->src_rect.width == 0 &&
+ srf_updates->surface->src_rect.height == 0 &&
+ srf_updates->surface->dst_rect.width == 0 &&
+ srf_updates->surface->dst_rect.height == 0 &&
+ !srf_updates->scaling_info)
return;
update_type = dc_check_update_surfaces_for_stream(
--
2.11.0
More information about the amd-gfx
mailing list