Article: NuttX RTOS for PinePhone: Feature Phone UI in LVGL, Zig and WebAssembly
#61
I understand, thanks, I have to return to that when I understand more Smile

I am trying to do the same with the LCD startup sequence still. I think I finally found my problem with it. The A31 user manual talks about the TX register byte order being 3,2,1,0, 7,6,5,4, etc but I think it is actually the other way around! ie sequential. I had some confusion because to check the []u8 being written, I was pulling pack u32 so that I could use my handy GUI register debug panel, but seems like Zig might have been doing some Endianess tricks reading the u32, still not quite sure, but feel like I am getting closer! Also the CMD_CTL register seems to be mis-documented, possibly 1 bit out, not sure yet. So very slow days at the moment, but as a result my debug tool collection increases Smile

I hope you are making better progress with the PineTab-V Smile
  Reply
#62
Well it involved quite a few calls from Nuttx up into my Zig layer to debug and get things working. It also involved learning about Zig slice of slice '''[]const []const u8''' which was a bit painful given the current state of Zig documentation. And I stored some intermediate calculated LCD init commands in the end, vs implementing the CRC and packaging headers etc. It feels fragile, but works!

Anyway onwards to your Framebuffer article Smile
  Reply
#63
So framebuffer is kinda decoded, I have to pass the fb pointers up to Zig to get it to work, since I am not sure how LVGL is accessing them yet, seems to be via a driver? Ideally I want to allocate the fb on the Zig side and have LVGL access that directly. Anyway, all good fun still. I also want to clean up my dev environment and have a test with new Zig Smile
  Reply
#64
A frame buffer is normally a buffer provided by the hardware (using memory-mapped I/O (MMIO) or DMA) or by the driver where the userspace can just write to the predetermined address. So yes, using the pointer returned by the driver is how you use it. If you want to allocate your own buffer, that would be double-buffering, so then you need to "blit" (copy) your double buffer into the real frame buffer regularly (usually in some interrupt handler, synchronized to the screen refresh to avoid flickering). It can make sense on some hardware, not so much on other hardware. I do not know the internals of the PinePhone display hardware well enough to be able to tell you whether it makes sense here. (Well, technically, some hardware also allows you to remap its DMA to a different address, provided by you, usually under some constraints such as a minimum alignment, but I do not know whether this is possible on the PinePhone.)
  Reply
#65
(09-09-2023, 05:34 AM)Kevin Kofler Wrote: (Well, technically, some hardware also allows you to remap its DMA to a different address, provided by you, usually under some constraints such as a minimum alignment, but I do not know whether this is possible on the PinePhone.)

Thanks Kevin, yes, this is what I try to do, DMA accessed, direct memory without a driver, and no blit. I hope this will allow me eventually some hardware GPU acceleration, if I ever find documentation for the openVG, or if not just access to the 3 planes and mixers for some UI effects.  Lets see Smile  Currently my USB micro SD card adapter broke, so testing is on hold for a few days, and it has prompted me that I really should have an extension cable for the PP card slot to avoid too much ware n tear during development, but struggling to find one locally.

After that I might have another go with the audio routing, now that I have so much of the SoC working in Zig I feel a bit more confident to try again.  Unless the PineTab-V comes back in stock before then! Smile

btw I did see mention of some kind of recovery mode, 'FEL Mode' that sounds useful for development, but no way to switch the PP into this mode?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Slack on PinePhone Adam Seline 5 4,961 12-20-2023, 07:20 AM
Last Post: nickolas
  Struggle to install LibreOffice on the PinePhone Peter Gamma 48 22,007 11-24-2023, 07:02 AM
Last Post: Peter Gamma
  Which word processor to choose for the Pinephone? Peter Gamma 8 1,465 11-23-2023, 01:06 AM
Last Post: Peter Gamma
  openSUSE for Pinephone Alefnode 75 98,214 11-17-2023, 08:37 AM
Last Post: Uturn
  Using Signal on PinePhone in mid-2023? dante404 45 10,617 11-17-2023, 04:23 AM
Last Post: Kevin Kofler
  Slarm64 on PinePhone [Unofficial Slackware ARM - 64 bit] acid andy 28 22,379 11-05-2023, 09:09 AM
Last Post: acid andy
  Genode- Sculpt OS for the PinePhone (non Linux) Surehand53 1 671 11-04-2023, 07:23 PM
Last Post: tllim
  Abiword as a office mobile word processor for the Pinephone? Peter Gamma 11 1,543 10-24-2023, 08:57 AM
Last Post: Peter Gamma
  What File Manager Options Are There For The Pinephone? pinephoneuser22 7 1,910 10-18-2023, 08:37 AM
Last Post: luppivega
  Does Ubuntu modify a Pinephone SD boot card? Peter Gamma 0 655 10-05-2023, 09:18 AM
Last Post: Peter Gamma

Forum Jump:


Users browsing this thread: 1 Guest(s)