aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2017-08-14 11:15:29 -0400
committerImre Deak <imre.deak@intel.com>2017-08-15 07:31:52 -0400
commit0a445945be6d10c5e6fd5599a27e43b6a7fdf14d (patch)
tree904295c702b6f7c8b8c6bb44671b4bcdfb128914
parentbaa68f6e5b6674f6d5b9e5bf7f358104d15d4067 (diff)
drm/i915: Work around GCC anonymous union initialization bug
GCC 4.4 can't cope with anonymous union initializers which seems to be a bug in that version (see the Reference) and is fixed since GCC version 4.6. A workaround which is also used elsewhere in the kernel for the same purpose is to wrap the initialization in curly braces, so do the same here. Fixes: b5565a2efc12 ("drm/i915/bxt, glk: Give a proper name to the power well struct phy field") Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20170814151530.24154-1-imre.deak@intel.com
-rw-r--r--drivers/gpu/drm/i915/intel_runtime_pm.c78
1 files changed, 54 insertions, 24 deletions
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index e77e84a6fd2f..6e0c9d99bf0a 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -1920,7 +1920,9 @@ static struct i915_power_well hsw_power_wells[] = {
1920 .domains = HSW_DISPLAY_POWER_DOMAINS, 1920 .domains = HSW_DISPLAY_POWER_DOMAINS,
1921 .ops = &hsw_power_well_ops, 1921 .ops = &hsw_power_well_ops,
1922 .id = HSW_DISP_PW_GLOBAL, 1922 .id = HSW_DISP_PW_GLOBAL,
1923 .hsw.has_vga = true, 1923 {
1924 .hsw.has_vga = true,
1925 },
1924 }, 1926 },
1925}; 1927};
1926 1928
@@ -1937,8 +1939,10 @@ static struct i915_power_well bdw_power_wells[] = {
1937 .domains = BDW_DISPLAY_POWER_DOMAINS, 1939 .domains = BDW_DISPLAY_POWER_DOMAINS,
1938 .ops = &hsw_power_well_ops, 1940 .ops = &hsw_power_well_ops,
1939 .id = HSW_DISP_PW_GLOBAL, 1941 .id = HSW_DISP_PW_GLOBAL,
1940 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C), 1942 {
1941 .hsw.has_vga = true, 1943 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C),
1944 .hsw.has_vga = true,
1945 },
1942 }, 1946 },
1943}; 1947};
1944 1948
@@ -2080,7 +2084,9 @@ static struct i915_power_well skl_power_wells[] = {
2080 .domains = 0, 2084 .domains = 0,
2081 .ops = &hsw_power_well_ops, 2085 .ops = &hsw_power_well_ops,
2082 .id = SKL_DISP_PW_1, 2086 .id = SKL_DISP_PW_1,
2083 .hsw.has_fuses = true, 2087 {
2088 .hsw.has_fuses = true,
2089 },
2084 }, 2090 },
2085 { 2091 {
2086 .name = "MISC IO power well", 2092 .name = "MISC IO power well",
@@ -2100,9 +2106,11 @@ static struct i915_power_well skl_power_wells[] = {
2100 .domains = SKL_DISPLAY_POWERWELL_2_POWER_DOMAINS, 2106 .domains = SKL_DISPLAY_POWERWELL_2_POWER_DOMAINS,
2101 .ops = &hsw_power_well_ops, 2107 .ops = &hsw_power_well_ops,
2102 .id = SKL_DISP_PW_2, 2108 .id = SKL_DISP_PW_2,
2103 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C), 2109 {
2104 .hsw.has_vga = true, 2110 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C),
2105 .hsw.has_fuses = true, 2111 .hsw.has_vga = true,
2112 .hsw.has_fuses = true,
2113 },
2106 }, 2114 },
2107 { 2115 {
2108 .name = "DDI A/E IO power well", 2116 .name = "DDI A/E IO power well",
@@ -2143,7 +2151,9 @@ static struct i915_power_well bxt_power_wells[] = {
2143 .domains = 0, 2151 .domains = 0,
2144 .ops = &hsw_power_well_ops, 2152 .ops = &hsw_power_well_ops,
2145 .id = SKL_DISP_PW_1, 2153 .id = SKL_DISP_PW_1,
2146 .hsw.has_fuses = true, 2154 {
2155 .hsw.has_fuses = true,
2156 },
2147 }, 2157 },
2148 { 2158 {
2149 .name = "DC off", 2159 .name = "DC off",
@@ -2156,23 +2166,29 @@ static struct i915_power_well bxt_power_wells[] = {
2156 .domains = BXT_DISPLAY_POWERWELL_2_POWER_DOMAINS, 2166 .domains = BXT_DISPLAY_POWERWELL_2_POWER_DOMAINS,
2157 .ops = &hsw_power_well_ops, 2167 .ops = &hsw_power_well_ops,
2158 .id = SKL_DISP_PW_2, 2168 .id = SKL_DISP_PW_2,
2159 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C), 2169 {
2160 .hsw.has_vga = true, 2170 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C),
2161 .hsw.has_fuses = true, 2171 .hsw.has_vga = true,
2172 .hsw.has_fuses = true,
2173 },
2162 }, 2174 },
2163 { 2175 {
2164 .name = "dpio-common-a", 2176 .name = "dpio-common-a",
2165 .domains = BXT_DPIO_CMN_A_POWER_DOMAINS, 2177 .domains = BXT_DPIO_CMN_A_POWER_DOMAINS,
2166 .ops = &bxt_dpio_cmn_power_well_ops, 2178 .ops = &bxt_dpio_cmn_power_well_ops,
2167 .id = BXT_DPIO_CMN_A, 2179 .id = BXT_DPIO_CMN_A,
2168 .bxt.phy = DPIO_PHY1, 2180 {
2181 .bxt.phy = DPIO_PHY1,
2182 },
2169 }, 2183 },
2170 { 2184 {
2171 .name = "dpio-common-bc", 2185 .name = "dpio-common-bc",
2172 .domains = BXT_DPIO_CMN_BC_POWER_DOMAINS, 2186 .domains = BXT_DPIO_CMN_BC_POWER_DOMAINS,
2173 .ops = &bxt_dpio_cmn_power_well_ops, 2187 .ops = &bxt_dpio_cmn_power_well_ops,
2174 .id = BXT_DPIO_CMN_BC, 2188 .id = BXT_DPIO_CMN_BC,
2175 .bxt.phy = DPIO_PHY0, 2189 {
2190 .bxt.phy = DPIO_PHY0,
2191 },
2176 }, 2192 },
2177}; 2193};
2178 2194
@@ -2190,7 +2206,9 @@ static struct i915_power_well glk_power_wells[] = {
2190 .domains = 0, 2206 .domains = 0,
2191 .ops = &hsw_power_well_ops, 2207 .ops = &hsw_power_well_ops,
2192 .id = SKL_DISP_PW_1, 2208 .id = SKL_DISP_PW_1,
2193 .hsw.has_fuses = true, 2209 {
2210 .hsw.has_fuses = true,
2211 },
2194 }, 2212 },
2195 { 2213 {
2196 .name = "DC off", 2214 .name = "DC off",
@@ -2203,30 +2221,38 @@ static struct i915_power_well glk_power_wells[] = {
2203 .domains = GLK_DISPLAY_POWERWELL_2_POWER_DOMAINS, 2221 .domains = GLK_DISPLAY_POWERWELL_2_POWER_DOMAINS,
2204 .ops = &hsw_power_well_ops, 2222 .ops = &hsw_power_well_ops,
2205 .id = SKL_DISP_PW_2, 2223 .id = SKL_DISP_PW_2,
2206 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C), 2224 {
2207 .hsw.has_vga = true, 2225 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C),
2208 .hsw.has_fuses = true, 2226 .hsw.has_vga = true,
2227 .hsw.has_fuses = true,
2228 },
2209 }, 2229 },
2210 { 2230 {
2211 .name = "dpio-common-a", 2231 .name = "dpio-common-a",
2212 .domains = GLK_DPIO_CMN_A_POWER_DOMAINS, 2232 .domains = GLK_DPIO_CMN_A_POWER_DOMAINS,
2213 .ops = &bxt_dpio_cmn_power_well_ops, 2233 .ops = &bxt_dpio_cmn_power_well_ops,
2214 .id = BXT_DPIO_CMN_A, 2234 .id = BXT_DPIO_CMN_A,
2215 .bxt.phy = DPIO_PHY1, 2235 {
2236 .bxt.phy = DPIO_PHY1,
2237 },
2216 }, 2238 },
2217 { 2239 {
2218 .name = "dpio-common-b", 2240 .name = "dpio-common-b",
2219 .domains = GLK_DPIO_CMN_B_POWER_DOMAINS, 2241 .domains = GLK_DPIO_CMN_B_POWER_DOMAINS,
2220 .ops = &bxt_dpio_cmn_power_well_ops, 2242 .ops = &bxt_dpio_cmn_power_well_ops,
2221 .id = BXT_DPIO_CMN_BC, 2243 .id = BXT_DPIO_CMN_BC,
2222 .bxt.phy = DPIO_PHY0, 2244 {
2245 .bxt.phy = DPIO_PHY0,
2246 },
2223 }, 2247 },
2224 { 2248 {
2225 .name = "dpio-common-c", 2249 .name = "dpio-common-c",
2226 .domains = GLK_DPIO_CMN_C_POWER_DOMAINS, 2250 .domains = GLK_DPIO_CMN_C_POWER_DOMAINS,
2227 .ops = &bxt_dpio_cmn_power_well_ops, 2251 .ops = &bxt_dpio_cmn_power_well_ops,
2228 .id = GLK_DPIO_CMN_C, 2252 .id = GLK_DPIO_CMN_C,
2229 .bxt.phy = DPIO_PHY2, 2253 {
2254 .bxt.phy = DPIO_PHY2,
2255 },
2230 }, 2256 },
2231 { 2257 {
2232 .name = "AUX A", 2258 .name = "AUX A",
@@ -2280,7 +2306,9 @@ static struct i915_power_well cnl_power_wells[] = {
2280 .domains = 0, 2306 .domains = 0,
2281 .ops = &hsw_power_well_ops, 2307 .ops = &hsw_power_well_ops,
2282 .id = SKL_DISP_PW_1, 2308 .id = SKL_DISP_PW_1,
2283 .hsw.has_fuses = true, 2309 {
2310 .hsw.has_fuses = true,
2311 },
2284 }, 2312 },
2285 { 2313 {
2286 .name = "AUX A", 2314 .name = "AUX A",
@@ -2317,9 +2345,11 @@ static struct i915_power_well cnl_power_wells[] = {
2317 .domains = CNL_DISPLAY_POWERWELL_2_POWER_DOMAINS, 2345 .domains = CNL_DISPLAY_POWERWELL_2_POWER_DOMAINS,
2318 .ops = &hsw_power_well_ops, 2346 .ops = &hsw_power_well_ops,
2319 .id = SKL_DISP_PW_2, 2347 .id = SKL_DISP_PW_2,
2320 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C), 2348 {
2321 .hsw.has_vga = true, 2349 .hsw.irq_pipe_mask = BIT(PIPE_B) | BIT(PIPE_C),
2322 .hsw.has_fuses = true, 2350 .hsw.has_vga = true,
2351 .hsw.has_fuses = true,
2352 },
2323 }, 2353 },
2324 { 2354 {
2325 .name = "DDI A IO power well", 2355 .name = "DDI A IO power well",