1. 02 Sep, 2015 3 commits
    • Ville Syrjälä's avatar
      drm/dp: Add dp_aux_i2c_speed_khz module param to set the assume i2c bus speed · f36203be
      Ville Syrjälä authored
      To help with debugging i2c-over-aux issues, add a module parameter than
      can be used to tweak the assumed i2c bus speed, and thus the maximum
      number of retries we will do for each aux message.
      
      Cc: Simon Farnsworth <simon.farnsworth@onelan.com>
      Cc: moosotc@gmail.com
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarSimon Farnsworth <simon.farnsworth@onelan.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      f36203be
    • Ville Syrjälä's avatar
      drm/dp: Adjust i2c-over-aux retry count based on message size and i2c bus speed · 4efa83c8
      Ville Syrjälä authored
      Calculate the number of retries we should do for each i2c-over-aux
      message based on the time it takes to perform the i2c transfer vs. the
      aux transfer. We assume the shortest possible length for the aux
      transfer, and the longest possible (exluding clock stretching) for the
      i2c transfer.
      
      The DP spec has some examples on how to calculate this, but we don't
      calculate things quite the same way. The spec doesn't account for the
      retry interval (assumes immediate retry on defer), and doesn't assume
      the best/worst case behaviour as we do.
      
      Note that currently we assume 10 kHz speed for the i2c bus. Some real
      world devices (eg. some Apple DP->VGA dongle) fails with less than 16
      retries. and that would correspond to something close to 15 kHz (with
      our method of calculating things) But let's just go for 10 kHz to be
      on the safe side. Ideally we should query/set the i2c bus speed via
      DPCD but for now this should at leaast remove the regression from the
      1->16 byte trasnfer size change. And of course if the sink completes
      the transfer quicker this shouldn't slow things down since we don't
      change the interval between retries.
      
      I did a few experiments with a DP->DVI dongle I have that allows you
      to change the i2c bus speed. Here are the results of me changing the
      actual bus speed and the assumed bus speed and seeing when we start
      to fail the operation:
      
      actual i2c khz          assumed i2c khz         max retries
      1                       1 ok -> 2 fail          211 ok -> 106 fail
      5                       8 ok -> 9 fail          27 ok -> 24 fail
      10                      17 ok -> 18 fail        13 ok -> 12 fail
      100                     210 ok -> 211 fail      2 ok -> 1 fail
      
      So based on that we have a fairly decent safety margin baked into
      the formula to calculate the max number of retries.
      
      Fixes a regression with some DP dongles from:
      commit 1d002fa7
      Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
      Date:   Tue Feb 10 18:38:08 2015 +0000
      
          drm/dp: Use large transactions for I2C over AUX
      
      v2: Use best case for AUX and worst case for i2c (Simon Farnsworth)
          Add a define our AUX retry interval and account for it
      v3: Make everything usecs to avoid confusion about units (Daniel)
          Add a comment reminding people about the AUX bitrate (Daniel)
          Use DIV_ROUND_UP() since we're after the "worst" case for i2c
      
      Cc: Simon Farnsworth <simon.farnsworth@onelan.com>
      Cc: moosotc@gmail.com
      Tested-by: moosotc@gmail.com
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91451Reviewed-by: default avatarSimon Farnsworth <simon.farnsworth@onelan.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      4efa83c8
    • Ville Syrjälä's avatar
      drm/dp: Define AUX_RETRY_INTERVAL as 500 us · 79a2b161
      Ville Syrjälä authored
      Currently we react to native and i2c defers by waiting either 400-500 us
      or 500-600 us, depending on which code path we take. Consolidate them
      all to one define AUX_RETRY_INTERVAL which defines the minimum interval.
      Since we've been using two different intervals pick the longer of them
      and define AUX_RETRY_INTERVAL as 500 us. For the maximum just use
      AUX_RETRY_INTERVAL+100 us.
      
      I want to have a define for this so that I can use it when calculating
      the estimated duration of i2c-over-aux transfers. Without a define it
      would be very easy to change the sleep duration and neglect to update
      the i2c-over-aux estimates.
      
      Cc: Simon Farnsworth <simon.farnsworth@onelan.com>
      Cc: moosotc@gmail.com
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarSimon Farnsworth <simon.farnsworth@onelan.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      79a2b161
  2. 01 Sep, 2015 1 commit
  3. 31 Aug, 2015 3 commits
    • Dave Airlie's avatar
      Merge branch 'exynos-drm-next' of... · 879a37d0
      Dave Airlie authored
      Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
      
      This is a second pull-request which adds last part of
      atomic modeset/pageflip support, render node support,
      clean-up, and fix-up.
      
      * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos: fix build warning to exynos_drm_gem.c
        drm/exynos: Properly report supported formats for each device
        drm/exynos: add render node support
        drm/exynos: implement atomic_{begin/flush} of DECON
        drm/exynos: remove legacy ->suspend()/resume()
        drm/exynos: Enable atomic modesetting feature
        drm/exynos: remove wait queue for pending page flip
        drm/exynos: wait all planes updates to finish
        drm/exynos: add atomic asynchronous commit
        drm/exynos: fimd: only finish update if START == START_S
        drm/exynos: add macro to get the address of START_S reg
        drm/exynos: check for pending fb before finish update
        drm/exynos: fimd: move window protect code to prepare/cleanup_plane
        drm/exynos: add prepare and cleanup phases for planes
        drm/exynos: fimd: unify call to exynos_drm_crtc_finish_pageflip()
        drm/exynos: don't track enabled state at exynos_crtc
      879a37d0
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-fixes-2015-08-28' of... · 701078d5
      Dave Airlie authored
      Merge tag 'drm-intel-next-fixes-2015-08-28' of git://anongit.freedesktop.org/drm-intel into drm-next
      
      Some i915 fixes headed for v4.3. SKL DDI-E is a wip, but here's the
      first in a series.
      
      * tag 'drm-intel-next-fixes-2015-08-28' of git://anongit.freedesktop.org/drm-intel:
        drm/i915/skl: enable DDI-E hotplug
        drm/i915: Fix build warning on 32-bit
        drm/i915/skl: Update DDI buffer translation programming.
        drm/i915: Allow parsing of variable size child device entries from VBT
        drm/i915: fix link rates reported for SKL
        drm/i915: fix VBT parsing for SDVO child device mapping
      701078d5
    • Dave Airlie's avatar
      Merge tag 'drm-amdkfd-next-fixes-2015-08-30' of... · d3e8ea50
      Dave Airlie authored
      Merge tag 'drm-amdkfd-next-fixes-2015-08-30' of git://people.freedesktop.org/~gabbayo/linux into drm-next
      
      Just one small fix before 4.3 merge window:
      
      - Use linux/mman.h instead of uapi's mman-common.h inside the driver.
      
      * tag 'drm-amdkfd-next-fixes-2015-08-30' of git://people.freedesktop.org/~gabbayo/linux:
        amdkfd: use <linux/mman.h> instead of <uapi/asm-generic/mman-common.h>
      d3e8ea50
  4. 30 Aug, 2015 17 commits
  5. 28 Aug, 2015 16 commits