This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Generic framebuffer support
- From: "Gábor Török" <tgabor84 at gmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Fri, 31 Oct 2008 01:12:05 +0100
- Subject: [ECOS] Generic framebuffer support
Hi!
I think I have found a bug in the generic framebuffer code in function
"cyg_fb_linear_move_block_16_impl" in "linear.c".
I think the code below should either init source and dest with
(height-1) or do the decrements before the memcpy in the for loop.
// There is an overlap. Can we do a safe bottom-to-top lot of memcpy()'s ?
if (new_y > y) {
source = (cyg_uint16*)(((cyg_uint8*)source) + (height * stride8));
dest = (cyg_uint16*)(((cyg_uint8*)dest) + (height * stride8));
width <<= 1;
for ( ; height; height--) {
__builtin_memcpy(dest, source, width);
source = (cyg_uint16*)(((cyg_uint8*)source) - stride8);
dest = (cyg_uint16*)(((cyg_uint8*)dest) - stride8);
}
return;
}
Gábor
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss