Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. Integrating and building
  2. ---------------------------
  3.  
  4. 4.1 Integrating UMP with your display driver
  5. It is required that you support the "GET_UMP_SECURE_ID" ioctl for your display
  6. driver. This ioctl has to return a UMP secure ID for your framebuffer memory.
  7.  
  8. Such an integration typically consists of two major parts
  9. - Mapping and UnMapping of physical blocks of memory
  10. - Returning UMP Secure ID from within ioctl handler
  11.  
  12. A typical example of mapping the framebuffer memory would look like this:
  13. ump_dd_handle ump_wrapped_buffer;
  14. ump_dd_physical_block ump_memory_description;
  15.  
  16. ump_memory_description.addr = fix->smem_start;
  17. ump_memory_description.size = buffer_size;
  18. ump_wrapped_buffer = ump_dd_handle_create_from_phys_blocks(
  19. &ump_memory_description, 1);
  20.  
  21. A typical example of retrieving the secure ID from this memory look like this:
  22. u32 __user *psecureid = (u32 __user *) arg;
  23. ump_secure_id secure_id;
  24.  
  25. secure_id = ump_dd_secure_id_get( ump_wrapped_buffer );
  26. return put_user( (unsigned int)secure_id, psecureid );
  27.  
  28. 4.2 Integrating EXA with your 2D hardware
  29. The EXA module provides hooks for accelerating various 2D operations. Please
  30. refer to the EXA documentation for further information regarding this.
  31.  
  32. The provided "xf86-video-mali" driver contains an EXA module which has been
  33. integrated with the UMP system. Your 2D driver may therefore require an
  34. integration with UMP as well. The suggestion is to pass the secure ID down to
  35. the kernel device driver for your hardware, but it is also possible to get the
  36. CPU-mapped address for the memory by calling ump_mapped_pointer_get.
  37.  
  38. Please refer to UMP documentation for more information regarding this.
  39.  
  40. 4.3 Building the Mali DDK for X.Org
  41. The client API libraries can be built to support X.Org by including
  42. "linux-x11-ump" in the variant string. An example of such a variant string can
  43. be VARIANT="mali400-gles20-gles11-linux-x11-ump"
  44.  
  45. You will also have to edit driver/Makefile_x11.mak to reflect your system. A
  46. complete development setup for X Window System is required, including
  47. development header files and precompiled libraries.
  48.  
  49. The process of building the Mali DDK, including client API libraries and device
  50. drivers are otherwise the same as building for regular Linux.
  51.  
  52. Copy your libraries into the system library folder, typically /usr/lib or
  53. /usr/local/lib. Make sure that file permissions allows read and execute.
  54.  
  55. 4.4 Building the X Display Driver
  56. As for the Mali DDK, the X Display Driver "xf86-video-mali" requires an existing
  57. development setup for the X Windowing System for your architecture.
  58.  
  59. Modify the GET_UMP_SECURE_ID ioctl define in mali_exa.h to reflect your
  60. integration with the display driver.
  61. Also modify the build.sh script inside the X Display Driver package to reflect your
  62. current include paths and library folders for X Window System.
  63.  
  64. The build.sh shell script performs the following steps:
  65. 1. make distclean
  66. 2. runs configure script to generate makefile(s)
  67. 3. runs make
  68.  
  69. The display driver can be found in xf86-video-mali-0.0.1/src/.lib/mali_drv.so.
  70. Copy this driver into your X Server display driver path, typically
  71. /usr/lib/xorg/modules/drivers
  72.  
  73. Make sure that the file has the correct permissions.
  74.  
  75. A reference xorg.conf file can be found under xf86-video-mali-0.0.1/xorg.conf.
  76. Make sure that you are using "mali" as the Driver under the "Device" section.
  77.  
  78. Supported options under "Device" section for Mali are:
  79. > fbdev Select which framebuffer device to use. Defalt: /dev/fb0
  80. > DRI2 Enable DRI2 or not. Default: false
  81. > DRI2_PAGE_FLIP Enable flipping for fullscreen gles apps. Default: false
  82. > DRI2_WAIT_VSYNC Enable vsync for fullscreen gles apps. Default: false
  83.  
  84.  
  85. 4.5 Building the Mali DRM
  86. The Mali DRM can be plugged into the drivers/gpu/drm folder of your kernel. It
  87. is compatible with the latest 2.6.36 kernel where PCI and AGP bus requirements
  88. were removed in favor of supporting a generic platform device.
  89. Please refer to the to Mali DRM README.txt for more information on
  90. including the Mali DRM as a platform device.