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
|
From ea66a4b86b52bdf258a30c0a0d6e5abdbe405093 Mon Sep 17 00:00:00 2001
From: Ken Chalmers <ken.chalmers@amd.com>
Date: Mon, 1 Feb 2016 09:46:38 -0500
Subject: [PATCH 0757/1110] drm/amd/dal: Fix building with C++ compiler.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Move struct definitions outside anonymous unions. Without this,
including these files from a C++ source file causes an error from g++:
../../include/audio_types.h:134:10: error: ‘struct
audio_info_flags::<anonymous union>::audio_speaker_flags’ invalid; an
anonymous union can only have non-static data members [-fpermissive]
Signed-off-by: Ken Chalmers <ken.chalmers@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
drivers/gpu/drm/amd/dal/include/audio_types.h | 33 ++++++++++++----------
.../drm/amd/dal/include/grph_object_ctrl_defs.h | 12 ++++----
2 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/amd/dal/include/audio_types.h b/drivers/gpu/drm/amd/dal/include/audio_types.h
index 204c5d8..54f5546 100644
--- a/drivers/gpu/drm/amd/dal/include/audio_types.h
+++ b/drivers/gpu/drm/amd/dal/include/audio_types.h
@@ -127,25 +127,28 @@ struct audio_mode {
};
};
+struct audio_speaker_flags {
+ uint32_t FL_FR:1;
+ uint32_t LFE:1;
+ uint32_t FC:1;
+ uint32_t RL_RR:1;
+ uint32_t RC:1;
+ uint32_t FLC_FRC:1;
+ uint32_t RLC_RRC:1;
+ uint32_t SUPPORT_AI:1;
+};
+
+struct audio_speaker_info {
+ uint32_t ALLSPEAKERS:7;
+ uint32_t SUPPORT_AI:1;
+};
+
struct audio_info_flags {
union {
- struct audio_speaker_flags {
- uint32_t FL_FR:1;
- uint32_t LFE:1;
- uint32_t FC:1;
- uint32_t RL_RR:1;
- uint32_t RC:1;
- uint32_t FLC_FRC:1;
- uint32_t RLC_RRC:1;
- uint32_t SUPPORT_AI:1;
- } speaker_flags;
-
- struct audio_speaker_info {
- uint32_t ALLSPEAKERS:7;
- uint32_t SUPPORT_AI:1;
- } info;
+ struct audio_speaker_flags speaker_flags;
+ struct audio_speaker_info info;
uint8_t all;
};
diff --git a/drivers/gpu/drm/amd/dal/include/grph_object_ctrl_defs.h b/drivers/gpu/drm/amd/dal/include/grph_object_ctrl_defs.h
index c6de837..2ed01bd 100644
--- a/drivers/gpu/drm/amd/dal/include/grph_object_ctrl_defs.h
+++ b/drivers/gpu/drm/amd/dal/include/grph_object_ctrl_defs.h
@@ -259,6 +259,12 @@ struct analog_tv_info {
union tv_standard_support tv_boot_up_default;
};
+struct step_and_delay_info {
+ uint32_t step;
+ uint32_t delay;
+ uint32_t recommended_ref_div;
+};
+
struct spread_spectrum_info {
struct spread_spectrum_type {
bool CENTER_MODE:1;
@@ -273,11 +279,7 @@ struct spread_spectrum_info {
uint32_t spread_spectrum_range; /* modulation freq (HZ)*/
union {
- struct step_and_delay_info {
- uint32_t step;
- uint32_t delay;
- uint32_t recommended_ref_div;
- } step_and_delay_info;
+ struct step_and_delay_info step_and_delay_info;
/* For mem/engine/uvd, Clock Out frequence (VCO ),
in unit of kHz. For TMDS/HDMI/LVDS, it is pixel clock,
for DP, it is link clock ( 270000 or 162000 ) */
--
2.7.4
|