diff options
author | Eric Anholt <eric@anholt.net> | 2010-01-28 19:45:52 -0500 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-02-26 16:23:20 -0500 |
commit | c619eed4b2ee1b2bde3e02464eb81632a08bb976 (patch) | |
tree | b017349c3626233d872b185efb38135f91b1abd5 /drivers/gpu | |
parent | faa7bde6cb1227d13d011042f17bda0869c3bd1e (diff) |
drm/i915: More s/IS_IRONLAKE/HAS_PCH_SPLIT for Sandybridge.
I think this is pretty much correct. Not really tested.
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_hdmi.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_i2c.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 24 |
6 files changed, 22 insertions, 22 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index f93f822fa72c..5388354da0d1 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -166,7 +166,7 @@ void intel_enable_asle (struct drm_device *dev) | |||
166 | { | 166 | { |
167 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 167 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
168 | 168 | ||
169 | if (IS_IRONLAKE(dev)) | 169 | if (HAS_PCH_SPLIT(dev)) |
170 | ironlake_enable_display_irq(dev_priv, DE_GSE); | 170 | ironlake_enable_display_irq(dev_priv, DE_GSE); |
171 | else | 171 | else |
172 | i915_enable_pipestat(dev_priv, 1, | 172 | i915_enable_pipestat(dev_priv, 1, |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3fe90730b0ff..9cd6de5f9906 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -886,7 +886,7 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | |||
886 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { | 886 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { |
887 | int lvds_reg; | 887 | int lvds_reg; |
888 | 888 | ||
889 | if (IS_IRONLAKE(dev)) | 889 | if (HAS_PCH_SPLIT(dev)) |
890 | lvds_reg = PCH_LVDS; | 890 | lvds_reg = PCH_LVDS; |
891 | else | 891 | else |
892 | lvds_reg = LVDS; | 892 | lvds_reg = LVDS; |
@@ -3320,12 +3320,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3320 | /* set the dithering flag */ | 3320 | /* set the dithering flag */ |
3321 | if (IS_I965G(dev)) { | 3321 | if (IS_I965G(dev)) { |
3322 | if (dev_priv->lvds_dither) { | 3322 | if (dev_priv->lvds_dither) { |
3323 | if (IS_IRONLAKE(dev)) | 3323 | if (HAS_PCH_SPLIT(dev)) |
3324 | pipeconf |= PIPE_ENABLE_DITHER; | 3324 | pipeconf |= PIPE_ENABLE_DITHER; |
3325 | else | 3325 | else |
3326 | lvds |= LVDS_ENABLE_DITHER; | 3326 | lvds |= LVDS_ENABLE_DITHER; |
3327 | } else { | 3327 | } else { |
3328 | if (IS_IRONLAKE(dev)) | 3328 | if (HAS_PCH_SPLIT(dev)) |
3329 | pipeconf &= ~PIPE_ENABLE_DITHER; | 3329 | pipeconf &= ~PIPE_ENABLE_DITHER; |
3330 | else | 3330 | else |
3331 | lvds &= ~LVDS_ENABLE_DITHER; | 3331 | lvds &= ~LVDS_ENABLE_DITHER; |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 439506cefc14..3ef3a0d0edd0 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -231,7 +231,7 @@ intel_dp_aux_ch(struct intel_output *intel_output, | |||
231 | */ | 231 | */ |
232 | if (IS_eDP(intel_output)) | 232 | if (IS_eDP(intel_output)) |
233 | aux_clock_divider = 225; /* eDP input clock at 450Mhz */ | 233 | aux_clock_divider = 225; /* eDP input clock at 450Mhz */ |
234 | else if (IS_IRONLAKE(dev)) | 234 | else if (HAS_PCH_SPLIT(dev)) |
235 | aux_clock_divider = 62; /* IRL input clock fixed at 125Mhz */ | 235 | aux_clock_divider = 62; /* IRL input clock fixed at 125Mhz */ |
236 | else | 236 | else |
237 | aux_clock_divider = intel_hrawclk(dev) / 2; | 237 | aux_clock_divider = intel_hrawclk(dev) / 2; |
@@ -584,7 +584,7 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode, | |||
584 | intel_dp_compute_m_n(3, lane_count, | 584 | intel_dp_compute_m_n(3, lane_count, |
585 | mode->clock, adjusted_mode->clock, &m_n); | 585 | mode->clock, adjusted_mode->clock, &m_n); |
586 | 586 | ||
587 | if (IS_IRONLAKE(dev)) { | 587 | if (HAS_PCH_SPLIT(dev)) { |
588 | if (intel_crtc->pipe == 0) { | 588 | if (intel_crtc->pipe == 0) { |
589 | I915_WRITE(TRANSA_DATA_M1, | 589 | I915_WRITE(TRANSA_DATA_M1, |
590 | ((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) | | 590 | ((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) | |
@@ -1176,7 +1176,7 @@ intel_dp_detect(struct drm_connector *connector) | |||
1176 | 1176 | ||
1177 | dp_priv->has_audio = false; | 1177 | dp_priv->has_audio = false; |
1178 | 1178 | ||
1179 | if (IS_IRONLAKE(dev)) | 1179 | if (HAS_PCH_SPLIT(dev)) |
1180 | return ironlake_dp_detect(connector); | 1180 | return ironlake_dp_detect(connector); |
1181 | 1181 | ||
1182 | temp = I915_READ(PORT_HOTPLUG_EN); | 1182 | temp = I915_READ(PORT_HOTPLUG_EN); |
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 0e268deed761..a30f8bfc1985 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
@@ -82,7 +82,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode) | |||
82 | /* HW workaround, need to toggle enable bit off and on for 12bpc, but | 82 | /* HW workaround, need to toggle enable bit off and on for 12bpc, but |
83 | * we do this anyway which shows more stable in testing. | 83 | * we do this anyway which shows more stable in testing. |
84 | */ | 84 | */ |
85 | if (IS_IRONLAKE(dev)) { | 85 | if (HAS_PCH_SPLIT(dev)) { |
86 | I915_WRITE(hdmi_priv->sdvox_reg, temp & ~SDVO_ENABLE); | 86 | I915_WRITE(hdmi_priv->sdvox_reg, temp & ~SDVO_ENABLE); |
87 | POSTING_READ(hdmi_priv->sdvox_reg); | 87 | POSTING_READ(hdmi_priv->sdvox_reg); |
88 | } | 88 | } |
@@ -99,7 +99,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode) | |||
99 | /* HW workaround, need to write this twice for issue that may result | 99 | /* HW workaround, need to write this twice for issue that may result |
100 | * in first write getting masked. | 100 | * in first write getting masked. |
101 | */ | 101 | */ |
102 | if (IS_IRONLAKE(dev)) { | 102 | if (HAS_PCH_SPLIT(dev)) { |
103 | I915_WRITE(hdmi_priv->sdvox_reg, temp); | 103 | I915_WRITE(hdmi_priv->sdvox_reg, temp); |
104 | POSTING_READ(hdmi_priv->sdvox_reg); | 104 | POSTING_READ(hdmi_priv->sdvox_reg); |
105 | } | 105 | } |
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index 8673c735b8ab..fcc753ca5d94 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c | |||
@@ -128,7 +128,7 @@ intel_i2c_reset_gmbus(struct drm_device *dev) | |||
128 | { | 128 | { |
129 | struct drm_i915_private *dev_priv = dev->dev_private; | 129 | struct drm_i915_private *dev_priv = dev->dev_private; |
130 | 130 | ||
131 | if (IS_IRONLAKE(dev)) { | 131 | if (HAS_PCH_SPLIT(dev)) { |
132 | I915_WRITE(PCH_GMBUS0, 0); | 132 | I915_WRITE(PCH_GMBUS0, 0); |
133 | } else { | 133 | } else { |
134 | I915_WRITE(GMBUS0, 0); | 134 | I915_WRITE(GMBUS0, 0); |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index e91e81de5c71..222459ad178d 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -56,7 +56,7 @@ static void intel_lvds_set_backlight(struct drm_device *dev, int level) | |||
56 | struct drm_i915_private *dev_priv = dev->dev_private; | 56 | struct drm_i915_private *dev_priv = dev->dev_private; |
57 | u32 blc_pwm_ctl, reg; | 57 | u32 blc_pwm_ctl, reg; |
58 | 58 | ||
59 | if (IS_IRONLAKE(dev)) | 59 | if (HAS_PCH_SPLIT(dev)) |
60 | reg = BLC_PWM_CPU_CTL; | 60 | reg = BLC_PWM_CPU_CTL; |
61 | else | 61 | else |
62 | reg = BLC_PWM_CTL; | 62 | reg = BLC_PWM_CTL; |
@@ -74,7 +74,7 @@ static u32 intel_lvds_get_max_backlight(struct drm_device *dev) | |||
74 | struct drm_i915_private *dev_priv = dev->dev_private; | 74 | struct drm_i915_private *dev_priv = dev->dev_private; |
75 | u32 reg; | 75 | u32 reg; |
76 | 76 | ||
77 | if (IS_IRONLAKE(dev)) | 77 | if (HAS_PCH_SPLIT(dev)) |
78 | reg = BLC_PWM_PCH_CTL2; | 78 | reg = BLC_PWM_PCH_CTL2; |
79 | else | 79 | else |
80 | reg = BLC_PWM_CTL; | 80 | reg = BLC_PWM_CTL; |
@@ -91,7 +91,7 @@ static void intel_lvds_set_power(struct drm_device *dev, bool on) | |||
91 | struct drm_i915_private *dev_priv = dev->dev_private; | 91 | struct drm_i915_private *dev_priv = dev->dev_private; |
92 | u32 pp_status, ctl_reg, status_reg; | 92 | u32 pp_status, ctl_reg, status_reg; |
93 | 93 | ||
94 | if (IS_IRONLAKE(dev)) { | 94 | if (HAS_PCH_SPLIT(dev)) { |
95 | ctl_reg = PCH_PP_CONTROL; | 95 | ctl_reg = PCH_PP_CONTROL; |
96 | status_reg = PCH_PP_STATUS; | 96 | status_reg = PCH_PP_STATUS; |
97 | } else { | 97 | } else { |
@@ -137,7 +137,7 @@ static void intel_lvds_save(struct drm_connector *connector) | |||
137 | u32 pp_on_reg, pp_off_reg, pp_ctl_reg, pp_div_reg; | 137 | u32 pp_on_reg, pp_off_reg, pp_ctl_reg, pp_div_reg; |
138 | u32 pwm_ctl_reg; | 138 | u32 pwm_ctl_reg; |
139 | 139 | ||
140 | if (IS_IRONLAKE(dev)) { | 140 | if (HAS_PCH_SPLIT(dev)) { |
141 | pp_on_reg = PCH_PP_ON_DELAYS; | 141 | pp_on_reg = PCH_PP_ON_DELAYS; |
142 | pp_off_reg = PCH_PP_OFF_DELAYS; | 142 | pp_off_reg = PCH_PP_OFF_DELAYS; |
143 | pp_ctl_reg = PCH_PP_CONTROL; | 143 | pp_ctl_reg = PCH_PP_CONTROL; |
@@ -174,7 +174,7 @@ static void intel_lvds_restore(struct drm_connector *connector) | |||
174 | u32 pp_on_reg, pp_off_reg, pp_ctl_reg, pp_div_reg; | 174 | u32 pp_on_reg, pp_off_reg, pp_ctl_reg, pp_div_reg; |
175 | u32 pwm_ctl_reg; | 175 | u32 pwm_ctl_reg; |
176 | 176 | ||
177 | if (IS_IRONLAKE(dev)) { | 177 | if (HAS_PCH_SPLIT(dev)) { |
178 | pp_on_reg = PCH_PP_ON_DELAYS; | 178 | pp_on_reg = PCH_PP_ON_DELAYS; |
179 | pp_off_reg = PCH_PP_OFF_DELAYS; | 179 | pp_off_reg = PCH_PP_OFF_DELAYS; |
180 | pp_ctl_reg = PCH_PP_CONTROL; | 180 | pp_ctl_reg = PCH_PP_CONTROL; |
@@ -297,7 +297,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, | |||
297 | } | 297 | } |
298 | 298 | ||
299 | /* full screen scale for now */ | 299 | /* full screen scale for now */ |
300 | if (IS_IRONLAKE(dev)) | 300 | if (HAS_PCH_SPLIT(dev)) |
301 | goto out; | 301 | goto out; |
302 | 302 | ||
303 | /* 965+ wants fuzzy fitting */ | 303 | /* 965+ wants fuzzy fitting */ |
@@ -327,7 +327,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, | |||
327 | * to register description and PRM. | 327 | * to register description and PRM. |
328 | * Change the value here to see the borders for debugging | 328 | * Change the value here to see the borders for debugging |
329 | */ | 329 | */ |
330 | if (!IS_IRONLAKE(dev)) { | 330 | if (!HAS_PCH_SPLIT(dev)) { |
331 | I915_WRITE(BCLRPAT_A, 0); | 331 | I915_WRITE(BCLRPAT_A, 0); |
332 | I915_WRITE(BCLRPAT_B, 0); | 332 | I915_WRITE(BCLRPAT_B, 0); |
333 | } | 333 | } |
@@ -548,7 +548,7 @@ static void intel_lvds_prepare(struct drm_encoder *encoder) | |||
548 | struct drm_i915_private *dev_priv = dev->dev_private; | 548 | struct drm_i915_private *dev_priv = dev->dev_private; |
549 | u32 reg; | 549 | u32 reg; |
550 | 550 | ||
551 | if (IS_IRONLAKE(dev)) | 551 | if (HAS_PCH_SPLIT(dev)) |
552 | reg = BLC_PWM_CPU_CTL; | 552 | reg = BLC_PWM_CPU_CTL; |
553 | else | 553 | else |
554 | reg = BLC_PWM_CTL; | 554 | reg = BLC_PWM_CTL; |
@@ -587,7 +587,7 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder, | |||
587 | * settings. | 587 | * settings. |
588 | */ | 588 | */ |
589 | 589 | ||
590 | if (IS_IRONLAKE(dev)) | 590 | if (HAS_PCH_SPLIT(dev)) |
591 | return; | 591 | return; |
592 | 592 | ||
593 | /* | 593 | /* |
@@ -1027,7 +1027,7 @@ void intel_lvds_init(struct drm_device *dev) | |||
1027 | return; | 1027 | return; |
1028 | } | 1028 | } |
1029 | 1029 | ||
1030 | if (IS_IRONLAKE(dev)) { | 1030 | if (HAS_PCH_SPLIT(dev)) { |
1031 | if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0) | 1031 | if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0) |
1032 | return; | 1032 | return; |
1033 | if (dev_priv->edp_support) { | 1033 | if (dev_priv->edp_support) { |
@@ -1130,7 +1130,7 @@ void intel_lvds_init(struct drm_device *dev) | |||
1130 | */ | 1130 | */ |
1131 | 1131 | ||
1132 | /* Ironlake: FIXME if still fail, not try pipe mode now */ | 1132 | /* Ironlake: FIXME if still fail, not try pipe mode now */ |
1133 | if (IS_IRONLAKE(dev)) | 1133 | if (HAS_PCH_SPLIT(dev)) |
1134 | goto failed; | 1134 | goto failed; |
1135 | 1135 | ||
1136 | lvds = I915_READ(LVDS); | 1136 | lvds = I915_READ(LVDS); |
@@ -1151,7 +1151,7 @@ void intel_lvds_init(struct drm_device *dev) | |||
1151 | goto failed; | 1151 | goto failed; |
1152 | 1152 | ||
1153 | out: | 1153 | out: |
1154 | if (IS_IRONLAKE(dev)) { | 1154 | if (HAS_PCH_SPLIT(dev)) { |
1155 | u32 pwm; | 1155 | u32 pwm; |
1156 | /* make sure PWM is enabled */ | 1156 | /* make sure PWM is enabled */ |
1157 | pwm = I915_READ(BLC_PWM_CPU_CTL2); | 1157 | pwm = I915_READ(BLC_PWM_CPU_CTL2); |