xf86-video-s3c64xx-0.0.1 10/15/2009 S3C6410 based Xwindows fbdevhw with o XAA accelerated fills, lines, expands, blits, offscreen pixmaps/stipples o Alpha-blended HWCursor o XVideo Support (using the Samsung Post-Processor colorspace driver) Acknowledgements: The most excellent XAA base code was done by Matan Ziv-Av The original XVideo code was done by Jetta Tang The g2d and pp drivers upon which this code is based were provided by Samsung Semiconductor. Thanks. Time and Materials and Hosting Chronolytics Inc. Real-Time Embedded Software http://chronolytics.com ------------------------------------------------------------------------------ Kernel patches have been submitted to gitorious.org/mcuelenaeres-clone branch open-acceleration. ------------------------------------------------------------------------------ xorg.conf and this driver have been tested on the SmartQ7 running v5. ------------------------------------------------------------------------------ XWindow RandR (Rotate and Resize) is a work in progress. It is disabled in this compile. It does not work for rotations of 90/270, but is it how real rotation will work on these devices. Enable it if you want to help/play. ------------------------------------------------------------------------------ XAA needs off screen video ram for color expansion, cursor storage and pixmap/stipple cache. In order to get this, the kernel needs to be changed: Kernel 2.6.24.6 (SmartQ5/7) --------------------------- 1. Enable config option: CONFIG_FB_S3C_VIRTUAL_SCREEN 2. Apply s3cfb.2.6.24.6.patch to the mer-smartq-kernel Others kernels/devices: ------- Modern kernels use device platform data in the arch/arm/smdk-foo.c file. This structure is: struct s3c_fb_pd_win { struct fb_videomode win_mode; unsigned short default_bpp; unsigned short max_bpp; unsigned short virtual_x; unsigned short virtual_y; }; The offscreen memory is added by increasing virtual_y. virtual_x may be set to "real" xres. The virtual_y should be 2x-3x the physical yres to properly use the offscreen stipple and pixmap cache in XAA. ------------------------------------------------------------------------------ NOTE: This driver *requires* a "/dev/s3c-pp". Otherwise, XVideo will fail to startup. This driver is compatible with the smplayer/mplayer supplied with the SmartQ5/7. ------------------------------------------------------------------------------ NOTE: The widely accepted way that an XWindows fbdev driver obtains access to the graphics card register space is the silly offset trick in mmap. The XWindows fbdevHWMapMMIO() uses this trick to "canonically" map registers into the XWindows server space. Unfortunately, current versions of the s3c tree (next-s3c) do not support the MMIO idiom. This forces this driver to mmap using /dev/mem. The above patch for 2.6.24.6 adds this idiom in addition to allocating offscreen memory. ------------------------------------------------------------------------------ This XWindows driver uses the Samsung G2D driver for mmap and suspend/resume ONLY. It does not use any device-specific APIs. NOTE: The existing Samsung driver for the 2D graphics, /dev/s3c-g2d, fails to suspend/resume correctly. A patch fixing the problem has been sent to Samsung. It is highly recommended to get a "good" copy of this driver. A patch for the version in the samsung-ap-2.6 git tree is included. If the g2d driver is missing, then XWindows will use /dev/mem to mmap the register space. Using /dev/mem, there is 0.0% chance that suspend/resume will work. A version of the g2d driver is available at: git clone git://git.kernel.org/pub/scm/kki_ip/samsung-ap-2.6 under drivers/media/video/media/video/samsung/g2d ------------------------------------------------------------------------------ BUG: The next-s3c kernels have a means to allocate multiple screens using the platform data. The requirements for a Screen4 32x32 28bit cursor is ~2KB. Currently this memory is "stolen" from Screen0. This should be fixed in a later release. NOTE: This driver is untested with DBE (double buffer extensions). ------------------------------------------------------------------------------- BUG: If there is no offscreen memory configured, the driver will use sw cursor. XAA blits currently "trash" the swCursor. Workaround: get offscreen memory. :-) ------------------------------------------------------------------------------- David F. Carlson Chronolytics, Inc. Rochester, NY mailto:dave@chronolytics.com http://www.chronolytics.com "The faster I go, the behinder I get." --Lewis Carroll