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/drm/i915/intel_lvds.c | |
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/drm/i915/intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 24 |
1 files changed, 12 insertions, 12 deletions
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); |