aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0841-drm-amd-dal-fix-lb-alpha-programming.patch
blob: 3c97033c2c61dda36b59180ee357ed1b073f07bc (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From 9b9b78e7a2229cf1d2ec1773e757230afa2c202d Mon Sep 17 00:00:00 2001
From: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Date: Thu, 25 Feb 2016 14:07:49 -0500
Subject: [PATCH 0841/1110] drm/amd/dal: fix lb alpha programming

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 .../drm/amd/dal/dc/dce110/dce110_transform_bit_depth.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_transform_bit_depth.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_transform_bit_depth.c
index 70dedbc..1fe8b1b 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_transform_bit_depth.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_transform_bit_depth.c
@@ -772,9 +772,7 @@ bool dce110_transform_set_pixel_storage_depth(
 	uint32_t value;
 	enum dc_color_depth color_depth;
 
-	value = dm_read_reg(
-			xfm->ctx,
-			LB_REG(mmLB_DATA_FORMAT));
+	value = dm_read_reg(xfm->ctx, LB_REG(mmLB_DATA_FORMAT));
 	switch (depth) {
 	case LB_PIXEL_DEPTH_18BPP:
 		color_depth = COLOR_DEPTH_666;
@@ -806,9 +804,8 @@ bool dce110_transform_set_pixel_storage_depth(
 		ret = program_bit_depth_reduction(xfm110, color_depth,
 				bit_depth_params);
 
-		set_reg_field_value(value, 0, LB_DATA_FORMAT, ALPHA_EN);
-		dm_write_reg(
-				xfm->ctx, LB_REG(mmLB_DATA_FORMAT), value);
+		set_reg_field_value(value, 1, LB_DATA_FORMAT, ALPHA_EN);
+		dm_write_reg(xfm->ctx, LB_REG(mmLB_DATA_FORMAT), value);
 		if (!(xfm110->lb_pixel_depth_supported & depth)) {
 			/*we should use unsupported capabilities
 			 *  unless it is required by w/a*/
@@ -901,9 +898,7 @@ bool dce110_transform_v_set_pixel_storage_depth(
 	uint32_t value;
 	enum dc_color_depth color_depth;
 
-	value = dm_read_reg(
-			xfm->ctx,
-			LB_REG(mmLBV_DATA_FORMAT));
+	value = dm_read_reg(xfm->ctx, mmLBV_DATA_FORMAT);
 	switch (depth) {
 	case LB_PIXEL_DEPTH_18BPP:
 		color_depth = COLOR_DEPTH_666;
@@ -947,9 +942,8 @@ bool dce110_transform_v_set_pixel_storage_depth(
 		ret = program_bit_depth_reduction(xfm110, color_depth,
 				bit_depth_params);
 
-		set_reg_field_value(value, 0, LB_DATA_FORMAT, ALPHA_EN);
-		dm_write_reg(
-				xfm->ctx, LB_REG(mmLB_DATA_FORMAT), value);
+		set_reg_field_value(value, 0, LBV_DATA_FORMAT, ALPHA_EN);
+		dm_write_reg(xfm->ctx, mmLBV_DATA_FORMAT, value);
 		if (!(xfm110->lb_pixel_depth_supported & depth)) {
 			/*we should use unsupported capabilities
 			 *  unless it is required by w/a*/
-- 
2.7.4