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

feat(LVGL port): Support for RGB screen. (BSP-478) #313

Closed

Conversation

espressif2022
Copy link
Contributor

ESP-BSP Pull Request checklist

Note: For new BSPs create a PR with this link.

  • Version of modified component bumped
  • CI passing

Change description

1: esp_lv_port adds RGB interface support.
2: esp32_s3_lcd_ev_board delete lvgl related content.

@github-actions github-actions bot changed the title feat(LVGL port): Support for RGB screen. feat(LVGL port): Support for RGB screen. (BSP-478) Mar 22, 2024
Copy link
Collaborator

@espzav espzav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@espressif2022 thank you for this PR. I know this is the draft and I didn't make real review yet. I left only some thoughts.

@@ -44,20 +44,27 @@ typedef struct {
uint32_t buffer_size; /*!< Size of the buffer for the screen in pixels */
bool double_buffer; /*!< True, if should be allocated two buffers */
uint32_t trans_size; /*!< Allocated buffer will be in SRAM to move framebuf */
void *user_buf1; /*!< OPTIONAL: A buffer to be used by LVGL to draw the image */
void *user_buf2; /*!< OPTIONAL: Optionally specify a second buffer to render and flush */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It seems, that we still add new items in this structure. Here is lot of buffers and I think, that it is not clear for custommers. We should add new union for specific settings for MIPI, RGB, monochromatic, ...
  2. Same for flags.
  3. I would like to add something into esp_lcd, how to determine, what bus is used (MIPI, RGB, ... )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It seems, that we still add new items in this structure. Here is lot of buffers and I think, that it is not clear for custommers. We should add new union for specific settings for MIPI, RGB, monochromatic, ...
  2. Same for flags.
  3. I would like to add something into esp_lcd, how to determine, what bus is used (MIPI, RGB, ... )

Yes, the fbs of SPI, I80 are allocated by esp_lv_port, not in the driver.
But the RGB driver will allocate fb internally, which depends on the user, and the internal buffer is more efficient.

The screen is initialized in BSP, at this time, the fb inside the RGB driver has been allocated.
It is not appropriate to take it completely from inside the RGB, users may want to use thire own buffer, so it is a problem.

@@ -120,6 +120,8 @@ esp_err_t lvgl_port_stop(void);
*/
esp_err_t lvgl_port_resume(void);

bool lvgl_port_task_notify(void);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what is this function? Any description?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used to synchronize RGB screen refresh and LVGL tasks.

If it is an SPI screen, the trans_done event will not be received if esp_lcd_panel_draw_bitmap is not executed.
This is synchronous, esp_lcd_panel_draw_bitmap , and receive flush_io_ready_callback event.
We can handle lv_disp_flush_ready in the trans_done event.

However, the esp_lcd_panel_draw_bitmap and trans_done of the RGB screen are not generated synchronously.
The screen is always refreshed and there is always a trans_done event。
So we can only wait for the first event after draw_bitmap in lvgl_port_flush_callback.

@espzav
Copy link
Collaborator

espzav commented May 28, 2024

It was made by PRs: #322 and #333.

@espzav espzav closed this May 28, 2024
@espressif2022 espressif2022 deleted the feature/add_RGB_support branch May 30, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants