aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-07 06:01:32 -0400
committerEric Anholt <eric@anholt.net>2010-08-09 14:24:34 -0400
commit862daefcc9a1eb9ff3e4c3d8076c31535f710cf9 (patch)
treedaf14cd55ea6a90be57b74e0312c5743d933b16a /drivers
parent868dc58fbfda73493d62eae353b6b13649550e10 (diff)
drm/i915/opregion: Use ASLE response codes defined in 0.1
Within i915_opregion.c there are two blocks of semantically identical ASLE response codes defined. Only one of those matches the ACPI IGD OpRegion Specification 0.1, use those. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_opregion.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
index 8fcc75c1aa28..ce402b2568be 100644
--- a/drivers/gpu/drm/i915/i915_opregion.c
+++ b/drivers/gpu/drm/i915/i915_opregion.c
@@ -114,10 +114,6 @@ struct opregion_asle {
114#define ASLE_REQ_MSK 0xf 114#define ASLE_REQ_MSK 0xf
115 115
116/* response bits of ASLE irq request */ 116/* response bits of ASLE irq request */
117#define ASLE_ALS_ILLUM_FAIL (2<<10)
118#define ASLE_BACKLIGHT_FAIL (2<<12)
119#define ASLE_PFIT_FAIL (2<<14)
120#define ASLE_PWM_FREQ_FAIL (2<<16)
121#define ASLE_ALS_ILLUM_FAILED (1<<10) 117#define ASLE_ALS_ILLUM_FAILED (1<<10)
122#define ASLE_BACKLIGHT_FAILED (1<<12) 118#define ASLE_BACKLIGHT_FAILED (1<<12)
123#define ASLE_PFIT_FAILED (1<<14) 119#define ASLE_PFIT_FAILED (1<<14)
@@ -155,11 +151,11 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)
155 u32 max_backlight, level, shift; 151 u32 max_backlight, level, shift;
156 152
157 if (!(bclp & ASLE_BCLP_VALID)) 153 if (!(bclp & ASLE_BCLP_VALID))
158 return ASLE_BACKLIGHT_FAIL; 154 return ASLE_BACKLIGHT_FAILED;
159 155
160 bclp &= ASLE_BCLP_MSK; 156 bclp &= ASLE_BCLP_MSK;
161 if (bclp < 0 || bclp > 255) 157 if (bclp < 0 || bclp > 255)
162 return ASLE_BACKLIGHT_FAIL; 158 return ASLE_BACKLIGHT_FAILED;
163 159
164 blc_pwm_ctl = I915_READ(BLC_PWM_CTL); 160 blc_pwm_ctl = I915_READ(BLC_PWM_CTL);
165 blc_pwm_ctl2 = I915_READ(BLC_PWM_CTL2); 161 blc_pwm_ctl2 = I915_READ(BLC_PWM_CTL2);
@@ -211,7 +207,7 @@ static u32 asle_set_pfit(struct drm_device *dev, u32 pfit)
211 /* Panel fitting is currently controlled by the X code, so this is a 207 /* Panel fitting is currently controlled by the X code, so this is a
212 noop until modesetting support works fully */ 208 noop until modesetting support works fully */
213 if (!(pfit & ASLE_PFIT_VALID)) 209 if (!(pfit & ASLE_PFIT_VALID))
214 return ASLE_PFIT_FAIL; 210 return ASLE_PFIT_FAILED;
215 return 0; 211 return 0;
216} 212}
217 213