On Fri, Mar 13, 2026 at 10:18:22AM +0000, Richard Miller wrote: > Have a look at the pitft driver in the bcm kernel (from Brian Stuart).
A little more context that may or may not be relevant to what you want to do. The HX8357 chip that is used on the display I played with seems to have essentially the same register set as most of the other LCD chips I've encountered with students doing display projects. I wasn't able to find anything in a quick glance over the Sharp site as to which controller chip they're using, so no promises there. The driver works by slipping a little shim into screen.c to siphon off the pixels going to the frame buffer and also send them to the SPI display. I won't say it's optimized in any way, but there is an attempt to look at queued updates and combine them into single updates if appropriate. It seemed overkill to make a whole new dev driver for it, so I posted the control file using addarchfile. It also seemed like it was appropriate to make it something listed in the link section of the config file and for the link init to post the arch file. That worked until the Pi4. For reasons I have yet to track down calling addarchfile during link initialization crashes on that kernel. I suppose if there's any meanngful value this, I should make it its own driver. Right now, it's hard coded to the resolution of the display I have, but it would be pretty easy to add a command in the control file to set the resolution. My own copy does have an additional command to set the scaling. I usually run mine where each 2x2 block in the frame buffer maps to a single pixel on the LCD. The works especially well on the machine I use for presenting in class where the fonts are a bit bigger for the projections. Finally, one of my students just submitted an IWP9 paper where we looked at the SPI driver and experimented with some different techniques to deal with some timing things. I haven't yet had a chance to test any of those with the display, but hope to before long. We're just at the end of our winter term, so I'm up to my eyeballs in all the grading that I've let slide over the term. However, spring term is my term off of teaching, and I'm hoping to treat it as a mini-retirement to develop an effective mindset and schedule for when real retirement comes along in the next few years. My immediate priorities for spring are balancing Plan 9 work (especially some ssh stuff that I've promised to look at) and ENIAC work. Fingers crossed for more discipline than I usually show. BLS ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T1460754cbd027e4e-M58529acb03b2b7099e88922b Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
