aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-21 09:57:17 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-21 14:08:39 -0400
commitf00a3ddf91d596bece5fa31e8ce2e8a3b4c0623b (patch)
treecae4beb61a2ae44ffa6d892bbd207b4022094dc2
parent549f7365820a212a1cfd0871d377b1ad0d1e5723 (diff)
drm/i915: IS_IRONLAKE is synonymous with gen == 5
So remove the redundant bit in the capabilities block and s/IS_IRONLAKE/IS_GEN5/. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c3
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c6
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c4
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h11
-rw-r--r--drivers/gpu/drm/i915/i915_gem_tiling.c2
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c4
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c2
8 files changed, 18 insertions, 22 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index d521de3e0680..7698983577d1 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -71,7 +71,6 @@ static int i915_capabilities(struct seq_file *m, void *data)
71 B(is_pineview); 71 B(is_pineview);
72 B(is_broadwater); 72 B(is_broadwater);
73 B(is_crestline); 73 B(is_crestline);
74 B(is_ironlake);
75 B(has_fbc); 74 B(has_fbc);
76 B(has_rc6); 75 B(has_rc6);
77 B(has_pipe_cxsr); 76 B(has_pipe_cxsr);
@@ -795,7 +794,7 @@ static int i915_sr_status(struct seq_file *m, void *unused)
795 drm_i915_private_t *dev_priv = dev->dev_private; 794 drm_i915_private_t *dev_priv = dev->dev_private;
796 bool sr_enabled = false; 795 bool sr_enabled = false;
797 796
798 if (IS_IRONLAKE(dev)) 797 if (IS_GEN5(dev))
799 sr_enabled = I915_READ(WM1_LP_ILK) & WM1_LP_SR_EN; 798 sr_enabled = I915_READ(WM1_LP_ILK) & WM1_LP_SR_EN;
800 else if (IS_CRESTLINE(dev) || IS_I945G(dev) || IS_I945GM(dev)) 799 else if (IS_CRESTLINE(dev) || IS_I945G(dev) || IS_I945GM(dev))
801 sr_enabled = I915_READ(FW_BLC_SELF) & FW_BLC_SELF_EN; 800 sr_enabled = I915_READ(FW_BLC_SELF) & FW_BLC_SELF_EN;
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 1851ca4087f9..7a26f4dd21ae 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -499,7 +499,7 @@ static int i915_dispatch_batchbuffer(struct drm_device * dev,
499 } 499 }
500 500
501 501
502 if (IS_G4X(dev) || IS_IRONLAKE(dev)) { 502 if (IS_G4X(dev) || IS_GEN5(dev)) {
503 BEGIN_LP_RING(2); 503 BEGIN_LP_RING(2);
504 OUT_RING(MI_FLUSH | MI_NO_WRITE_FLUSH | MI_INVALIDATE_ISP); 504 OUT_RING(MI_FLUSH | MI_NO_WRITE_FLUSH | MI_INVALIDATE_ISP);
505 OUT_RING(MI_NOOP); 505 OUT_RING(MI_NOOP);
@@ -1995,7 +1995,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1995 1995
1996 dev->driver->get_vblank_counter = i915_get_vblank_counter; 1996 dev->driver->get_vblank_counter = i915_get_vblank_counter;
1997 dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ 1997 dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
1998 if (IS_G4X(dev) || IS_IRONLAKE(dev) || IS_GEN6(dev)) { 1998 if (IS_G4X(dev) || IS_GEN5(dev) || IS_GEN6(dev)) {
1999 dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */ 1999 dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */
2000 dev->driver->get_vblank_counter = gm45_get_vblank_counter; 2000 dev->driver->get_vblank_counter = gm45_get_vblank_counter;
2001 } 2001 }
@@ -2019,7 +2019,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
2019 2019
2020 if (IS_PINEVIEW(dev)) 2020 if (IS_PINEVIEW(dev))
2021 i915_pineview_get_mem_freq(dev); 2021 i915_pineview_get_mem_freq(dev);
2022 else if (IS_IRONLAKE(dev)) 2022 else if (IS_GEN5(dev))
2023 i915_ironlake_get_mem_freq(dev); 2023 i915_ironlake_get_mem_freq(dev);
2024 2024
2025 /* On the 945G/GM, the chipset reports the MSI capability on the 2025 /* On the 945G/GM, the chipset reports the MSI capability on the
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 90f9c3e3fee3..8e632110c58f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -143,13 +143,13 @@ static const struct intel_device_info intel_pineview_info = {
143}; 143};
144 144
145static const struct intel_device_info intel_ironlake_d_info = { 145static const struct intel_device_info intel_ironlake_d_info = {
146 .gen = 5, .is_ironlake = 1, 146 .gen = 5,
147 .need_gfx_hws = 1, .has_pipe_cxsr = 1, .has_hotplug = 1, 147 .need_gfx_hws = 1, .has_pipe_cxsr = 1, .has_hotplug = 1,
148 .has_bsd_ring = 1, 148 .has_bsd_ring = 1,
149}; 149};
150 150
151static const struct intel_device_info intel_ironlake_m_info = { 151static const struct intel_device_info intel_ironlake_m_info = {
152 .gen = 5, .is_ironlake = 1, .is_mobile = 1, 152 .gen = 5, .is_mobile = 1,
153 .need_gfx_hws = 1, .has_fbc = 1, .has_rc6 = 1, .has_hotplug = 1, 153 .need_gfx_hws = 1, .has_fbc = 1, .has_rc6 = 1, .has_hotplug = 1,
154 .has_bsd_ring = 1, 154 .has_bsd_ring = 1,
155}; 155};
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a9a0e220176e..cc9cb0dda6fc 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -206,7 +206,6 @@ struct intel_device_info {
206 u8 is_pineview : 1; 206 u8 is_pineview : 1;
207 u8 is_broadwater : 1; 207 u8 is_broadwater : 1;
208 u8 is_crestline : 1; 208 u8 is_crestline : 1;
209 u8 is_ironlake : 1;
210 u8 has_fbc : 1; 209 u8 has_fbc : 1;
211 u8 has_rc6 : 1; 210 u8 has_rc6 : 1;
212 u8 has_pipe_cxsr : 1; 211 u8 has_pipe_cxsr : 1;
@@ -1292,7 +1291,6 @@ static inline void i915_write(struct drm_i915_private *dev_priv, u32 reg,
1292#define IS_G33(dev) (INTEL_INFO(dev)->is_g33) 1291#define IS_G33(dev) (INTEL_INFO(dev)->is_g33)
1293#define IS_IRONLAKE_D(dev) ((dev)->pci_device == 0x0042) 1292#define IS_IRONLAKE_D(dev) ((dev)->pci_device == 0x0042)
1294#define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046) 1293#define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046)
1295#define IS_IRONLAKE(dev) (INTEL_INFO(dev)->is_ironlake)
1296#define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) 1294#define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile)
1297 1295
1298#define IS_GEN2(dev) (INTEL_INFO(dev)->gen == 2) 1296#define IS_GEN2(dev) (INTEL_INFO(dev)->gen == 2)
@@ -1314,8 +1312,8 @@ static inline void i915_write(struct drm_i915_private *dev_priv, u32 reg,
1314#define HAS_128_BYTE_Y_TILING(dev) (!IS_GEN2(dev) && !(IS_I915G(dev) || \ 1312#define HAS_128_BYTE_Y_TILING(dev) (!IS_GEN2(dev) && !(IS_I915G(dev) || \
1315 IS_I915GM(dev))) 1313 IS_I915GM(dev)))
1316#define SUPPORTS_DIGITAL_OUTPUTS(dev) (!IS_GEN2(dev) && !IS_PINEVIEW(dev)) 1314#define SUPPORTS_DIGITAL_OUTPUTS(dev) (!IS_GEN2(dev) && !IS_PINEVIEW(dev))
1317#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_IRONLAKE(dev)) 1315#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_GEN5(dev))
1318#define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_IRONLAKE(dev)) 1316#define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_GEN5(dev))
1319#define SUPPORTS_EDP(dev) (IS_IRONLAKE_M(dev)) 1317#define SUPPORTS_EDP(dev) (IS_IRONLAKE_M(dev))
1320#define SUPPORTS_TV(dev) (INTEL_INFO(dev)->supports_tv) 1318#define SUPPORTS_TV(dev) (INTEL_INFO(dev)->supports_tv)
1321#define I915_HAS_HOTPLUG(dev) (INTEL_INFO(dev)->has_hotplug) 1319#define I915_HAS_HOTPLUG(dev) (INTEL_INFO(dev)->has_hotplug)
@@ -1327,9 +1325,8 @@ static inline void i915_write(struct drm_i915_private *dev_priv, u32 reg,
1327#define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc) 1325#define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc)
1328#define I915_HAS_RC6(dev) (INTEL_INFO(dev)->has_rc6) 1326#define I915_HAS_RC6(dev) (INTEL_INFO(dev)->has_rc6)
1329 1327
1330#define HAS_PCH_SPLIT(dev) (IS_IRONLAKE(dev) || \ 1328#define HAS_PCH_SPLIT(dev) (IS_GEN5(dev) || IS_GEN6(dev))
1331 IS_GEN6(dev)) 1329#define HAS_PIPE_CONTROL(dev) (IS_GEN5(dev) || IS_GEN6(dev))
1332#define HAS_PIPE_CONTROL(dev) (IS_IRONLAKE(dev) || IS_GEN6(dev))
1333 1330
1334#define INTEL_PCH_TYPE(dev) (((struct drm_i915_private *)(dev)->dev_private)->pch_type) 1331#define INTEL_PCH_TYPE(dev) (((struct drm_i915_private *)(dev)->dev_private)->pch_type)
1335#define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT) 1332#define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
index 8c9ffc4768ee..af352de70be1 100644
--- a/drivers/gpu/drm/i915/i915_gem_tiling.c
+++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
@@ -92,7 +92,7 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
92 uint32_t swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN; 92 uint32_t swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
93 uint32_t swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN; 93 uint32_t swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
94 94
95 if (IS_IRONLAKE(dev) || IS_GEN6(dev)) { 95 if (IS_GEN5(dev) || IS_GEN6(dev)) {
96 /* On Ironlake whatever DRAM config, GPU always do 96 /* On Ironlake whatever DRAM config, GPU always do
97 * same swizzling setup. 97 * same swizzling setup.
98 */ 98 */
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index b9560f3cbb3d..b0b1200ed650 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -265,10 +265,10 @@ parse_general_features(struct drm_i915_private *dev_priv,
265 dev_priv->lvds_use_ssc = general->enable_ssc; 265 dev_priv->lvds_use_ssc = general->enable_ssc;
266 266
267 if (dev_priv->lvds_use_ssc) { 267 if (dev_priv->lvds_use_ssc) {
268 if (IS_I85X(dev_priv->dev)) 268 if (IS_I85X(dev))
269 dev_priv->lvds_ssc_freq = 269 dev_priv->lvds_ssc_freq =
270 general->ssc_freq ? 66 : 48; 270 general->ssc_freq ? 66 : 48;
271 else if (IS_IRONLAKE(dev_priv->dev) || IS_GEN6(dev)) 271 else if (IS_GEN5(dev) || IS_GEN6(dev))
272 dev_priv->lvds_ssc_freq = 272 dev_priv->lvds_ssc_freq =
273 general->ssc_freq ? 100 : 120; 273 general->ssc_freq ? 100 : 120;
274 else 274 else
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index cda36b348fe8..e031d82381e5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4152,7 +4152,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
4152 4152
4153 intel_wait_for_vblank(dev, pipe); 4153 intel_wait_for_vblank(dev, pipe);
4154 4154
4155 if (IS_IRONLAKE(dev)) { 4155 if (IS_GEN5(dev)) {
4156 /* enable address swizzle for tiling buffer */ 4156 /* enable address swizzle for tiling buffer */
4157 temp = I915_READ(DISP_ARB_CTL); 4157 temp = I915_READ(DISP_ARB_CTL);
4158 I915_WRITE(DISP_ARB_CTL, temp | DISP_TILE_SURFACE_SWIZZLING); 4158 I915_WRITE(DISP_ARB_CTL, temp | DISP_TILE_SURFACE_SWIZZLING);
@@ -5736,7 +5736,7 @@ void intel_init_clock_gating(struct drm_device *dev)
5736 if (HAS_PCH_SPLIT(dev)) { 5736 if (HAS_PCH_SPLIT(dev)) {
5737 uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE; 5737 uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE;
5738 5738
5739 if (IS_IRONLAKE(dev)) { 5739 if (IS_GEN5(dev)) {
5740 /* Required for FBC */ 5740 /* Required for FBC */
5741 dspclk_gate |= DPFDUNIT_CLOCK_GATE_DISABLE; 5741 dspclk_gate |= DPFDUNIT_CLOCK_GATE_DISABLE;
5742 /* Required for CxSR */ 5742 /* Required for CxSR */
@@ -5763,7 +5763,7 @@ void intel_init_clock_gating(struct drm_device *dev)
5763 * The bit 5 of 0x42020 5763 * The bit 5 of 0x42020
5764 * The bit 15 of 0x45000 5764 * The bit 15 of 0x45000
5765 */ 5765 */
5766 if (IS_IRONLAKE(dev)) { 5766 if (IS_GEN5(dev)) {
5767 I915_WRITE(ILK_DISPLAY_CHICKEN2, 5767 I915_WRITE(ILK_DISPLAY_CHICKEN2,
5768 (I915_READ(ILK_DISPLAY_CHICKEN2) | 5768 (I915_READ(ILK_DISPLAY_CHICKEN2) |
5769 ILK_DPARB_GATE | ILK_VSDPFD_FULL)); 5769 ILK_DPARB_GATE | ILK_VSDPFD_FULL));
@@ -5939,7 +5939,7 @@ static void intel_init_display(struct drm_device *dev)
5939 5939
5940 /* For FIFO watermark updates */ 5940 /* For FIFO watermark updates */
5941 if (HAS_PCH_SPLIT(dev)) { 5941 if (HAS_PCH_SPLIT(dev)) {
5942 if (IS_IRONLAKE(dev)) { 5942 if (IS_GEN5(dev)) {
5943 if (I915_READ(MLTR_ILK) & ILK_SRLT_MASK) 5943 if (I915_READ(MLTR_ILK) & ILK_SRLT_MASK)
5944 dev_priv->display.update_wm = ironlake_update_wm; 5944 dev_priv->display.update_wm = ironlake_update_wm;
5945 else { 5945 else {
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index a8f408fe4e71..0c6eb97d60fd 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -491,7 +491,7 @@ render_ring_dispatch_gem_execbuffer(struct drm_device *dev,
491 intel_ring_advance(dev, ring); 491 intel_ring_advance(dev, ring);
492 } 492 }
493 493
494 if (IS_G4X(dev) || IS_IRONLAKE(dev)) { 494 if (IS_G4X(dev) || IS_GEN5(dev)) {
495 intel_ring_begin(dev, ring, 2); 495 intel_ring_begin(dev, ring, 2);
496 intel_ring_emit(dev, ring, MI_FLUSH | 496 intel_ring_emit(dev, ring, MI_FLUSH |
497 MI_NO_WRITE_FLUSH | 497 MI_NO_WRITE_FLUSH |