1. 05 Dec, 2018 1 commit
  2. 27 Nov, 2018 2 commits
    • Rob Clark's avatar
      freedreno: move ir3 to common location · aa0fed10
      Rob Clark authored
      Move (most of) the ir3 compiler to src/freedreno/ir3 so that it can be
      re-used by some future vulkan driver.  The parts that are gallium
      specific have been refactored out and remain in the gallium driver.
      
      Getting the move done now so that it can happen before further
      refactoring to support a6xx specific instructions.
      
      NOTE also removes ir3_cmdline compiler tool from autotools build since
      that was easier than fixing it and I normally use meson build.  Waiting
      patiently for the day that we can remove *everything* from the autotools
      build.
      Signed-off-by: Rob Clark's avatarRob Clark <robdclark@gmail.com>
      aa0fed10
    • Rob Clark's avatar
      freedreno: move drm to common location · b4476138
      Rob Clark authored
      So that we can re-use at least parts of it for vulkan driver, and so
      that we can move ir3 to a common location (which uses fd_bo to allocate
      storage for shaders)
      Signed-off-by: Rob Clark's avatarRob Clark <robdclark@gmail.com>
      b4476138
  3. 31 Oct, 2018 2 commits
    • Vinson Lee's avatar
      freedreno: Do not link ir3_compiler with valgrind libraries. · 802ae533
      Vinson Lee authored
      This patch fixes this freedreno autotools build error.
      
        CXXLD    ir3_compiler
      /usr/lib/valgrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-m_main.o): In function `_start':
      (.text+0x0): multiple definition of `_start'
      /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o:(.text+0x0): first defined here
      /usr/bin/ld: /usr/lib/valgrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-m_main.o): relocation R_X86_64_32S against undefined symbol `vgPlain_interim_stack' can not be used when making a PIE object; recompile with -fPIC
      /usr/bin/ld: /usr/lib/valgrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-m_trampoline.o): relocation R_X86_64_32 against `.text' can not be used when making a PIE object; recompile with -fPIC
      /usr/bin/ld: /usr/lib/valgrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-dispatch-amd64-linux.o): relocation R_X86_64_32S against symbol `vgPlain_stats__n_xindirs_32' can not be used when making a PIE object; recompile with -fPIC
      /usr/bin/ld: final link failed: Nonrepresentable section on output
      collect2: error: ld returned 1 exit status
      
      Fixes: f3cc0d27 ("freedreno: import libdrm_freedreno + redesign submit")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108595Signed-off-by: Vinson Lee's avatarVinson Lee <vlee@freedesktop.org>
      Reviewed-by: Rob Clark's avatarRob Clark <robdclark@gmail.com>
      802ae533
    • Emil Velikov's avatar
      configure: allow building with python3 · 986033a2
      Emil Velikov authored
      Pretty much all of the scripts are python2+3 compatible.
      Check and allow using python3, while adjusting the PYTHON2 refs.
      
      Note:
       - python3.4 is used as it's the earliest supported version
       - python2 chosen prior to python3
      
      v2: use python2 by default
      
      Cc: Ilia Mirkin <imirkin@alum.mit.edu>
      Signed-off-by: 's avatarEmil Velikov <emil.velikov@collabora.com>
      Acked-by: Eric Engestrom's avatarEric Engestrom <eric.engestrom@intel.com>
      986033a2
  4. 26 Oct, 2018 1 commit
    • Rob Clark's avatar
      freedreno: import libdrm_freedreno + redesign submit · f3cc0d27
      Rob Clark authored
      In the pursuit of lowering driver overhead, it became clear that some
      amount of redesign of how libdrm_freedreno constructs the submit ioctl
      would be needed.  In particular, as the gallium driver is starting to
      make heavier use of CP_SET_DRAW_STATE state groups/objects, the over-
      head of tracking cmd buffers and relocs becomes too much.  And for
      "streaming" state, which isn't ever reused (like uniform uploads) the
      overhead of allocating/freeing ringbuffer[1] objects is too high.
      
      This redesign makes two main changes:
      
       1) Introduces a fd_submit object for tracking bos and cmds table
          for the submit ioctl, making ringbuffer objects more light-
          weight.  This was previously done in the ringbuffer.  But we
          have many ringbuffer instances involved in a submit (gmem +
          draw + potentially 1000's of state-group rbs), and only need
          a single bos and cmds table.  (Reloc table is still per-rb)
      
          The submit is also a convenient place for a slab allocator for
          ringbuffer objects.  Other options would have required locking
          because, while we can guarantee allocations will only happen on
          a single thread, free's could happen either on the application
          thread or the flush_queue thread.  With the slab allocator in
          the submit object, any frees that happen on the flush_queue
          thread happen after we know that the application thread is done
          with the submit.
      
       2) Introduce a new "softpin" msm_ringbuffer_sp implementation that
          does not use relocs and only has cmds table entries for IB1 (ie.
          the cmdstream buffers that kernel needs to CP_INDIRECT_BUFFER
          to from the RB).  To do this properly will require some updates
          on the kernel side, so whether you get the softpin or legacy
          submit/ringbuffer implementation at runtime depends on your
          kernel version.
      
      To make all these changes in libdrm would basically require adding a
      libdrm_freedreno2, so this is a good point to just pull the libdrm code
      into mesa.  Plus it allows for using mesa's hashtable, slab allocator,
      etc.  And it lets us have asserts enabled for debug mesa buids but
      omitted for release builds.  And it makes life easier if further API
      changes become necessary.
      
      At this point I haven't tried to pull in the kgsl backend.  Although
      I left the level of vfunc indirection which would make it possible
      to have other backends.  (And this was convenient to keep to allow
      for the "softpin" ringbuffer to coexist.)
      
      NOTE: if bisecting a build error takes you here, try a clean build.
      There are a bunch of ways things can go wrong if you still have
      libdrm_freedreno cflags.
      
      [1] "ringbuffer" is probably a bad name, the only level of cmdstream
          buffer that is actually a ring is RB managed by kernel.  User-
          space cmdstream is all IB1/IB2 and state-groups.
      Reviewed-by: 's avatarKristian H. Kristensen <hoegsberg@chromium.org>
      Reviewed-by: Eric Engestrom's avatarEric Engestrom <eric.engestrom@intel.com>
      Signed-off-by: Rob Clark's avatarRob Clark <robdclark@gmail.com>
      f3cc0d27
  5. 24 Aug, 2018 1 commit
  6. 23 Aug, 2018 1 commit
  7. 16 Aug, 2018 1 commit
  8. 25 Jan, 2018 1 commit
  9. 20 Jan, 2018 1 commit
  10. 24 Oct, 2017 1 commit
  11. 27 Jan, 2017 1 commit
  12. 30 Nov, 2016 1 commit
  13. 30 May, 2016 1 commit
  14. 25 May, 2016 1 commit
  15. 25 Apr, 2016 1 commit
    • Rob Clark's avatar
      freedreno/ir3: fix sin/cos · 4610e5ef
      Rob Clark authored
      We seem to need range reduction to get sane results.  Fixes glmark2
      jellyfish bench, and a whole bunch of
      dEQP-GLES3.functional.shaders.builtin_functions.precision.{sin,cos,tan}.*
      
      v2: squashed in android build fixes from Rob Herring
      Signed-off-by: 's avatarRob Clark <robclark@freedesktop.org>
      4610e5ef
  16. 26 Jan, 2016 1 commit
  17. 16 Oct, 2015 1 commit
  18. 26 Jun, 2015 1 commit
  19. 12 Jun, 2015 2 commits
  20. 05 Apr, 2015 1 commit
  21. 12 Dec, 2014 1 commit
  22. 15 Nov, 2014 1 commit
  23. 16 Sep, 2014 1 commit
  24. 05 Sep, 2014 1 commit
  25. 12 Aug, 2014 1 commit
  26. 25 Jul, 2014 1 commit
    • Rob Clark's avatar
      freedreno/ir3: split out shader compiler from a3xx · db193e5a
      Rob Clark authored
      Move the bits we want to share between generations from fd3_program to
      ir3_shader.  So overall structure is:
      
        fdN_shader_stateobj -> ir3_shader -> ir3_shader_variant -> ir3
                                          |- ...
                                          \- ir3_shader_variant -> ir3
      
      So the ir3_shader becomes the topmost generation neutral object, which
      manages the set of variants each of which generates, compiles, and
      assembles it's own ir.
      
      There is a bit of additional renaming to s/fd3_compiler/ir3_compiler/,
      etc.
      
      Keep the split between the gallium level stateobj and the shader helper
      object because it might be a good idea to pre-compute some generation
      specific register values (ie. anything that is independent of linking).
      Signed-off-by: 's avatarRob Clark <robclark@freedesktop.org>
      db193e5a
  27. 16 Nov, 2013 3 commits
  28. 01 Oct, 2013 1 commit
  29. 08 Jun, 2013 2 commits
    • Rob Clark's avatar
      freedreno: add a3xx support · 2855f3f7
      Rob Clark authored
      The adreno a3xx GPU is found in newer snapdragon devices, such as the
      nexus4.  The a3xx is GLESv3 and OpenCL capable, although that is not
      enabled yet in gallium.
      
      Compared to a2xx, it introduces an entirely new unified shader ISA, and
      re-shuffles all or nearly all of the registers.  The good news is that
      (for the most part) the registers are more orthogonal, not combining
      unrelated state in a single register.  And that there is a lot more
      flexibility, so we don't need to patch and re-emit the shader like we
      did on a2xx.
      
      The shader compiler is currently quite dumb, there would be a lot of
      room for improvement with an optimizing pass.  Despite that, with the
      a320 in my nexus4 it seems to be ~2-3x faster compared to the a220 in my
      HP touchpad.
      Signed-off-by: 's avatarRob Clark <robclark@freedesktop.org>
      2855f3f7
    • Rob Clark's avatar
      freedreno: prepare for a3xx · 18c317b2
      Rob Clark authored
      Split the parts that are specific to adreno a2xx series GPUs from the
      parts that will be in common with a3xx, so that a3xx support can be
      added more cleanly.
      Signed-off-by: 's avatarRob Clark <robclark@freedesktop.org>
      18c317b2
  30. 20 Apr, 2013 1 commit
    • Rob Clark's avatar
      freedreno: move ir -> ir2 · 26b39df0
      Rob Clark authored
      There will be a new IR for a3xx, which has a very different shader ISA
      (more scalar oriented).  So rename to avoid conflicts later when I start
      adding a3xx support to the gallium driver.
      
      Signed-off-by: Rob Clark <Rob Clark robdclark@freedesktop.org>
      26b39df0
  31. 12 Mar, 2013 1 commit
    • Rob Clark's avatar
      freedreno: gallium driver for adreno · 6173cc19
      Rob Clark authored
      Currently works on a220.  Others in the a2xx family look pretty similar
      and should be pretty straightforward to support with the same driver.
      
      The a3xx has a new shader ISA, and while many registers appear similar,
      the register addresses have been completely shuffled around.  I am not
      sure yet whether it is best to support with the same driver, but
      different compiler, or whether it should be split into a different
      driver.
      
      v1: original
      v2: build file updates from review comments, and remove GPL licensed
          header files from msm kernel
      v3: smarter temp/pred register assignment, fix clear and depth/stencil
          format issues, resource_transfer fixes, scissor fixes
      Signed-off-by: Rob Clark's avatarRob Clark <robdclark@gmail.com>
      6173cc19