Revert "drm/i915: Implement Link Rate fallback on Link training failure"
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 1 Mar 2017 17:17:49 +0000 (18:17 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 2 Mar 2017 08:17:16 +0000 (09:17 +0100)
This reverts commit 233ce881dd91fb13eb6b09deefae33168e6ead4c.

I assumed it's ok, but really should have double-checked - CI caught
tons of fail :(

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Acked-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170301171749.13053-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_dp_link_training.c
drivers/gpu/drm/i915/intel_drv.h

index af07a830fa95d78261abef06556217474bbdca5d..d1670b8afbf5794c2edf0399dc7271d62a1b55ba 100644 (file)
@@ -5790,29 +5790,6 @@ out_vdd_off:
        return false;
 }
 
-static void intel_dp_modeset_retry_work_fn(struct work_struct *work)
-{
-       struct intel_connector *intel_connector;
-       struct drm_connector *connector;
-
-       intel_connector = container_of(work, typeof(*intel_connector),
-                                      modeset_retry_work);
-       connector = &intel_connector->base;
-       DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id,
-                     connector->name);
-
-       /* Grab the locks before changing connector property*/
-       mutex_lock(&connector->dev->mode_config.mutex);
-       /* Set connector link status to BAD and send a Uevent to notify
-        * userspace to do a modeset.
-        */
-       drm_mode_connector_set_link_status_property(connector,
-                                                   DRM_MODE_LINK_STATUS_BAD);
-       mutex_unlock(&connector->dev->mode_config.mutex);
-       /* Send Hotplug uevent so userspace can reprobe */
-       drm_kms_helper_hotplug_event(connector->dev);
-}
-
 bool
 intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
                        struct intel_connector *intel_connector)
@@ -5825,10 +5802,6 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
        enum port port = intel_dig_port->port;
        int type;
 
-       /* Initialize the work for modeset in case of link train failure */
-       INIT_WORK(&intel_connector->modeset_retry_work,
-                 intel_dp_modeset_retry_work_fn);
-
        if (WARN(intel_dig_port->max_lanes < 1,
                 "Not enough lanes (%d) for DP on port %c\n",
                 intel_dig_port->max_lanes, port_name(port)))
index 955b239e7c2df04f4a66d41e33849641d7e9882c..0048b520baf7c7bf210c2287b3d5c5f0139ceb52 100644 (file)
@@ -313,24 +313,6 @@ void intel_dp_stop_link_train(struct intel_dp *intel_dp)
 void
 intel_dp_start_link_train(struct intel_dp *intel_dp)
 {
-       struct intel_connector *intel_connector = intel_dp->attached_connector;
-
-       if (!intel_dp_link_training_clock_recovery(intel_dp))
-               goto failure_handling;
-       if (!intel_dp_link_training_channel_equalization(intel_dp))
-               goto failure_handling;
-
-       DRM_DEBUG_KMS("Link Training Passed at Link Rate = %d, Lane count = %d",
-                     intel_dp->link_rate, intel_dp->lane_count);
-       return;
-
- failure_handling:
-       DRM_DEBUG_KMS("Link Training failed at link rate = %d, lane count = %d",
-                     intel_dp->link_rate, intel_dp->lane_count);
-       if (!intel_dp_get_link_train_fallback_values(intel_dp,
-                                                    intel_dp->link_rate,
-                                                    intel_dp->lane_count))
-               /* Schedule a Hotplug Uevent to userspace to start modeset */
-               schedule_work(&intel_connector->modeset_retry_work);
-       return;
+       intel_dp_link_training_clock_recovery(intel_dp);
+       intel_dp_link_training_channel_equalization(intel_dp);
 }
index 6c6abc932726ec9f6505d905b6256a0d015118f1..3b797909f631d3185b619acce88f5f9d6dce7fe8 100644 (file)
@@ -316,9 +316,6 @@ struct intel_connector {
        void *port; /* store this opaque as its illegal to dereference it */
 
        struct intel_dp *mst_port;
-
-       /* Work struct to schedule a uevent on link train failure */
-       struct work_struct modeset_retry_work;
 };
 
 struct dpll {