1. 13 11月, 2014 2 次提交
  2. 04 8月, 2014 1 次提交
    • T
      drm/tegra: Make job submission 64-bit safe · 961e3bea
      Thierry Reding 提交于
      Job submission currently relies on the fact that struct drm_tegra_reloc
      and struct host1x_reloc are the same size and uses a simple call to the
      copy_from_user() function to copy them to kernel space. This causes the
      handle to be stored in the buffer object field, which then needs a cast
      to a 32 bit integer to resolve it to a proper buffer object pointer and
      store it back in the buffer object field.
      
      On 64-bit architectures that will no longer work, since pointers are 64
      bits wide whereas handles will remain 32 bits. This causes the sizes of
      both structures to because different and copying will no longer work.
      
      Fix this by adding a new function, host1x_reloc_get_user(), that copies
      the structures field by field.
      
      While at it, use substructures for the command and target buffers in
      struct host1x_reloc for better readability. Also use unsized types to
      make it more obvious that this isn't part of userspace ABI.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      961e3bea
  3. 06 6月, 2014 1 次提交
  4. 16 4月, 2014 1 次提交
    • S
      gpu: host1x: handle the correct # of syncpt regs · 22bbd5d9
      Stephen Warren 提交于
      BIT_WORD() truncates rather than rounds, so the loops in
      syncpt_thresh_isr() and _host1x_intr_disable_all_syncpt_intrs() use <=
      rather than < in an attempt to process the correct number of registers
      when rounding of the conversion of count of bits to count of words is
      necessary. However, when rounding isn't necessary because the value is
      already a multiple of the divisor (as is the case for all values of
      nb_pts the code actually sees), this causes one too many registers to
      be processed.
      
      Solve this by using and explicit DIV_ROUND_UP() call, rather than
      BIT_WORD(), and comparing with < rather than <=.
      
      Fixes: 7ede0b0b ("gpu: host1x: Add syncpoint wait and interrupts")
      Cc: <stable@vger.kernel.org> # 3.10
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-By: NTerje Bergstrom <tbergstrom@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      22bbd5d9
  5. 04 4月, 2014 1 次提交
  6. 12 2月, 2014 1 次提交
  7. 14 1月, 2014 1 次提交
  8. 19 12月, 2013 7 次提交
  9. 03 12月, 2013 1 次提交
    • T
      gpu: host1x: Fix a few sparse warnings · d24b2898
      Thierry Reding 提交于
      Include the bus.h header, so that various function declarations are
      visible in the source file that implements those functions. This keeps
      sparse from suggesting that they should be made static.
      
      Make the host1x_bus_type variable static since it isn't used globally.
      
      Finally replace the slightly unsafe dev_set_name(dev, name) by the more
      secure dev_set_name(dev, "%s", name).
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      d24b2898
  10. 28 11月, 2013 1 次提交
    • O
      gpu: host1x: Silence a few warnings with LPAE=y · 43dd5554
      Olof Johansson 提交于
      When building with LPAE=y (64-bit dma_addr_t), the following warnings are seen:
      
      drivers/gpu/host1x/hw/cdma_hw.c:57:3: warning: format '%x' expects
        argument of type 'unsigned int', but argument 5 has type 'dma_addr_t'
      
      drivers/gpu/host1x/hw/debug_hw.c:167:10: warning: format '%x' expects
        argument of type 'unsigned int', but argument 3 has type 'dma_addr_t'
      
      The agreed-to solution for this is upcast to u64 and using %llx.
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      43dd5554
  11. 31 10月, 2013 23 次提交