This patch series adds upfront link training support to enable USB type C based DP on BXT platform. To support USB type C alternate DP mode, the display driver needs to know the number of lanes required by the DP panel as well as number of lanes that can be supported by the type-C cable. Sometimes, the type-C cable may limit the bandwidth even if Panel can support more lanes. The goal is to find out the number of lanes which can be supported using a particular cable so that we can cap 'max_available_lanes' to that number during modeset. Patches 1-4/7 :Refactoring/exporting DDI functions required to do upfront link train Patch 5/7 :Exports a common function to update DPCD Patch 6/7 :Moves finding unused crtc to a common function Patch 7/7 :Upfront implementation for DDI platforms, that is for now, tested on BXT A1. Changes from RFCv2: * Rebased on top of atomic and latest-nightly * Re-used code in load_detect to find unused crtc as per Ander's comment * Moved DPCD update to common function which can be used by upfront link train code for other platforms also. * intel_crtc_control() does not exist in atomic world; so implemented the required dpms_off/on calls through get/release_load_detect() functions which take care of locking semantics. The other option I tried was using intel_crtc_disable_noatomic() But this does not have a corresponding _enable part (and hence needed a connector->func->dpms_on() anyway). Hence re-using the load_detect functions makes the implementation cleaner. * Replaced all unnecessary local variables in upfront link train code with the corresponding ones in intel_dp struct. * RFCv2 link: https://patchwork.freedesktop.org/patch/61776/ As per Daniel's suggestion on RFCv1: * Added the last patch 6/6 that has implementation for CHV * Made intel_dp_upfront_link_train as common for all platforms and added a intel_ddi_upfront_* for all DDI platforms. Currently, have restricted it to only for SKL/BXT. * Moved the upfront code for DDI platforms into intel_ddi.c from display.c, since that aligned better with other ddi* functions. * Kept the CHV implementation in display.c as of now since we are using some pll functions defined in display.c We can discuss and finalize an appropriate place for this and then refactor/export required functions. Durgadoss R (7): drm/i915/dp: Reuse encoder if it is already available drm/i915/dp: Reuse shared DPLL if it exists already drm/i915/dp: Abstract all get_ddi_pll methods drm/i915/dp: Export enable/disable_shared_dpll methods drm/i915/dp: Add methods to update link train params drm/i915: Make finding unused crtc as a generic function drm/i915/dp: Enable Upfront link training for typeC DP support on BXT drivers/gpu/drm/i915/intel_ddi.c | 160 ++++++++++++++++++++++++++++------- drivers/gpu/drm/i915/intel_display.c | 61 ++++++++----- drivers/gpu/drm/i915/intel_dp.c | 111 +++++++++++++++++++++++- drivers/gpu/drm/i915/intel_drv.h | 12 ++- 4 files changed, 287 insertions(+), 57 deletions(-) -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx