1. 16 3月, 2014 2 次提交
    • D
      drm: init TTM dev_mapping in ttm_bo_device_init() · 44d847b7
      David Herrmann 提交于
      With dev->anon_inode we have a global address_space ready for operation
      right from the beginning. Therefore, there is no need to do a delayed
      setup with TTM. Instead, set dev_mapping during initialization in
      ttm_bo_device_init() and remove any "if (dev_mapping)" conditions.
      
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      44d847b7
    • D
      drm: use anon-inode instead of relying on cdevs · 6796cb16
      David Herrmann 提交于
      DRM drivers share a common address_space across all character-devices of a
      single DRM device. This allows simple buffer eviction and mapping-control.
      However, DRM core currently waits for the first ->open() on any char-dev
      to mark the underlying inode as backing inode of the device. This delayed
      initialization causes ugly conditions all over the place:
        if (dev->dev_mapping)
          do_sth();
      
      To avoid delayed initialization and to stop reusing the inode of the
      char-dev, we allocate an anonymous inode for each DRM device and reset
      filp->f_mapping to it on ->open().
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      6796cb16
  2. 14 1月, 2014 1 次提交
    • R
      drivers: gpu: Mark functions as static and remove unused function in cirrus_ttm.c · cdd73306
      Rashika 提交于
      Mark functions cirrus_ttm_global_release(), cirrus_ttm_bo_is_cirrus_bo()
      and cirrus_ttm_tt_create() as static in drm/cirrus/cirrus_ttm.c because
      they are not used outside this file. Remove unused function
      cirrus_bo_unpin() from drm/cirrus/cirrus_ttm.c.
      
      This eliminates the following warnings in drm/cirrus/cirrus_ttm.c:
      drivers/gpu/drm/cirrus/cirrus_ttm.c:84:1: warning: no previous prototype for ‘cirrus_ttm_global_release’ [-Wmissing-prototypes]
      drivers/gpu/drm/cirrus/cirrus_ttm.c:105:6: warning: no previous prototype for ‘cirrus_ttm_bo_is_cirrus_bo’ [-Wmissing-prototypes]
      drivers/gpu/drm/cirrus/cirrus_ttm.c:211:16: warning: no previous prototype for ‘cirrus_ttm_tt_create’ [-Wmissing-prototypes]
      drivers/gpu/drm/cirrus/cirrus_ttm.c:378:5: warning: no previous prototype for ‘cirrus_bo_unpin’ [-Wmissing-prototypes]
      Signed-off-by: NRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      cdd73306
  3. 27 8月, 2013 1 次提交
    • D
      drm: verify vma access in TTM+GEM drivers · acb46527
      David Herrmann 提交于
      GEM does already a good job in tracking access to gem buffers via handles
      and drm_vma access management. However, TTM drivers currently do not
      verify this during mmap().
      
      TTM provides the verify_access() callback to test this. So fix all drivers
      to actually call into gem+vma to verify access instead of always returning
      0.
      
      All drivers assume that user-space can only get access to TTM buffers via
      GEM handles. So whenever the verify_access() callback is called from
      ttm_bo_mmap(), the buffer must have a valid embedded gem object. This is
      true for all TTM+GEM drivers. But that's why this patch doesn't touch pure
      TTM drivers (ie, vmwgfx).
      
      v2: Switch to drm_vma_node_verify_access() to correctly return -EACCES if
          access was denied.
      
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      acb46527
  4. 19 8月, 2013 1 次提交
  5. 07 8月, 2013 1 次提交
  6. 28 6月, 2013 1 次提交
  7. 31 5月, 2013 1 次提交
  8. 02 5月, 2013 1 次提交
    • D
      drm/cirrus: deal with bo reserve fail in dirty update path · f3b2bbdc
      Dave Airlie 提交于
      Port over the mgag200 fix to cirrus as it suffers the same issue.
      
          On F19 testing, it was noticed we get a lot of errors in dmesg
          about being unable to reserve the buffer when plymouth starts,
          this is due to the buffer being in the process of migrating,
          so it makes sense we can't reserve it.
      
          In order to deal with it, this adds delayed updates for the dirty
          updates, when the bo is unreservable, in the normal console case
          this shouldn't ever happen, its just when plymouth or X is
          pushing the console bo to system memory.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f3b2bbdc
  9. 10 12月, 2012 1 次提交
    • M
      drm/ttm: remove no_wait_reserve, v3 · 97a875cb
      Maarten Lankhorst 提交于
      All items on the lru list are always reservable, so this is a stupid
      thing to keep. Not only that, it is used in a way which would
      guarantee deadlocks if it were ever to be set to block on reserve.
      
      This is a lot of churn, but mostly because of the removal of the
      argument which can be nested arbitrarily deeply in many places.
      
      No change of code in this patch except removal of the no_wait_reserve
      argument, the previous patch removed the use of no_wait_reserve.
      
      v2:
       - Warn if -EBUSY is returned on reservation, all objects on the list
         should be reservable. Adjusted patch slightly due to conflicts.
      v3:
       - Focus on no_wait_reserve removal only.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@canonical.com>
      Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      97a875cb
  10. 20 11月, 2012 1 次提交
  11. 03 10月, 2012 1 次提交
  12. 31 5月, 2012 1 次提交
  13. 23 5月, 2012 1 次提交
  14. 17 5月, 2012 2 次提交
    • D
      drm/kms: driver for virtual cirrus under qemu · f9aa76a8
      Dave Airlie 提交于
      This is the initial driver for emulated cirrus GPU found in qemu.
      This driver only supports the emulated GPU and doesn't attempt
      to bind to any real cirrus GPUs.
      
      This driver is intended to be used with xf86-video-modesetting in userspace.
      It requires at least version 0.3.0
      
      This follow the same design as ast and mgag200, and is based on work
      done by Matthew Garrett previously.
      
      This GPU has no hw cursor, and it can't scanout 32-bpp, only packed 24-bpp.
      i.e. it sucks.
      Reviewed-by: NAdam Jackson <ajax@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f9aa76a8
    • D
      drm: Initial KMS driver for AST (ASpeed Technologies) 2000 series (v2) · 312fec14
      Dave Airlie 提交于
      This is the initial driver for the Aspeed Technologies chips found in
      servers. This driver supports the AST 2000, 2100, 2200, 2150 and 2300. It
      doesn't support the AST11xx due to lack of hw to test it on, and them requiring
      different codepaths.
      
      This driver is intended to be used with xf86-video-modesetting in userspace.
      
      This driver has a slightly different design than other KMS drivers, but
      future server chips will probably share similiar setup. As these GPUs commonly
      have low video RAM, it doesn't make sense to put the kms console in VRAM
      always. This driver places the kms console into system RAM, and does dirty
      updates to a copy in video RAM. When userspace sets a new scanout buffer,
      it forcefully evicts the video RAM console, and X can create a framebuffer
      that can use all of of video RAM.
      
      This driver uses TTM but in a very simple fashion to control the eviction
      to system RAM of the console, and multiple servers.
      
      v2: add s/r support, fix Kconfig.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      312fec14