aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-06-24 13:29:34 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-01 05:14:44 -0400
commitf5adf94e5fed2468eef4f0c094b66bf834770d7b (patch)
tree434e98438c4e00286db68cba5179c4eb0f7db12d /drivers
parent3765f3048651586e2617793e9efe184ff8c79a97 (diff)
drm/i915: Introduce an HAS_IPS() macro
Follow the trend and don't code conditions with platforms but with features. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c2
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index d4e78b64ca87..f72d5a3fdfba 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1483,7 +1483,7 @@ static int i915_ips_status(struct seq_file *m, void *unused)
1483 struct drm_device *dev = node->minor->dev; 1483 struct drm_device *dev = node->minor->dev;
1484 struct drm_i915_private *dev_priv = dev->dev_private; 1484 struct drm_i915_private *dev_priv = dev->dev_private;
1485 1485
1486 if (!IS_ULT(dev)) { 1486 if (!HAS_IPS(dev)) {
1487 seq_puts(m, "not supported\n"); 1487 seq_puts(m, "not supported\n");
1488 return 0; 1488 return 0;
1489 } 1489 }
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 9e1bf6dcbb2a..cc1d6056ab70 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1474,6 +1474,8 @@ struct drm_i915_file_private {
1474#define HAS_PIPE_CXSR(dev) (INTEL_INFO(dev)->has_pipe_cxsr) 1474#define HAS_PIPE_CXSR(dev) (INTEL_INFO(dev)->has_pipe_cxsr)
1475#define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc) 1475#define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc)
1476 1476
1477#define HAS_IPS(dev) (IS_ULT(dev))
1478
1477#define HAS_PIPE_CONTROL(dev) (INTEL_INFO(dev)->gen >= 5) 1479#define HAS_PIPE_CONTROL(dev) (INTEL_INFO(dev)->gen >= 5)
1478 1480
1479#define HAS_DDI(dev) (INTEL_INFO(dev)->has_ddi) 1481#define HAS_DDI(dev) (INTEL_INFO(dev)->has_ddi)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b08d1f9ce0de..17d5c7a3468b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3250,7 +3250,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
3250/* IPS only exists on ULT machines and is tied to pipe A. */ 3250/* IPS only exists on ULT machines and is tied to pipe A. */
3251static bool hsw_crtc_supports_ips(struct intel_crtc *crtc) 3251static bool hsw_crtc_supports_ips(struct intel_crtc *crtc)
3252{ 3252{
3253 return IS_ULT(crtc->base.dev) && crtc->pipe == PIPE_A; 3253 return HAS_IPS(crtc->base.dev) && crtc->pipe == PIPE_A;
3254} 3254}
3255 3255
3256static void hsw_enable_ips(struct intel_crtc *crtc) 3256static void hsw_enable_ips(struct intel_crtc *crtc)
@@ -4069,7 +4069,7 @@ static int intel_crtc_compute_config(struct intel_crtc *crtc,
4069 pipe_config->pipe_bpp = 8*3; 4069 pipe_config->pipe_bpp = 8*3;
4070 } 4070 }
4071 4071
4072 if (IS_HASWELL(dev)) 4072 if (HAS_IPS(dev))
4073 hsw_compute_ips_config(crtc, pipe_config); 4073 hsw_compute_ips_config(crtc, pipe_config);
4074 4074
4075 /* XXX: PCH clock sharing is done in ->mode_set, so make sure the old 4075 /* XXX: PCH clock sharing is done in ->mode_set, so make sure the old