blob: 88f60a41a66f725c52f6d2f780f894eb7ba6b661 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From cfa111f794ee1a23ddb89afec5c1c543f74db8e7 Mon Sep 17 00:00:00 2001
From: Corbin McElhanney <corbin.mcelhanney@amd.com>
Date: Thu, 1 Jun 2017 15:40:04 -0400
Subject: [PATCH 0492/4131] drm/amd/display: Don't update surface if dimensions
are 0
Signed-off-by: Corbin McElhanney <corbin.mcelhanney@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@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 323a5e7..976229e 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.7.4
|