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

Nxp pxp vglite v8 dev #2313

Merged
merged 3 commits into from Jun 22, 2021
Merged

Conversation

sebastienfagard
Copy link
Contributor

Description of the feature or fix

This pull-request re-enables in LVGL v8 the acceleration of Blit and Fill operations for i.MX RT platforms using the PXP and VGLite API for GPU. The features and bugfixes of src/gpu/ are aligned with the content of LVGL 7.10.1 in the MCUXpresso SDK 2.10 to be released in June.

Checkpoints

@embeddedt
Copy link
Member

embeddedt commented Jun 15, 2021

Something weird may have happened with your branch here... there are unrelated commits regarding an src/widgets/lv_anim_img widget, which does not appear to match the upstream one in src/extra/widgets/animimg.

@sebastienfagard
Copy link
Contributor Author

@embeddedt the commits that add src/widgets/lv_anim_img are actually an evolution of the original src/extra/widgets/animimg, thus the conflicting symbols at build time.
Can I remove src/extra/widgets/animimg to replace it by src/widgets/lv_anim_img ?

@embeddedt
Copy link
Member

I think it would be best to remove src/widgets/lv_anim_img from this PR, and add the relevant changes to src/extra/widgets/animimg in another PR.

@sebastienfagard
Copy link
Contributor Author

@embeddedt Hi, I updated the PR:

  • removed the conflicting lv_anim_img widget, this will be part of another PR
  • squashed the commits for the PXP & VGLite acceleration
  • formatted the commit as requested using the Angular rules
    Regards,
    Seb

@@ -349,6 +340,12 @@ void lv_gpu_nxp_pxp_disable_recolor(void)
*/
static void lv_gpu_nxp_pxp_run(void)
{
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
lv_disp_t * disp = _lv_refr_get_disp_refreshing();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indent fixed. Thanks.

@embeddedt
Copy link
Member

The changes look fine to me; I don't have the hardware so I can't test this.

jozba and others added 3 commits June 21, 2021 10:53
includes updates from NXP MCU SDK 2.10 with adaptation for lvgl v8:

Updated cache handling

- range limited cache flushing changed to complete cache flush, which is
faster and shold be safe
- flushing done via callback system, so OS specific code is removed
from LVGL

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

gpu: pxp: Buffer sync with BLITs

Added buffer synchronisation with BLITs instead of memcpy for PXP.
In LVGL v8, buffer synchronisation acceleration is moved to littlevgl_support.c.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

gpu: pxp: updates for v8

cache callback type changed in display driver struct
chroma key name changed

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>

gpu: pxp: new log header file for v8

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>

core: init PXP accelerator

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
includes updates coming from NXP MCU SDK 2.10 with adaptation for lvgl v8:

Fixed BLIT offset computation

Previous implementation didn't take into account a possibility of
non-zero offset in source image, so output was wrong if offset was used.
With this fix, CPU and VG-Lite output is the same even with offsets.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

gpu: vglite: Buffer sync with BLITs

Added buffer synchronisation with BLITs instead of memcpy for VG-Lite.
In LVGL v8, buffer synchronisation acceleration is moved to littlevgl_support.c.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

gpu: vglite: Fixed BLIT boundary

Fixed artifact issue revealed by buffer sync with BLIT feature. Caused
by wrong BLIT boundary.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

gpu: vglite: BLIT quality degradation workaround for RT595

Limitation in RT595 causes BLIT image quality degradation when
coordinates are above 368 px. This patch implements workaround that will
break the BLIT into multiple smaller BLITs, so the quality is not
affected for higher resolutions.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

gpu: vglite: Fix address alignment and stride requirements

Fixed multiple issues:
- The VGLite alignment requirement checks for the pixel destination
buffer are not applicable in our case of Linear (non-tiled) format.
- Some VGLite stride requirement requirement should be expressed in bytes,
not in pixels.
- Fix the Y alignment function to ensure that line starts at an address
that the respects the alignment requirement of VG-Lite.

Such mistakes do not break application,
but cause a fallback to non-accelerated Blit by CPU.
See MGG-741.

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>

gpu: vglite: fix some MISRA C 2012 violations

fixed 56 violations: mainly implicit format casts
and unchecked returned values.

see JIRA MCUX-43327

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>

gpu: vglite: fix stride requirement in _init_vg_buf()

fix unit: need to convert the alignment requirement into bytes when checking
stride parameter.
fix condition: stride requirement applies only on source buffers.

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>

gpu: vglite: updates for v8

cache callback type changed in display driver struct

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>

gpu: vglite: update parameter type for v8

display driver is now a pointer in structure.

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
replace FSL_RTOS_FREE_RTOS by SDK_OS_FREE_RTOS in order to be aligned
with MCU SDK 2.10.
See MCUX-41577.

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
@kisvegabor
Copy link
Member

Looks good to me too. I've tested on iMX RT 595 and they worked well.
I'll merge it if the CI runs successfully.

@kisvegabor
Copy link
Member

Merging, thank you, Sebastien!

@kisvegabor kisvegabor merged commit 13ed195 into lvgl:master Jun 22, 2021
@sebastienfagard
Copy link
Contributor Author

You are welcome.
Thanks for the review and merge.

@nicusorcitu nicusorcitu deleted the nxp_pxp_vglite_v8-dev branch April 4, 2022 06:19
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.

None yet

4 participants