xf86-video-intel: src/i830.h src/i830_lvds.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Tue Dec 4 18:27:27 PST 2007


 src/i830.h      |   18 +++++++++---------
 src/i830_lvds.c |   24 ++++++++++++------------
 2 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 4c1fa5235555c9ef3de1eebd006c4e91283362bf
Author: Jesse Barnes <jbarnes at hobbes.virtuousgeek.org>
Date:   Tue Dec 4 18:27:24 2007 -0800

    Add BCM_ to backlight control method enums
    
    Avoids polluting the global namespace with such generic terms.

diff --git a/src/i830.h b/src/i830.h
index 2c1ac86..fe4d6c5 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -321,29 +321,29 @@ enum last_3d {
  * so they can choose an ideal one for their platform (assuming our quirk
  * code picks the wrong one).
  *
- * Four different methods are available:
- *   NATIVE:  only ever touch the native backlight control registers
+ * Four different backlight control methods are available:
+ *   BCM_NATIVE:  only ever touch the native backlight control registers
  *     This method may be susceptible to problem (2) above if the firmware
  *     modifies the legacy registers.
- *   LEGACY:  only ever touch the legacy backlight control registers
+ *   BCM_LEGACY:  only ever touch the legacy backlight control registers
  *     This method may be susceptible to problem (1) above if the firmware
  *     also modifies the legacy registers.
- *   COMBO:  try to use both sets
+ *   BCM_COMBO:  try to use both sets
  *     In this case, the driver will try to modify both sets of registers
  *     if needed.  To avoid problem (2) above it may set the LBB register
  *     to a non-zero value if the brightness is to be increased.  It's still
  *     susceptible to problem (1), but to a lesser extent than the LEGACY only
  *     method.
- *   KERNEL:  use kernel methods for controlling the backlight
+ *   BCM_KERNEL:  use kernel methods for controlling the backlight
  *     This is only available on some platforms, but where present this can
  *     provide the best user experience.
  */
 
 enum backlight_control {
-    NATIVE = 0,
-    LEGACY,
-    COMBO,
-    KERNEL,
+    BCM_NATIVE = 0,
+    BCM_LEGACY,
+    BCM_COMBO,
+    BCM_KERNEL,
 };
 
 typedef struct _I830Rec {
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index da1fc46..602a55d 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -109,18 +109,18 @@ i830_set_lvds_backlight_method(xf86OutputPtr output)
     ScrnInfoPtr pScrn = output->scrn;
     I830Ptr pI830 = I830PTR(pScrn);
     CARD32 blc_pwm_ctl, blc_pwm_ctl2;
-    enum backlight_control method = NATIVE; /* Default to native */
+    enum backlight_control method = BCM_NATIVE; /* Default to native */
 
     if (i830_kernel_backlight_available(output)) {
-	    method = KERNEL;
+	    method = BCM_KERNEL;
     } else if (IS_I965GM(pI830)) {
 	blc_pwm_ctl2 = INREG(BLC_PWM_CTL2);
 	if (blc_pwm_ctl2 & BLM_LEGACY_MODE2)
-	    method = LEGACY;
+	    method = BCM_LEGACY;
     } else {
 	blc_pwm_ctl = INREG(BLC_PWM_CTL);
 	if (blc_pwm_ctl & BLM_LEGACY_MODE)
-	    method = LEGACY;
+	    method = BCM_LEGACY;
     }
 
     pI830->backlight_control_method = method;
@@ -646,24 +646,24 @@ i830_lvds_set_backlight_control(xf86OutputPtr output)
     struct i830_lvds_priv   *dev_priv = intel_output->dev_priv;
 
     switch (pI830->backlight_control_method) {
-    case NATIVE:
+    case BCM_NATIVE:
 	dev_priv->set_backlight = i830_lvds_set_backlight_native;
 	dev_priv->get_backlight = i830_lvds_get_backlight_native;
 	dev_priv->backlight_max =
 	    i830_lvds_get_backlight_max_native(output);
 	break;
-    case LEGACY:
+    case BCM_LEGACY:
 	dev_priv->set_backlight = i830_lvds_set_backlight_legacy;
 	dev_priv->get_backlight = i830_lvds_get_backlight_legacy;
 	dev_priv->backlight_max = 0xff;
 	break;
-    case COMBO:
+    case BCM_COMBO:
 	dev_priv->set_backlight = i830_lvds_set_backlight_combo;
 	dev_priv->get_backlight = i830_lvds_get_backlight_combo;
 	dev_priv->backlight_max =
 	    i830_lvds_get_backlight_max_native(output);
 	break;
-    case KERNEL:
+    case BCM_KERNEL:
 	dev_priv->set_backlight = i830_lvds_set_backlight_kernel;
 	dev_priv->get_backlight = i830_lvds_get_backlight_kernel;
 	dev_priv->backlight_max =
@@ -990,22 +990,22 @@ i830_lvds_init(ScrnInfoPtr pScrn)
     i830_set_lvds_backlight_method(output);
 
     switch (pI830->backlight_control_method) {
-    case NATIVE:
+    case BCM_NATIVE:
 	dev_priv->set_backlight = i830_lvds_set_backlight_native;
 	dev_priv->get_backlight = i830_lvds_get_backlight_native;
 	dev_priv->backlight_max = i830_lvds_get_backlight_max_native(output);
 	break;
-    case LEGACY:
+    case BCM_LEGACY:
 	dev_priv->set_backlight = i830_lvds_set_backlight_legacy;
 	dev_priv->get_backlight = i830_lvds_get_backlight_legacy;
 	dev_priv->backlight_max = 0xff;
 	break;
-    case COMBO:
+    case BCM_COMBO:
 	dev_priv->set_backlight = i830_lvds_set_backlight_combo;
 	dev_priv->get_backlight = i830_lvds_get_backlight_combo;
 	dev_priv->backlight_max = i830_lvds_get_backlight_max_native(output);
 	break;
-    case KERNEL:
+    case BCM_KERNEL:
 	dev_priv->set_backlight = i830_lvds_set_backlight_kernel;
 	dev_priv->get_backlight = i830_lvds_get_backlight_kernel;
 	dev_priv->backlight_max = i830_lvds_get_backlight_max_kernel(output);


More information about the xorg-commit mailing list