aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/1051-drm-amd-dal-fixed-one-issue-found-by-static-analyzer.patch
blob: 23c6bc25cb6026576058498b08488350bb6af99c (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
From efb96666e1ff86e4eabc135648505d93de35019c Mon Sep 17 00:00:00 2001
From: Mykola Lysenko <Mykola.Lysenko@amd.com>
Date: Tue, 19 Apr 2016 17:36:27 +0800
Subject: [PATCH 1051/1110] drm/amd/dal: fixed one issue found by static
 analyzer

Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/core/dc_resource.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
index c2f16a9..edf0aab 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
@@ -775,10 +775,10 @@ static enum ds_color_space build_default_color_space(
 	{
 		uint32_t pix_clk_khz;
 
-		if (timing->pixel_encoding == PIXEL_ENCODING_YCBCR422 &&
-			timing->pixel_encoding == PIXEL_ENCODING_YCBCR444) {
+		if (timing->pixel_encoding != PIXEL_ENCODING_YCBCR422 &&
+			timing->pixel_encoding != PIXEL_ENCODING_YCBCR444) {
 			if (timing->timing_standard ==
-					TIMING_STANDARD_CEA770 &&
+					TIMING_STANDARD_CEA770 ||
 				timing->timing_standard ==
 						TIMING_STANDARD_CEA861)
 				color_space = DS_COLOR_SPACE_SRGB_FULLRANGE;
-- 
2.7.4