![]() ![]() |
Apr 11 2008, 07:27 AM
Post
#1
|
|
|
Group: Members Posts: 1 Joined: 11-April 08 Member No.: 21,614 |
Hello all of you,
I am new on this forum and english is not my mother language I am a sofware writter since 20 years now and brand new on linux environment. I am written a Cash register application using Opie on a Cirrus logic EDB9312 , ( the same code is running also in Casio cash register ( ITRON OS ) and on Windows XP). I wrote all of my softwares on DELPHI (pascal On Opie i use Qt to manage the application but i directly write into the Frame buffer using a mmap file . To accelerate the drawings i use the ioctl to access to FBIO_EP93XX_FILL and FBIO_EP93XX_LINE procedure . But i have seen in the sources of ep93xxfb.c that a FBIO_EP93XX_BLIT (which redirect it to cfb_imageblit) can be use to display bitmaps but i don't understand how to use it. Can anyone help ? void ep93xxfb_imageblit(struct fb_info *p, const struct fb_image *image) { // unsigned long blkdestwidth,tmp; // void * pucBlitBuf; cfb_imageblit( p , image ); return; /* if ((image->dx >= p->var.xres) || (image->dy >= p->var.yres) || ((image->dx + image->width - 1) >= p->var.xres) || ((image->dy + image->height - 1) >= p->var.yres)) return; if (epinfo.bpp != image->depth ) return; tmp = (( image->dx + image->width ) * epinfo.bpp ); blkdestwidth = tmp / 32; if(blkdestwidth > 0 && (tmp % 32 == 0)) blkdestwidth--; blkdestwidth = blkdestwidth - (image->dx * epinfo.bpp) / 32; pucBlitBuf = kmalloc(1024*8,GFP_KERNEL); copy_from_user(pucBlitBuf, image->data, 5000); outl( 0x00000000 , BLOCKCTRL); outl( 0x00000000, SRCPIXELSTRT); outl( virt_to_phys(pucBlitBuf), BLKSRCSTRT); outl( (image->width * epinfo.bpp) / 32 , SRCLINELENGTH); outl(((image->width - 1) * epinfo.bpp) / 32, BLKSRCWIDTH ); outl(((image->dx * epinfo.bpp) & 0x1F) | ((((image->dx + image->width - 1) * epinfo.bpp ) & 0x1F) << 16) , DESTPIXELSTRT); outl((epinfo.fb_phys + (image->dy * epinfo.xres * epinfo.bpp ) / 8 + (image->dx * epinfo.bpp ) / 8 ) , BLKDSTSTRT); outl( ((epinfo.xres * epinfo.bpp) / 32), DESTLINELENGTH ); outl( blkdestwidth, BLKDESTWIDTH ); outl( image->height - 1 , BLKDESTHEIGHT); outl(image->fg_color, BLOCKMASK); outl(image->bg_color, BACKGROUND); outl( epinfo.pixformat | 0x00000003, BLOCKCTRL ); ep93xxfb_wait(); */ } |
|
|
|
Apr 28 2008, 03:56 AM
Post
#2
|
|
|
Group: Members Posts: 1 Joined: 28-April 08 Member No.: 21,704 |
Dear ESKI,
I am just going through groups for hardware acceleration implementation in EP93xx board and found your message. I am also exactly at the same situation. I commented call to cfb_imageblit and un-commented original code in ep93xx_imageblit. What is the solution you are approaching at your end Regards. Hello all of you, I am new on this forum and english is not my mother language I am a sofware writter since 20 years now and brand new on linux environment. I am written a Cash register application using Opie on a Cirrus logic EDB9312 , ( the same code is running also in Casio cash register ( ITRON OS ) and on Windows XP). I wrote all of my softwares on DELPHI (pascal On Opie i use Qt to manage the application but i directly write into the Frame buffer using a mmap file . To accelerate the drawings i use the ioctl to access to FBIO_EP93XX_FILL and FBIO_EP93XX_LINE procedure . But i have seen in the sources of ep93xxfb.c that a FBIO_EP93XX_BLIT (which redirect it to cfb_imageblit) can be use to display bitmaps but i don't understand how to use it. Can anyone help ? void ep93xxfb_imageblit(struct fb_info *p, const struct fb_image *image) { // unsigned long blkdestwidth,tmp; // void * pucBlitBuf; cfb_imageblit( p , image ); return; /* if ((image->dx >= p->var.xres) || (image->dy >= p->var.yres) || ((image->dx + image->width - 1) >= p->var.xres) || ((image->dy + image->height - 1) >= p->var.yres)) return; if (epinfo.bpp != image->depth ) return; tmp = (( image->dx + image->width ) * epinfo.bpp ); blkdestwidth = tmp / 32; if(blkdestwidth > 0 && (tmp % 32 == 0)) blkdestwidth--; blkdestwidth = blkdestwidth - (image->dx * epinfo.bpp) / 32; pucBlitBuf = kmalloc(1024*8,GFP_KERNEL); copy_from_user(pucBlitBuf, image->data, 5000); outl( 0x00000000 , BLOCKCTRL); outl( 0x00000000, SRCPIXELSTRT); outl( virt_to_phys(pucBlitBuf), BLKSRCSTRT); outl( (image->width * epinfo.bpp) / 32 , SRCLINELENGTH); outl(((image->width - 1) * epinfo.bpp) / 32, BLKSRCWIDTH ); outl(((image->dx * epinfo.bpp) & 0x1F) | ((((image->dx + image->width - 1) * epinfo.bpp ) & 0x1F) << 16) , DESTPIXELSTRT); outl((epinfo.fb_phys + (image->dy * epinfo.xres * epinfo.bpp ) / 8 + (image->dx * epinfo.bpp ) / 8 ) , BLKDSTSTRT); outl( ((epinfo.xres * epinfo.bpp) / 32), DESTLINELENGTH ); outl( blkdestwidth, BLKDESTWIDTH ); outl( image->height - 1 , BLKDESTHEIGHT); outl(image->fg_color, BLOCKMASK); outl(image->bg_color, BACKGROUND); outl( epinfo.pixformat | 0x00000003, BLOCKCTRL ); ep93xxfb_wait(); */ } |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 18th May 2013 - 09:59 AM |