Repository navigation
fix(freertos) sync signal from isr fixed - #6793
Conversation
| #define _enter_critical_isr() _enter_critical() | ||
| #define _exit_critical_isr() _exit_critical() |
There was a problem hiding this comment.
| #define _enter_critical_isr() _enter_critical() | |
| #define _exit_critical_isr() _exit_critical() | |
| #define _enter_critical_isr() taskENTER_CRITICAL_FROM_ISR() | |
| #define _exit_critical_isr(x) taskEXIT_CRITICAL_FROM_ISR(x) |
I tested on ESP32 and that API is available. I think it would be good to use it here too.
There was a problem hiding this comment.
It has to be this or FreeRTOS will assert in vPortExitCritical - at least on the CM4/7 port
|
I am seeing this issue after upgrading from v9.1 to v9.2. Let me know if I can help testing. Currently working with an i.MX RT1170 CM7 |
|
Thanks @kschwan.
So it is working now with this fix? |
fe44384 to
a5891f4
Compare
|
hi @liamHowatt We can work together to fix any issue on your side. |
I'll check tomorrow! I believe it will because I made a very similar change myself before coming here |
|
Note: I had to patch lv_draw_pxp.h to |
|
If I switch to master (651f69f) and apply the following patch, it runs. At a glance it looks like the refresh period is fluctuating more than previously (9.1) though I can't say for sure |
|
I also see this blocking status with PXP draw + SW draw enabled. So now, the PXP interrupt and LVGL main thread both uses the same thread handle to be signaled. So after the PXP IRQ comes, a different thread is being woke up. |
|
Have to solve that problem too on PXP. |
|
I'm reading #6692 and these comments and trying to understand the root of the issue, but I'm not quite there yet. The original issue was to solve calling There is some thing which might be an issue in the current logic. In lv_draw_dispatch() we have this: if(!task_dispatched) {
lv_draw_wait_for_finish();
lv_draw_dispatch_request();
}Note that
|
|
lvgl/src/draw/lv_draw_private.h Line 118 in dc9e423 |
|
@liamHowatt @kisvegabor Let me do some more work and I will get back with another fix, hopefully keeping the code that @liamHowatt implemented here Line 206 in dc9e423 Because we will need that code while the PXP interrupt have to signal two different tasks: draw task (for drawing) and LVGL main task (for screen rotation). In the past while using semaphores it was no issue, but once with PR #6298 we need to handle it with task sync too. |
Signed-off-by: Nicușor Cîțu <[email protected]> Signed-off-by: Cosmin-Daniel Radu <[email protected]>
…") instead. Signed-off-by: Nicușor Cîțu <[email protected]>
a5891f4 to
b43de47
Compare
|
Hi @liamHowatt @kschwan please let me know if this solution works for you. It works for me on all combinations: VGLite still needs an extra patch but I will send it separately on a different PR. I intend to do it soon to fixup the remaining issues on lvgl 9.2.0 |
b43de47 to
bbb1a90
Compare
If there is no supported draw task for a unit or the list is empty, the draw unit will be idle. Just to be sure we understand it the same way: if the draw unit it busy and cannot take new tasks, the dispatcher should return
The return value of all draw unit dispatches are combined into a single result here.
If it should work without this wait too, let's remove it to see if we understand what's happening correctly. I'm not familiar with the FreeRTOS part, so @liamHowatt will comment on it. |
VGLite dispatcher will never return: So, if task is not supported or task list is empty, the GPU HW might be busy, so we can call a wait for finish which will make sure the unit is done processing all tasks. |
|
Why can't VGLite return 0 when:
I think the missing information for me is the new flow of VGLite. When will VGLite render the queued tasks? Only on |
|
Okay, thank you! Let's keep logic as it is 🙂 |
|
I have not changed any logic in the main dispatcher. |
Thanks! I'll give it a spin tomorrow. |
|
I'm seeing a weird issue: The display is not refreshing if I disable I having same issue on release/v9.1, too. I just didn't notice for a while because I had perf monitor enabled.
|
|
Please open a separate thread for that issue. |
Thanks, will do |
|
Looks like it's working correctly on my end (with PXP/FreeRTOS) :) |
|
Hi @liamHowatt would you please review this PR? I let your implementation, just fixed the ISR routines and handled the loop case (we discussed) inside the |
kisvegabor
left a comment
There was a problem hiding this comment.
Okay for me in general, but @liamHowatt can add more meaningful comments.
liamHowatt
left a comment
There was a problem hiding this comment.
It works great on ESP IDF. There are a few nice catches you made.
Just two things.
Signed-off-by: Nicușor Cîțu <[email protected]>
…ggered. Signed-off-by: Nicușor Cîțu <[email protected]>
Signed-off-by: Nicușor Cîțu <[email protected]>
fb975da to
bfb6cec
Compare
Signed-off-by: Nicușor Cîțu <[email protected]> Signed-off-by: Cosmin-Daniel Radu <[email protected]> Co-authored-by: Nicușor Cîțu <[email protected]>
Signed-off-by: Nicușor Cîțu <[email protected]> Signed-off-by: Cosmin-Daniel Radu <[email protected]> Co-authored-by: Nicușor Cîțu <[email protected]>
Signed-off-by: Nicușor Cîțu <[email protected]> Signed-off-by: Cosmin-Daniel Radu <[email protected]> Co-authored-by: Nicușor Cîțu <[email protected]>
Signed-off-by: Nicușor Cîțu <[email protected]> Signed-off-by: Cosmin-Daniel Radu <[email protected]> Co-authored-by: Nicușor Cîțu <[email protected]>

Description of the feature or fix
Fixes #6692
lv_thread_sync_signal_isrneeded to call_enter_critical_isr()instead of_enter_critical()because it was hangingNotes
lv_conf_template.hrun lv_conf_internal_gen.py and update Kconfig.scripts/code-format.py(astyle v3.4.12needs to installed by runningcd scripts; ./install_astyle.sh) and follow the Code Conventions.