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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
From 2f9d707a626f16107e9f06f4c2ccdb52c461418f Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Mon, 11 Apr 2016 17:48:57 +1000
Subject: [PATCH 1019/1110] drm/amd/dal: drop call dce110 set scratch acc mode
directly
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
.../gpu/drm/amd/dal/dc/bios/dce110/bios_dce110.h | 2 +-
.../dal/dc/bios/dce110/bios_parser_helper_dce110.c | 6 +++---
.../dal/dc/bios/dce80/bios_parser_helper_dce80.c | 24 ----------------------
.../drm/amd/dal/dc/dce110/dce110_hw_sequencer.c | 6 +-----
4 files changed, 5 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_dce110.h b/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_dce110.h
index a994d81..fd86296 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_dce110.h
+++ b/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_dce110.h
@@ -2,5 +2,5 @@
#define BIOS_DCE110_H
void dce110_set_scratch_critical_state(struct dc_context *ctx,
bool state);
-
+void dce110_set_scratch_acc_mode_change(struct dc_context *ctx);
#endif
diff --git a/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c b/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c
index 30cb2ee..2a275b1 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c
+++ b/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c
@@ -46,9 +46,9 @@
* @param
* struct dc_context *ctx - [in] DAL context
*/
-static void set_scratch_acc_mode_change(
- struct dc_context *ctx)
+void dce110_set_scratch_acc_mode_change(struct dc_context *ctx)
{
+#ifdef CONFIG_DRM_AMD_DAL_VBIOS_PRESENT
uint32_t addr = mmBIOS_SCRATCH_6;
uint32_t value = 0;
@@ -57,6 +57,7 @@ static void set_scratch_acc_mode_change(
value |= ATOM_S6_ACC_MODE;
dm_write_reg(ctx, addr, value);
+#endif
}
/**
@@ -308,7 +309,6 @@ static const struct bios_parser_helper bios_parser_helper_funcs = {
.is_lid_status_changed = NULL,
.prepare_scratch_active_and_requested =
prepare_scratch_active_and_requested,
- .set_scratch_acc_mode_change = set_scratch_acc_mode_change,
.take_backlight_control = NULL,
.update_requested_backlight_level = NULL,
};
diff --git a/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c b/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c
index b9d01f3..bff8fd4 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c
+++ b/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c
@@ -173,29 +173,6 @@ static bool is_display_config_changed(
}
/**
- * set_scratch_acc_mode_change
- *
- * @brief
- * set Accelerated Mode in VBIOS scratch register, VBIOS will clean it when
- * VGA/non-Accelerated mode is set
- *
- * @param
- * NONE
- */
-static void set_scratch_acc_mode_change(
- struct dc_context *ctx)
-{
- uint32_t addr = mmBIOS_SCRATCH_6;
- uint32_t value = 0;
-
- value = dm_read_reg(ctx, addr);
-
- value |= ATOM_S6_ACC_MODE;
-
- dm_write_reg(ctx, addr, value);
-}
-
-/**
* is_accelerated_mode
*
* @brief
@@ -579,7 +556,6 @@ static const struct bios_parser_helper bios_parser_helper_funcs = {
.is_lid_status_changed = is_lid_status_changed,
.prepare_scratch_active_and_requested =
prepare_scratch_active_and_requested,
- .set_scratch_acc_mode_change = set_scratch_acc_mode_change,
.take_backlight_control = take_backlight_control,
.update_requested_backlight_level = update_requested_backlight_level,
};
diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
index fbb9f63..6778c75 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
@@ -874,15 +874,11 @@ static void disable_vga_and_power_gate_all_controllers(
*/
static void enable_accelerated_mode(struct core_dc *dc)
{
- struct dc_bios *dcb;
-
- dcb = dal_adapter_service_get_bios_parser(dc->res_pool.adapter_srv);
-
power_down_all_hw_blocks(dc);
disable_vga_and_power_gate_all_controllers(dc);
- dc_bios_set_scratch_acc_mode_change(dcb);
+ dce110_set_scratch_acc_mode_change(dc->ctx);
}
#if 0
--
2.7.4
|