1. 27 May, 2009 3 commits
    • Kristian Høgsberg's avatar
      i915: Set object to gtt domain when faulting it back in · 07f4f3e8
      Kristian Høgsberg authored
      When a GEM object is evicted from the GTT we set it to the CPU domain,
      as it might get swapped in and out or ever mmapped regularly.  If the
      object is mmapped through the GTT it can still get evicted in this way
      by other objects requiring GTT space.  When the GTT mapping is touched
      again we fault it back into the GTT, but fail to set it back to the
      GTT domain.  This means we fail to flush any cached CPU writes to the
      pages backing the object which will then happen "eventually", typically
      after we write to the page through the uncached GTT mapping.
      
      [anholt: Note that userland does do a set_domain(GTT, GTT) when starting
      to access the GTT mapping.  That covers getting the existing mapping of the
      object synchronized if it's bound to the GTT.  But set_domain(GTT, GTT)
      doesn't do anything if the object is currently unbound.  This fix covers the
      transition to being bound for GTT mapping.]
      
      Fixes glyph and other pixmap corruption during swapping.  fd.o bug #21790
      Signed-off-by: default avatarKristian Høgsberg <krh@redhat.com>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      07f4f3e8
    • Eric Anholt's avatar
      drm/i915: Apply a big hammer to 865 GEM object CPU cache flushing. · cfa16a0d
      Eric Anholt authored
      On the 865, but not the 855, the clflush we do appears to not actually make
      it out to the hardware all the time.  An easy way to safely reproduce was
      X -retro, which would show that some of the blits involved in drawing the
      lovely root weave didn't make it out to the hardware.  Those blits are 32
      bytes each, and 1-2 would be missing at various points around the screen.
      Other experimentation (doing more clflush, doing more AGP chipset flush,
      poking at some more device registers to maybe trigger more flushing) didn't
      help.  krh came up with the wbinvd as a way to successfully get all those
      blits to appear.
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      cfa16a0d
    • Eric Anholt's avatar
      drm/i915: Fix tiling pitch handling on 8xx. · e76a16de
      Eric Anholt authored
      The pitch field is an exponent on pre-965, so we were rejecting buffers
      on 8xx that we shouldn't have.  915 got lucky in that the largest legal
      value happened to match (8KB / 512 = 0x10), but 8xx has a smaller tile width.
      Additionally, we programmed that bad value into the register on 8xx, so the
      only pitch that would work correctly was 4096 (512-1023 pixels), while others
      would probably give bad rendering or hangs.
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      
      fd.o bug #20473.
      e76a16de
  2. 26 May, 2009 32 commits
  3. 25 May, 2009 5 commits