drm/i915: base gmbus pin validity check on the gmbus pin map array
[deliverable/linux.git] / drivers / gpu / drm / i915 / intel_lvds.c
index 071b96d6e14642778f25a89e81b4ca908c0b64ea..314a5d56ace25cd727b5f90214390974a3268095 100644 (file)
@@ -286,7 +286,7 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder,
        struct intel_connector *intel_connector =
                &lvds_encoder->attached_connector->base;
        struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode;
-       struct intel_crtc *intel_crtc = lvds_encoder->base.new_crtc;
+       struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->base.crtc);
        unsigned int lvds_bpp;
 
        /* Should never happen!! */
@@ -509,7 +509,7 @@ static int intel_lvds_set_property(struct drm_connector *connector,
                intel_connector->panel.fitting_mode = value;
 
                crtc = intel_attached_encoder(connector)->base.crtc;
-               if (crtc && crtc->enabled) {
+               if (crtc && crtc->state->enable) {
                        /*
                         * If the CRTC is enabled, the display will be changed
                         * according to the new panel fitting mode.
@@ -535,6 +535,7 @@ static const struct drm_connector_funcs intel_lvds_connector_funcs = {
        .atomic_get_property = intel_connector_atomic_get_property,
        .destroy = intel_lvds_destroy,
        .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
+       .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
 };
 
 static const struct drm_encoder_funcs intel_lvds_enc_funcs = {
@@ -780,7 +781,7 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev,
                    child->device_type != DEVICE_TYPE_LFP)
                        continue;
 
-               if (intel_gmbus_is_port_valid(child->i2c_pin))
+               if (intel_gmbus_is_valid_pin(dev_priv, child->i2c_pin))
                        *i2c_pin = child->i2c_pin;
 
                /* However, we cannot trust the BIOS writers to populate
@@ -920,7 +921,7 @@ void intel_lvds_init(struct drm_device *dev)
        if (dmi_check_system(intel_no_lvds))
                return;
 
-       pin = GMBUS_PORT_PANEL;
+       pin = GMBUS_PIN_PANEL;
        if (!lvds_is_present_in_vbt(dev, &pin)) {
                DRM_DEBUG_KMS("LVDS is not present in VBT\n");
                return;
This page took 0.029797 seconds and 5 git commands to generate.