Changes between Version 9 and Version 10 of fbf_device_api
- Timestamp:
- Jan 22, 2020, 6:26:36 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
fbf_device_api
v9 v10 32 32 All functions defined in this ''user'' API do NOT use the the FBF device waiting queue, the associated device thread and the FBF IRQ, as the client thread does NOT deschedules, 33 33 34 ''' C.1) void dev_fbf_get_config( uint32_t * width, uint32_t * height, uint32_t type )'''34 '''1) void dev_fbf_get_config( uint32_t * width, uint32_t * height, uint32_t type )''' 35 35 36 36 This function implements the ''fbf_get_config()'' syscall. It returns the FBF number of lines, the number of pixels per line, and the pixel encoding type. It can be called by a client thread running in any cluster. 37 37 It does not access the hardware, as these informations have been registered in the chdev descriptor extension by the ''dev_fbf_init()'' function. 38 38 39 ''' C.2) uint32_t dev_fbf_create_window( uint32_t nlines, npixels, l_min, p_min, intptr_t * user_base )'''39 '''2) uint32_t dev_fbf_create_window( uint32_t nlines, npixels, l_min, p_min, intptr_t * user_base )''' 40 40 41 41 This blocking function implements the ''fbf_create_window()'' sys-call. It registers a new window in the windows_tbl[] array, and in the windows list, rooted in FBF device descriptor. It registers in the reference VSL an ANON vseg, that will be mapped in local cluster. It returns the dynamically allocated window index <wid>. The owner process is the calling process. The FBF window is defined by the <nlines>, <npixels>, <l_min>, <p_min> arguments. The created vseg base address in user space is returned in the <user_base> argument. It can be called by any thread running in any cluster. … … 43 43 As the vseg associated to the window is not directly mapped to the frame buffer, the owner process can read and write in the window buffer without syscall. As for any other vseg, the physical memory is allocated on demand, at each page fault. 44 44 45 ''' C.3) error_t dev_fbf_refresh_window( uint32_t wid, uint32_t line_first, uint32_t line_last )'''45 '''3) error_t dev_fbf_refresh_window( uint32_t wid, uint32_t line_first, uint32_t line_last )''' 46 46 47 47 This blocking function implements the ''fbf_refresh_window()'' sys-call. It allows the owner process to signal the windows manager that some lines of a window identified by the <wid>, <line_min>, and <line_max> arguments have been modified, and must be refreshed in the FBF. It scans all the registered FBF windows to respect the overlap order defined by the windows xlist. It can be called by any thread running in any cluster. 48 48 49 ''' C.4) error_t dev_fbf_move_window( uint32_t wid, uint32_t l_min, uint32_t p_min )'''49 '''4) error_t dev_fbf_move_window( uint32_t wid, uint32_t l_min, uint32_t p_min )''' 50 50 51 51 This blocking function implements the ''fbf_move_window()'' sys-call. It moves a window identified by the <wid> argument to a new position in the FBF, defined by the <l_min> and <p_min> arguments (FBF coordinates). It can be called by any thread running in any cluster. 52 52 53 ''' C.5) dev_fbf_resize_window( uint32_t wid, uint32_t width, uint32_t height )'''53 '''5) dev_fbf_resize_window( uint32_t wid, uint32_t width, uint32_t height )''' 54 54 55 This blocking function implements the ''fbf_resize_window()'' sys call. It changes the <width> and <height> of a window identified by the <wid> argument. It updates the size of the associated vseg, but does not change the vseg "base". When the new window buffer is larger than the existing one, this buffer is 0 filled. It can be called by any thread running in any cluster.55 This blocking function implements the ''fbf_resize_window()'' sys-call. It changes the <width> and <height> of a window identified by the <wid> argument. It updates the size of the associated vseg, but does not change the vseg "base". When the new window buffer is larger than the existing one, this buffer is 0 filled. It can be called by any thread running in any cluster. 56 56 57 ''' C.6) dev_fbf_delete_window( uint32_t wid )'''57 '''6) dev_fbf_delete_window( uint32_t wid )''' 58 58 59 59 This function implements the ''fbf_delete_window()'' sys-call to delete a FBF window identified by the <wid> argument. It releases all memory allocated for the window buffer and for the window descriptor. It can be called by any thread running in any cluster. 60 60 61 ''' C.7) dev_fbf_move_data( bool_t is_write, void * user_buffer, uint32_t npixels, uint32_t offset )'''61 '''7) dev_fbf_move_data( bool_t is_write, void * user_buffer, uint32_t npixels, uint32_t offset )''' 62 62 63 63 This function is deprecated. It implements the deprecated ''fbf_read()'' and ''fbf_write()'' sys-calls. This function allows an user application to directly access the Frame Buffer, without using any intermediate window. It calls directly the driver to synchronously move <npixels> between an user <buffer> and the FBF, starting at a given <offset> in the FBF. The transfer direction is defined by the <is_write> argument. … … 67 67 All FBF drivers must define three functions: 68 68 * void '''fbf_driver_init( chdev_t *ioc_chdev )''' 69 * void '''fbf_driver_cmd '''( xptr_t thread_xp )'''70 * void '''fbf_driver_isr '''( chdev_t * ioc_chdev )'''69 * void '''fbf_driver_cmd( xptr_t thread_xp )''' 70 * void '''fbf_driver_isr( chdev_t * ioc_chdev )''' 71 71 72 72 The '''fbf_driver_cmd()''' function moves pixels between a kernel or user buffer identified and the FBF frame buffer.