drm/i915: Remove "i2c_speed" nonsense from child device table
authorAdam Jackson <ajax@redhat.com>
Thu, 16 Jun 2011 20:36:23 +0000 (16:36 -0400)
committerKeith Packard <keithp@keithp.com>
Thu, 20 Oct 2011 21:11:15 +0000 (14:11 -0700)
I have no evidence for this byte being used this way, and lots of
counterexamples.  Restore the struct to its empirical definition and
patch up gmbus setup to match.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_bios.c
drivers/gpu/drm/i915/intel_bios.h
drivers/gpu/drm/i915/intel_sdvo.c

index 0e777fdf9c61bd6ee783f0c706b374d084f476b7..c02cdace744ca231162cf8efdc5c16c0b2fd000d 100644 (file)
@@ -139,7 +139,6 @@ struct sdvo_device_mapping {
        u8 slave_addr;
        u8 dvo_wiring;
        u8 i2c_pin;
-       u8 i2c_speed;
        u8 ddc_pin;
 };
 
index dbda66f622ee6ec15809d35effb8f913e7b1ccf4..63880e2e5cfd4c2028f9933081606b57e2d5380f 100644 (file)
@@ -403,15 +403,13 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv,
                        p_mapping->dvo_wiring = p_child->dvo_wiring;
                        p_mapping->ddc_pin = p_child->ddc_pin;
                        p_mapping->i2c_pin = p_child->i2c_pin;
-                       p_mapping->i2c_speed = p_child->i2c_speed;
                        p_mapping->initialized = 1;
-                       DRM_DEBUG_KMS("SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d, i2c_speed=%d\n",
+                       DRM_DEBUG_KMS("SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d\n",
                                      p_mapping->dvo_port,
                                      p_mapping->slave_addr,
                                      p_mapping->dvo_wiring,
                                      p_mapping->ddc_pin,
-                                     p_mapping->i2c_pin,
-                                     p_mapping->i2c_speed);
+                                     p_mapping->i2c_pin);
                } else {
                        DRM_DEBUG_KMS("Maybe one SDVO port is shared by "
                                         "two SDVO device.\n");
index a8cad2b88e04b46c5fe67b8ef41d3a556548a861..8af3735e27c615506eb94a171bde35e7aebd36ef 100644 (file)
@@ -202,8 +202,7 @@ struct bdb_general_features {
 struct child_device_config {
        u16 handle;
        u16 device_type;
-       u8  i2c_speed;
-       u8  rsvd[9];
+       u8  device_id[10]; /* ascii string */
        u16 addin_offset;
        u8  dvo_port; /* See Device_PORT_* above */
        u8  i2c_pin;
index 73120024321929136de0e4107de156f12e98b54e..ed15c00aecdfe98bbe99aeb42715db090101f5a3 100644 (file)
@@ -1896,7 +1896,7 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
                          struct intel_sdvo *sdvo, u32 reg)
 {
        struct sdvo_device_mapping *mapping;
-       u8 pin, speed;
+       u8 pin;
 
        if (IS_SDVOB(reg))
                mapping = &dev_priv->sdvo_mappings[0];
@@ -1904,18 +1904,16 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
                mapping = &dev_priv->sdvo_mappings[1];
 
        pin = GMBUS_PORT_DPB;
-       speed = GMBUS_RATE_1MHZ >> 8;
-       if (mapping->initialized) {
+       if (mapping->initialized)
                pin = mapping->i2c_pin;
-               speed = mapping->i2c_speed;
-       }
 
        if (pin < GMBUS_NUM_PORTS) {
                sdvo->i2c = &dev_priv->gmbus[pin].adapter;
-               intel_gmbus_set_speed(sdvo->i2c, speed);
+               intel_gmbus_set_speed(sdvo->i2c, GMBUS_RATE_1MHZ >> 8);
                intel_gmbus_force_bit(sdvo->i2c, true);
-       } else
+       } else {
                sdvo->i2c = &dev_priv->gmbus[GMBUS_PORT_DPB].adapter;
+       }
 }
 
 static bool