drm/i915: move sdvo mappings to vbt data
authorJani Nikula <jani.nikula@intel.com>
Thu, 24 Mar 2016 15:50:22 +0000 (17:50 +0200)
committerJani Nikula <jani.nikula@intel.com>
Tue, 29 Mar 2016 12:12:30 +0000 (15:12 +0300)
Move all data initialized from VBT under dev_priv->vbt. No functional
changes.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1458834623-8734-4-git-send-email-jani.nikula@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_bios.c
drivers/gpu/drm/i915/intel_sdvo.c

index ad6f69ef95d5f8127c6561e6d753cc961bea03a0..bf867e28731d56987badd035073188f9c907d0f4 100644 (file)
@@ -1491,6 +1491,7 @@ struct intel_vbt_data {
        union child_device_config *child_dev;
 
        struct ddi_vbt_port_info ddi_port_info[I915_MAX_PORTS];
+       struct sdvo_device_mapping sdvo_mappings[2];
 };
 
 enum intel_ddb_partitioning {
@@ -1823,8 +1824,6 @@ struct drm_i915_private {
 
        /* Kernel Modesetting */
 
-       struct sdvo_device_mapping sdvo_mappings[2];
-
        struct drm_crtc *plane_to_crtc_mapping[I915_MAX_PIPES];
        struct drm_crtc *pipe_to_crtc_mapping[I915_MAX_PIPES];
        wait_queue_head_t pending_flip_queue;
index 3af8a4a2e145c375b88e1997373a037b9df868bd..407fb7a12a498cc858c89269ff3c557984732567 100644 (file)
@@ -482,7 +482,7 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv,
                              child->slave_addr,
                              (child->dvo_port == DEVICE_PORT_DVOB) ?
                              "SDVOB" : "SDVOC");
-               p_mapping = &(dev_priv->sdvo_mappings[child->dvo_port - 1]);
+               p_mapping = &dev_priv->vbt.sdvo_mappings[child->dvo_port - 1];
                if (!p_mapping->initialized) {
                        p_mapping->dvo_port = child->dvo_port;
                        p_mapping->slave_addr = child->slave_addr;
index fae64bc93c1ba48f12a301794326204687c3d241..2128fae5687d12a59c8d06ecc4003113abcc7944 100644 (file)
@@ -2260,9 +2260,9 @@ intel_sdvo_select_ddc_bus(struct drm_i915_private *dev_priv,
        struct sdvo_device_mapping *mapping;
 
        if (sdvo->port == PORT_B)
-               mapping = &(dev_priv->sdvo_mappings[0]);
+               mapping = &dev_priv->vbt.sdvo_mappings[0];
        else
-               mapping = &(dev_priv->sdvo_mappings[1]);
+               mapping = &dev_priv->vbt.sdvo_mappings[1];
 
        if (mapping->initialized)
                sdvo->ddc_bus = 1 << ((mapping->ddc_pin & 0xf0) >> 4);
@@ -2278,9 +2278,9 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
        u8 pin;
 
        if (sdvo->port == PORT_B)
-               mapping = &dev_priv->sdvo_mappings[0];
+               mapping = &dev_priv->vbt.sdvo_mappings[0];
        else
-               mapping = &dev_priv->sdvo_mappings[1];
+               mapping = &dev_priv->vbt.sdvo_mappings[1];
 
        if (mapping->initialized &&
            intel_gmbus_is_valid_pin(dev_priv, mapping->i2c_pin))
@@ -2316,11 +2316,11 @@ intel_sdvo_get_slave_addr(struct drm_device *dev, struct intel_sdvo *sdvo)
        struct sdvo_device_mapping *my_mapping, *other_mapping;
 
        if (sdvo->port == PORT_B) {
-               my_mapping = &dev_priv->sdvo_mappings[0];
-               other_mapping = &dev_priv->sdvo_mappings[1];
+               my_mapping = &dev_priv->vbt.sdvo_mappings[0];
+               other_mapping = &dev_priv->vbt.sdvo_mappings[1];
        } else {
-               my_mapping = &dev_priv->sdvo_mappings[1];
-               other_mapping = &dev_priv->sdvo_mappings[0];
+               my_mapping = &dev_priv->vbt.sdvo_mappings[1];
+               other_mapping = &dev_priv->vbt.sdvo_mappings[0];
        }
 
        /* If the BIOS described our SDVO device, take advantage of it. */