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
65
|
From 6c48ea68ad5273d901638685697be240f089ed69 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 1407/1565] drm/amd/dal: fix lb alpha programming
Change-Id: I0e8c6d7b695dbfb8a73515e525f58f8e61ef0bbb
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*/
--
1.9.1
|