mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
CFrameBuffer: Use hw accelator for blit2FB() on apollo/kronos hw
Origin commit data
------------------
Commit: 8c90e899ef
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-01-28 (Thu, 28 Jan 2016)
This commit is contained in:
@@ -632,7 +632,22 @@ void CFbAccel::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t x
|
|||||||
xc = (width > fb->xRes) ? fb->xRes : width;
|
xc = (width > fb->xRes) ? fb->xRes : width;
|
||||||
yc = (height > fb->yRes) ? fb->yRes : height;
|
yc = (height > fb->yRes) ? fb->yRes : height;
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_NEVIS_GXA
|
#if defined(FB_HW_ACCELERATION)
|
||||||
|
if(!(width%4)) {
|
||||||
|
fb_image image;
|
||||||
|
image.dx = xoff;
|
||||||
|
image.dy = yoff;
|
||||||
|
image.width = xc;
|
||||||
|
image.height = yc;
|
||||||
|
image.cmap.len = 0;
|
||||||
|
image.depth = 32;
|
||||||
|
image.data = (const char*)fbbuff;
|
||||||
|
ioctl(fb->fd, FBIO_IMAGE_BLT, &image);
|
||||||
|
//printf("\033[33m>>>>\033[0m [%s:%s:%d] FB_HW_ACCELERATION x: %d, y: %d, w: %d, h: %d\n", __file__, __func__, __LINE__, xoff, yoff, xc, yc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
printf("\033[31m>>>>\033[0m [%s:%s:%d] Not use FB_HW_ACCELERATION x: %d, y: %d, w: %d, h: %d\n", __file__, __func__, __LINE__, xoff, yoff, xc, yc);
|
||||||
|
#elif defined(USE_NEVIS_GXA)
|
||||||
(void)transp;
|
(void)transp;
|
||||||
u32 cmd;
|
u32 cmd;
|
||||||
void *uKva;
|
void *uKva;
|
||||||
@@ -699,7 +714,7 @@ void CFbAccel::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t x
|
|||||||
if (ioctl(fb->fd, STMFBIO_BLT_EXTERN, &blt_data) < 0)
|
if (ioctl(fb->fd, STMFBIO_BLT_EXTERN, &blt_data) < 0)
|
||||||
perror("CFbAccel blit2FB STMFBIO_BLT_EXTERN");
|
perror("CFbAccel blit2FB STMFBIO_BLT_EXTERN");
|
||||||
return;
|
return;
|
||||||
#else
|
#endif
|
||||||
fb_pixel_t *data = (fb_pixel_t *) fbbuff;
|
fb_pixel_t *data = (fb_pixel_t *) fbbuff;
|
||||||
|
|
||||||
uint8_t *d = (uint8_t *)lbb + xoff * sizeof(fb_pixel_t) + fb->stride * yoff;
|
uint8_t *d = (uint8_t *)lbb + xoff * sizeof(fb_pixel_t) + fb->stride * yoff;
|
||||||
@@ -733,7 +748,6 @@ void CFbAccel::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t x
|
|||||||
memmove(clfb + (i + yoff)*stride + xoff*4, ip + (i + yp)*width + xp, xc*4);
|
memmove(clfb + (i + yoff)*stride + xoff*4, ip + (i + yp)*width + xp, xc*4);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void CFbAccel::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
void CFbAccel::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
||||||
|
@@ -1254,7 +1254,9 @@ void * CFrameBuffer::convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, uns
|
|||||||
|
|
||||||
void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
||||||
{
|
{
|
||||||
|
checkFbArea(xoff, yoff, width, height, true);
|
||||||
accel->blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp);
|
accel->blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp);
|
||||||
|
checkFbArea(xoff, yoff, width, height, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrameBuffer::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff)
|
void CFrameBuffer::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff)
|
||||||
|
Reference in New Issue
Block a user