adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.03k stars 1.19k forks source link

Qualia / DotClockFrameBuffer unexpectedly renders a few lines of pixels at once in the most bizarre way #9498

Open tyeth opened 1 month ago

tyeth commented 1 month ago

CircuitPython version

9.1.1

Code/REPL

Adapted version of Liz's countdown clock for CircuitPython Day 2024, bitmap background + bitmap label that scrolls

https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/main/CircuitPython_Day_2024_Projects/Qualia_820x320_IO_Countdown

Behavior

Image renders about 5 lines at a time, but seemingly randomly out of order and not the whole line at once. Probably made worse by my use of display.rotation=90

Description

No response

Additional information

No response

tyeth commented 1 month ago

It's also incredibly slow once the bitmap label starts being scrolled (but I'd possibly expect/accept that)

Code: G.zip

Video: https://photos.app.goo.gl/DLvyEcP4XDUtz9xN8 Still image part way through initial render: image

tyeth commented 1 month ago

Just realised I'm not using the color converter for the main tilegrid that the default example uses, like this: tile_grid = displayio.TileGrid(bitmap, pixel_shader=displayio.ColorConverter(input_colorspace=displayio.Colorspace.RGB565))

Instead using the one from the bitmap image (my qualia image is 16bit rgb 565 bitmap): blinka_grid = displayio.TileGrid(blinka_bitmap, pixel_shader=blinka_bitmap.pixel_shader)

It does not appear to make a difference changing to use that instead

somenice commented 3 weeks ago

I experienced really slow updates on Qualia w 2.1 round display when using any display rotation. Even calling rotation=0 seemed to cause slow loading if I recall.

tannewt commented 3 weeks ago

I experienced really slow updates on Qualia w 2.1 round display when using any display rotation. Even calling rotation=0 seemed to cause slow loading if I recall.

Is this new? Loading from flash into PSRAM is going to be limited by the speed of their shared memory bus.

Rotation can be bad for loading since it may cause skipping through the file system to go column by column instead of row by row which wouldn't. This isn't new and I'd suggest rotating the asset to align with the display's rotation.