1. 26 Mar, 2013 1 commit
    • Siarhei Siamashka's avatar
      G2D: Now sunxi_x_g2d.c code does not require sunxi disp anymore · 1cd5f084
      Siarhei Siamashka authored
      
      
      The sunxi_x_g2d.c file contains the midlayer code for hooking the
      G2D optimized blit into xserver. But in fact it does not strictly
      need to depend on anything sunxi specific.
      
      So now we introduce a simple "blt2d_i" interface struct which
      specifically provides a pointer to the accelerated blit function.
      And just use this interface struct instead of the whole "sunxi_disp_t".
      This allows to easily reuse the same code for other non-G2D or even
      non-sunxi blit implementations in the future.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      1cd5f084
  2. 21 Mar, 2013 1 commit
    • Siarhei Siamashka's avatar
      G2D: accelerate CopyArea between different pixmaps in framebuffer · cc1b1410
      Siarhei Siamashka authored
      
      
      Now source and destination pixmaps don't need to be the same for
      using G2D acceleration (as long as both of them are allocated in
      the framebuffer). This allows using G2D to copy pixels from DRI2
      buffers to the framebuffer on the fallback path (when the window
      of an OpenGL ES application is partially overlapped by some other
      windows). Though it only works when composite extension is
      disabled, for example by adding the following to xorg.conf:
      
          Section "Extensions"
              Option "Composite" "Disable"
          EndSection
      
      If composite extension is enabled, windows have backing pixmaps, and
      we have a longer chain of copies:
      
         DRI2 buffer -> backing pixmap -> framebuffer
      
      Because backing pixmap is not allocated in a physically contiguous
      memory, it can't be copied using G2D yet.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      cc1b1410
  3. 14 Mar, 2013 1 commit
  4. 13 Mar, 2013 1 commit
    • Siarhei Siamashka's avatar
      Added ioctl wrappers for simple G2D fill and blit operations · df534b22
      Siarhei Siamashka authored
      
      
      The existing kernel driver from Allwinner for G2D accelerator
      is quite bad because ioctls are synchronous and blocking the
      caller thread, compromise security (basically it is a backdoor
      for copying data in memory between any arbitrary physical
      addresses) and have high overhead (each individual fill or
      blit operation needs an ioctl). But we need to start with
      something, so use this stuff as a placeholder.
      
      The g2d_driver.h header file is taken from linux-sunxi-3.4
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      df534b22
  5. 18 Feb, 2013 1 commit
    • Siarhei Siamashka's avatar
      Add support for hardware ARGB cursors up to 32x32 size · 06ae9b68
      Siarhei Siamashka authored
      
      
      Actually they are converted to 32x32 with 256 color palette. In the
      case if we have more than 256 unique colors, the color components
      of the pixels are reduced from 8-bit to 7-bit, then to 6-bit if
      necessary and so on (until we reduce the number of unique colors
      so that they can fit the palette). In the worst case we may
      theoretically end up with just 2 bits per A, R, G and B channels,
      but in practice 7 or 6 bits seem to be enough.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      06ae9b68
  6. 20 Jan, 2013 1 commit
    • Siarhei Siamashka's avatar
      Added supplementary wrapper functions for sunxi display controller ioctls · bf7c7a6c
      Siarhei Siamashka authored
      Note: the header file "sunxi_disp_ioctl.h" is GPL licensed. So until
      it is gets a MIT/X11 replacement, the DDX driver is GPL licensed as
      a whole. The individual source files still have their own license.
      Also in order to avoid any possible confusion, the MIT/X11 license
      header from COPYING has been added to "fbdev.c" and "fbdev_priv.h".
      bf7c7a6c