summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.c
diff options
context:
space:
mode:
authorPaulo Zanoni2012-07-17 21:55:16 +0200
committerDaniel Vetter2012-07-25 18:23:47 +0200
commit47ea7542a1ac33ba9f15608d2fca00abcc1c11e5 (patch)
tree9613bd6a9d24732647f13c3adbd925673c5fdf81 /drivers/gpu/drm/i915/i915_drv.c
parentdrm/i915: add port parameter to intel_hdmi_init (diff)
downloadkernel-qcow2-linux-47ea7542a1ac33ba9f15608d2fca00abcc1c11e5.tar.gz
kernel-qcow2-linux-47ea7542a1ac33ba9f15608d2fca00abcc1c11e5.tar.xz
kernel-qcow2-linux-47ea7542a1ac33ba9f15608d2fca00abcc1c11e5.zip
drm/i915: move common code to intel_dp_set_link_train
We have some common code that we always run before calling intel_dp_set_link_train. This common code sets the correct training patterns to the DP variable. If we add more calls to intel_dp_set_link_train, we'll also have to duplicate this common code. So instead of repeating this code whenever we call intel_dp_set_link_train, we move the code to inside the function: now we check which training pattern we're going to set and then we set the DP register according to it. One of the side-effects of this change is that now we never forget to mask the training pattern bits before changing them. It looks like this was working before because we were first masking the bits, then writing 00, 01 and then 11. This patch also enables us to use the intel_dp_set_link_train function when disabling link training: in this case we need to avoid writing the DP_TRAINING_LANE*_SET AUX commands. As a bonus, the big intel_dp_{start,complete}_link_train functions will get smaller and a little bit easier to read. Version 2 changes: - Rewrite commit message. - Also clear the training pattern bits before changing them. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
0 files changed, 0 insertions, 0 deletions