Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fb: cfb: Support memory constrainted system by partial frame transferring #72204

Closed

Commits on Jul 2, 2024

  1. fb: cfb: Remove the restriction for non-x8 heights fonts

    The logic introduced in zephyrproject-rtos#67881 can also handle fonts with heights
    other than integer multiple of 8. I remove the restriction.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    48e3d0e View commit details
    Browse the repository at this point in the history
  2. tests: subsys: display: cfb: Added test for font heights non-x8

    Add test cases for 1x1 and 11x13 fonts.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    426c794 View commit details
    Browse the repository at this point in the history
  3. fb: cfb: Use signed-integer for API that specifies coordinations

    Change the arguments of `cfb_invert_area`, `cfb_print`, and
    `cfb_draw_(point|line|rect)`, which used unsigned integers to specify
    coordinates to signed integers.
    
    This is because coordinate calculations are usually based on real
    numbers, so it is difficult to use unless negative numbers are
    accepted.
    We clip drawings outside the drawable area on the implementation side.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    aa159e4 View commit details
    Browse the repository at this point in the history
  4. fb: cfb: Remove unused argument from font API

    `cfb_get_font_size` and `cfb_get_numof_fonts` take a
    `const struct driver *` as a first argument, but not use it.
    
    Remove the argument and clean up related sources.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    dd90916 View commit details
    Browse the repository at this point in the history
  5. fb: cfb: Supporting multiple display

    There are three major changes.
    
    - Introducing `struct cfb_display`
    - Changed the argument `struct device *` to `struct cfb_framebuffer *`
    - Rename APIs starting with `cfb_framebuffer_*`
    
    Introduces struct cfb_display as a data structure to represent the display.
    As a result, it is now possible to create multiple pieces of data managed
    using a single static variable in previous implementations,
    making it possible to handle multiple displays.
    The old `struct cfb_framebuffer` remains but is now part of the
    `struct cfb_display` data structure.
    You can get cfb_framebuffer from cfb_display using the added API
    `cfb_display_get_framebuffer`.
    
    All places where a `struct device *` argument was passed to specify the
    target will be replaced with a `struct cfb_framebuffer *`.
    In line with this, API names starting with `cfb_framebuffer_*`,
    which were redundant and inconsistent names, will remove
    `_framebuffer` and change to `cfb_*` .
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    cd5e728 View commit details
    Browse the repository at this point in the history
  6. fb: cfb_shell: Support display selecting

    Add `display select` command to select display.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    b5954be View commit details
    Browse the repository at this point in the history
  7. doc: releases: migration-guide: 3.7: list CFB API change

    Add a note about the changes of CFB(Character framebuffer) APIs.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    dc2c64a View commit details
    Browse the repository at this point in the history
  8. fb: cfb: Delete ppt field of cfb_framebuffer struct

    The pixel per tile value can be calculated from pixel_format,
    so delete the ppt field.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    adbe949 View commit details
    Browse the repository at this point in the history
  9. fb: cfb: Improved behavior when a character not in the font

    If a character that does not exist in the font was specified,
    it was replaced with a space character, but it will now draw with 0 data.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    4f73129 View commit details
    Browse the repository at this point in the history
  10. fb: cfb: Support color display

    Added support for color displays.
    
    Along with color support, we are introducing the concept of foreground
    and background colors. Drawing fonts and lines is done with the
    foreground color, and clear operation fills with the background color.
    With the introduction of drawing colors, we have removed the process of
    inverting data before transfer if the inverted flag was enabled
    during finalizing.
    Replacing the "Invert" operation by swapping the foreground and
    background colors.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    2bf0e7a View commit details
    Browse the repository at this point in the history
  11. samples: subsys: display: Update CFB samples for supporting color

    I have removed the process to set the display format to monochrome.
    Also, I added board settings conf files for native_sim and native_sim_64
    to change the initial value of the SDL display driver's pixel format.
    CFB operates according to the pixel format set here.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    674da20 View commit details
    Browse the repository at this point in the history
  12. test: subsys: display: cfb: Add test for color display

    Added a test to check the display on a color display.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    5206a39 View commit details
    Browse the repository at this point in the history
  13. fb: cfb_shell: Add command for color display supporting

    Add the `fgcolor` `bgcolor` and `display pixel_format`  to
    support color display
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    6d9d6d1 View commit details
    Browse the repository at this point in the history
  14. fb: cfb: Remove unused config

    CHARACTER_FRAMEBUFFER_SHELL_DRIVER_NAME is not used.
    Remove it.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    d3b64e9 View commit details
    Browse the repository at this point in the history
  15. fb: cfb: Changed library name to Compact framebuffer

    CFB was an abbreviation for Character Framebuffer.
    However, it currently supports characters and graphic drawing,
    so it has become far from actual.
    
    However, since there are only a few API changes, I don't want to
    change symbol names, etc.
    Therefore, we will keep the abbreviation CFB and change the name
    to `Compact Framebuffer`.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    1fd9a94 View commit details
    Browse the repository at this point in the history
  16. fb: cfb_shell: Update README.rst

    Update README to update to current specs.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    ca6abc6 View commit details
    Browse the repository at this point in the history
  17. update comments

    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    f149062 View commit details
    Browse the repository at this point in the history
  18. fb: cfb: Support partial drawing

    Allows you to draw part of the screen so that the drawing process can be
    performed even if the buffer size is not large enough.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    b6b88bf View commit details
    Browse the repository at this point in the history
  19. fb: cfb: Introducing a command structure for framebuffer operations

    Store operations for the frame buffer as commands,
    Change to a method that draws at once and transfers at finalize.
    
    Commands are managed in a linked list and processed at the finalization.
    The behavior of drawing APIs does not change.
    It's just that the timing at which drawing is done to memory
    is internally delayed a little.
    
    Typical usage stores command in the buffer.
    The behavior of existing drawing APIs has been changed to store
    commands in this buffer.
    For this reason, an argument for buffer specification is added to
    the initialization function cfb_display_init.
    
    Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
    soburi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    d37422c View commit details
    Browse the repository at this point in the history