drm/i915/bxt: Adjusting the error in horizontal timings retrieval
authorRamalingam C <ramalingam.c@intel.com>
Tue, 19 Apr 2016 08:18:14 +0000 (13:48 +0530)
committerJani Nikula <jani.nikula@intel.com>
Thu, 28 Apr 2016 14:08:44 +0000 (17:08 +0300)
commit042ab0c3c40be1efcaad6b526173b5536fc6c3bf
tree46385c144c06f38e225365c074fc1d5ba8df52d4
parentcefc4e18785123326c5d4d985085e32160fef7f5
drm/i915/bxt: Adjusting the error in horizontal timings retrieval

In BXT DSI there is no regs programmed with few horizontal timings
in Pixels but txbyteclkhs.. So retrieval process adds some
ROUND_UP ERRORS in the process of PIXELS<==>txbyteclkhs.

Actually here for the given adjusted_mode, we are calculating the
value programmed to the port and then back to the horizontal timing
param in pixels. This is the expected value at the end of get_config,
including roundup errors. And if that is same as retrieved value
from port, then retrieved (HW state) adjusted_mode's horizontal
timings are corrected to match with SW state to nullify the errors.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1461053894-5058-2-git-send-email-ramalingam.c@intel.com
drivers/gpu/drm/i915/intel_dsi.c