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

[BUG] stm32f746g-disco display examples show garbage #13839

Closed
1 task done
raiden00pl opened this issue Oct 5, 2024 · 9 comments · Fixed by #13915
Closed
1 task done

[BUG] stm32f746g-disco display examples show garbage #13839

raiden00pl opened this issue Oct 5, 2024 · 9 comments · Fixed by #13915
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Drivers Drivers issues Area: OS Components OS Components issues blocker Release Blocker

Comments

@raiden00pl
Copy link
Member

Description / Steps to reproduce the issue

./tools/configure.sh stm32f746g-disco/fb
make -j
nsh> fb
<garbage on the screen>

It should be:

20241005_145803

But it is:

20241005_150027

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Arch Linux

NuttX Version

nuttx-12.7.0-RC0

Issue Architecture

[Arch: arm]

Issue Area

[Area: Drivers], [Area: OS Components]

Verification

  • I have verified before submitting the report.
@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Area: Drivers Drivers issues Area: OS Components OS Components issues labels Oct 5, 2024
@raiden00pl raiden00pl added the blocker Release Blocker label Oct 5, 2024
@raiden00pl
Copy link
Member Author

stm32f746g-disco/nxdemo also broken

@raiden00pl raiden00pl changed the title [BUG] stm32f746g-disco/fb example show garbage [BUG] stm32f746g-disco display examples show garbage Oct 5, 2024
@cederom
Copy link
Contributor

cederom commented Oct 6, 2024

We are waiting for LVGL 9.2.1 release lots of fixes incoming and if all works fine we will include it in NuttX 12.7.0 :-)

@raiden00pl
Copy link
Member Author

@cederom @xiaoxiang781216 This issue is not related to LVGL. fb and nxlines examples don't use LVGL, something else is broken.

@cederom
Copy link
Contributor

cederom commented Oct 7, 2024

This seems the same problem as reported by @TimJTi ?

Update: Nope, all problems that Tim had seems to be fixed already in the LVGL upstream :-)

@terry0012
Copy link
Contributor

@raiden00pl can you provide the output log of ‘fb’ ?

we want to check FB driver info first.

@terry0012
Copy link
Contributor

@raiden00pl
I found that output bpp is 24 in boards/arm/stm32f7/stm32f746g-disco/include/board.h
#define BOARD_LTDC_OUTPUT_BPP 24
and gpio settings is using 24bpp as below.

static const uint32_t g_ltdcpins[] =
{
  GPIO_LTDC_R4, GPIO_LTDC_R5, GPIO_LTDC_R6, GPIO_LTDC_R7,
  GPIO_LTDC_G4, GPIO_LTDC_G5, GPIO_LTDC_G6, GPIO_LTDC_G7,
  GPIO_LTDC_B4, GPIO_LTDC_B5, GPIO_LTDC_B6, GPIO_LTDC_B7,
#if BOARD_LTDC_OUTPUT_BPP > 12
  GPIO_LTDC_R3, GPIO_LTDC_G2, GPIO_LTDC_G3, GPIO_LTDC_B3,
#  if BOARD_LTDC_OUTPUT_BPP > 16
  GPIO_LTDC_R2, GPIO_LTDC_B2,
#    if BOARD_LTDC_OUTPUT_BPP > 18
  GPIO_LTDC_R0, GPIO_LTDC_R1, GPIO_LTDC_G0, GPIO_LTDC_G1,
  GPIO_LTDC_B0, GPIO_LTDC_B1,
#    endif
#  endif
#endif
  GPIO_LTDC_VSYNC, GPIO_LTDC_HSYNC, GPIO_LTDC_DE, GPIO_LTDC_CLK
};

But the bpp reported by framebuffer driver is 16, and framebuffer length is also in bpp 16 mode (261120 = 480 * 272 * 2).

CONFIG_STM32F7_LTDC_FB_SIZE=261120
CONFIG_STM32F7_LTDC_L1_CHROMAKEYEN=y
CONFIG_STM32F7_LTDC_L1_CHROMAKEY=0x00000000
CONFIG_STM32F7_LTDC_L1_COLOR=0x00000000
CONFIG_STM32F7_LTDC_L1_RGB565=y

can you check this problem, and try to set BOARD_LTDC_OUTPUT_BPP to 16 and test again ?

@raiden00pl
Copy link
Member Author

@terry0012
BOARD_LTDC_OUTPUT_BPP set to 16 doesn't fix the problem. Here fb output with BOARD_LTDC_OUTPUT_BPP=16:

nsh> fb
VideoInfo:
      fmt: 11
     xres: 480
     yres: 272
  nplanes: 1
PlaneInfo (plane 0):
    fbmem: 0xc0000000
    fblen: 261120
   stride: 960
  display: 0
      bpp: 16
Mapped FB: 0xc0000000
 0: (  0,  0) (480,272)
 1: ( 43, 24) (394,224)
 2: ( 86, 48) (308,176)
 3: (129, 72) (222,128)
 4: (172, 96) (136, 80)
 5: (215,120) ( 50, 32)
Test finished

@terry0012
Copy link
Contributor

terry0012 commented Oct 8, 2024

I don't have the stm32f746g-disco board, but from the documentation, I can see that its LCD is 24bpp.

should we report 24bpp for framebuffer driver ? @raiden00pl

I have STM32F429-disco, and test fb with RGB565, it show buffer correctly.

@raiden00pl
Copy link
Member Author

@terry0012
Thanks for help. The problem is somewhere in board configuration which was broken long time ago. I didn't find the reason yet, but I'll take care of it. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Drivers Drivers issues Area: OS Components OS Components issues blocker Release Blocker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants