1. 29 11月, 2016 1 次提交
    • R
      drm/msm: convert iova to 64b · 78babc16
      Rob Clark 提交于
      For a5xx the gpu is 64b so we need to change iova to 64b everywhere.  On
      the display side, iova is still 32b so it can ignore the upper bits.
      (Although all the armv8 devices have an iommu that can map 64b pa to 32b
      iova.)
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      78babc16
  2. 28 11月, 2016 1 次提交
  3. 25 10月, 2016 1 次提交
    • C
      dma-buf: Rename struct fence to dma_fence · f54d1867
      Chris Wilson 提交于
      I plan to usurp the short name of struct fence for a core kernel struct,
      and so I need to rename the specialised fence/timeline for DMA
      operations to make room.
      
      A consensus was reached in
      https://lists.freedesktop.org/archives/dri-devel/2016-July/113083.html
      that making clear this fence applies to DMA operations was a good thing.
      Since then the patch has grown a bit as usage increases, so hopefully it
      remains a good thing!
      
      (v2...: rebase, rerun spatch)
      v3: Compile on msm, spotted a manual fixup that I broke.
      v4: Try again for msm, sorry Daniel
      
      coccinelle script:
      @@
      
      @@
      - struct fence
      + struct dma_fence
      @@
      
      @@
      - struct fence_ops
      + struct dma_fence_ops
      @@
      
      @@
      - struct fence_cb
      + struct dma_fence_cb
      @@
      
      @@
      - struct fence_array
      + struct dma_fence_array
      @@
      
      @@
      - enum fence_flag_bits
      + enum dma_fence_flag_bits
      @@
      
      @@
      (
      - fence_init
      + dma_fence_init
      |
      - fence_release
      + dma_fence_release
      |
      - fence_free
      + dma_fence_free
      |
      - fence_get
      + dma_fence_get
      |
      - fence_get_rcu
      + dma_fence_get_rcu
      |
      - fence_put
      + dma_fence_put
      |
      - fence_signal
      + dma_fence_signal
      |
      - fence_signal_locked
      + dma_fence_signal_locked
      |
      - fence_default_wait
      + dma_fence_default_wait
      |
      - fence_add_callback
      + dma_fence_add_callback
      |
      - fence_remove_callback
      + dma_fence_remove_callback
      |
      - fence_enable_sw_signaling
      + dma_fence_enable_sw_signaling
      |
      - fence_is_signaled_locked
      + dma_fence_is_signaled_locked
      |
      - fence_is_signaled
      + dma_fence_is_signaled
      |
      - fence_is_later
      + dma_fence_is_later
      |
      - fence_later
      + dma_fence_later
      |
      - fence_wait_timeout
      + dma_fence_wait_timeout
      |
      - fence_wait_any_timeout
      + dma_fence_wait_any_timeout
      |
      - fence_wait
      + dma_fence_wait
      |
      - fence_context_alloc
      + dma_fence_context_alloc
      |
      - fence_array_create
      + dma_fence_array_create
      |
      - to_fence_array
      + to_dma_fence_array
      |
      - fence_is_array
      + dma_fence_is_array
      |
      - trace_fence_emit
      + trace_dma_fence_emit
      |
      - FENCE_TRACE
      + DMA_FENCE_TRACE
      |
      - FENCE_WARN
      + DMA_FENCE_WARN
      |
      - FENCE_ERR
      + DMA_FENCE_ERR
      )
       (
       ...
       )
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Acked-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161025120045.28839-1-chris@chris-wilson.co.uk
      f54d1867
  4. 16 9月, 2016 1 次提交
  5. 08 5月, 2016 7 次提交
  6. 23 10月, 2015 1 次提交
  7. 12 6月, 2015 3 次提交
    • R
      drm/msm: restart queued submits after hang · 1a370be9
      Rob Clark 提交于
      Track the list of in-flight submits.  If the gpu hangs, retire up to an
      including the offending submit, and then re-submit the remainder.  This
      way, for concurrently running piglit tests (for example), one failing
      test doesn't cause unrelated tests to fail simply because it's submit
      was queued up after one that triggered a hang.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      1a370be9
    • R
      drm/msm: adreno a306 support · de558cd2
      Rob Clark 提交于
      As found in apq8016 (used in DragonBoard 410c) and msm8916.
      
      Note that numerically a306 is actually 307 (since a305c already claimed
      306).  Nice and confusing.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      de558cd2
    • R
      drm/msm: clarify downstream bus scaling · 6490ad47
      Rob Clark 提交于
      A few spots in the driver have support for downstream android
      CONFIG_MSM_BUS_SCALING.  This is mainly to simplify backporting the
      driver for various devices which do not have sufficient upstream
      kernel support.  But the intentionally dead code seems to cause
      some confusion.  Rename the #define to make this more clear.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      6490ad47
  8. 04 8月, 2014 2 次提交
    • R
      drm/msm: fix potential deadlock in gpu init · a1ad3523
      Rob Clark 提交于
      Somewhere along the way, the firmware loader sprouted another lock
      dependency, resulting in possible deadlock scenario:
      
       &dev->struct_mutex --> &sb->s_type->i_mutex_key#2 --> &mm->mmap_sem
      
      which is problematic vs things like gem mmap.
      
      So introduce a separate mutex to synchronize gpu init.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      a1ad3523
    • R
      drm/msm: use upstream iommu · 944fc36c
      Rob Clark 提交于
      Downstream kernel IOMMU had a non-standard way of dealing with multiple
      devices and multiple ports/contexts.  We don't need that on upstream
      kernel, so rip out the crazy.
      
      Note that we have to move the pinning of the ringbuffer to after the
      IOMMU is attached.  No idea how that managed to work properly on the
      downstream kernel.
      
      For now, I am leaving the IOMMU port name stuff in place, to simplify
      things for folks trying to backport latest drm/msm to device kernels.
      Once we no longer have to care about pre-DT kernels, we can drop this
      and instead backport upstream IOMMU driver.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      944fc36c
  9. 02 6月, 2014 2 次提交
  10. 31 3月, 2014 1 次提交
  11. 07 2月, 2014 1 次提交
  12. 10 1月, 2014 2 次提交
    • R
      drm/msm: add support for non-IOMMU systems · 871d812a
      Rob Clark 提交于
      Add a VRAM carveout that is used for systems which do not have an IOMMU.
      
      The VRAM carveout uses CMA.  The arch code must setup a CMA pool for the
      device (preferrably in highmem.. a 256m-512m VRAM pool in lowmem is not
      cool).  The user can configure the VRAM pool size using msm.vram module
      param.
      
      Technically, the abstraction of IOMMU behind msm_mmu is not strictly
      needed, but it simplifies the GEM code a bit, and will be useful later
      when I add support for a2xx devices with GPUMMU, so I decided to keep
      this part.
      
      It appears to be possible to configure the GPU to restrict access to
      addresses within the VRAM pool, but this is not done yet.  So for now
      the GPU will refuse to load if there is no sort of mmu.  Once address
      based limits are supported and tested to confirm that we aren't giving
      the GPU access to arbitrary memory, this restriction can be lifted
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      871d812a
    • R
      drm/msm: fix bus scaling · bf2b33af
      Rob Clark 提交于
      This got a bit broken with original patches when re-arranging things to
      move dependencies on mach-msm inside #ifndef OF.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      bf2b33af
  13. 02 11月, 2013 1 次提交
    • R
      drm/msm: rework inactive-work · edd4fc63
      Rob Clark 提交于
      Re-arrange things a bit so that we can get work requested after a bo
      fence passes, like pageflip, done before retiring bo's.  Without any
      sort of bo cache in userspace, some games can trigger hundred's of
      transient bo's, which can cause retire to take a long time (5-10ms).
      Obviously we want a bo cache.. but this cleanup will make things a
      bit easier for atomic as well and makes things a bit cleaner.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Acked-by: NDavid Brown <davidb@codeaurora.org>
      edd4fc63
  14. 12 9月, 2013 2 次提交
  15. 11 9月, 2013 2 次提交
    • R
      drm/msm: hangcheck harder · 26791c48
      Rob Clark 提交于
      If gpu locks up with the rptr shortly beyond the wrap-around point in
      the ringbuffer, because the rptr was not reset (but wptr is, by virtue
      of resetting rb->cur), we could end up in a scenario where we think
      there is not enough space in the ringbuffer for the next cmds.  And
      since the CP won't reset rptr until after processing an IB, this leaves
      things in a sort of deadlock.
      
      So reset rptr too.  And a bit more spiffing up of hangcheck to make
      things easier to debug.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      26791c48
    • R
      drm/msm: handle read vs write fences · bf6811f3
      Rob Clark 提交于
      The userspace API already had everything needed to handle read vs write
      synchronization.  This patch actually bothers to hook it up properly, so
      that we don't need to (for example) stall on userspace read access to a
      buffer that gpu is also still reading.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      bf6811f3
  16. 25 8月, 2013 2 次提交
    • R
      drm/msm: add basic hangcheck/recovery mechanism · bd6f82d8
      Rob Clark 提交于
      A basic, no-frills recovery mechanism in case the gpu gets wedged.  We
      could try to be a bit more fancy and restart the next submit after the
      one that got wedged, but for now keep it simple.  This is enough to
      recover things if, for example, the gpu hangs mid way through a piglit
      run.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      bd6f82d8
    • R
      drm/msm: add a3xx gpu support · 7198e6b0
      Rob Clark 提交于
      Add initial support for a3xx 3d core.
      
      So far, with hardware that I've seen to date, we can have:
       + zero, one, or two z180 2d cores
       + a3xx or a2xx 3d core, which share a common CP (the firmware
         for the CP seems to implement some different PM4 packet types
         but the basics of cmdstream submission are the same)
      
      Which means that the eventual complete "class" hierarchy, once
      support for all past and present hw is in place, becomes:
       + msm_gpu
         + adreno_gpu
           + a3xx_gpu
           + a2xx_gpu
         + z180_gpu
      
      This commit splits out the parts that will eventually be common
      between a2xx/a3xx into adreno_gpu, and the parts that are even
      common to z180 into msm_gpu.
      
      Note that there is no cmdstream validation required.  All memory access
      from the GPU is via IOMMU/MMU.  So as long as you don't map silly things
      to the GPU, there isn't much damage that the GPU can do.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      7198e6b0