1. 09 Apr, 2012 13 commits
  2. 28 Mar, 2012 23 commits
  3. 27 Mar, 2012 4 commits
    • Daniel Vetter's avatar
      drm/i915: mark pwrite/pread slowpaths with unlikely · e7e58eb5
      Daniel Vetter authored
      Beside helping the compiler untangle this maze they double-up as
      documentation for which parts of the code aren't performance-critical
      but just around to keep old (but already dead-slow) userspace from
      breaking.
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e7e58eb5
    • Daniel Vetter's avatar
      drm/i915: fixup in-line clflushing on bit17 swizzled bos · 23c18c71
      Daniel Vetter authored
      The issue is that with inline clflushing the clflushing isn't properly
      swizzled. Fix this by
      - always clflushing entire 128 byte chunks and
      - unconditionally flush before writes when swizzling a given page.
        We could be clever and check whether we pwrite a partial 128 byte
        chunk instead of a partial cacheline, but I've figured that's not
        worth it.
      
      Now the usual approach is to fold this into the original patch series, but
      I've opted against this because
      - this fixes a corner case only very old userspace relies on and
      - I'd like to not invalidate all the testing the pwrite rewrite has gotten.
      
      This fixes the regression notice by tests/gem_tiled_partial_prite_pread
      from i-g-t. Unfortunately it doesn't fix the issues with partial pwrites to
      tiled buffers on bit17 swizzling machines. But that is also broken without
      the pwrite patches, so likely a different issue (or a problem with the
      testcase).
      
      v2: Simplify the patch by dropping the overly clever partial write
      logic for swizzled pages.
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      23c18c71
    • Daniel Vetter's avatar
      mm: extend prefault helpers to fault in more than PAGE_SIZE · f56f821f
      Daniel Vetter authored
      drm/i915 wants to read/write more than one page in its fastpath
      and hence needs to prefault more than PAGE_SIZE bytes.
      
      Add new functions in filemap.h to make that possible.
      
      Also kill a copy&pasted spurious space in both functions while at it.
      
      v2: As suggested by Andrew Morton, add a multipage parameter to both
      functions to avoid the additional branch for the pagemap.c hotpath.
      My gcc 4.6 here seems to dtrt and indeed reap these branches where not
      needed.
      
      v3: Becaus I couldn't find a way around adding a uaddr += PAGE_SIZE to
      the filemap.c hotpaths (that the compiler couldn't remove again),
      let's go with separate new functions for the multipage use-case.
      
      v4: Adjust comment to CodingStlye and fix spelling.
      Acked-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f56f821f
    • Daniel Vetter's avatar
      drm/i915: extract copy helpers from shmem_pread|pwrite · d174bd64
      Daniel Vetter authored
      While moving around things, this two functions slowly grew out of any
      sane bounds. So extract a few lines that do the copying and
      clflushing. Also add a few comments to explain what's going on.
      
      v2: Again do s/needs_clflush/needs_clflush_after/ in the write paths
      as suggested by Chris Wilson.
      Tested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d174bd64