1. 12 6月, 2015 2 次提交
    • 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
  2. 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
  3. 02 6月, 2014 2 次提交
  4. 31 3月, 2014 1 次提交
  5. 07 2月, 2014 1 次提交
  6. 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
  7. 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
  8. 12 9月, 2013 2 次提交
  9. 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
  10. 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