Changes between Version 1 and Version 2 of fbf_device_api


Ignore:
Timestamp:
Jan 20, 2020, 3:49:35 PM (4 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • fbf_device_api

    v1 v2  
    77This device provide access to an external graphic display, that is seen as a fixed size frame buffer, mapped in the kernel address space. The only pixel encoding type in the current implementation is one byte per pixel (256 levels of gray).
    88
    9 It defines a first API, implementing the user syscalls, and implementing a simple, kernel controlled, windows manager.
    10 This windows manager allows any process to create and use for display one (or several) window(s). Each window defines a private buffer, dynamically allocated in user space, that can be directly accessed (for read and write) by the owner process.
     9It defines a first ''user'' API, used by the user-level system calls, and implementing a simple, kernel controlled, windows manager. This windows manager allows any process to create and use for display one (or several) window(s). Each window defines a private buffer, dynamically allocated in user space, that can be directly accessed (for read and write) by the owner process.
    1110
    1211These windows can be moved in the frame buffer, they can be resized, they can overlap other windows, but a window must be entirely contained in the frame buffer.
     
    1615Each window has a single process owner, but all the windows are registered in the FBF chdev in a windows_tbl[] array, indexed by the window identifier (wid). Each array entry contains an extended pointer on the window descriptor. All windows are also registered in a trans-cluster xlist, defining the overlapping order (last window in xlist has the highest priority).
    1716
     17To access the various drivers, this FBF device defines a lower-level ''driver'' API, that must be implemented by all drivers.
     18
    1819All FBF access functions are defined in the [https://www-soc.lip6.fr/trac/almos-mkh/kernel/devices/dev_fbf.c  dev_fbf.c] et [https://www-soc.lip6.fr/trac/almos-mkh/kernel/devices/dev_fbf.h dev_fbf.h] files.
    1920
     
    2223The '''dev_fbf_init()''' function completes the FBF chdev descriptor initialisation. It calls the specific driver initialisation function, to initialise the specific hardware device, and initializes the FBF chdev extension. It must be called by a local thread.
    2324
    24 == __C) Sys-calls API__ ==
     25== __C) User API__ ==
    2526
    26 The ''syscalls'' API define the following access functions, that do NOT use the the FBF device waiting queue, the associated
    27 device thread and the FBF IRQ, as the client thread does NOT deschedules,
     27All 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,
    2828
    2929=== C.1) dev_fbf_get_config() ===
     
    5252=== C.6) dev_fbf_delete_window() ===
    5353
    54 This function implements the ''fbf_delete_window()'' syscall to delete a FBF window. 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.
     54This function implements the ''fbf_delete_window()'' sys-call to delete a FBF window. 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.
    5555
    5656=== C.7) dev_fbf_move_data() ===
    5757
    58 This function implements the deprecated ''fbf_read()'' and ''fbf_write()'' sys-calls.
    59  * 2) Two extra syscalls exist but are deprecated:
    60  * - FBF_DIRECT_WRITE   : move synchronously pixels from an user buffer to the FBF.
    61  * - FBF_DIRECT_READ    : move synchronously pixels from the FBF to an user buffer.
    62  *
    63  * For these deprecated operations, the client thread calls
    64  * directly the driver to move data between the user buffer and the FBF.
    65  *
     58This function 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.
    6659
    67 === C) Drivers API FBF The FBF device defines defines four command types to access FBF driver(s) :
    68  * - FBF_DRIVER_KERNEL_WRITE : move pixels from a kernel window to the FBF.
    69  * - FBF_DRIVER_KERNEL_READ  : move pixels from the FBF to a kernel window.
    70  * - FBF_DRIVER_USER_WRITE   : move bytes from an user buffer to the FBF.
    71  * - FBF_DRIVER_USER_READ    : move bytes from the FBF to an user buffer.
    72  *
    73  * Note: As we don'
     60
     61== __ D) Driver API__ ==
     62
     63The FBF device defines defines four command types to access FBF driver(s) :
     64 - '''FBF_DRIVER_KERNEL_WRITE''' : move pixels from a kernel window to the FBF.
     65 - '''FBF_DRIVER_KERNEL_READ'''  : move pixels from the FBF to a kernel window.
     66 - '''FBF_DRIVER_USER_WRITE'''   : move bytes from an user buffer to the FBF.
     67 - '''FBF_DRIVER_USER_READ'''    : move bytes from the FBF to an user buffer.
     68
     69These four commands use the three following arguments, that must be registered, with the command type, in the ''fbf_command_t'' structure embedded in the client thread descriptor :
     70 - '''npixels''' : number of pixels to be moved.
     71 - '''buffer''' : pointer on buffer in (can be in user space or in kernel space).
     72 - '''offset''' : offset in FBF (number of pixels).