1. 14 12月, 2017 1 次提交
  2. 28 10月, 2017 9 次提交
    • J
      drm/msm: Implement preemption for A5XX targets · b1fc2839
      Jordan Crouse 提交于
      Implement preemption for A5XX targets - this allows multiple
      ringbuffers for different priorities with automatic preemption
      of a lower priority ringbuffer if a higher one is ready.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      b1fc2839
    • J
      drm/msm: Make the value of RB_CNTL (almost) generic · 4d87fc32
      Jordan Crouse 提交于
      We use a global ringbuffer size and block size for all targets and
      at least for 5XX preemption we need to know the value the RB_CNTL
      in several locations so it makes sense to calculate it once and use
      it everywhere.
      
      The only monkey wrench is that we need to disable the RPTR shadow
      for A430 targets but that only needs to be done once and doesn't
      affect A5XX so we can or in the value at init time.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4d87fc32
    • J
      drm/msm: Shadow current pointer in the ring until command is complete · 4c7085a5
      Jordan Crouse 提交于
      Add a shadow pointer to track the current command being written into
      the ring. Don't commit it as 'cur' until the command is submitted.
      Because 'cur' is used to construct the software copy of the wptr this
      ensures that somebody peeking in on the ring doesn't assume that a
      command is inflight while it is being written. This isn't a huge deal
      with a single ring (though technically the hangcheck could assume
      the system is prematurely busy when it isn't) but it will be rather
      important for preemption where the decision to preempt is based
      on a non-empty ringbuffer. Without a shadow an aggressive preemption
      scheme could assume that the ringbuffer is non empty and switch to it
      before the CPU is done writing the command and boom.
      
      Even though preemption won't be supported for all targets because of
      the way the code is organized it is simpler to make this generic for
      all targets. The extra load for non-preemption targets should be
      minimal.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4c7085a5
    • J
      drm/msm: Add a parameter query for the number of ringbuffers · a6e29a0e
      Jordan Crouse 提交于
      In order to manage ringbuffer priority to its fullest userspace
      should know how many ringbuffers it has to work with. Add a
      parameter to return the number of active rings.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      a6e29a0e
    • J
      drm/msm: Support multiple ringbuffers · f97decac
      Jordan Crouse 提交于
      Add the infrastructure to support the idea of multiple ringbuffers.
      Assign each ringbuffer an id and use that as an index for the various
      ring specific operations.
      
      The biggest delta is to support legacy fences. Each fence gets its own
      sequence number but the legacy functions expect to use a unique integer.
      To handle this we return a unique identifier for each submission but
      map it to a specific ring/sequence under the covers. Newer users use
      a dma_fence pointer anyway so they don't care about the actual sequence
      ID or ring.
      
      The actual mechanics for multiple ringbuffers are very target specific
      so this code just allows for the possibility but still only defines
      one ringbuffer for each target family.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      f97decac
    • J
      drm/msm: Move memptrs to msm_gpu · cd414f3d
      Jordan Crouse 提交于
      When we move to multiple ringbuffers we're going to store the data
      in the memptrs on a per-ring basis. In order to prepare for that
      move the current memptrs from the adreno namespace into msm_gpu.
      This is way cleaner and immediately lets us kill off some sub
      functions so there is much less cost later when we do move to
      per-ring structs.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      cd414f3d
    • R
      drm/msm/adreno: deal with linux-firmware fw paths · 2c41ef1b
      Rob Clark 提交于
      When firmware was added to linux-firmware, it was put in a qcom sub-
      directory, unlike what we'd been using before.  For a300_pfp.fw and
      a300_pm4.fw symlinks were created, but we'd prefer not to have to do
      this in the future.  So add support to look in both places when
      loading firmware.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      2c41ef1b
    • R
      drm/msm/adreno: split out helper to load fw · e8f3de96
      Rob Clark 提交于
      Prep work for the next patch.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      e8f3de96
    • R
      drm/msm/adreno: load gpu at probe/bind time · eec874ce
      Rob Clark 提交于
      Previously, in an effort to defer initializing the gpu until firmware
      was available (ie. rootfs mounted), the gpu was not loaded at when the
      subdevice was bound.  Which resulted that clks/etc were requested in a
      place that devm couldn't really help unwind if something failed.
      
      Instead move request_firmware() to gpu->hw_init() and construct the gpu
      earlier in adreno_bind().  To avoid the rest of the driver needing to
      be aware of a gpu that hasn't managed to load firmware and hw_init()
      yet, stash the gpu ptr in the adreno device's drvdata, and don't set
      priv->gpu() until hw_init() succeeds.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      eec874ce
  3. 23 8月, 2017 2 次提交
  4. 02 8月, 2017 1 次提交
  5. 17 6月, 2017 1 次提交
  6. 16 6月, 2017 4 次提交
  7. 08 4月, 2017 7 次提交
  8. 04 4月, 2017 1 次提交
  9. 07 2月, 2017 1 次提交
  10. 13 1月, 2017 1 次提交
  11. 30 12月, 2016 1 次提交
    • J
      drm/msm: Ensure that the hardware write pointer is valid · 88b333b0
      Jordan Crouse 提交于
      Currently the value written to CP_RB_WPTR is calculated on the fly as
      (rb->next - rb->start). But as the code is designed rb->next is wrapped
      before writing the commands so if a series of commands happened to
      fit perfectly in the ringbuffer, rb->next would end up being equal to
      rb->size / 4 and thus result in an out of bounds address to CP_RB_WPTR.
      
      The easiest way to fix this is to mask WPTR when writing it to the
      hardware; it makes the hardware happy and the rest of the ringbuffer
      math appears to work and there isn't any point in upsetting anything.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      [squash in is_power_of_2() check]
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      88b333b0
  12. 29 11月, 2016 5 次提交
  13. 28 11月, 2016 1 次提交
  14. 16 7月, 2016 2 次提交
  15. 05 6月, 2016 1 次提交
  16. 08 5月, 2016 2 次提交
    • R
      drm/msm: drop return from gpu->submit() · 1193c3bc
      Rob Clark 提交于
      At this point, there is nothing left to fail.  And submit already has a
      fence assigned and is added to the submit_list.  Any problems from here
      on out are asynchronous (ie. hangcheck/recovery).
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      1193c3bc
    • R
      drm/msm: fix ->last_fence() after recover · 27557343
      Rob Clark 提交于
      It is no longer true that we discard all in-flight submits on recover
      (these days we only discard the first one that hung).  After the first
      re-submitted batch completes it would overwrite the fence with a correct
      value, but there would be a window of time which showed all re-submitted
      batches as already complete.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      27557343