1. 12 Oct, 2017 3 commits
    • Arnd Bergmann's avatar
      drm: vblank: use ktime_t instead of timeval · 67680d3c
      Arnd Bergmann authored
      The drm vblank handling uses 'timeval' to store timestamps in either
      monotonic or wall-clock time base. In either case, it reads the current
      time as a ktime_t in get_drm_timestamp() and converts it from there.
      
      This is a bit suspicious, as users of 'timeval' often suffer from
      the time_t overflow in y2038. I have gone through this code and
      found that it is unlikely to cause problems here:
      
      - The user space ABI does not use time_t or timeval, but uses
        'u32' and 'long' as the types. This means at least that rebuilding
        user programs against a new libc with 64-bit time_t does not
        change the ABI.
      
      - As of commit c61eef72 ("drm: add support for monotonic vblank
        timestamps") in linux-3.8, the monotonic timestamp is the default
        and can only get reverted to wall-clock through a module-parameter.
      
      - With the default monotonic timestamps, there is no problem at all.
      
      - The drm_wait_vblank_ioctl() interface is alway safe on 64-bit
        architectures, on 32-bit it might overflow the 'long' timestamps
        in 2038 with wall-clock timestamps.
      
      - The event handling uses 'u32' seconds, which overflow in 2106
        on both 32-bit and 64-bit machines, when wall-clock timestamps
        are used.
      
      - The effect of overflowing either of the two is only temporary
        (during the overflow, and is likely to keep working again
        afterwards. It is likely the same problem as observing a
        'settimeofday()' call, which was the reason for moving to the
        monotonic timestamps in the first place.
      
      Overall, this seems good enough, so my patch removes the use of
      'timeval' from the vblank handling altogether and uses ktime_t
      consistently, except for the part where we copy the data to user
      space structures in the existing format.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      67680d3c
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2017-09-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-next · c5c7bc71
      Dave Airlie authored
      2nd batch of v4.15 features:
      
      - lib/scatterlist updates, use for userptr allocations (Tvrtko)
      - Fixed point wrapper cleanup (Mahesh)
      - Gen9+ transition watermarks, watermark optimization and fixes (Mahesh)
      - Display IPC (Isochronous Priority Control) support (Mahesh)
      - GEM workaround fixes (Oscar)
      - GVT: PCI config sanitize series (Changbin)
      - GVT: Workload submission error handling series (Fred)
      - PSR fixes and refactoring (Rodrigo)
      - HWSP based optimizations (Chris)
      - Private PAT management (Zhi)
      - IRQ handling fixes and refactoring (Ville)
      - Module parameter refactoring and variable name clash fix (Michal)
      - Execlist refactoring, incomplete request unwinding on reset (Chris)
      - GuC scheduling improvements (Michal)
      - OA updates (Lionel)
      - Coffeelake out of alpha support (Rodrigo)
      - seqno fixes (Chris)
      - Execlist refactoring (Mika)
      - DP and DP MST cleanups (Dhinakaran)
      - Cannonlake slice/sublice config (Ben)
      - Numerous fixes all around (Everyone)
      
      * tag 'drm-intel-next-2017-09-29' of git://anongit.freedesktop.org/drm/drm-intel: (168 commits)
        drm/i915: Update DRIVER_DATE to 20170929
        drm/i915: Use memset64() to prefill the GTT page
        drm/i915: Also discard second CRC on gen8+ platforms.
        drm/i915/psr: Set frames before SU entry for psr2
        drm/dp: Add defines for latency in sink
        drm/i915: Allow optimized platform checks
        drm/i915: Avoid using dev_priv->info.gen directly.
        i915: Use %pS printk format for direct addresses
        drm/i915/execlists: Notify context-out for lost requests
        drm/i915/cnl: Add support slice/subslice/eu configs
        drm/i915: Compact device info access by a small re-ordering
        drm/i915: Add IS_PLATFORM macro
        drm/i915/selftests: Try to recover from a wedged GPU during reset tests
        drm/i915/huc: Reorganize HuC authentication
        drm/i915: Fix default values of some modparams
        drm/i915: Extend I915_PARAMS_FOR_EACH with default member value
        drm/i915: Make I915_PARAMS_FOR_EACH macro more flexible
        drm/i915: Enable scanline read based on frame timestamps
        drm/i915/execlists: Microoptimise execlists_cancel_port_request()
        drm/i915: Don't rmw PIPESTAT enable bits
        ...
      c5c7bc71
    • Keith Packard's avatar
      drm: Pass struct drm_file * to __drm_mode_object_find [v2] · 418da172
      Keith Packard authored
      This will allow __drm_mode_object_file to be extended to perform
      access control checks based on the file in use.
      
      v2: Also fix up vboxvideo driver in staging
      
      [airlied: merging early as this is an API change]
      Suggested-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      418da172
  2. 09 Oct, 2017 3 commits
  3. 06 Oct, 2017 34 commits