drm/i915: Compute sink's max lane count/link BW at Hotplug
authorManasi Navare <manasi.d.navare@intel.com>
Tue, 6 Dec 2016 00:27:36 +0000 (16:27 -0800)
committerJani Nikula <jani.nikula@intel.com>
Tue, 13 Dec 2016 14:20:00 +0000 (16:20 +0200)
commitf482984acb101d351a49ab0ec51c75dbf094a51d
tree6abe3c8b70b1a9ea6dc37fa614e1dabdcca8b9e7
parent213e08ad60baca3676d6633ca91e523735eed474
drm/i915: Compute sink's max lane count/link BW at Hotplug

Sink's capabilities are advertised through DPCD registers and get
updated only on hotplug. So they should be computed only once in the
long pulse handler and saved off in intel_dp structure for the use
later. For this reason two new fields max_sink_lane_count and
max_sink_link_bw are added to intel_dp structure.

This also simplifies the fallback link rate/lane count logic
to handle link training failure. In that case, the max_sink_link_bw
and max_sink_lane_count can be reccomputed to match the fallback
values lowering the sink capabilities due to link train failure.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1480984058-552-3-git-send-email-manasi.d.navare@intel.com
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h