drm/i915/dp: Read DP descriptor for eDP and LSPCON too
authorImre Deak <imre.deak@intel.com>
Mon, 24 Oct 2016 16:33:29 +0000 (19:33 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 26 Oct 2016 09:41:01 +0000 (12:41 +0300)
As for external DP sink and branch devices read and print the DP
descriptor for eDP and LSPCON devices as well to aid debugging.

v2:
- Split out this change to a separate patch. (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1477326811-30431-7-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_lspcon.c

index 07a502fd6773ee2b3e04637915a5930d316dc721..6eb43647163cf052fc35c7e35e91c892d06ed24e 100644 (file)
@@ -1461,7 +1461,7 @@ __intel_dp_read_desc(struct intel_dp *intel_dp, struct intel_dp_desc *desc)
               sizeof(*desc);
 }
 
-static bool intel_dp_read_desc(struct intel_dp *intel_dp)
+bool intel_dp_read_desc(struct intel_dp *intel_dp)
 {
        struct intel_dp_desc *desc = &intel_dp->desc;
        bool oui_sup = intel_dp->dpcd[DP_DOWN_STREAM_PORT_COUNT] &
@@ -3521,6 +3521,8 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
        if (!intel_dp_read_dpcd(intel_dp))
                return false;
 
+       intel_dp_read_desc(intel_dp);
+
        if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11)
                dev_priv->no_aux_handshake = intel_dp->dpcd[DP_MAX_DOWNSPREAD] &
                        DP_NO_AUX_HANDSHAKE_LINK_TRAINING;
index b9583268aafb963ef5035b02b3f1193c3f41774e..20fb6e72e90e889c4673a19693d746f88baf19b5 100644 (file)
@@ -1468,6 +1468,7 @@ static inline unsigned int intel_dp_unused_lane_mask(int lane_count)
 }
 
 bool intel_dp_read_dpcd(struct intel_dp *intel_dp);
+bool intel_dp_read_desc(struct intel_dp *intel_dp);
 
 /* intel_dp_aux_backlight.c */
 int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector);
index 23b817acd99d25c4439f1d656527a256e2b87999..c5f278b250a789a41bf1bf7fe53d0ad360a40961 100644 (file)
@@ -136,6 +136,8 @@ bool lspcon_init(struct intel_digital_port *intel_dig_port)
                return false;
        }
 
+       intel_dp_read_desc(dp);
+
        DRM_DEBUG_KMS("Success: LSPCON init\n");
        return true;
 }