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

Add OS_SDK_ZEPHYR definition to LVGL compile defines #69987

Closed
wants to merge 1 commit into from

Conversation

dberlin
Copy link
Contributor

@dberlin dberlin commented Mar 8, 2024

This enables us to use it in NXP's PXP accelerator (and later VGlite) support in LVGL.

(LVGL supports PXP, but only for freertos right now)

For a little more detail, Zephyr PXP support in LVGL requires two things:

  1. For thread safety, LVGL uses a semaphore to tell when pxp completion happens, and so we need to use a zephyr semaphore to do that. See https://github.com/lvgl/lvgl/blob/master/src/draw/nxp/pxp/lv_pxp_osa.c for what i mean
  2. Connecting the interrupt to the LVGL PXP Interrupt handler

To do #1, we need a define we can ifdef off in LVGL. The current FreeRTOS one is named OS_SDK_FREE_RTOS, so this introduces OS_SDK_ZEPHYR.

The rest of the patches for #1 go upstream, and are small (see zephyrproject-rtos/lvgl@zephyr...dberlin:lvgl:zephyr)

If zephyr is going to stick at 8.x for a bit, i can send backport patches as well

For #2, i'll send a patch to do the irq connect in lvgl_init if pxp support is enabled.

Note: All of this is unrelated to the current zephyr DMA driver and ELCDIF driver for PXP (which are related to doing hardware accelerated rotation for the display)

This enables us to use it in PXP/VGlite support in LVGL.
(the free rtos define is named OS_SDK_FREE_RTOS)
@zephyrbot zephyrbot added area: LVGL Light and Versatile Graphics Library Support Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels Mar 8, 2024
@zephyrbot zephyrbot requested review from brgl, faxe1008 and pdgendt March 8, 2024 18:24
Copy link
Collaborator

@thedjnK thedjnK left a comment

Choose a reason for hiding this comment

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

Why can't it use __ZEPHYR__ ?

@dberlin
Copy link
Contributor Author

dberlin commented Mar 8, 2024

Why can't it use __ZEPHYR__ ?

I wasn't aware it existed :)
If it's meant for this purpose, happy to use it!

@dberlin dberlin closed this Mar 8, 2024
@faxe1008
Copy link
Collaborator

@dberlin
I raised the PR with your changes upstream, lvgl/lvgl#5838 since I could not find a PR of yours and I'd love to make this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: LVGL Light and Versatile Graphics Library Support Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants