summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/raspberrypi/include/rpi-fb.h
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2016-07-31 11:33:06 +0200
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2016-07-31 11:33:06 +0200
commit3d3ad4dc1c54306aea643e66c377a7d06893f07b (patch)
tree85b18681c3efc848ca0d45e6d016cfa9d714945f /c/src/lib/libbsp/arm/raspberrypi/include/rpi-fb.h
parentposix: nanosleep: optimize away a time conversion (diff)
downloadrtems-3d3ad4dc1c54306aea643e66c377a7d06893f07b.tar.bz2
arm/raspberrypi: VideoCore access corrections in cache operation and more error checking.
The first, mistake in buffer size computation for cache flush and invalidate has been corrected. GCC __attribute__( ( aligned( 64 ) ) ) should work and works for local variables. Code ensures right stack alignment. But attribute has to be moved to type declaration to ensure that structure size is affected by attribute. But even this seems to not work reliably for some reason. May it be, the stack area between frame start and end of local variable buffer accessed during context switch or some stack prefetch during resturn such way that some cache lines belonging to buffer are filled to cache. Extending buffer by one more cache line padding helps there. In the longer term perspective, buffer should be moved to some static area or cache aligned dynamic memory allocated. Concurrent calls to the VideoCore operations and access serialization should be added too but problem is that some calls are required during workspace and MMU setup so variant without need of mutex would be required as well. Framebuffer setup code and other VideoCore calls check more precisely for errors and do not proceed forward with incorrect data now. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'c/src/lib/libbsp/arm/raspberrypi/include/rpi-fb.h')
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/include/rpi-fb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/arm/raspberrypi/include/rpi-fb.h b/c/src/lib/libbsp/arm/raspberrypi/include/rpi-fb.h
index fa9a939682..4f3c07fea2 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/include/rpi-fb.h
+++ b/c/src/lib/libbsp/arm/raspberrypi/include/rpi-fb.h
@@ -41,7 +41,8 @@ enum rpi_fb_init_result {
RPI_FB_INIT_CMDLINE_DONT_INIT = -4,
RPI_FB_INIT_CMDLINE_NO_MODE_REQ = -5,
RPI_FB_INIT_MODE_PROBE_ERROR = -6,
- RPI_FB_INIT_START_ADDR_UNKNOWN = -7,
+ RPI_FB_INIT_SETUP_FAILED = -7,
+ RPI_FB_INIT_START_ADDR_UNKNOWN = -8,
};
int rpi_fb_init( void );