diff options
author | Carlos Santa <carlos.santa@intel.com> | 2016-08-17 15:30:42 -0400 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2016-09-07 19:07:08 -0400 |
commit | 3bacde19993a7b8f7f2440aeaf112da81f64bb5b (patch) | |
tree | de7142718969975777676d3f62254c066cc19de0 /drivers/gpu/drm | |
parent | 2631034677ad74a57f10866e02ae8037fa5724f3 (diff) |
drm/i915 Move HAS_CSR definition to platform definition
Moving all GPU features to the platform struct definition allows for
- standard place when adding new features from new platforms
- possible to see supported features when dumping struct
definitions
Signed-off-by: Carlos Santa <carlos.santa@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_pci.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 0978f1701f1d..44e18110a279 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -656,6 +656,7 @@ struct intel_csr { | |||
656 | func(has_fbc) sep \ | 656 | func(has_fbc) sep \ |
657 | func(has_psr) sep \ | 657 | func(has_psr) sep \ |
658 | func(has_runtime_pm) sep \ | 658 | func(has_runtime_pm) sep \ |
659 | func(has_csr) sep \ | ||
659 | func(has_pipe_cxsr) sep \ | 660 | func(has_pipe_cxsr) sep \ |
660 | func(has_hotplug) sep \ | 661 | func(has_hotplug) sep \ |
661 | func(cursor_needs_physical) sep \ | 662 | func(cursor_needs_physical) sep \ |
@@ -2791,7 +2792,7 @@ struct drm_i915_cmd_table { | |||
2791 | #define HAS_RC6(dev) (INTEL_INFO(dev)->gen >= 6) | 2792 | #define HAS_RC6(dev) (INTEL_INFO(dev)->gen >= 6) |
2792 | #define HAS_RC6p(dev) (IS_GEN6(dev) || IS_IVYBRIDGE(dev)) | 2793 | #define HAS_RC6p(dev) (IS_GEN6(dev) || IS_IVYBRIDGE(dev)) |
2793 | 2794 | ||
2794 | #define HAS_CSR(dev) (IS_GEN9(dev)) | 2795 | #define HAS_CSR(dev) (INTEL_INFO(dev)->has_csr) |
2795 | 2796 | ||
2796 | /* | 2797 | /* |
2797 | * For now, anything with a GuC requires uCode loading, and then supports | 2798 | * For now, anything with a GuC requires uCode loading, and then supports |
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 9d788369465b..21a3bc50faa4 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c | |||
@@ -301,12 +301,14 @@ static const struct intel_device_info intel_skylake_info = { | |||
301 | BDW_FEATURES, | 301 | BDW_FEATURES, |
302 | .is_skylake = 1, | 302 | .is_skylake = 1, |
303 | .gen = 9, | 303 | .gen = 9, |
304 | .has_csr = 1, | ||
304 | }; | 305 | }; |
305 | 306 | ||
306 | static const struct intel_device_info intel_skylake_gt3_info = { | 307 | static const struct intel_device_info intel_skylake_gt3_info = { |
307 | BDW_FEATURES, | 308 | BDW_FEATURES, |
308 | .is_skylake = 1, | 309 | .is_skylake = 1, |
309 | .gen = 9, | 310 | .gen = 9, |
311 | .has_csr = 1, | ||
310 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING, | 312 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING, |
311 | }; | 313 | }; |
312 | 314 | ||
@@ -321,6 +323,7 @@ static const struct intel_device_info intel_broxton_info = { | |||
321 | .has_fbc = 1, | 323 | .has_fbc = 1, |
322 | .has_runtime_pm = 1, | 324 | .has_runtime_pm = 1, |
323 | .has_pooled_eu = 0, | 325 | .has_pooled_eu = 0, |
326 | .has_csr = 1, | ||
324 | GEN_DEFAULT_PIPEOFFSETS, | 327 | GEN_DEFAULT_PIPEOFFSETS, |
325 | IVB_CURSOR_OFFSETS, | 328 | IVB_CURSOR_OFFSETS, |
326 | BDW_COLORS, | 329 | BDW_COLORS, |
@@ -330,12 +333,14 @@ static const struct intel_device_info intel_kabylake_info = { | |||
330 | BDW_FEATURES, | 333 | BDW_FEATURES, |
331 | .is_kabylake = 1, | 334 | .is_kabylake = 1, |
332 | .gen = 9, | 335 | .gen = 9, |
336 | .has_csr = 1, | ||
333 | }; | 337 | }; |
334 | 338 | ||
335 | static const struct intel_device_info intel_kabylake_gt3_info = { | 339 | static const struct intel_device_info intel_kabylake_gt3_info = { |
336 | BDW_FEATURES, | 340 | BDW_FEATURES, |
337 | .is_kabylake = 1, | 341 | .is_kabylake = 1, |
338 | .gen = 9, | 342 | .gen = 9, |
343 | .has_csr = 1, | ||
339 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING, | 344 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING | BSD2_RING, |
340 | }; | 345 | }; |
341 | 346 | ||