1. 23 Aug, 2019 16 commits
  2. 22 Aug, 2019 2 commits
  3. 21 Aug, 2019 1 commit
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-2019-08-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-next · 5f680625
      Dave Airlie authored
      drm-misc-next for 5.4:
      
      UAPI Changes:
      
      Cross-subsystem Changes:
      
      Core Changes:
        - dma-buf: add reservation_object_fences helper, relax
                   reservation_object_add_shared_fence, remove
                   reservation_object seq number (and then
                   restored)
        - dma-fence: Shrinkage of the dma_fence structure,
                     Merge dma_fence_signal and dma_fence_signal_locked,
                     Store the timestamp in struct dma_fence in a union with
                     cb_list
      
      Driver Changes:
        - More dt-bindings YAML conversions
        - More removal of drmP.h includes
        - dw-hdmi: Support get_eld and various i2s improvements
        - gm12u320: Few fixes
        - meson: Global cleanup
        - panfrost: Few refactors, Support for GPU heap allocations
        - sun4i: Support for DDC enable GPIO
        - New panels: TI nspire, NEC NL8048HL11, LG Philips LB035Q02,
                      Sharp LS037V7DW01, Sony ACX565AKM, Toppoly TD028TTEC1
                      Toppoly TD043MTEA1
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      [airlied: fixup dma_resv rename fallout]
      
      From: Maxime Ripard <maxime.ripard@bootlin.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190819141923.7l2adietcr2pioct@flea
      5f680625
  4. 19 Aug, 2019 1 commit
  5. 18 Aug, 2019 1 commit
  6. 17 Aug, 2019 5 commits
  7. 16 Aug, 2019 7 commits
  8. 15 Aug, 2019 7 commits
    • Lucas Stach's avatar
      drm/etnaviv: implement softpin · 088880dd
      Lucas Stach authored
      With softpin we allow the userspace to take control over the GPU virtual
      address space. The new capability is relected by a bump of the minor DRM
      version. There are a few restrictions for userspace to take into
      account:
      
      1. The kernel reserves a bit of the address space to implement zero page
      faulting and mapping of the kernel internal ring buffer. Userspace can
      query the kernel for the first usable GPU VM address via
      ETNAVIV_PARAM_SOFTPIN_START_ADDR.
      
      2. We only allow softpin on GPUs, which implement proper process
      separation via PPAS. If softpin is not available the softpin start
      address will be set to ~0.
      
      3. Softpin is all or nothing. A submit using softpin must not use any
      address fixups via relocs.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      088880dd
    • Lucas Stach's avatar
      drm/etnaviv: allow to request specific virtual address for gem mapping · 17eae23b
      Lucas Stach authored
      Allow the mapping code to request a specific virtual address for the gem
      mapping. If the virtual address is zero we fall back to the old mode of
      allocating a virtual address for the mapping.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      17eae23b
    • Lucas Stach's avatar
      drm/etnaviv: skip command stream validation on PPAS capable GPUs · edb5ff07
      Lucas Stach authored
      With per-process address spaces in place, a rogue process submitting
      bogus command streams can only hurt itself. There is no need to
      validate the command stream before execution anymore.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      edb5ff07
    • Lucas Stach's avatar
      drm/etnaviv: implement per-process address spaces on MMUv2 · 17e4660a
      Lucas Stach authored
      This builds on top of the MMU contexts introduced earlier. Instead of having
      one context per GPU core, each GPU client receives its own context.
      
      On MMUv1 this still means a single shared pagetable set is used by all
      clients, but on MMUv2 there is now a distinct set of pagetables for each
      client. As the command fetch is also translated via the MMU on MMUv2 the
      kernel command ringbuffer is mapped into each of the client pagetables.
      
      As the MMU context switch is a bit of a heavy operation, due to the needed
      cache and TLB flushing, this patch implements a lazy way of switching the
      MMU context. The kernel does not have its own MMU context, but reuses the
      last client context for all of its operations. This has some visible impact,
      as the GPU can now only be started once a client has submitted some work and
      we got the client MMU context assigned. Also the MMU context has a different
      lifetime than the general client context, as the GPU might still execute the
      kernel command buffer in the context of a client even after the client has
      completed all GPU work and has been terminated. Only when the GPU is runtime
      suspended or switches to another clients MMU context is the old context
      freed up.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      17e4660a
    • Lucas Stach's avatar
      drm/etnaviv: provide MMU context to etnaviv_gem_mapping_get · e6364d70
      Lucas Stach authored
      In preparation to having a context per process, etnaviv_gem_mapping_get
      should not use the current GPU context, but needs to be told which
      context to use.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      e6364d70
    • Lucas Stach's avatar
      drm/etnaviv: split out starting of FE idle loop · d80d842a
      Lucas Stach authored
      Move buffer setup and starting of the FE loop in the kernel ringbuffer
      into a separate function. This is a preparation to start the FE later
      in the submit process.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      d80d842a
    • Lucas Stach's avatar
      drm/etnaviv: rework MMU handling · 27b67278
      Lucas Stach authored
      This reworks the MMU handling to make it possible to have multiple MMU contexts.
      A context is basically one instance of GPU page tables. Currently we have one
      set of page tables per GPU, which isn't all that clever, as it has the
      following two consequences:
      
      1. All GPU clients (aka processes) are sharing the same pagetables, which means
      there is no isolation between clients, but only between GPU assigned memory
      spaces and the rest of the system. Better than nothing, but also not great.
      
      2. Clients operating on the same set of buffers with different etnaviv GPU
      cores, e.g. a workload using both the 2D and 3D GPU, need to map the used
      buffers into the pagetable sets of each used GPU.
      
      This patch reworks all the MMU handling to introduce the abstraction of the
      MMU context. A context can be shared across different GPU cores, as long as
      they have compatible MMU implementations, which is the case for all systems
      with Vivante GPUs seen in the wild.
      
      As MMUv1 is not able to change pagetables on the fly, without a
      "stop the world" operation, which stops GPU, changes pagetables via CPU
      interaction, restarts GPU, the implementation introduces a shared context on
      MMUv1, which is returned whenever there is a request for a new context.
      
      This patch assigns a MMU context to each GPU, so on MMUv2 systems there is
      still one set of pagetables per GPU, but due to the shared context MMUv1
      systems see a change in behavior as now a single pagetable set is used
      across all GPU cores.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: default avatarGuido Günther <agx@sigxcpu.org>
      27b67278