diff options
author | Carlos Santa <carlos.santa@intel.com> | 2016-08-17 15:30:36 -0400 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2016-09-07 19:07:07 -0400 |
commit | 6e3b84d831113804fcae3646b99816556915b881 (patch) | |
tree | 723a516b437beb6dff73e377803aadfedf9e759f /drivers/gpu/drm | |
parent | 81b9fd8fc68e9e0999efc604c4e5477b8d1982aa (diff) |
drm/i915: Move HAS_PSR definition to platform struct definition
[patch series] 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 definition
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 | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_pci.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index ecfd8e9726b5..04e55aa242c3 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -654,6 +654,7 @@ struct intel_csr { | |||
654 | func(is_kabylake) sep \ | 654 | func(is_kabylake) sep \ |
655 | func(is_preliminary) sep \ | 655 | func(is_preliminary) sep \ |
656 | func(has_fbc) sep \ | 656 | func(has_fbc) sep \ |
657 | func(has_psr) sep \ | ||
657 | func(has_pipe_cxsr) sep \ | 658 | func(has_pipe_cxsr) sep \ |
658 | func(has_hotplug) sep \ | 659 | func(has_hotplug) sep \ |
659 | func(cursor_needs_physical) sep \ | 660 | func(cursor_needs_physical) sep \ |
@@ -2784,9 +2785,7 @@ struct drm_i915_cmd_table { | |||
2784 | 2785 | ||
2785 | #define HAS_DDI(dev) (INTEL_INFO(dev)->has_ddi) | 2786 | #define HAS_DDI(dev) (INTEL_INFO(dev)->has_ddi) |
2786 | #define HAS_FPGA_DBG_UNCLAIMED(dev) (INTEL_INFO(dev)->has_fpga_dbg) | 2787 | #define HAS_FPGA_DBG_UNCLAIMED(dev) (INTEL_INFO(dev)->has_fpga_dbg) |
2787 | #define HAS_PSR(dev) (IS_HASWELL(dev) || IS_BROADWELL(dev) || \ | 2788 | #define HAS_PSR(dev) (INTEL_INFO(dev)->has_psr) |
2788 | IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev) || \ | ||
2789 | IS_SKYLAKE(dev) || IS_KABYLAKE(dev)) | ||
2790 | #define HAS_RUNTIME_PM(dev) (IS_GEN6(dev) || IS_HASWELL(dev) || \ | 2789 | #define HAS_RUNTIME_PM(dev) (IS_GEN6(dev) || IS_HASWELL(dev) || \ |
2791 | IS_BROADWELL(dev) || IS_VALLEYVIEW(dev) || \ | 2790 | IS_BROADWELL(dev) || IS_VALLEYVIEW(dev) || \ |
2792 | IS_CHERRYVIEW(dev) || IS_SKYLAKE(dev) || \ | 2791 | IS_CHERRYVIEW(dev) || IS_SKYLAKE(dev) || \ |
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 2587b1bd41f4..e1caa0b63f3b 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c | |||
@@ -243,6 +243,7 @@ static const struct intel_device_info intel_ivybridge_q_info = { | |||
243 | 243 | ||
244 | #define VLV_FEATURES \ | 244 | #define VLV_FEATURES \ |
245 | .gen = 7, .num_pipes = 2, \ | 245 | .gen = 7, .num_pipes = 2, \ |
246 | .has_psr = 1, \ | ||
246 | .need_gfx_hws = 1, .has_hotplug = 1, \ | 247 | .need_gfx_hws = 1, .has_hotplug = 1, \ |
247 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING, \ | 248 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING, \ |
248 | .display_mmio_offset = VLV_DISPLAY_BASE, \ | 249 | .display_mmio_offset = VLV_DISPLAY_BASE, \ |
@@ -264,7 +265,8 @@ static const struct intel_device_info intel_valleyview_d_info = { | |||
264 | GEN7_FEATURES, \ | 265 | GEN7_FEATURES, \ |
265 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING, \ | 266 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING, \ |
266 | .has_ddi = 1, \ | 267 | .has_ddi = 1, \ |
267 | .has_fpga_dbg = 1 | 268 | .has_fpga_dbg = 1, \ |
269 | .has_psr = 1 | ||
268 | 270 | ||
269 | static const struct intel_device_info intel_haswell_d_info = { | 271 | static const struct intel_device_info intel_haswell_d_info = { |
270 | HSW_FEATURES, | 272 | HSW_FEATURES, |
@@ -312,6 +314,7 @@ static const struct intel_device_info intel_cherryview_info = { | |||
312 | .need_gfx_hws = 1, .has_hotplug = 1, | 314 | .need_gfx_hws = 1, .has_hotplug = 1, |
313 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING, | 315 | .ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING, |
314 | .is_cherryview = 1, | 316 | .is_cherryview = 1, |
317 | .has_psr = 1, | ||
315 | .display_mmio_offset = VLV_DISPLAY_BASE, | 318 | .display_mmio_offset = VLV_DISPLAY_BASE, |
316 | GEN_CHV_PIPEOFFSETS, | 319 | GEN_CHV_PIPEOFFSETS, |
317 | CURSOR_OFFSETS, | 320 | CURSOR_OFFSETS, |