1. 31 10月, 2017 6 次提交
  2. 30 10月, 2017 2 次提交
  3. 27 10月, 2017 2 次提交
  4. 21 10月, 2017 5 次提交
  5. 20 10月, 2017 2 次提交
  6. 19 10月, 2017 2 次提交
  7. 18 10月, 2017 19 次提交
  8. 17 10月, 2017 2 次提交
    • M
      drm/sun4i: Implement endpoint parsing using kfifo · 8b11aafa
      Maxime Ripard 提交于
      The commit da82b878 ("drm/sun4i: add components in breadth first
      traversal order") implemented a breadth first traversal of our device tree
      nodes graph. However, it was relying on the kernel linked lists, and those
      are not really safe for addition.
      
      Indeed, in a single pipeline stage, your first stage (ie, the mixer or
      fronted) will be queued, and it will be the final iteration of that list as
      far as list_for_each_entry_safe is concerned. Then, during that final
      iteration, we'll queue another element (the TCON or the backend) that
      list_for_each_entry_safe will not account for, and we will leave the loop
      without having iterated over all the elements. And since we won't have
      built our components list properly, the DRM driver will be left
      non-functional.
      
      We can instead use a kfifo to queue and enqueue components in-order, as was
      the original intention. This also has the benefit of removing any dynamic
      allocation, making the error handling path simpler too. The only thing
      we're losing is the ability to tell whether an element has already been
      queued, but that was only needed to remove spurious logs, and therefore
      purely cosmetic.
      
      This means that this commit effectively reverses e8afb7b6 ("drm/sun4i:
      don't add components that are already in the queue").
      
      Fixes: da82b878 ("drm/sun4i: add components in breadth first traversal order")
      Reviewed-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/4ecb323e787918208f6a5d9f0ebba12c62583c98.1508231063.git-series.maxime.ripard@free-electrons.com
      8b11aafa
    • C
      drm/sun4i: backend: Offset layer buffer address by DRAM starting address · 4690803b
      Chen-Yu Tsai 提交于
      The display backend, as well as other peripherals that have a DRAM
      clock gate and access DRAM directly, bypassing the system bus,
      address the DRAM starting from 0x0, while physical addresses the
      system uses starts from 0x40000000 (or 0x20000000 in A80's case).
      
      This issue was witnessed on the Cubietruck, which has 2GB of RAM.
      
      Devices with less RAM function normally due to the DRAM address
      wrapping around. CMA seems to always allocate its buffer at a
      very high address, close to the end of DRAM.
      
      On a 1GB RAM device, the physical address would be something like
      0x78000000. The DRAM address 0x78000000 would access the same DRAM
      region as 0x38000000 on a system, as the DRAM address would only
      span 0x0 ~ 0x3fffffff. The bit 0x40000000 is non-functional in this
      case.
      
      However on the Cubietruck, the DRAM is 2GB. The physical address
      is 0x40000000 ~ 0xbfffffff. The buffer would be something like
      0xb8000000. But the DRAM address span 0x0 ~ 0x7fffffff, meaning
      the buffer address wraps around to 0x38000000, which is wrong.
      The correct DRAM address for it should be 0x78000000.
      
      Correct the address configured into the backend layer registers
      by PHYS_OFFSET to account for this.
      
      Fixes: 9026e0d1 ("drm: Add Allwinner A10 Display Engine support")
      Signed-off-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171017042349.31743-6-wens@csie.org
      4690803b