diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 241 |
1 files changed, 45 insertions, 196 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 8624b4bdc242..4064e49dbf70 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <drm/drm_cache.h> | 54 | #include <drm/drm_cache.h> |
55 | #include <drm/drm_util.h> | 55 | #include <drm/drm_util.h> |
56 | 56 | ||
57 | #include "i915_fixed.h" | ||
57 | #include "i915_params.h" | 58 | #include "i915_params.h" |
58 | #include "i915_reg.h" | 59 | #include "i915_reg.h" |
59 | #include "i915_utils.h" | 60 | #include "i915_utils.h" |
@@ -87,8 +88,8 @@ | |||
87 | 88 | ||
88 | #define DRIVER_NAME "i915" | 89 | #define DRIVER_NAME "i915" |
89 | #define DRIVER_DESC "Intel Graphics" | 90 | #define DRIVER_DESC "Intel Graphics" |
90 | #define DRIVER_DATE "20180921" | 91 | #define DRIVER_DATE "20181122" |
91 | #define DRIVER_TIMESTAMP 1537521997 | 92 | #define DRIVER_TIMESTAMP 1542898187 |
92 | 93 | ||
93 | /* Use I915_STATE_WARN(x) and I915_STATE_WARN_ON() (rather than WARN() and | 94 | /* Use I915_STATE_WARN(x) and I915_STATE_WARN_ON() (rather than WARN() and |
94 | * WARN_ON()) for hw state sanity checks to check for unexpected conditions | 95 | * WARN_ON()) for hw state sanity checks to check for unexpected conditions |
@@ -127,144 +128,6 @@ bool i915_error_injected(void); | |||
127 | __i915_printk(i915, i915_error_injected() ? KERN_DEBUG : KERN_ERR, \ | 128 | __i915_printk(i915, i915_error_injected() ? KERN_DEBUG : KERN_ERR, \ |
128 | fmt, ##__VA_ARGS__) | 129 | fmt, ##__VA_ARGS__) |
129 | 130 | ||
130 | typedef struct { | ||
131 | uint32_t val; | ||
132 | } uint_fixed_16_16_t; | ||
133 | |||
134 | #define FP_16_16_MAX ({ \ | ||
135 | uint_fixed_16_16_t fp; \ | ||
136 | fp.val = UINT_MAX; \ | ||
137 | fp; \ | ||
138 | }) | ||
139 | |||
140 | static inline bool is_fixed16_zero(uint_fixed_16_16_t val) | ||
141 | { | ||
142 | if (val.val == 0) | ||
143 | return true; | ||
144 | return false; | ||
145 | } | ||
146 | |||
147 | static inline uint_fixed_16_16_t u32_to_fixed16(uint32_t val) | ||
148 | { | ||
149 | uint_fixed_16_16_t fp; | ||
150 | |||
151 | WARN_ON(val > U16_MAX); | ||
152 | |||
153 | fp.val = val << 16; | ||
154 | return fp; | ||
155 | } | ||
156 | |||
157 | static inline uint32_t fixed16_to_u32_round_up(uint_fixed_16_16_t fp) | ||
158 | { | ||
159 | return DIV_ROUND_UP(fp.val, 1 << 16); | ||
160 | } | ||
161 | |||
162 | static inline uint32_t fixed16_to_u32(uint_fixed_16_16_t fp) | ||
163 | { | ||
164 | return fp.val >> 16; | ||
165 | } | ||
166 | |||
167 | static inline uint_fixed_16_16_t min_fixed16(uint_fixed_16_16_t min1, | ||
168 | uint_fixed_16_16_t min2) | ||
169 | { | ||
170 | uint_fixed_16_16_t min; | ||
171 | |||
172 | min.val = min(min1.val, min2.val); | ||
173 | return min; | ||
174 | } | ||
175 | |||
176 | static inline uint_fixed_16_16_t max_fixed16(uint_fixed_16_16_t max1, | ||
177 | uint_fixed_16_16_t max2) | ||
178 | { | ||
179 | uint_fixed_16_16_t max; | ||
180 | |||
181 | max.val = max(max1.val, max2.val); | ||
182 | return max; | ||
183 | } | ||
184 | |||
185 | static inline uint_fixed_16_16_t clamp_u64_to_fixed16(uint64_t val) | ||
186 | { | ||
187 | uint_fixed_16_16_t fp; | ||
188 | WARN_ON(val > U32_MAX); | ||
189 | fp.val = (uint32_t) val; | ||
190 | return fp; | ||
191 | } | ||
192 | |||
193 | static inline uint32_t div_round_up_fixed16(uint_fixed_16_16_t val, | ||
194 | uint_fixed_16_16_t d) | ||
195 | { | ||
196 | return DIV_ROUND_UP(val.val, d.val); | ||
197 | } | ||
198 | |||
199 | static inline uint32_t mul_round_up_u32_fixed16(uint32_t val, | ||
200 | uint_fixed_16_16_t mul) | ||
201 | { | ||
202 | uint64_t intermediate_val; | ||
203 | |||
204 | intermediate_val = (uint64_t) val * mul.val; | ||
205 | intermediate_val = DIV_ROUND_UP_ULL(intermediate_val, 1 << 16); | ||
206 | WARN_ON(intermediate_val > U32_MAX); | ||
207 | return (uint32_t) intermediate_val; | ||
208 | } | ||
209 | |||
210 | static inline uint_fixed_16_16_t mul_fixed16(uint_fixed_16_16_t val, | ||
211 | uint_fixed_16_16_t mul) | ||
212 | { | ||
213 | uint64_t intermediate_val; | ||
214 | |||
215 | intermediate_val = (uint64_t) val.val * mul.val; | ||
216 | intermediate_val = intermediate_val >> 16; | ||
217 | return clamp_u64_to_fixed16(intermediate_val); | ||
218 | } | ||
219 | |||
220 | static inline uint_fixed_16_16_t div_fixed16(uint32_t val, uint32_t d) | ||
221 | { | ||
222 | uint64_t interm_val; | ||
223 | |||
224 | interm_val = (uint64_t)val << 16; | ||
225 | interm_val = DIV_ROUND_UP_ULL(interm_val, d); | ||
226 | return clamp_u64_to_fixed16(interm_val); | ||
227 | } | ||
228 | |||
229 | static inline uint32_t div_round_up_u32_fixed16(uint32_t val, | ||
230 | uint_fixed_16_16_t d) | ||
231 | { | ||
232 | uint64_t interm_val; | ||
233 | |||
234 | interm_val = (uint64_t)val << 16; | ||
235 | interm_val = DIV_ROUND_UP_ULL(interm_val, d.val); | ||
236 | WARN_ON(interm_val > U32_MAX); | ||
237 | return (uint32_t) interm_val; | ||
238 | } | ||
239 | |||
240 | static inline uint_fixed_16_16_t mul_u32_fixed16(uint32_t val, | ||
241 | uint_fixed_16_16_t mul) | ||
242 | { | ||
243 | uint64_t intermediate_val; | ||
244 | |||
245 | intermediate_val = (uint64_t) val * mul.val; | ||
246 | return clamp_u64_to_fixed16(intermediate_val); | ||
247 | } | ||
248 | |||
249 | static inline uint_fixed_16_16_t add_fixed16(uint_fixed_16_16_t add1, | ||
250 | uint_fixed_16_16_t add2) | ||
251 | { | ||
252 | uint64_t interm_sum; | ||
253 | |||
254 | interm_sum = (uint64_t) add1.val + add2.val; | ||
255 | return clamp_u64_to_fixed16(interm_sum); | ||
256 | } | ||
257 | |||
258 | static inline uint_fixed_16_16_t add_fixed16_u32(uint_fixed_16_16_t add1, | ||
259 | uint32_t add2) | ||
260 | { | ||
261 | uint64_t interm_sum; | ||
262 | uint_fixed_16_16_t interm_add2 = u32_to_fixed16(add2); | ||
263 | |||
264 | interm_sum = (uint64_t) add1.val + interm_add2.val; | ||
265 | return clamp_u64_to_fixed16(interm_sum); | ||
266 | } | ||
267 | |||
268 | enum hpd_pin { | 131 | enum hpd_pin { |
269 | HPD_NONE = 0, | 132 | HPD_NONE = 0, |
270 | HPD_TV = HPD_NONE, /* TV is known to be unreliable */ | 133 | HPD_TV = HPD_NONE, /* TV is known to be unreliable */ |
@@ -283,7 +146,8 @@ enum hpd_pin { | |||
283 | #define for_each_hpd_pin(__pin) \ | 146 | #define for_each_hpd_pin(__pin) \ |
284 | for ((__pin) = (HPD_NONE + 1); (__pin) < HPD_NUM_PINS; (__pin)++) | 147 | for ((__pin) = (HPD_NONE + 1); (__pin) < HPD_NUM_PINS; (__pin)++) |
285 | 148 | ||
286 | #define HPD_STORM_DEFAULT_THRESHOLD 5 | 149 | /* Threshold == 5 for long IRQs, 50 for short */ |
150 | #define HPD_STORM_DEFAULT_THRESHOLD 50 | ||
287 | 151 | ||
288 | struct i915_hotplug { | 152 | struct i915_hotplug { |
289 | struct work_struct hotplug_work; | 153 | struct work_struct hotplug_work; |
@@ -308,6 +172,8 @@ struct i915_hotplug { | |||
308 | bool poll_enabled; | 172 | bool poll_enabled; |
309 | 173 | ||
310 | unsigned int hpd_storm_threshold; | 174 | unsigned int hpd_storm_threshold; |
175 | /* Whether or not to count short HPD IRQs in HPD storms */ | ||
176 | u8 hpd_short_storm_enabled; | ||
311 | 177 | ||
312 | /* | 178 | /* |
313 | * if we get a HPD irq from DP and a HPD irq from non-DP | 179 | * if we get a HPD irq from DP and a HPD irq from non-DP |
@@ -465,8 +331,10 @@ struct drm_i915_display_funcs { | |||
465 | struct intel_csr { | 331 | struct intel_csr { |
466 | struct work_struct work; | 332 | struct work_struct work; |
467 | const char *fw_path; | 333 | const char *fw_path; |
334 | uint32_t required_version; | ||
335 | uint32_t max_fw_size; /* bytes */ | ||
468 | uint32_t *dmc_payload; | 336 | uint32_t *dmc_payload; |
469 | uint32_t dmc_fw_size; | 337 | uint32_t dmc_fw_size; /* dwords */ |
470 | uint32_t version; | 338 | uint32_t version; |
471 | uint32_t mmio_count; | 339 | uint32_t mmio_count; |
472 | i915_reg_t mmioaddr[8]; | 340 | i915_reg_t mmioaddr[8]; |
@@ -546,6 +414,8 @@ struct intel_fbc { | |||
546 | int adjusted_y; | 414 | int adjusted_y; |
547 | 415 | ||
548 | int y; | 416 | int y; |
417 | |||
418 | uint16_t pixel_blend_mode; | ||
549 | } plane; | 419 | } plane; |
550 | 420 | ||
551 | struct { | 421 | struct { |
@@ -630,7 +500,6 @@ struct i915_psr { | |||
630 | bool sink_psr2_support; | 500 | bool sink_psr2_support; |
631 | bool link_standby; | 501 | bool link_standby; |
632 | bool colorimetry_support; | 502 | bool colorimetry_support; |
633 | bool alpm; | ||
634 | bool psr2_enabled; | 503 | bool psr2_enabled; |
635 | u8 sink_sync_latency; | 504 | u8 sink_sync_latency; |
636 | ktime_t last_entry_attempt; | 505 | ktime_t last_entry_attempt; |
@@ -918,6 +787,11 @@ struct i915_power_well_desc { | |||
918 | /* The pw is backing the VGA functionality */ | 787 | /* The pw is backing the VGA functionality */ |
919 | bool has_vga:1; | 788 | bool has_vga:1; |
920 | bool has_fuses:1; | 789 | bool has_fuses:1; |
790 | /* | ||
791 | * The pw is for an ICL+ TypeC PHY port in | ||
792 | * Thunderbolt mode. | ||
793 | */ | ||
794 | bool is_tc_tbt:1; | ||
921 | } hsw; | 795 | } hsw; |
922 | }; | 796 | }; |
923 | const struct i915_power_well_ops *ops; | 797 | const struct i915_power_well_ops *ops; |
@@ -1042,17 +916,6 @@ struct i915_gem_mm { | |||
1042 | 916 | ||
1043 | #define I915_ENGINE_WEDGED_TIMEOUT (60 * HZ) /* Reset but no recovery? */ | 917 | #define I915_ENGINE_WEDGED_TIMEOUT (60 * HZ) /* Reset but no recovery? */ |
1044 | 918 | ||
1045 | #define DP_AUX_A 0x40 | ||
1046 | #define DP_AUX_B 0x10 | ||
1047 | #define DP_AUX_C 0x20 | ||
1048 | #define DP_AUX_D 0x30 | ||
1049 | #define DP_AUX_E 0x50 | ||
1050 | #define DP_AUX_F 0x60 | ||
1051 | |||
1052 | #define DDC_PIN_B 0x05 | ||
1053 | #define DDC_PIN_C 0x04 | ||
1054 | #define DDC_PIN_D 0x06 | ||
1055 | |||
1056 | struct ddi_vbt_port_info { | 919 | struct ddi_vbt_port_info { |
1057 | int max_tmds_clock; | 920 | int max_tmds_clock; |
1058 | 921 | ||
@@ -1099,6 +962,7 @@ struct intel_vbt_data { | |||
1099 | unsigned int panel_type:4; | 962 | unsigned int panel_type:4; |
1100 | int lvds_ssc_freq; | 963 | int lvds_ssc_freq; |
1101 | unsigned int bios_lvds_val; /* initial [PCH_]LVDS reg val in VBIOS */ | 964 | unsigned int bios_lvds_val; /* initial [PCH_]LVDS reg val in VBIOS */ |
965 | enum drm_panel_orientation orientation; | ||
1102 | 966 | ||
1103 | enum drrs_support_type drrs_type; | 967 | enum drrs_support_type drrs_type; |
1104 | 968 | ||
@@ -1144,6 +1008,7 @@ struct intel_vbt_data { | |||
1144 | u8 *data; | 1008 | u8 *data; |
1145 | const u8 *sequence[MIPI_SEQ_MAX]; | 1009 | const u8 *sequence[MIPI_SEQ_MAX]; |
1146 | u8 *deassert_seq; /* Used by fixup_mipi_sequences() */ | 1010 | u8 *deassert_seq; /* Used by fixup_mipi_sequences() */ |
1011 | enum drm_panel_orientation orientation; | ||
1147 | } dsi; | 1012 | } dsi; |
1148 | 1013 | ||
1149 | int crt_ddc_pin; | 1014 | int crt_ddc_pin; |
@@ -1240,9 +1105,9 @@ struct skl_ddb_values { | |||
1240 | }; | 1105 | }; |
1241 | 1106 | ||
1242 | struct skl_wm_level { | 1107 | struct skl_wm_level { |
1243 | bool plane_en; | ||
1244 | uint16_t plane_res_b; | 1108 | uint16_t plane_res_b; |
1245 | uint8_t plane_res_l; | 1109 | uint8_t plane_res_l; |
1110 | bool plane_en; | ||
1246 | }; | 1111 | }; |
1247 | 1112 | ||
1248 | /* Stores plane specific WM parameters */ | 1113 | /* Stores plane specific WM parameters */ |
@@ -1520,30 +1385,12 @@ struct i915_oa_ops { | |||
1520 | bool (*is_valid_flex_reg)(struct drm_i915_private *dev_priv, u32 addr); | 1385 | bool (*is_valid_flex_reg)(struct drm_i915_private *dev_priv, u32 addr); |
1521 | 1386 | ||
1522 | /** | 1387 | /** |
1523 | * @init_oa_buffer: Resets the head and tail pointers of the | ||
1524 | * circular buffer for periodic OA reports. | ||
1525 | * | ||
1526 | * Called when first opening a stream for OA metrics, but also may be | ||
1527 | * called in response to an OA buffer overflow or other error | ||
1528 | * condition. | ||
1529 | * | ||
1530 | * Note it may be necessary to clear the full OA buffer here as part of | ||
1531 | * maintaining the invariable that new reports must be written to | ||
1532 | * zeroed memory for us to be able to reliable detect if an expected | ||
1533 | * report has not yet landed in memory. (At least on Haswell the OA | ||
1534 | * buffer tail pointer is not synchronized with reports being visible | ||
1535 | * to the CPU) | ||
1536 | */ | ||
1537 | void (*init_oa_buffer)(struct drm_i915_private *dev_priv); | ||
1538 | |||
1539 | /** | ||
1540 | * @enable_metric_set: Selects and applies any MUX configuration to set | 1388 | * @enable_metric_set: Selects and applies any MUX configuration to set |
1541 | * up the Boolean and Custom (B/C) counters that are part of the | 1389 | * up the Boolean and Custom (B/C) counters that are part of the |
1542 | * counter reports being sampled. May apply system constraints such as | 1390 | * counter reports being sampled. May apply system constraints such as |
1543 | * disabling EU clock gating as required. | 1391 | * disabling EU clock gating as required. |
1544 | */ | 1392 | */ |
1545 | int (*enable_metric_set)(struct drm_i915_private *dev_priv, | 1393 | int (*enable_metric_set)(struct i915_perf_stream *stream); |
1546 | const struct i915_oa_config *oa_config); | ||
1547 | 1394 | ||
1548 | /** | 1395 | /** |
1549 | * @disable_metric_set: Remove system constraints associated with using | 1396 | * @disable_metric_set: Remove system constraints associated with using |
@@ -1554,12 +1401,12 @@ struct i915_oa_ops { | |||
1554 | /** | 1401 | /** |
1555 | * @oa_enable: Enable periodic sampling | 1402 | * @oa_enable: Enable periodic sampling |
1556 | */ | 1403 | */ |
1557 | void (*oa_enable)(struct drm_i915_private *dev_priv); | 1404 | void (*oa_enable)(struct i915_perf_stream *stream); |
1558 | 1405 | ||
1559 | /** | 1406 | /** |
1560 | * @oa_disable: Disable periodic sampling | 1407 | * @oa_disable: Disable periodic sampling |
1561 | */ | 1408 | */ |
1562 | void (*oa_disable)(struct drm_i915_private *dev_priv); | 1409 | void (*oa_disable)(struct i915_perf_stream *stream); |
1563 | 1410 | ||
1564 | /** | 1411 | /** |
1565 | * @read: Copy data from the circular OA buffer into a given userspace | 1412 | * @read: Copy data from the circular OA buffer into a given userspace |
@@ -1948,7 +1795,6 @@ struct drm_i915_private { | |||
1948 | 1795 | ||
1949 | struct dram_info { | 1796 | struct dram_info { |
1950 | bool valid; | 1797 | bool valid; |
1951 | bool valid_dimm; | ||
1952 | bool is_16gb_dimm; | 1798 | bool is_16gb_dimm; |
1953 | u8 num_channels; | 1799 | u8 num_channels; |
1954 | enum dram_rank { | 1800 | enum dram_rank { |
@@ -2323,6 +2169,8 @@ static inline struct scatterlist *__sg_next(struct scatterlist *sg) | |||
2323 | (((__iter).curr += PAGE_SIZE) >= (__iter).max) ? \ | 2169 | (((__iter).curr += PAGE_SIZE) >= (__iter).max) ? \ |
2324 | (__iter) = __sgt_iter(__sg_next((__iter).sgp), false), 0 : 0) | 2170 | (__iter) = __sgt_iter(__sg_next((__iter).sgp), false), 0 : 0) |
2325 | 2171 | ||
2172 | bool i915_sg_trim(struct sg_table *orig_st); | ||
2173 | |||
2326 | static inline unsigned int i915_sg_page_sizes(struct scatterlist *sg) | 2174 | static inline unsigned int i915_sg_page_sizes(struct scatterlist *sg) |
2327 | { | 2175 | { |
2328 | unsigned int page_sizes; | 2176 | unsigned int page_sizes; |
@@ -2368,20 +2216,12 @@ intel_info(const struct drm_i915_private *dev_priv) | |||
2368 | #define REVID_FOREVER 0xff | 2216 | #define REVID_FOREVER 0xff |
2369 | #define INTEL_REVID(dev_priv) ((dev_priv)->drm.pdev->revision) | 2217 | #define INTEL_REVID(dev_priv) ((dev_priv)->drm.pdev->revision) |
2370 | 2218 | ||
2371 | #define GEN_FOREVER (0) | ||
2372 | |||
2373 | #define INTEL_GEN_MASK(s, e) ( \ | 2219 | #define INTEL_GEN_MASK(s, e) ( \ |
2374 | BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \ | 2220 | BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \ |
2375 | BUILD_BUG_ON_ZERO(!__builtin_constant_p(e)) + \ | 2221 | BUILD_BUG_ON_ZERO(!__builtin_constant_p(e)) + \ |
2376 | GENMASK((e) != GEN_FOREVER ? (e) - 1 : BITS_PER_LONG - 1, \ | 2222 | GENMASK((e) - 1, (s) - 1)) |
2377 | (s) != GEN_FOREVER ? (s) - 1 : 0) \ | ||
2378 | ) | ||
2379 | 2223 | ||
2380 | /* | 2224 | /* Returns true if Gen is in inclusive range [Start, End] */ |
2381 | * Returns true if Gen is in inclusive range [Start, End]. | ||
2382 | * | ||
2383 | * Use GEN_FOREVER for unbound start and or end. | ||
2384 | */ | ||
2385 | #define IS_GEN(dev_priv, s, e) \ | 2225 | #define IS_GEN(dev_priv, s, e) \ |
2386 | (!!((dev_priv)->info.gen_mask & INTEL_GEN_MASK((s), (e)))) | 2226 | (!!((dev_priv)->info.gen_mask & INTEL_GEN_MASK((s), (e)))) |
2387 | 2227 | ||
@@ -2462,6 +2302,8 @@ intel_info(const struct drm_i915_private *dev_priv) | |||
2462 | #define IS_KBL_ULX(dev_priv) (INTEL_DEVID(dev_priv) == 0x590E || \ | 2302 | #define IS_KBL_ULX(dev_priv) (INTEL_DEVID(dev_priv) == 0x590E || \ |
2463 | INTEL_DEVID(dev_priv) == 0x5915 || \ | 2303 | INTEL_DEVID(dev_priv) == 0x5915 || \ |
2464 | INTEL_DEVID(dev_priv) == 0x591E) | 2304 | INTEL_DEVID(dev_priv) == 0x591E) |
2305 | #define IS_AML_ULX(dev_priv) (INTEL_DEVID(dev_priv) == 0x591C || \ | ||
2306 | INTEL_DEVID(dev_priv) == 0x87C0) | ||
2465 | #define IS_SKL_GT2(dev_priv) (IS_SKYLAKE(dev_priv) && \ | 2307 | #define IS_SKL_GT2(dev_priv) (IS_SKYLAKE(dev_priv) && \ |
2466 | (dev_priv)->info.gt == 2) | 2308 | (dev_priv)->info.gt == 2) |
2467 | #define IS_SKL_GT3(dev_priv) (IS_SKYLAKE(dev_priv) && \ | 2309 | #define IS_SKL_GT3(dev_priv) (IS_SKYLAKE(dev_priv) && \ |
@@ -2593,9 +2435,14 @@ intel_info(const struct drm_i915_private *dev_priv) | |||
2593 | 2435 | ||
2594 | #define HAS_EXECLISTS(dev_priv) HAS_LOGICAL_RING_CONTEXTS(dev_priv) | 2436 | #define HAS_EXECLISTS(dev_priv) HAS_LOGICAL_RING_CONTEXTS(dev_priv) |
2595 | 2437 | ||
2596 | #define USES_PPGTT(dev_priv) (i915_modparams.enable_ppgtt) | 2438 | #define INTEL_PPGTT(dev_priv) (INTEL_INFO(dev_priv)->ppgtt) |
2597 | #define USES_FULL_PPGTT(dev_priv) (i915_modparams.enable_ppgtt >= 2) | 2439 | #define HAS_PPGTT(dev_priv) \ |
2598 | #define USES_FULL_48BIT_PPGTT(dev_priv) (i915_modparams.enable_ppgtt == 3) | 2440 | (INTEL_PPGTT(dev_priv) != INTEL_PPGTT_NONE) |
2441 | #define HAS_FULL_PPGTT(dev_priv) \ | ||
2442 | (INTEL_PPGTT(dev_priv) >= INTEL_PPGTT_FULL) | ||
2443 | #define HAS_FULL_48BIT_PPGTT(dev_priv) \ | ||
2444 | (INTEL_PPGTT(dev_priv) >= INTEL_PPGTT_FULL_4LVL) | ||
2445 | |||
2599 | #define HAS_PAGE_SIZES(dev_priv, sizes) ({ \ | 2446 | #define HAS_PAGE_SIZES(dev_priv, sizes) ({ \ |
2600 | GEM_BUG_ON((sizes) == 0); \ | 2447 | GEM_BUG_ON((sizes) == 0); \ |
2601 | ((sizes) & ~(dev_priv)->info.page_sizes) == 0; \ | 2448 | ((sizes) & ~(dev_priv)->info.page_sizes) == 0; \ |
@@ -2743,9 +2590,6 @@ intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *dev_priv) | |||
2743 | return IS_BROXTON(dev_priv) && intel_vtd_active(); | 2590 | return IS_BROXTON(dev_priv) && intel_vtd_active(); |
2744 | } | 2591 | } |
2745 | 2592 | ||
2746 | int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv, | ||
2747 | int enable_ppgtt); | ||
2748 | |||
2749 | /* i915_drv.c */ | 2593 | /* i915_drv.c */ |
2750 | void __printf(3, 4) | 2594 | void __printf(3, 4) |
2751 | __i915_printk(struct drm_i915_private *dev_priv, const char *level, | 2595 | __i915_printk(struct drm_i915_private *dev_priv, const char *level, |
@@ -3230,7 +3074,7 @@ int i915_gem_object_wait(struct drm_i915_gem_object *obj, | |||
3230 | int i915_gem_object_wait_priority(struct drm_i915_gem_object *obj, | 3074 | int i915_gem_object_wait_priority(struct drm_i915_gem_object *obj, |
3231 | unsigned int flags, | 3075 | unsigned int flags, |
3232 | const struct i915_sched_attr *attr); | 3076 | const struct i915_sched_attr *attr); |
3233 | #define I915_PRIORITY_DISPLAY I915_PRIORITY_MAX | 3077 | #define I915_PRIORITY_DISPLAY I915_USER_PRIORITY(I915_PRIORITY_MAX) |
3234 | 3078 | ||
3235 | int __must_check | 3079 | int __must_check |
3236 | i915_gem_object_set_to_wc_domain(struct drm_i915_gem_object *obj, bool write); | 3080 | i915_gem_object_set_to_wc_domain(struct drm_i915_gem_object *obj, bool write); |
@@ -3462,6 +3306,7 @@ bool intel_bios_is_port_hpd_inverted(struct drm_i915_private *dev_priv, | |||
3462 | enum port port); | 3306 | enum port port); |
3463 | bool intel_bios_is_lspcon_present(struct drm_i915_private *dev_priv, | 3307 | bool intel_bios_is_lspcon_present(struct drm_i915_private *dev_priv, |
3464 | enum port port); | 3308 | enum port port); |
3309 | enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv, enum port port); | ||
3465 | 3310 | ||
3466 | /* intel_acpi.c */ | 3311 | /* intel_acpi.c */ |
3467 | #ifdef CONFIG_ACPI | 3312 | #ifdef CONFIG_ACPI |
@@ -3483,8 +3328,6 @@ mkwrite_device_info(struct drm_i915_private *dev_priv) | |||
3483 | extern void intel_modeset_init_hw(struct drm_device *dev); | 3328 | extern void intel_modeset_init_hw(struct drm_device *dev); |
3484 | extern int intel_modeset_init(struct drm_device *dev); | 3329 | extern int intel_modeset_init(struct drm_device *dev); |
3485 | extern void intel_modeset_cleanup(struct drm_device *dev); | 3330 | extern void intel_modeset_cleanup(struct drm_device *dev); |
3486 | extern int intel_connector_register(struct drm_connector *); | ||
3487 | extern void intel_connector_unregister(struct drm_connector *); | ||
3488 | extern int intel_modeset_vga_set_state(struct drm_i915_private *dev_priv, | 3331 | extern int intel_modeset_vga_set_state(struct drm_i915_private *dev_priv, |
3489 | bool state); | 3332 | bool state); |
3490 | extern void intel_display_resume(struct drm_device *dev); | 3333 | extern void intel_display_resume(struct drm_device *dev); |
@@ -3584,6 +3427,12 @@ void vlv_phy_pre_encoder_enable(struct intel_encoder *encoder, | |||
3584 | void vlv_phy_reset_lanes(struct intel_encoder *encoder, | 3427 | void vlv_phy_reset_lanes(struct intel_encoder *encoder, |
3585 | const struct intel_crtc_state *old_crtc_state); | 3428 | const struct intel_crtc_state *old_crtc_state); |
3586 | 3429 | ||
3430 | /* intel_combo_phy.c */ | ||
3431 | void icl_combo_phys_init(struct drm_i915_private *dev_priv); | ||
3432 | void icl_combo_phys_uninit(struct drm_i915_private *dev_priv); | ||
3433 | void cnl_combo_phys_init(struct drm_i915_private *dev_priv); | ||
3434 | void cnl_combo_phys_uninit(struct drm_i915_private *dev_priv); | ||
3435 | |||
3587 | int intel_gpu_freq(struct drm_i915_private *dev_priv, int val); | 3436 | int intel_gpu_freq(struct drm_i915_private *dev_priv, int val); |
3588 | int intel_freq_opcode(struct drm_i915_private *dev_priv, int val); | 3437 | int intel_freq_opcode(struct drm_i915_private *dev_priv, int val); |
3589 | u64 intel_rc6_residency_ns(struct drm_i915_private *dev_priv, | 3438 | u64 intel_rc6_residency_ns(struct drm_i915_private *dev_priv, |