source: rtems/c/src/lib/libbsp/arm/raspberrypi/include/rpi-fb.h @ 3d3ad4dc

5
Last change on this file since 3d3ad4dc was 3d3ad4dc, checked in by Pavel Pisa <pisa@…>, on 07/31/16 at 09:33:06

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@…>

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup raspberrypi_fb
5 *
6 * @brief framebuffer support and setup
7 *
8 */
9
10/*
11 * Copyright (c) 2015 Yang Qiao
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *
16 *  http://www.rtems.org/license/LICENSE
17 *
18 */
19
20#ifndef LIBBSP_ARM_RASPBERRYPI_FB_H
21#define LIBBSP_ARM_RASPBERRYPI_FB_H
22
23#include <rtems/fb.h>
24
25/**
26 * @defgroup raspberrypi_fb
27 *
28 * @ingroup arm_raspberrypi
29 *
30 * @brief Framebuffer support and setup
31 *
32 * @{
33 */
34
35enum rpi_fb_init_result {
36  RPI_FB_INIT_OK = 0,
37  RPI_FB_INIT_ALREADY_INITIALIZED = 1,
38  RPI_FB_INIT_GENERIC_ERROR = -1,
39  RPI_FB_INIT_NO_DISPLAY = -2,
40  RPI_FB_INIT_CMDLINE_BAD_FORMAT = -3,
41  RPI_FB_INIT_CMDLINE_DONT_INIT = -4,
42  RPI_FB_INIT_CMDLINE_NO_MODE_REQ = -5,
43  RPI_FB_INIT_MODE_PROBE_ERROR = -6,
44  RPI_FB_INIT_SETUP_FAILED = -7,
45  RPI_FB_INIT_START_ADDR_UNKNOWN = -8,
46};
47
48int rpi_fb_init( void );
49int rpi_get_fix_screen_info( struct fb_fix_screeninfo *info );
50int rpi_get_var_screen_info( struct fb_var_screeninfo *info );
51bool rpi_fb_hdmi_is_present( void );
52
53/** @} */
54
55#endif /* LIBBSP_ARM_RASPBERRYPI_FB_H */
Note: See TracBrowser for help on using the repository browser.