1. 24 Sep, 2015 1 commit
  2. 17 Sep, 2015 1 commit
  3. 15 Sep, 2015 1 commit
    • Thomas Hellstrom's avatar
      drm/ttm: Fix memory space allocation v2 · e30f3963
      Thomas Hellstrom authored
      In the event that TTM doesn't find a compatible memory type for the
      driver's first placement choice (placement without eviction), TTM
      returns -EINVAL without trying the driver's second choice.
      This causes problems on vmwgfx when VRAM is disabled before first modeset
      and during VT switches when fbdev is not enabled.
      
      Fix this by also trying the driver's second choice before returning
      -EINVAL.
      
      v2: Also check that man->use_type is true for the driver's second choice.
      Fixes a bug where disallowed memory types could be used.
      Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
      Reviewed-by: default avatarSinclair Yeh <syeh@vmware.com>
      e30f3963
  4. 14 Sep, 2015 2 commits
    • Thomas Hellstrom's avatar
      drm/vmwgfx: Map the fifo as cached · 2e586a7e
      Thomas Hellstrom authored
      On the guest kernel side, previously the FIFO has been mapped write-
      combined. This has worked since VMs up to now has not honored the mapping
      type and mapped the FIFO cached anyway. Since the FIFO is accessed cached
      by the CPU on the virtual device side, this leads to inconsistent
      mappings once the guest starts to honor the mapping types.
      
      So ask for cached mappings when we map the FIFO. We do this by
      using ioremap_cache() instead of ioremap_wc(), and remove the MTRR setup.
      On the TTM side, MOBs, GMRs and VRAM buffers are already requesting
      cached mappings for kernel- and user-space.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: default avatarSinclair Yeh <syeh@vmware.com>
      2e586a7e
    • Thomas Hellstrom's avatar
      drm/vmwgfx: Fix up user_dmabuf refcounting · 54c12bc3
      Thomas Hellstrom authored
      If user space calls unreference on a user_dmabuf it will typically
      kill the struct ttm_base_object member which is responsible for the
      user-space visibility. However the dmabuf part may still be alive and
      refcounted. In some situations, like for shared guest-backed surface
      referencing/opening, the driver may try to reference the
      struct ttm_base_object member again, causing an immediate kernel warning
      and a later kernel NULL pointer dereference.
      
      Fix this by always maintaining a reference on the struct
      ttm_base_object member, in situations where it might subsequently be
      referenced.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
      Reviewed-by: default avatarSinclair Yeh <syeh@vmware.com>
      54c12bc3
  5. 11 Sep, 2015 7 commits
  6. 10 Sep, 2015 3 commits
  7. 09 Sep, 2015 1 commit
  8. 08 Sep, 2015 1 commit
  9. 04 Sep, 2015 11 commits
  10. 03 Sep, 2015 6 commits
  11. 02 Sep, 2015 6 commits