aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Boyer <wayne.boyer@intel.com>2015-12-02 16:28:14 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-12-04 05:24:25 -0500
commit6a8beeffed3b2d33151150e3a03696e697f16d46 (patch)
treec8898824fa00314e3f803411551eb207ad48a85a
parent89f41f4f90741fe94b6da9d4d366628a9b0be8f1 (diff)
drm/i915: Clean up device info structure definitions
Beginning with gen7, newer devices repetitively redefine values for the device info structure members. This patch simplifies the structure definitions by grouping member value definitions into the existing GEN7_FEATURES #define and into the new GEN7_LP_FEATURES and HSW_FEATURES #defines. Specifically, GEN_DEFAULT_PIPEOFFSETS and IVB_CURSOR_OFFSETS are added to GEN7_FEATURES and subsequent IVB definitions are simplified. VLV_FEATURES is defined to differentiate and simplify the gen7 low power (LP) devices. HSW_FEATURES is defined and used to simplify all HSW+ devices except for LP. v2: Use VLV_FEATURES for the gen7 low power devices. (Jani) Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Wayne Boyer <wayne.boyer@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1449091694-7681-1-git-send-email-wayne.boyer@intel.com
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c137
1 files changed, 35 insertions, 102 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 90faa8e03fca..d2d7e2461fa6 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -228,121 +228,83 @@ static const struct intel_device_info intel_sandybridge_m_info = {
228 .need_gfx_hws = 1, .has_hotplug = 1, \ 228 .need_gfx_hws = 1, .has_hotplug = 1, \
229 .has_fbc = 1, \ 229 .has_fbc = 1, \
230 .ring_mask = RENDER_RING | BSD_RING | BLT_RING, \ 230 .ring_mask = RENDER_RING | BSD_RING | BLT_RING, \
231 .has_llc = 1 231 .has_llc = 1, \
232 GEN_DEFAULT_PIPEOFFSETS, \
233 IVB_CURSOR_OFFSETS
232 234
233static const struct intel_device_info intel_ivybridge_d_info = { 235static const struct intel_device_info intel_ivybridge_d_info = {
234 GEN7_FEATURES, 236 GEN7_FEATURES,
235 .is_ivybridge = 1, 237 .is_ivybridge = 1,
236 GEN_DEFAULT_PIPEOFFSETS,
237 IVB_CURSOR_OFFSETS,
238}; 238};
239 239
240static const struct intel_device_info intel_ivybridge_m_info = { 240static const struct intel_device_info intel_ivybridge_m_info = {
241 GEN7_FEATURES, 241 GEN7_FEATURES,
242 .is_ivybridge = 1, 242 .is_ivybridge = 1,
243 .is_mobile = 1, 243 .is_mobile = 1,
244 GEN_DEFAULT_PIPEOFFSETS,
245 IVB_CURSOR_OFFSETS,
246}; 244};
247 245
248static const struct intel_device_info intel_ivybridge_q_info = { 246static const struct intel_device_info intel_ivybridge_q_info = {
249 GEN7_FEATURES, 247 GEN7_FEATURES,
250 .is_ivybridge = 1, 248 .is_ivybridge = 1,
251 .num_pipes = 0, /* legal, last one wins */ 249 .num_pipes = 0, /* legal, last one wins */
252 GEN_DEFAULT_PIPEOFFSETS,
253 IVB_CURSOR_OFFSETS,
254}; 250};
255 251
252#define VLV_FEATURES \
253 .gen = 7, .num_pipes = 2, \
254 .need_gfx_hws = 1, .has_hotplug = 1, \
255 .ring_mask = RENDER_RING | BSD_RING | BLT_RING, \
256 .display_mmio_offset = VLV_DISPLAY_BASE, \
257 GEN_DEFAULT_PIPEOFFSETS, \
258 CURSOR_OFFSETS
259
256static const struct intel_device_info intel_valleyview_m_info = { 260static const struct intel_device_info intel_valleyview_m_info = {
257 GEN7_FEATURES, 261 VLV_FEATURES,
258 .is_mobile = 1,
259 .num_pipes = 2,
260 .is_valleyview = 1, 262 .is_valleyview = 1,
261 .display_mmio_offset = VLV_DISPLAY_BASE, 263 .is_mobile = 1,
262 .has_fbc = 0, /* legal, last one wins */
263 .has_llc = 0, /* legal, last one wins */
264 GEN_DEFAULT_PIPEOFFSETS,
265 CURSOR_OFFSETS,
266}; 264};
267 265
268static const struct intel_device_info intel_valleyview_d_info = { 266static const struct intel_device_info intel_valleyview_d_info = {
269 GEN7_FEATURES, 267 VLV_FEATURES,
270 .num_pipes = 2,
271 .is_valleyview = 1, 268 .is_valleyview = 1,
272 .display_mmio_offset = VLV_DISPLAY_BASE,
273 .has_fbc = 0, /* legal, last one wins */
274 .has_llc = 0, /* legal, last one wins */
275 GEN_DEFAULT_PIPEOFFSETS,
276 CURSOR_OFFSETS,
277}; 269};
278 270
271#define HSW_FEATURES \
272 GEN7_FEATURES, \
273 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING, \
274 .has_ddi = 1, \
275 .has_fpga_dbg = 1
276
279static const struct intel_device_info intel_haswell_d_info = { 277static const struct intel_device_info intel_haswell_d_info = {
280 GEN7_FEATURES, 278 HSW_FEATURES,
281 .is_haswell = 1, 279 .is_haswell = 1,
282 .has_ddi = 1,
283 .has_fpga_dbg = 1,
284 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
285 GEN_DEFAULT_PIPEOFFSETS,
286 IVB_CURSOR_OFFSETS,
287}; 280};
288 281
289static const struct intel_device_info intel_haswell_m_info = { 282static const struct intel_device_info intel_haswell_m_info = {
290 GEN7_FEATURES, 283 HSW_FEATURES,
291 .is_haswell = 1, 284 .is_haswell = 1,
292 .is_mobile = 1, 285 .is_mobile = 1,
293 .has_ddi = 1,
294 .has_fpga_dbg = 1,
295 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
296 GEN_DEFAULT_PIPEOFFSETS,
297 IVB_CURSOR_OFFSETS,
298}; 286};
299 287
300static const struct intel_device_info intel_broadwell_d_info = { 288static const struct intel_device_info intel_broadwell_d_info = {
301 .gen = 8, .num_pipes = 3, 289 HSW_FEATURES,
302 .need_gfx_hws = 1, .has_hotplug = 1, 290 .gen = 8,
303 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
304 .has_llc = 1,
305 .has_ddi = 1,
306 .has_fpga_dbg = 1,
307 .has_fbc = 1,
308 GEN_DEFAULT_PIPEOFFSETS,
309 IVB_CURSOR_OFFSETS,
310}; 291};
311 292
312static const struct intel_device_info intel_broadwell_m_info = { 293static const struct intel_device_info intel_broadwell_m_info = {
313 .gen = 8, .is_mobile = 1, .num_pipes = 3, 294 HSW_FEATURES,
314 .need_gfx_hws = 1, .has_hotplug = 1, 295 .gen = 8, .is_mobile = 1,
315 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
316 .has_llc = 1,
317 .has_ddi = 1,
318 .has_fpga_dbg = 1,
319 .has_fbc = 1,
320 GEN_DEFAULT_PIPEOFFSETS,
321 IVB_CURSOR_OFFSETS,
322}; 296};
323 297
324static const struct intel_device_info intel_broadwell_gt3d_info = { 298static const struct intel_device_info intel_broadwell_gt3d_info = {
325 .gen = 8, .num_pipes = 3, 299 HSW_FEATURES,
326 .need_gfx_hws = 1, .has_hotplug = 1, 300 .gen = 8,
327 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING, 301 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING,
328 .has_llc = 1,
329 .has_ddi = 1,
330 .has_fpga_dbg = 1,
331 .has_fbc = 1,
332 GEN_DEFAULT_PIPEOFFSETS,
333 IVB_CURSOR_OFFSETS,
334}; 302};
335 303
336static const struct intel_device_info intel_broadwell_gt3m_info = { 304static const struct intel_device_info intel_broadwell_gt3m_info = {
337 .gen = 8, .is_mobile = 1, .num_pipes = 3, 305 HSW_FEATURES,
338 .need_gfx_hws = 1, .has_hotplug = 1, 306 .gen = 8, .is_mobile = 1,
339 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING, 307 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING,
340 .has_llc = 1,
341 .has_ddi = 1,
342 .has_fpga_dbg = 1,
343 .has_fbc = 1,
344 GEN_DEFAULT_PIPEOFFSETS,
345 IVB_CURSOR_OFFSETS,
346}; 308};
347 309
348static const struct intel_device_info intel_cherryview_info = { 310static const struct intel_device_info intel_cherryview_info = {
@@ -356,29 +318,15 @@ static const struct intel_device_info intel_cherryview_info = {
356}; 318};
357 319
358static const struct intel_device_info intel_skylake_info = { 320static const struct intel_device_info intel_skylake_info = {
321 HSW_FEATURES,
359 .is_skylake = 1, 322 .is_skylake = 1,
360 .gen = 9, .num_pipes = 3, 323 .gen = 9,
361 .need_gfx_hws = 1, .has_hotplug = 1,
362 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
363 .has_llc = 1,
364 .has_ddi = 1,
365 .has_fpga_dbg = 1,
366 .has_fbc = 1,
367 GEN_DEFAULT_PIPEOFFSETS,
368 IVB_CURSOR_OFFSETS,
369}; 324};
370 325
371static const struct intel_device_info intel_skylake_gt3_info = { 326static const struct intel_device_info intel_skylake_gt3_info = {
372 .is_skylake = 1, 327 .is_skylake = 1,
373 .gen = 9, .num_pipes = 3, 328 .gen = 9,
374 .need_gfx_hws = 1, .has_hotplug = 1,
375 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING, 329 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING,
376 .has_llc = 1,
377 .has_ddi = 1,
378 .has_fpga_dbg = 1,
379 .has_fbc = 1,
380 GEN_DEFAULT_PIPEOFFSETS,
381 IVB_CURSOR_OFFSETS,
382}; 330};
383 331
384static const struct intel_device_info intel_broxton_info = { 332static const struct intel_device_info intel_broxton_info = {
@@ -396,33 +344,18 @@ static const struct intel_device_info intel_broxton_info = {
396}; 344};
397 345
398static const struct intel_device_info intel_kabylake_info = { 346static const struct intel_device_info intel_kabylake_info = {
347 HSW_FEATURES,
399 .is_preliminary = 1, 348 .is_preliminary = 1,
400 .is_kabylake = 1, 349 .is_kabylake = 1,
401 .gen = 9, 350 .gen = 9,
402 .num_pipes = 3,
403 .need_gfx_hws = 1, .has_hotplug = 1,
404 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
405 .has_llc = 1,
406 .has_ddi = 1,
407 .has_fpga_dbg = 1,
408 .has_fbc = 1,
409 GEN_DEFAULT_PIPEOFFSETS,
410 IVB_CURSOR_OFFSETS,
411}; 351};
412 352
413static const struct intel_device_info intel_kabylake_gt3_info = { 353static const struct intel_device_info intel_kabylake_gt3_info = {
354 HSW_FEATURES,
414 .is_preliminary = 1, 355 .is_preliminary = 1,
415 .is_kabylake = 1, 356 .is_kabylake = 1,
416 .gen = 9, 357 .gen = 9,
417 .num_pipes = 3,
418 .need_gfx_hws = 1, .has_hotplug = 1,
419 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING, 358 .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING,
420 .has_llc = 1,
421 .has_ddi = 1,
422 .has_fpga_dbg = 1,
423 .has_fbc = 1,
424 GEN_DEFAULT_PIPEOFFSETS,
425 IVB_CURSOR_OFFSETS,
426}; 359};
427 360
428/* 361/*