Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright © 2016 Intel Corporation |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), |
| 6 | * to deal in the Software without restriction, including without limitation |
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | * and/or sell copies of the Software, and to permit persons to whom the |
| 9 | * Software is furnished to do so, subject to the following conditions: |
| 10 | * |
| 11 | * The above copyright notice and this permission notice (including the next |
| 12 | * paragraph) shall be included in all copies or substantial portions of the |
| 13 | * Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| 21 | * IN THE SOFTWARE. |
| 22 | * |
| 23 | */ |
| 24 | |
Chris Wilson | a09d0ba | 2016-06-24 14:00:27 +0100 | [diff] [blame] | 25 | #include <linux/console.h> |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 26 | #include <linux/vgaarb.h> |
| 27 | #include <linux/vga_switcheroo.h> |
| 28 | |
Daniel Vetter | fcd70cd | 2019-01-17 22:03:34 +0100 | [diff] [blame] | 29 | #include <drm/drm_drv.h> |
| 30 | |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 31 | #include "i915_drv.h" |
Chris Wilson | 32eb6bc | 2019-02-28 10:20:33 +0000 | [diff] [blame] | 32 | #include "i915_globals.h" |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 33 | #include "i915_selftest.h" |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 34 | |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 35 | #define PLATFORM(x) .platform = (x), .platform_mask = BIT(x) |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 36 | #define GEN(x) .gen = (x), .gen_mask = BIT((x) - 1) |
| 37 | |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 38 | #define I845_PIPE_OFFSETS \ |
| 39 | .pipe_offsets = { \ |
| 40 | [TRANSCODER_A] = PIPE_A_OFFSET, \ |
| 41 | }, \ |
| 42 | .trans_offsets = { \ |
| 43 | [TRANSCODER_A] = TRANSCODER_A_OFFSET, \ |
| 44 | } |
| 45 | |
| 46 | #define I9XX_PIPE_OFFSETS \ |
| 47 | .pipe_offsets = { \ |
| 48 | [TRANSCODER_A] = PIPE_A_OFFSET, \ |
| 49 | [TRANSCODER_B] = PIPE_B_OFFSET, \ |
| 50 | }, \ |
| 51 | .trans_offsets = { \ |
| 52 | [TRANSCODER_A] = TRANSCODER_A_OFFSET, \ |
| 53 | [TRANSCODER_B] = TRANSCODER_B_OFFSET, \ |
| 54 | } |
| 55 | |
| 56 | #define IVB_PIPE_OFFSETS \ |
| 57 | .pipe_offsets = { \ |
| 58 | [TRANSCODER_A] = PIPE_A_OFFSET, \ |
| 59 | [TRANSCODER_B] = PIPE_B_OFFSET, \ |
| 60 | [TRANSCODER_C] = PIPE_C_OFFSET, \ |
| 61 | }, \ |
| 62 | .trans_offsets = { \ |
| 63 | [TRANSCODER_A] = TRANSCODER_A_OFFSET, \ |
| 64 | [TRANSCODER_B] = TRANSCODER_B_OFFSET, \ |
| 65 | [TRANSCODER_C] = TRANSCODER_C_OFFSET, \ |
| 66 | } |
| 67 | |
| 68 | #define HSW_PIPE_OFFSETS \ |
Imre Deak | 931f549 | 2018-11-20 11:23:23 +0200 | [diff] [blame] | 69 | .pipe_offsets = { \ |
| 70 | [TRANSCODER_A] = PIPE_A_OFFSET, \ |
| 71 | [TRANSCODER_B] = PIPE_B_OFFSET, \ |
| 72 | [TRANSCODER_C] = PIPE_C_OFFSET, \ |
| 73 | [TRANSCODER_EDP] = PIPE_EDP_OFFSET, \ |
| 74 | }, \ |
| 75 | .trans_offsets = { \ |
| 76 | [TRANSCODER_A] = TRANSCODER_A_OFFSET, \ |
| 77 | [TRANSCODER_B] = TRANSCODER_B_OFFSET, \ |
| 78 | [TRANSCODER_C] = TRANSCODER_C_OFFSET, \ |
| 79 | [TRANSCODER_EDP] = TRANSCODER_EDP_OFFSET, \ |
| 80 | } |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 81 | |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 82 | #define CHV_PIPE_OFFSETS \ |
Imre Deak | 931f549 | 2018-11-20 11:23:23 +0200 | [diff] [blame] | 83 | .pipe_offsets = { \ |
| 84 | [TRANSCODER_A] = PIPE_A_OFFSET, \ |
| 85 | [TRANSCODER_B] = PIPE_B_OFFSET, \ |
| 86 | [TRANSCODER_C] = CHV_PIPE_C_OFFSET, \ |
| 87 | }, \ |
| 88 | .trans_offsets = { \ |
| 89 | [TRANSCODER_A] = TRANSCODER_A_OFFSET, \ |
| 90 | [TRANSCODER_B] = TRANSCODER_B_OFFSET, \ |
| 91 | [TRANSCODER_C] = CHV_TRANSCODER_C_OFFSET, \ |
| 92 | } |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 93 | |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 94 | #define I845_CURSOR_OFFSETS \ |
| 95 | .cursor_offsets = { \ |
| 96 | [PIPE_A] = CURSOR_A_OFFSET, \ |
| 97 | } |
| 98 | |
| 99 | #define I9XX_CURSOR_OFFSETS \ |
| 100 | .cursor_offsets = { \ |
| 101 | [PIPE_A] = CURSOR_A_OFFSET, \ |
| 102 | [PIPE_B] = CURSOR_B_OFFSET, \ |
| 103 | } |
| 104 | |
| 105 | #define CHV_CURSOR_OFFSETS \ |
| 106 | .cursor_offsets = { \ |
| 107 | [PIPE_A] = CURSOR_A_OFFSET, \ |
| 108 | [PIPE_B] = CURSOR_B_OFFSET, \ |
| 109 | [PIPE_C] = CHV_CURSOR_C_OFFSET, \ |
| 110 | } |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 111 | |
| 112 | #define IVB_CURSOR_OFFSETS \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 113 | .cursor_offsets = { \ |
| 114 | [PIPE_A] = CURSOR_A_OFFSET, \ |
| 115 | [PIPE_B] = IVB_CURSOR_B_OFFSET, \ |
| 116 | [PIPE_C] = IVB_CURSOR_C_OFFSET, \ |
| 117 | } |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 118 | |
| 119 | #define BDW_COLORS \ |
| 120 | .color = { .degamma_lut_size = 512, .gamma_lut_size = 512 } |
| 121 | #define CHV_COLORS \ |
Matt Roper | e4c0d53 | 2019-01-30 10:10:22 -0800 | [diff] [blame] | 122 | .color = { .degamma_lut_size = 65, .gamma_lut_size = 257, \ |
| 123 | .degamma_lut_tests = DRM_COLOR_LUT_NON_DECREASING, \ |
| 124 | .gamma_lut_tests = DRM_COLOR_LUT_NON_DECREASING, \ |
| 125 | } |
Rodrigo Vivi | 4672770 | 2017-10-02 23:36:52 -0700 | [diff] [blame] | 126 | #define GLK_COLORS \ |
Uma Shankar | 8957129 | 2019-02-11 19:20:21 +0530 | [diff] [blame] | 127 | .color = { .degamma_lut_size = 33, .gamma_lut_size = 1024, \ |
Matt Roper | e4c0d53 | 2019-01-30 10:10:22 -0800 | [diff] [blame] | 128 | .degamma_lut_tests = DRM_COLOR_LUT_NON_DECREASING | \ |
| 129 | DRM_COLOR_LUT_EQUAL_CHANNELS, \ |
| 130 | } |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 131 | |
Jani Nikula | a5ce929 | 2016-11-30 17:43:02 +0200 | [diff] [blame] | 132 | /* Keep in gen based order, and chronological order within a gen */ |
Matthew Auld | 2a9654b | 2017-10-06 23:18:16 +0100 | [diff] [blame] | 133 | |
| 134 | #define GEN_DEFAULT_PAGE_SIZES \ |
| 135 | .page_sizes = I915_GTT_PAGE_SIZE_4K |
| 136 | |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 137 | #define I830_FEATURES \ |
| 138 | GEN(2), \ |
| 139 | .is_mobile = 1, \ |
| 140 | .num_pipes = 2, \ |
| 141 | .display.has_overlay = 1, \ |
| 142 | .display.cursor_needs_physical = 1, \ |
| 143 | .display.overlay_needs_physical = 1, \ |
| 144 | .display.has_gmch = 1, \ |
| 145 | .gpu_reset_clobbers_display = true, \ |
| 146 | .hws_needs_physical = 1, \ |
| 147 | .unfenced_needs_alignment = 1, \ |
| 148 | .engine_mask = BIT(RCS0), \ |
| 149 | .has_snoop = true, \ |
| 150 | .has_coherent_ggtt = false, \ |
| 151 | I9XX_PIPE_OFFSETS, \ |
| 152 | I9XX_CURSOR_OFFSETS, \ |
| 153 | GEN_DEFAULT_PAGE_SIZES |
| 154 | |
| 155 | #define I845_FEATURES \ |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 156 | GEN(2), \ |
| 157 | .num_pipes = 1, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 158 | .display.has_overlay = 1, \ |
| 159 | .display.overlay_needs_physical = 1, \ |
Rodrigo Vivi | b2ae318 | 2019-02-04 14:25:38 -0800 | [diff] [blame] | 160 | .display.has_gmch = 1, \ |
Chris Wilson | 55277e1 | 2019-01-03 11:21:04 +0000 | [diff] [blame] | 161 | .gpu_reset_clobbers_display = true, \ |
Carlos Santa | 3177659 | 2016-08-17 12:30:56 -0700 | [diff] [blame] | 162 | .hws_needs_physical = 1, \ |
Chris Wilson | f4ce766 | 2017-03-25 11:32:43 +0000 | [diff] [blame] | 163 | .unfenced_needs_alignment = 1, \ |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 164 | .engine_mask = BIT(RCS0), \ |
Chris Wilson | 5d95c24 | 2017-09-06 11:56:53 +0100 | [diff] [blame] | 165 | .has_snoop = true, \ |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 166 | .has_coherent_ggtt = false, \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 167 | I845_PIPE_OFFSETS, \ |
| 168 | I845_CURSOR_OFFSETS, \ |
| 169 | GEN_DEFAULT_PAGE_SIZES |
Carlos Santa | 0eec8dc | 2016-08-17 12:30:51 -0700 | [diff] [blame] | 170 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 171 | static const struct intel_device_info intel_i830_info = { |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 172 | I830_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 173 | PLATFORM(INTEL_I830), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 174 | }; |
| 175 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 176 | static const struct intel_device_info intel_i845g_info = { |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 177 | I845_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 178 | PLATFORM(INTEL_I845G), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 179 | }; |
| 180 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 181 | static const struct intel_device_info intel_i85x_info = { |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 182 | I830_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 183 | PLATFORM(INTEL_I85X), |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 184 | .display.has_fbc = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 185 | }; |
| 186 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 187 | static const struct intel_device_info intel_i865g_info = { |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 188 | I845_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 189 | PLATFORM(INTEL_I865G), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 190 | }; |
| 191 | |
Carlos Santa | 54d2a6a | 2016-08-17 12:30:50 -0700 | [diff] [blame] | 192 | #define GEN3_FEATURES \ |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 193 | GEN(3), \ |
| 194 | .num_pipes = 2, \ |
Rodrigo Vivi | b2ae318 | 2019-02-04 14:25:38 -0800 | [diff] [blame] | 195 | .display.has_gmch = 1, \ |
Chris Wilson | 55277e1 | 2019-01-03 11:21:04 +0000 | [diff] [blame] | 196 | .gpu_reset_clobbers_display = true, \ |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 197 | .engine_mask = BIT(RCS0), \ |
Chris Wilson | 5d95c24 | 2017-09-06 11:56:53 +0100 | [diff] [blame] | 198 | .has_snoop = true, \ |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 199 | .has_coherent_ggtt = true, \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 200 | I9XX_PIPE_OFFSETS, \ |
| 201 | I9XX_CURSOR_OFFSETS, \ |
| 202 | GEN_DEFAULT_PAGE_SIZES |
Carlos Santa | 54d2a6a | 2016-08-17 12:30:50 -0700 | [diff] [blame] | 203 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 204 | static const struct intel_device_info intel_i915g_info = { |
Carlos Santa | 54d2a6a | 2016-08-17 12:30:50 -0700 | [diff] [blame] | 205 | GEN3_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 206 | PLATFORM(INTEL_I915G), |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 207 | .has_coherent_ggtt = false, |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 208 | .display.cursor_needs_physical = 1, |
| 209 | .display.has_overlay = 1, |
| 210 | .display.overlay_needs_physical = 1, |
Carlos Santa | 3177659 | 2016-08-17 12:30:56 -0700 | [diff] [blame] | 211 | .hws_needs_physical = 1, |
Chris Wilson | f4ce766 | 2017-03-25 11:32:43 +0000 | [diff] [blame] | 212 | .unfenced_needs_alignment = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 213 | }; |
Jani Nikula | a5ce929 | 2016-11-30 17:43:02 +0200 | [diff] [blame] | 214 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 215 | static const struct intel_device_info intel_i915gm_info = { |
Carlos Santa | 54d2a6a | 2016-08-17 12:30:50 -0700 | [diff] [blame] | 216 | GEN3_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 217 | PLATFORM(INTEL_I915GM), |
Carlos Santa | 54d2a6a | 2016-08-17 12:30:50 -0700 | [diff] [blame] | 218 | .is_mobile = 1, |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 219 | .display.cursor_needs_physical = 1, |
| 220 | .display.has_overlay = 1, |
| 221 | .display.overlay_needs_physical = 1, |
| 222 | .display.supports_tv = 1, |
| 223 | .display.has_fbc = 1, |
Carlos Santa | 3177659 | 2016-08-17 12:30:56 -0700 | [diff] [blame] | 224 | .hws_needs_physical = 1, |
Chris Wilson | f4ce766 | 2017-03-25 11:32:43 +0000 | [diff] [blame] | 225 | .unfenced_needs_alignment = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 226 | }; |
Jani Nikula | a5ce929 | 2016-11-30 17:43:02 +0200 | [diff] [blame] | 227 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 228 | static const struct intel_device_info intel_i945g_info = { |
Carlos Santa | 54d2a6a | 2016-08-17 12:30:50 -0700 | [diff] [blame] | 229 | GEN3_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 230 | PLATFORM(INTEL_I945G), |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 231 | .display.has_hotplug = 1, |
| 232 | .display.cursor_needs_physical = 1, |
| 233 | .display.has_overlay = 1, |
| 234 | .display.overlay_needs_physical = 1, |
Carlos Santa | 3177659 | 2016-08-17 12:30:56 -0700 | [diff] [blame] | 235 | .hws_needs_physical = 1, |
Chris Wilson | f4ce766 | 2017-03-25 11:32:43 +0000 | [diff] [blame] | 236 | .unfenced_needs_alignment = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 237 | }; |
Jani Nikula | a5ce929 | 2016-11-30 17:43:02 +0200 | [diff] [blame] | 238 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 239 | static const struct intel_device_info intel_i945gm_info = { |
Carlos Santa | 54d2a6a | 2016-08-17 12:30:50 -0700 | [diff] [blame] | 240 | GEN3_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 241 | PLATFORM(INTEL_I945GM), |
| 242 | .is_mobile = 1, |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 243 | .display.has_hotplug = 1, |
| 244 | .display.cursor_needs_physical = 1, |
| 245 | .display.has_overlay = 1, |
| 246 | .display.overlay_needs_physical = 1, |
| 247 | .display.supports_tv = 1, |
| 248 | .display.has_fbc = 1, |
Carlos Santa | 3177659 | 2016-08-17 12:30:56 -0700 | [diff] [blame] | 249 | .hws_needs_physical = 1, |
Chris Wilson | f4ce766 | 2017-03-25 11:32:43 +0000 | [diff] [blame] | 250 | .unfenced_needs_alignment = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 251 | }; |
| 252 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 253 | static const struct intel_device_info intel_g33_info = { |
Jani Nikula | a5ce929 | 2016-11-30 17:43:02 +0200 | [diff] [blame] | 254 | GEN3_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 255 | PLATFORM(INTEL_G33), |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 256 | .display.has_hotplug = 1, |
| 257 | .display.has_overlay = 1, |
Jani Nikula | a5ce929 | 2016-11-30 17:43:02 +0200 | [diff] [blame] | 258 | }; |
| 259 | |
Tvrtko Ursulin | 86d35d4 | 2019-03-26 07:40:54 +0000 | [diff] [blame^] | 260 | static const struct intel_device_info intel_pineview_g_info = { |
| 261 | GEN3_FEATURES, |
| 262 | PLATFORM(INTEL_PINEVIEW), |
| 263 | .display.has_hotplug = 1, |
| 264 | .display.has_overlay = 1, |
| 265 | }; |
| 266 | |
| 267 | static const struct intel_device_info intel_pineview_m_info = { |
Jani Nikula | a5ce929 | 2016-11-30 17:43:02 +0200 | [diff] [blame] | 268 | GEN3_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 269 | PLATFORM(INTEL_PINEVIEW), |
| 270 | .is_mobile = 1, |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 271 | .display.has_hotplug = 1, |
| 272 | .display.has_overlay = 1, |
Jani Nikula | a5ce929 | 2016-11-30 17:43:02 +0200 | [diff] [blame] | 273 | }; |
| 274 | |
Carlos Santa | 4d495be | 2016-08-17 12:30:49 -0700 | [diff] [blame] | 275 | #define GEN4_FEATURES \ |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 276 | GEN(4), \ |
| 277 | .num_pipes = 2, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 278 | .display.has_hotplug = 1, \ |
Rodrigo Vivi | b2ae318 | 2019-02-04 14:25:38 -0800 | [diff] [blame] | 279 | .display.has_gmch = 1, \ |
Chris Wilson | 55277e1 | 2019-01-03 11:21:04 +0000 | [diff] [blame] | 280 | .gpu_reset_clobbers_display = true, \ |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 281 | .engine_mask = BIT(RCS0), \ |
Chris Wilson | 5d95c24 | 2017-09-06 11:56:53 +0100 | [diff] [blame] | 282 | .has_snoop = true, \ |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 283 | .has_coherent_ggtt = true, \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 284 | I9XX_PIPE_OFFSETS, \ |
| 285 | I9XX_CURSOR_OFFSETS, \ |
| 286 | GEN_DEFAULT_PAGE_SIZES |
Carlos Santa | 4d495be | 2016-08-17 12:30:49 -0700 | [diff] [blame] | 287 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 288 | static const struct intel_device_info intel_i965g_info = { |
Carlos Santa | 4d495be | 2016-08-17 12:30:49 -0700 | [diff] [blame] | 289 | GEN4_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 290 | PLATFORM(INTEL_I965G), |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 291 | .display.has_overlay = 1, |
Carlos Santa | 3177659 | 2016-08-17 12:30:56 -0700 | [diff] [blame] | 292 | .hws_needs_physical = 1, |
Chris Wilson | df0700e | 2017-09-06 20:24:24 +0100 | [diff] [blame] | 293 | .has_snoop = false, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 294 | }; |
| 295 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 296 | static const struct intel_device_info intel_i965gm_info = { |
Carlos Santa | 4d495be | 2016-08-17 12:30:49 -0700 | [diff] [blame] | 297 | GEN4_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 298 | PLATFORM(INTEL_I965GM), |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 299 | .is_mobile = 1, |
| 300 | .display.has_fbc = 1, |
| 301 | .display.has_overlay = 1, |
| 302 | .display.supports_tv = 1, |
Carlos Santa | 3177659 | 2016-08-17 12:30:56 -0700 | [diff] [blame] | 303 | .hws_needs_physical = 1, |
Chris Wilson | df0700e | 2017-09-06 20:24:24 +0100 | [diff] [blame] | 304 | .has_snoop = false, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 305 | }; |
| 306 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 307 | static const struct intel_device_info intel_g45_info = { |
Carlos Santa | 4d495be | 2016-08-17 12:30:49 -0700 | [diff] [blame] | 308 | GEN4_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 309 | PLATFORM(INTEL_G45), |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 310 | .engine_mask = BIT(RCS0) | BIT(VCS0), |
Chris Wilson | 55277e1 | 2019-01-03 11:21:04 +0000 | [diff] [blame] | 311 | .gpu_reset_clobbers_display = false, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 312 | }; |
| 313 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 314 | static const struct intel_device_info intel_gm45_info = { |
Carlos Santa | 4d495be | 2016-08-17 12:30:49 -0700 | [diff] [blame] | 315 | GEN4_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 316 | PLATFORM(INTEL_GM45), |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 317 | .is_mobile = 1, |
| 318 | .display.has_fbc = 1, |
| 319 | .display.supports_tv = 1, |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 320 | .engine_mask = BIT(RCS0) | BIT(VCS0), |
Chris Wilson | 55277e1 | 2019-01-03 11:21:04 +0000 | [diff] [blame] | 321 | .gpu_reset_clobbers_display = false, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 322 | }; |
| 323 | |
Carlos Santa | a132338 | 2016-08-17 12:30:47 -0700 | [diff] [blame] | 324 | #define GEN5_FEATURES \ |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 325 | GEN(5), \ |
| 326 | .num_pipes = 2, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 327 | .display.has_hotplug = 1, \ |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 328 | .engine_mask = BIT(RCS0) | BIT(VCS0), \ |
Chris Wilson | 5d95c24 | 2017-09-06 11:56:53 +0100 | [diff] [blame] | 329 | .has_snoop = true, \ |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 330 | .has_coherent_ggtt = true, \ |
Chris Wilson | fb6db0f | 2017-12-01 11:30:30 +0000 | [diff] [blame] | 331 | /* ilk does support rc6, but we do not implement [power] contexts */ \ |
| 332 | .has_rc6 = 0, \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 333 | I9XX_PIPE_OFFSETS, \ |
| 334 | I9XX_CURSOR_OFFSETS, \ |
| 335 | GEN_DEFAULT_PAGE_SIZES |
Carlos Santa | a132338 | 2016-08-17 12:30:47 -0700 | [diff] [blame] | 336 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 337 | static const struct intel_device_info intel_ironlake_d_info = { |
Carlos Santa | a132338 | 2016-08-17 12:30:47 -0700 | [diff] [blame] | 338 | GEN5_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 339 | PLATFORM(INTEL_IRONLAKE), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 340 | }; |
| 341 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 342 | static const struct intel_device_info intel_ironlake_m_info = { |
Carlos Santa | a132338 | 2016-08-17 12:30:47 -0700 | [diff] [blame] | 343 | GEN5_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 344 | PLATFORM(INTEL_IRONLAKE), |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 345 | .is_mobile = 1, |
| 346 | .display.has_fbc = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 347 | }; |
| 348 | |
Carlos Santa | 07db6be | 2016-08-17 12:30:38 -0700 | [diff] [blame] | 349 | #define GEN6_FEATURES \ |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 350 | GEN(6), \ |
| 351 | .num_pipes = 2, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 352 | .display.has_hotplug = 1, \ |
| 353 | .display.has_fbc = 1, \ |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 354 | .engine_mask = BIT(RCS0) | BIT(VCS0) | BIT(BCS0), \ |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 355 | .has_coherent_ggtt = true, \ |
Carlos Santa | 07db6be | 2016-08-17 12:30:38 -0700 | [diff] [blame] | 356 | .has_llc = 1, \ |
Carlos Santa | 86f3624 | 2016-08-17 12:30:44 -0700 | [diff] [blame] | 357 | .has_rc6 = 1, \ |
Carlos Santa | 33b5bf8 | 2016-08-17 12:30:45 -0700 | [diff] [blame] | 358 | .has_rc6p = 1, \ |
Chris Wilson | cbecbcc | 2019-03-14 22:38:36 +0000 | [diff] [blame] | 359 | .ppgtt_type = INTEL_PPGTT_ALIASING, \ |
| 360 | .ppgtt_size = 31, \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 361 | I9XX_PIPE_OFFSETS, \ |
| 362 | I9XX_CURSOR_OFFSETS, \ |
| 363 | GEN_DEFAULT_PAGE_SIZES |
Carlos Santa | 07db6be | 2016-08-17 12:30:38 -0700 | [diff] [blame] | 364 | |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 365 | #define SNB_D_PLATFORM \ |
| 366 | GEN6_FEATURES, \ |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 367 | PLATFORM(INTEL_SANDYBRIDGE) |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 368 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 369 | static const struct intel_device_info intel_sandybridge_d_gt1_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 370 | SNB_D_PLATFORM, |
| 371 | .gt = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 372 | }; |
| 373 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 374 | static const struct intel_device_info intel_sandybridge_d_gt2_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 375 | SNB_D_PLATFORM, |
| 376 | .gt = 2, |
| 377 | }; |
| 378 | |
| 379 | #define SNB_M_PLATFORM \ |
| 380 | GEN6_FEATURES, \ |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 381 | PLATFORM(INTEL_SANDYBRIDGE), \ |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 382 | .is_mobile = 1 |
| 383 | |
| 384 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 385 | static const struct intel_device_info intel_sandybridge_m_gt1_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 386 | SNB_M_PLATFORM, |
| 387 | .gt = 1, |
| 388 | }; |
| 389 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 390 | static const struct intel_device_info intel_sandybridge_m_gt2_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 391 | SNB_M_PLATFORM, |
| 392 | .gt = 2, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 393 | }; |
| 394 | |
| 395 | #define GEN7_FEATURES \ |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 396 | GEN(7), \ |
| 397 | .num_pipes = 3, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 398 | .display.has_hotplug = 1, \ |
| 399 | .display.has_fbc = 1, \ |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 400 | .engine_mask = BIT(RCS0) | BIT(VCS0) | BIT(BCS0), \ |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 401 | .has_coherent_ggtt = true, \ |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 402 | .has_llc = 1, \ |
Carlos Santa | 86f3624 | 2016-08-17 12:30:44 -0700 | [diff] [blame] | 403 | .has_rc6 = 1, \ |
Carlos Santa | 33b5bf8 | 2016-08-17 12:30:45 -0700 | [diff] [blame] | 404 | .has_rc6p = 1, \ |
Chris Wilson | cbecbcc | 2019-03-14 22:38:36 +0000 | [diff] [blame] | 405 | .ppgtt_type = INTEL_PPGTT_FULL, \ |
| 406 | .ppgtt_size = 31, \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 407 | IVB_PIPE_OFFSETS, \ |
| 408 | IVB_CURSOR_OFFSETS, \ |
| 409 | GEN_DEFAULT_PAGE_SIZES |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 410 | |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 411 | #define IVB_D_PLATFORM \ |
| 412 | GEN7_FEATURES, \ |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 413 | PLATFORM(INTEL_IVYBRIDGE), \ |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 414 | .has_l3_dpf = 1 |
| 415 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 416 | static const struct intel_device_info intel_ivybridge_d_gt1_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 417 | IVB_D_PLATFORM, |
| 418 | .gt = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 419 | }; |
| 420 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 421 | static const struct intel_device_info intel_ivybridge_d_gt2_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 422 | IVB_D_PLATFORM, |
| 423 | .gt = 2, |
| 424 | }; |
| 425 | |
| 426 | #define IVB_M_PLATFORM \ |
| 427 | GEN7_FEATURES, \ |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 428 | PLATFORM(INTEL_IVYBRIDGE), \ |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 429 | .is_mobile = 1, \ |
| 430 | .has_l3_dpf = 1 |
| 431 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 432 | static const struct intel_device_info intel_ivybridge_m_gt1_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 433 | IVB_M_PLATFORM, |
| 434 | .gt = 1, |
| 435 | }; |
| 436 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 437 | static const struct intel_device_info intel_ivybridge_m_gt2_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 438 | IVB_M_PLATFORM, |
| 439 | .gt = 2, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 440 | }; |
| 441 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 442 | static const struct intel_device_info intel_ivybridge_q_info = { |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 443 | GEN7_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 444 | PLATFORM(INTEL_IVYBRIDGE), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 445 | .gt = 2, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 446 | .num_pipes = 0, /* legal, last one wins */ |
Carlos Santa | ca9c452 | 2016-08-17 12:30:54 -0700 | [diff] [blame] | 447 | .has_l3_dpf = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 448 | }; |
| 449 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 450 | static const struct intel_device_info intel_valleyview_info = { |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 451 | PLATFORM(INTEL_VALLEYVIEW), |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 452 | GEN(7), |
Rodrigo Vivi | eb6f771 | 2016-12-19 13:55:08 -0800 | [diff] [blame] | 453 | .is_lp = 1, |
| 454 | .num_pipes = 2, |
Rodrigo Vivi | eb6f771 | 2016-12-19 13:55:08 -0800 | [diff] [blame] | 455 | .has_runtime_pm = 1, |
| 456 | .has_rc6 = 1, |
Rodrigo Vivi | b2ae318 | 2019-02-04 14:25:38 -0800 | [diff] [blame] | 457 | .display.has_gmch = 1, |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 458 | .display.has_hotplug = 1, |
Chris Wilson | cbecbcc | 2019-03-14 22:38:36 +0000 | [diff] [blame] | 459 | .ppgtt_type = INTEL_PPGTT_FULL, |
| 460 | .ppgtt_size = 31, |
Chris Wilson | 5d95c24 | 2017-09-06 11:56:53 +0100 | [diff] [blame] | 461 | .has_snoop = true, |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 462 | .has_coherent_ggtt = false, |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 463 | .engine_mask = BIT(RCS0) | BIT(VCS0) | BIT(BCS0), |
Rodrigo Vivi | eb6f771 | 2016-12-19 13:55:08 -0800 | [diff] [blame] | 464 | .display_mmio_offset = VLV_DISPLAY_BASE, |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 465 | I9XX_PIPE_OFFSETS, |
| 466 | I9XX_CURSOR_OFFSETS, |
Matthew Auld | 2a9654b | 2017-10-06 23:18:16 +0100 | [diff] [blame] | 467 | GEN_DEFAULT_PAGE_SIZES, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 468 | }; |
| 469 | |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 470 | #define G75_FEATURES \ |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 471 | GEN7_FEATURES, \ |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 472 | .engine_mask = BIT(RCS0) | BIT(VCS0) | BIT(BCS0) | BIT(VECS0), \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 473 | .display.has_ddi = 1, \ |
Carlos Santa | 6e3b84d | 2016-08-17 12:30:36 -0700 | [diff] [blame] | 474 | .has_fpga_dbg = 1, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 475 | .display.has_psr = 1, \ |
| 476 | .display.has_dp_mst = 1, \ |
Carlos Santa | 33b5bf8 | 2016-08-17 12:30:45 -0700 | [diff] [blame] | 477 | .has_rc6p = 0 /* RC6p removed-by HSW */, \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 478 | HSW_PIPE_OFFSETS, \ |
Carlos Santa | 4aa4c23 | 2016-08-17 12:30:39 -0700 | [diff] [blame] | 479 | .has_runtime_pm = 1 |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 480 | |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 481 | #define HSW_PLATFORM \ |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 482 | G75_FEATURES, \ |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 483 | PLATFORM(INTEL_HASWELL), \ |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 484 | .has_l3_dpf = 1 |
| 485 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 486 | static const struct intel_device_info intel_haswell_gt1_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 487 | HSW_PLATFORM, |
| 488 | .gt = 1, |
| 489 | }; |
| 490 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 491 | static const struct intel_device_info intel_haswell_gt2_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 492 | HSW_PLATFORM, |
| 493 | .gt = 2, |
| 494 | }; |
| 495 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 496 | static const struct intel_device_info intel_haswell_gt3_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 497 | HSW_PLATFORM, |
| 498 | .gt = 3, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 499 | }; |
| 500 | |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 501 | #define GEN8_FEATURES \ |
| 502 | G75_FEATURES, \ |
Chris Wilson | a6e1c5a | 2018-02-15 08:19:29 +0000 | [diff] [blame] | 503 | GEN(8), \ |
Carlos Santa | 4586f1d | 2016-08-17 12:30:53 -0700 | [diff] [blame] | 504 | BDW_COLORS, \ |
Matthew Auld | a883241 | 2017-10-06 23:18:33 +0100 | [diff] [blame] | 505 | .page_sizes = I915_GTT_PAGE_SIZE_4K | \ |
| 506 | I915_GTT_PAGE_SIZE_2M, \ |
Joonas Lahtinen | dfc5148 | 2016-11-03 10:39:46 +0200 | [diff] [blame] | 507 | .has_logical_ring_contexts = 1, \ |
Chris Wilson | 51d623b | 2019-03-14 22:38:37 +0000 | [diff] [blame] | 508 | .ppgtt_type = INTEL_PPGTT_FULL, \ |
Chris Wilson | cbecbcc | 2019-03-14 22:38:36 +0000 | [diff] [blame] | 509 | .ppgtt_size = 48, \ |
Michel Thierry | 142bc7d | 2017-06-20 10:57:46 +0100 | [diff] [blame] | 510 | .has_64bit_reloc = 1, \ |
| 511 | .has_reset_engine = 1 |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 512 | |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 513 | #define BDW_PLATFORM \ |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 514 | GEN8_FEATURES, \ |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 515 | PLATFORM(INTEL_BROADWELL) |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 516 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 517 | static const struct intel_device_info intel_broadwell_gt1_info = { |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 518 | BDW_PLATFORM, |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 519 | .gt = 1, |
| 520 | }; |
| 521 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 522 | static const struct intel_device_info intel_broadwell_gt2_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 523 | BDW_PLATFORM, |
| 524 | .gt = 2, |
| 525 | }; |
| 526 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 527 | static const struct intel_device_info intel_broadwell_rsvd_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 528 | BDW_PLATFORM, |
| 529 | .gt = 3, |
| 530 | /* According to the device ID those devices are GT3, they were |
| 531 | * previously treated as not GT3, keep it like that. |
| 532 | */ |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 533 | }; |
| 534 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 535 | static const struct intel_device_info intel_broadwell_gt3_info = { |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 536 | BDW_PLATFORM, |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 537 | .gt = 3, |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 538 | .engine_mask = |
| 539 | BIT(RCS0) | BIT(VCS0) | BIT(BCS0) | BIT(VECS0) | BIT(VCS1), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 540 | }; |
| 541 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 542 | static const struct intel_device_info intel_cherryview_info = { |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 543 | PLATFORM(INTEL_CHERRYVIEW), |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 544 | GEN(8), |
| 545 | .num_pipes = 3, |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 546 | .display.has_hotplug = 1, |
Rodrigo Vivi | 8727dc0 | 2016-12-18 13:36:26 -0800 | [diff] [blame] | 547 | .is_lp = 1, |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 548 | .engine_mask = BIT(RCS0) | BIT(VCS0) | BIT(BCS0) | BIT(VECS0), |
Joonas Lahtinen | dfc5148 | 2016-11-03 10:39:46 +0200 | [diff] [blame] | 549 | .has_64bit_reloc = 1, |
Carlos Santa | 4aa4c23 | 2016-08-17 12:30:39 -0700 | [diff] [blame] | 550 | .has_runtime_pm = 1, |
Carlos Santa | 86f3624 | 2016-08-17 12:30:44 -0700 | [diff] [blame] | 551 | .has_rc6 = 1, |
Carlos Santa | 4586f1d | 2016-08-17 12:30:53 -0700 | [diff] [blame] | 552 | .has_logical_ring_contexts = 1, |
Rodrigo Vivi | b2ae318 | 2019-02-04 14:25:38 -0800 | [diff] [blame] | 553 | .display.has_gmch = 1, |
Chris Wilson | cbecbcc | 2019-03-14 22:38:36 +0000 | [diff] [blame] | 554 | .ppgtt_type = INTEL_PPGTT_FULL, |
| 555 | .ppgtt_size = 32, |
Michel Thierry | 142bc7d | 2017-06-20 10:57:46 +0100 | [diff] [blame] | 556 | .has_reset_engine = 1, |
Chris Wilson | 5d95c24 | 2017-09-06 11:56:53 +0100 | [diff] [blame] | 557 | .has_snoop = true, |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 558 | .has_coherent_ggtt = false, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 559 | .display_mmio_offset = VLV_DISPLAY_BASE, |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 560 | CHV_PIPE_OFFSETS, |
| 561 | CHV_CURSOR_OFFSETS, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 562 | CHV_COLORS, |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 563 | GEN_DEFAULT_PAGE_SIZES, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 564 | }; |
| 565 | |
Matthew Auld | 2a9654b | 2017-10-06 23:18:16 +0100 | [diff] [blame] | 566 | #define GEN9_DEFAULT_PAGE_SIZES \ |
Matthew Auld | f1f3f98 | 2017-10-06 23:18:32 +0100 | [diff] [blame] | 567 | .page_sizes = I915_GTT_PAGE_SIZE_4K | \ |
Matthew Auld | a883241 | 2017-10-06 23:18:33 +0100 | [diff] [blame] | 568 | I915_GTT_PAGE_SIZE_64K | \ |
| 569 | I915_GTT_PAGE_SIZE_2M |
Matthew Auld | 2a9654b | 2017-10-06 23:18:16 +0100 | [diff] [blame] | 570 | |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 571 | #define GEN9_FEATURES \ |
| 572 | GEN8_FEATURES, \ |
Chris Wilson | a6e1c5a | 2018-02-15 08:19:29 +0000 | [diff] [blame] | 573 | GEN(9), \ |
Matthew Auld | 2a9654b | 2017-10-06 23:18:16 +0100 | [diff] [blame] | 574 | GEN9_DEFAULT_PAGE_SIZES, \ |
Chris Wilson | beecec9 | 2017-10-03 21:34:52 +0100 | [diff] [blame] | 575 | .has_logical_ring_preemption = 1, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 576 | .display.has_csr = 1, \ |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 577 | .has_guc = 1, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 578 | .display.has_ipc = 1, \ |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 579 | .ddb_size = 896 |
| 580 | |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 581 | #define SKL_PLATFORM \ |
| 582 | GEN9_FEATURES, \ |
José Roberto de Souza | 6323113 | 2018-09-18 13:47:12 -0700 | [diff] [blame] | 583 | /* Display WA #0477 WaDisableIPC: skl */ \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 584 | .display.has_ipc = 0, \ |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 585 | PLATFORM(INTEL_SKYLAKE) |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 586 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 587 | static const struct intel_device_info intel_skylake_gt1_info = { |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 588 | SKL_PLATFORM, |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 589 | .gt = 1, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 590 | }; |
| 591 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 592 | static const struct intel_device_info intel_skylake_gt2_info = { |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 593 | SKL_PLATFORM, |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 594 | .gt = 2, |
| 595 | }; |
| 596 | |
| 597 | #define SKL_GT3_PLUS_PLATFORM \ |
| 598 | SKL_PLATFORM, \ |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 599 | .engine_mask = \ |
| 600 | BIT(RCS0) | BIT(VCS0) | BIT(BCS0) | BIT(VECS0) | BIT(VCS1) |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 601 | |
| 602 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 603 | static const struct intel_device_info intel_skylake_gt3_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 604 | SKL_GT3_PLUS_PLATFORM, |
| 605 | .gt = 3, |
| 606 | }; |
| 607 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 608 | static const struct intel_device_info intel_skylake_gt4_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 609 | SKL_GT3_PLUS_PLATFORM, |
| 610 | .gt = 4, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 611 | }; |
| 612 | |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 613 | #define GEN9_LP_FEATURES \ |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 614 | GEN(9), \ |
Ander Conselvan de Oliveira | 3e4274f | 2016-11-10 17:23:09 +0200 | [diff] [blame] | 615 | .is_lp = 1, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 616 | .display.has_hotplug = 1, \ |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 617 | .engine_mask = BIT(RCS0) | BIT(VCS0) | BIT(BCS0) | BIT(VECS0), \ |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 618 | .num_pipes = 3, \ |
| 619 | .has_64bit_reloc = 1, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 620 | .display.has_ddi = 1, \ |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 621 | .has_fpga_dbg = 1, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 622 | .display.has_fbc = 1, \ |
| 623 | .display.has_psr = 1, \ |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 624 | .has_runtime_pm = 1, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 625 | .display.has_csr = 1, \ |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 626 | .has_rc6 = 1, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 627 | .display.has_dp_mst = 1, \ |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 628 | .has_logical_ring_contexts = 1, \ |
Chris Wilson | beecec9 | 2017-10-03 21:34:52 +0100 | [diff] [blame] | 629 | .has_logical_ring_preemption = 1, \ |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 630 | .has_guc = 1, \ |
Chris Wilson | 51d623b | 2019-03-14 22:38:37 +0000 | [diff] [blame] | 631 | .ppgtt_type = INTEL_PPGTT_FULL, \ |
Chris Wilson | cbecbcc | 2019-03-14 22:38:36 +0000 | [diff] [blame] | 632 | .ppgtt_size = 48, \ |
Michel Thierry | 142bc7d | 2017-06-20 10:57:46 +0100 | [diff] [blame] | 633 | .has_reset_engine = 1, \ |
Chris Wilson | 5d95c24 | 2017-09-06 11:56:53 +0100 | [diff] [blame] | 634 | .has_snoop = true, \ |
Chris Wilson | 900ccf3 | 2018-07-20 11:19:10 +0100 | [diff] [blame] | 635 | .has_coherent_ggtt = false, \ |
José Roberto de Souza | d53db44 | 2018-11-30 15:20:48 -0800 | [diff] [blame] | 636 | .display.has_ipc = 1, \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 637 | HSW_PIPE_OFFSETS, \ |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 638 | IVB_CURSOR_OFFSETS, \ |
Ville Syrjälä | 37fbbd49 | 2019-03-05 21:29:05 +0200 | [diff] [blame] | 639 | BDW_COLORS, \ |
| 640 | GEN9_DEFAULT_PAGE_SIZES |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 641 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 642 | static const struct intel_device_info intel_broxton_info = { |
Rodrigo Vivi | 80fa66b | 2016-12-01 11:33:16 +0200 | [diff] [blame] | 643 | GEN9_LP_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 644 | PLATFORM(INTEL_BROXTON), |
Deepak M | 6f3fff6 | 2016-09-15 15:01:10 +0530 | [diff] [blame] | 645 | .ddb_size = 512, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 646 | }; |
| 647 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 648 | static const struct intel_device_info intel_geminilake_info = { |
Ander Conselvan de Oliveira | c22097f | 2016-11-14 16:25:26 +0200 | [diff] [blame] | 649 | GEN9_LP_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 650 | PLATFORM(INTEL_GEMINILAKE), |
Ander Conselvan de Oliveira | c22097f | 2016-11-14 16:25:26 +0200 | [diff] [blame] | 651 | .ddb_size = 1024, |
Rodrigo Vivi | 4672770 | 2017-10-02 23:36:52 -0700 | [diff] [blame] | 652 | GLK_COLORS, |
Ander Conselvan de Oliveira | c22097f | 2016-11-14 16:25:26 +0200 | [diff] [blame] | 653 | }; |
| 654 | |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 655 | #define KBL_PLATFORM \ |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 656 | GEN9_FEATURES, \ |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 657 | PLATFORM(INTEL_KABYLAKE) |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 658 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 659 | static const struct intel_device_info intel_kabylake_gt1_info = { |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 660 | KBL_PLATFORM, |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 661 | .gt = 1, |
| 662 | }; |
| 663 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 664 | static const struct intel_device_info intel_kabylake_gt2_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 665 | KBL_PLATFORM, |
| 666 | .gt = 2, |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 667 | }; |
| 668 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 669 | static const struct intel_device_info intel_kabylake_gt3_info = { |
Rodrigo Vivi | 94829de | 2017-06-06 09:06:06 -0700 | [diff] [blame] | 670 | KBL_PLATFORM, |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 671 | .gt = 3, |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 672 | .engine_mask = |
| 673 | BIT(RCS0) | BIT(VCS0) | BIT(BCS0) | BIT(VECS0) | BIT(VCS1), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 674 | }; |
| 675 | |
Rodrigo Vivi | 71851fa | 2017-06-08 08:49:58 -0700 | [diff] [blame] | 676 | #define CFL_PLATFORM \ |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 677 | GEN9_FEATURES, \ |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 678 | PLATFORM(INTEL_COFFEELAKE) |
Rodrigo Vivi | 71851fa | 2017-06-08 08:49:58 -0700 | [diff] [blame] | 679 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 680 | static const struct intel_device_info intel_coffeelake_gt1_info = { |
Rodrigo Vivi | 71851fa | 2017-06-08 08:49:58 -0700 | [diff] [blame] | 681 | CFL_PLATFORM, |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 682 | .gt = 1, |
| 683 | }; |
| 684 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 685 | static const struct intel_device_info intel_coffeelake_gt2_info = { |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 686 | CFL_PLATFORM, |
| 687 | .gt = 2, |
Rodrigo Vivi | 71851fa | 2017-06-08 08:49:58 -0700 | [diff] [blame] | 688 | }; |
| 689 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 690 | static const struct intel_device_info intel_coffeelake_gt3_info = { |
Rodrigo Vivi | 71851fa | 2017-06-08 08:49:58 -0700 | [diff] [blame] | 691 | CFL_PLATFORM, |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 692 | .gt = 3, |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 693 | .engine_mask = |
| 694 | BIT(RCS0) | BIT(VCS0) | BIT(BCS0) | BIT(VECS0) | BIT(VCS1), |
Rodrigo Vivi | 71851fa | 2017-06-08 08:49:58 -0700 | [diff] [blame] | 695 | }; |
| 696 | |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 697 | #define GEN10_FEATURES \ |
| 698 | GEN9_FEATURES, \ |
Chris Wilson | a6e1c5a | 2018-02-15 08:19:29 +0000 | [diff] [blame] | 699 | GEN(10), \ |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 700 | .ddb_size = 1024, \ |
Chris Wilson | 21eb185 | 2018-08-01 11:47:21 +0100 | [diff] [blame] | 701 | .has_coherent_ggtt = false, \ |
Rodrigo Vivi | 4672770 | 2017-10-02 23:36:52 -0700 | [diff] [blame] | 702 | GLK_COLORS |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 703 | |
Rodrigo Vivi | 3f43031 | 2018-01-29 15:22:14 -0800 | [diff] [blame] | 704 | static const struct intel_device_info intel_cannonlake_info = { |
Rodrigo Vivi | 42a3ae8 | 2017-10-02 23:36:51 -0700 | [diff] [blame] | 705 | GEN10_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 706 | PLATFORM(INTEL_CANNONLAKE), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 707 | .gt = 2, |
Rodrigo Vivi | 413f3c1 | 2017-06-06 13:30:30 -0700 | [diff] [blame] | 708 | }; |
| 709 | |
Rodrigo Vivi | 41231001 | 2018-01-11 16:00:04 -0200 | [diff] [blame] | 710 | #define GEN11_FEATURES \ |
| 711 | GEN10_FEATURES, \ |
Imre Deak | 931f549 | 2018-11-20 11:23:23 +0200 | [diff] [blame] | 712 | .pipe_offsets = { \ |
| 713 | [TRANSCODER_A] = PIPE_A_OFFSET, \ |
| 714 | [TRANSCODER_B] = PIPE_B_OFFSET, \ |
| 715 | [TRANSCODER_C] = PIPE_C_OFFSET, \ |
| 716 | [TRANSCODER_EDP] = PIPE_EDP_OFFSET, \ |
| 717 | [TRANSCODER_DSI_0] = PIPE_DSI0_OFFSET, \ |
| 718 | [TRANSCODER_DSI_1] = PIPE_DSI1_OFFSET, \ |
| 719 | }, \ |
| 720 | .trans_offsets = { \ |
| 721 | [TRANSCODER_A] = TRANSCODER_A_OFFSET, \ |
| 722 | [TRANSCODER_B] = TRANSCODER_B_OFFSET, \ |
| 723 | [TRANSCODER_C] = TRANSCODER_C_OFFSET, \ |
| 724 | [TRANSCODER_EDP] = TRANSCODER_EDP_OFFSET, \ |
| 725 | [TRANSCODER_DSI_0] = TRANSCODER_DSI0_OFFSET, \ |
| 726 | [TRANSCODER_DSI_1] = TRANSCODER_DSI1_OFFSET, \ |
| 727 | }, \ |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 728 | GEN(11), \ |
Rodrigo Vivi | 41231001 | 2018-01-11 16:00:04 -0200 | [diff] [blame] | 729 | .ddb_size = 2048, \ |
Uma Shankar | e6ed078 | 2019-02-11 19:20:25 +0530 | [diff] [blame] | 730 | .has_logical_ring_elsq = 1, \ |
| 731 | .color = { .degamma_lut_size = 33, .gamma_lut_size = 1024 } |
Rodrigo Vivi | 41231001 | 2018-01-11 16:00:04 -0200 | [diff] [blame] | 732 | |
Lionel Landwerlin | 5db47e3 | 2018-01-29 08:33:46 +0000 | [diff] [blame] | 733 | static const struct intel_device_info intel_icelake_11_info = { |
Rodrigo Vivi | 41231001 | 2018-01-11 16:00:04 -0200 | [diff] [blame] | 734 | GEN11_FEATURES, |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 735 | PLATFORM(INTEL_ICELAKE), |
Chris Wilson | 8a68d46 | 2019-03-05 18:03:30 +0000 | [diff] [blame] | 736 | .engine_mask = |
| 737 | BIT(RCS0) | BIT(BCS0) | BIT(VECS0) | BIT(VCS0) | BIT(VCS2), |
Rodrigo Vivi | 41231001 | 2018-01-11 16:00:04 -0200 | [diff] [blame] | 738 | }; |
| 739 | |
James Ausmus | 29f3863 | 2019-03-22 10:58:42 -0700 | [diff] [blame] | 740 | static const struct intel_device_info intel_elkhartlake_info = { |
| 741 | GEN11_FEATURES, |
Bob Paauwe | 897f296 | 2019-03-22 10:58:43 -0700 | [diff] [blame] | 742 | PLATFORM(INTEL_ELKHARTLAKE), |
James Ausmus | 29f3863 | 2019-03-22 10:58:42 -0700 | [diff] [blame] | 743 | .is_alpha_support = 1, |
| 744 | .engine_mask = BIT(RCS0) | BIT(BCS0) | BIT(VCS0), |
| 745 | .ppgtt_size = 36, |
| 746 | }; |
| 747 | |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 748 | #undef GEN |
Chris Wilson | c5cb21c | 2018-02-15 08:19:30 +0000 | [diff] [blame] | 749 | #undef PLATFORM |
Chris Wilson | bc76298 | 2018-02-15 08:19:28 +0000 | [diff] [blame] | 750 | |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 751 | /* |
| 752 | * Make sure any device matches here are from most specific to most |
| 753 | * general. For example, since the Quanta match is based on the subsystem |
| 754 | * and subvendor IDs, we need it to come before the more general IVB |
| 755 | * PCI ID matches, otherwise we'll use the wrong info struct above. |
| 756 | */ |
| 757 | static const struct pci_device_id pciidlist[] = { |
| 758 | INTEL_I830_IDS(&intel_i830_info), |
Jani Nikula | 2a307c2 | 2016-11-30 17:43:04 +0200 | [diff] [blame] | 759 | INTEL_I845G_IDS(&intel_i845g_info), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 760 | INTEL_I85X_IDS(&intel_i85x_info), |
| 761 | INTEL_I865G_IDS(&intel_i865g_info), |
| 762 | INTEL_I915G_IDS(&intel_i915g_info), |
| 763 | INTEL_I915GM_IDS(&intel_i915gm_info), |
| 764 | INTEL_I945G_IDS(&intel_i945g_info), |
| 765 | INTEL_I945GM_IDS(&intel_i945gm_info), |
| 766 | INTEL_I965G_IDS(&intel_i965g_info), |
| 767 | INTEL_G33_IDS(&intel_g33_info), |
| 768 | INTEL_I965GM_IDS(&intel_i965gm_info), |
| 769 | INTEL_GM45_IDS(&intel_gm45_info), |
| 770 | INTEL_G45_IDS(&intel_g45_info), |
Tvrtko Ursulin | 86d35d4 | 2019-03-26 07:40:54 +0000 | [diff] [blame^] | 771 | INTEL_PINEVIEW_G_IDS(&intel_pineview_g_info), |
| 772 | INTEL_PINEVIEW_M_IDS(&intel_pineview_m_info), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 773 | INTEL_IRONLAKE_D_IDS(&intel_ironlake_d_info), |
| 774 | INTEL_IRONLAKE_M_IDS(&intel_ironlake_m_info), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 775 | INTEL_SNB_D_GT1_IDS(&intel_sandybridge_d_gt1_info), |
| 776 | INTEL_SNB_D_GT2_IDS(&intel_sandybridge_d_gt2_info), |
| 777 | INTEL_SNB_M_GT1_IDS(&intel_sandybridge_m_gt1_info), |
| 778 | INTEL_SNB_M_GT2_IDS(&intel_sandybridge_m_gt2_info), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 779 | INTEL_IVB_Q_IDS(&intel_ivybridge_q_info), /* must be first IVB */ |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 780 | INTEL_IVB_M_GT1_IDS(&intel_ivybridge_m_gt1_info), |
| 781 | INTEL_IVB_M_GT2_IDS(&intel_ivybridge_m_gt2_info), |
| 782 | INTEL_IVB_D_GT1_IDS(&intel_ivybridge_d_gt1_info), |
| 783 | INTEL_IVB_D_GT2_IDS(&intel_ivybridge_d_gt2_info), |
| 784 | INTEL_HSW_GT1_IDS(&intel_haswell_gt1_info), |
| 785 | INTEL_HSW_GT2_IDS(&intel_haswell_gt2_info), |
| 786 | INTEL_HSW_GT3_IDS(&intel_haswell_gt3_info), |
Carlos Santa | 8d9c20e | 2016-08-17 12:30:37 -0700 | [diff] [blame] | 787 | INTEL_VLV_IDS(&intel_valleyview_info), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 788 | INTEL_BDW_GT1_IDS(&intel_broadwell_gt1_info), |
| 789 | INTEL_BDW_GT2_IDS(&intel_broadwell_gt2_info), |
Carlos Santa | 8d9c20e | 2016-08-17 12:30:37 -0700 | [diff] [blame] | 790 | INTEL_BDW_GT3_IDS(&intel_broadwell_gt3_info), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 791 | INTEL_BDW_RSVD_IDS(&intel_broadwell_rsvd_info), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 792 | INTEL_CHV_IDS(&intel_cherryview_info), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 793 | INTEL_SKL_GT1_IDS(&intel_skylake_gt1_info), |
| 794 | INTEL_SKL_GT2_IDS(&intel_skylake_gt2_info), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 795 | INTEL_SKL_GT3_IDS(&intel_skylake_gt3_info), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 796 | INTEL_SKL_GT4_IDS(&intel_skylake_gt4_info), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 797 | INTEL_BXT_IDS(&intel_broxton_info), |
Ander Conselvan de Oliveira | 8363e3c | 2016-11-10 17:23:08 +0200 | [diff] [blame] | 798 | INTEL_GLK_IDS(&intel_geminilake_info), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 799 | INTEL_KBL_GT1_IDS(&intel_kabylake_gt1_info), |
| 800 | INTEL_KBL_GT2_IDS(&intel_kabylake_gt2_info), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 801 | INTEL_KBL_GT3_IDS(&intel_kabylake_gt3_info), |
| 802 | INTEL_KBL_GT4_IDS(&intel_kabylake_gt3_info), |
José Roberto de Souza | c0c46ca | 2018-09-26 18:06:50 -0700 | [diff] [blame] | 803 | INTEL_AML_KBL_GT2_IDS(&intel_kabylake_gt2_info), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 804 | INTEL_CFL_S_GT1_IDS(&intel_coffeelake_gt1_info), |
| 805 | INTEL_CFL_S_GT2_IDS(&intel_coffeelake_gt2_info), |
Rodrigo Vivi | 5e0f5a5 | 2019-02-01 15:50:49 -0800 | [diff] [blame] | 806 | INTEL_CFL_H_GT1_IDS(&intel_coffeelake_gt1_info), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 807 | INTEL_CFL_H_GT2_IDS(&intel_coffeelake_gt2_info), |
Rodrigo Vivi | c99d783 | 2017-12-20 10:29:19 -0800 | [diff] [blame] | 808 | INTEL_CFL_U_GT2_IDS(&intel_coffeelake_gt2_info), |
Lionel Landwerlin | 0890540 | 2017-08-30 17:12:05 +0100 | [diff] [blame] | 809 | INTEL_CFL_U_GT3_IDS(&intel_coffeelake_gt3_info), |
José Roberto de Souza | b9be785 | 2018-06-14 16:37:19 -0700 | [diff] [blame] | 810 | INTEL_WHL_U_GT1_IDS(&intel_coffeelake_gt1_info), |
| 811 | INTEL_WHL_U_GT2_IDS(&intel_coffeelake_gt2_info), |
José Roberto de Souza | c0c46ca | 2018-09-26 18:06:50 -0700 | [diff] [blame] | 812 | INTEL_AML_CFL_GT2_IDS(&intel_coffeelake_gt2_info), |
José Roberto de Souza | b9be785 | 2018-06-14 16:37:19 -0700 | [diff] [blame] | 813 | INTEL_WHL_U_GT3_IDS(&intel_coffeelake_gt3_info), |
Anusha Srivatsa | a7b4dee | 2019-03-18 13:01:32 -0700 | [diff] [blame] | 814 | INTEL_CML_GT1_IDS(&intel_coffeelake_gt1_info), |
| 815 | INTEL_CML_GT2_IDS(&intel_coffeelake_gt2_info), |
Rodrigo Vivi | 3f43031 | 2018-01-29 15:22:14 -0800 | [diff] [blame] | 816 | INTEL_CNL_IDS(&intel_cannonlake_info), |
Paulo Zanoni | d55cb4f | 2018-02-20 17:37:52 +0200 | [diff] [blame] | 817 | INTEL_ICL_11_IDS(&intel_icelake_11_info), |
James Ausmus | 29f3863 | 2019-03-22 10:58:42 -0700 | [diff] [blame] | 818 | INTEL_EHL_IDS(&intel_elkhartlake_info), |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 819 | {0, 0, 0} |
| 820 | }; |
| 821 | MODULE_DEVICE_TABLE(pci, pciidlist); |
| 822 | |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 823 | static void i915_pci_remove(struct pci_dev *pdev) |
| 824 | { |
Chris Wilson | 159b69b | 2018-07-16 09:03:31 +0100 | [diff] [blame] | 825 | struct drm_device *dev; |
| 826 | |
| 827 | dev = pci_get_drvdata(pdev); |
| 828 | if (!dev) /* driver load aborted, nothing to cleanup */ |
| 829 | return; |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 830 | |
| 831 | i915_driver_unload(dev); |
Harsha Sharma | 8e9f8ab | 2017-10-15 00:06:44 +0530 | [diff] [blame] | 832 | drm_dev_put(dev); |
Chris Wilson | 159b69b | 2018-07-16 09:03:31 +0100 | [diff] [blame] | 833 | |
| 834 | pci_set_drvdata(pdev, NULL); |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 835 | } |
| 836 | |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 837 | static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 838 | { |
| 839 | struct intel_device_info *intel_info = |
| 840 | (struct intel_device_info *) ent->driver_data; |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 841 | int err; |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 842 | |
Michal Wajdeczko | 4f044a8 | 2017-09-19 19:38:44 +0000 | [diff] [blame] | 843 | if (IS_ALPHA_SUPPORT(intel_info) && !i915_modparams.alpha_support) { |
Jani Nikula | c007fb4 | 2016-10-31 12:18:28 +0200 | [diff] [blame] | 844 | DRM_INFO("The driver support for your hardware in this kernel version is alpha quality\n" |
| 845 | "See CONFIG_DRM_I915_ALPHA_SUPPORT or i915.alpha_support module parameter\n" |
| 846 | "to enable support in this kernel version, or check for kernel updates.\n"); |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 847 | return -ENODEV; |
| 848 | } |
| 849 | |
| 850 | /* Only bind to function 0 of the device. Early generations |
| 851 | * used function 1 as a placeholder for multi-head. This causes |
| 852 | * us confusion instead, especially on the systems where both |
| 853 | * functions have the same PCI-ID! |
| 854 | */ |
| 855 | if (PCI_FUNC(pdev->devfn)) |
| 856 | return -ENODEV; |
| 857 | |
| 858 | /* |
| 859 | * apple-gmux is needed on dual GPU MacBook Pro |
| 860 | * to probe the panel if we're the inactive GPU. |
| 861 | */ |
| 862 | if (vga_switcheroo_client_probe_defer(pdev)) |
| 863 | return -EPROBE_DEFER; |
| 864 | |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 865 | err = i915_driver_load(pdev, ent); |
| 866 | if (err) |
| 867 | return err; |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 868 | |
Chris Wilson | 159b69b | 2018-07-16 09:03:31 +0100 | [diff] [blame] | 869 | if (i915_inject_load_failure()) { |
| 870 | i915_pci_remove(pdev); |
| 871 | return -ENODEV; |
| 872 | } |
| 873 | |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 874 | err = i915_live_selftests(pdev); |
| 875 | if (err) { |
| 876 | i915_pci_remove(pdev); |
| 877 | return err > 0 ? -ENOTTY : err; |
| 878 | } |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 879 | |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 880 | return 0; |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 881 | } |
| 882 | |
Chris Wilson | a09d0ba | 2016-06-24 14:00:27 +0100 | [diff] [blame] | 883 | static struct pci_driver i915_pci_driver = { |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 884 | .name = DRIVER_NAME, |
| 885 | .id_table = pciidlist, |
| 886 | .probe = i915_pci_probe, |
| 887 | .remove = i915_pci_remove, |
| 888 | .driver.pm = &i915_pm_ops, |
| 889 | }; |
Chris Wilson | a09d0ba | 2016-06-24 14:00:27 +0100 | [diff] [blame] | 890 | |
| 891 | static int __init i915_init(void) |
| 892 | { |
| 893 | bool use_kms = true; |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 894 | int err; |
| 895 | |
Chris Wilson | 32eb6bc | 2019-02-28 10:20:33 +0000 | [diff] [blame] | 896 | err = i915_globals_init(); |
| 897 | if (err) |
| 898 | return err; |
Chris Wilson | 5f5c139 | 2019-02-05 13:00:04 +0000 | [diff] [blame] | 899 | |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 900 | err = i915_mock_selftests(); |
| 901 | if (err) |
| 902 | return err > 0 ? 0 : err; |
Chris Wilson | a09d0ba | 2016-06-24 14:00:27 +0100 | [diff] [blame] | 903 | |
| 904 | /* |
| 905 | * Enable KMS by default, unless explicitly overriden by |
| 906 | * either the i915.modeset prarameter or by the |
| 907 | * vga_text_mode_force boot option. |
| 908 | */ |
| 909 | |
Michal Wajdeczko | 4f044a8 | 2017-09-19 19:38:44 +0000 | [diff] [blame] | 910 | if (i915_modparams.modeset == 0) |
Chris Wilson | a09d0ba | 2016-06-24 14:00:27 +0100 | [diff] [blame] | 911 | use_kms = false; |
| 912 | |
Michal Wajdeczko | 4f044a8 | 2017-09-19 19:38:44 +0000 | [diff] [blame] | 913 | if (vgacon_text_force() && i915_modparams.modeset == -1) |
Chris Wilson | a09d0ba | 2016-06-24 14:00:27 +0100 | [diff] [blame] | 914 | use_kms = false; |
| 915 | |
| 916 | if (!use_kms) { |
| 917 | /* Silently fail loading to not upset userspace. */ |
| 918 | DRM_DEBUG_DRIVER("KMS disabled.\n"); |
| 919 | return 0; |
| 920 | } |
| 921 | |
| 922 | return pci_register_driver(&i915_pci_driver); |
| 923 | } |
| 924 | |
| 925 | static void __exit i915_exit(void) |
| 926 | { |
| 927 | if (!i915_pci_driver.driver.owner) |
| 928 | return; |
| 929 | |
| 930 | pci_unregister_driver(&i915_pci_driver); |
Chris Wilson | 32eb6bc | 2019-02-28 10:20:33 +0000 | [diff] [blame] | 931 | i915_globals_exit(); |
Chris Wilson | a09d0ba | 2016-06-24 14:00:27 +0100 | [diff] [blame] | 932 | } |
| 933 | |
| 934 | module_init(i915_init); |
| 935 | module_exit(i915_exit); |
| 936 | |
| 937 | MODULE_AUTHOR("Tungsten Graphics, Inc."); |
| 938 | MODULE_AUTHOR("Intel Corporation"); |
| 939 | |
| 940 | MODULE_DESCRIPTION(DRIVER_DESC); |
| 941 | MODULE_LICENSE("GPL and additional rights"); |