Go to advanced search

by Daniel Gessel
Thu Jan 02, 2020 3:58 pm
Forum: Other projects
Topic: Controlling key lights on rgb keyboard
Replies: 0
Views: 208

Controlling key lights on rgb keyboard

I’ve suddenly become consumed by the idea of crafting a program to control the lights on one of those fancy keyboards that has rgb leds for each key, like the HyperX Alloy Origins. Because I’m no good at reverse engineering, I’m wondering if the community knows where I might get a publicly documente...
by Daniel Gessel
Thu Jan 02, 2020 1:48 am
Forum: Graphics programming
Topic: Fast(er) image rendering to screen on a Pi3
Replies: 9
Views: 1634

Re: Fast(er) image rendering to screen on a Pi3

I’m also interested in getting data to the screen quickly running under X. I’m currently experimenting with texsubimage then rendering the texture, but I’d like to find a way to map the texture buffer into cpu accessible memory or some other technique to avoid the extra copy that Texsubimage has to ...
by Daniel Gessel
Wed Jan 01, 2020 3:35 pm
Forum: C/C++
Topic: Problem using libgpiod
Replies: 33
Views: 4140

Re: Problem using libgpiod

I believe the only documentation on libgpiod is the source code itself. Do you have that as reference? For output (controlling a pimoroni blinkt on a Pi4) I ended up using the ioctl calls directly as it seemed easier than using the library. I’m Not sure if the ioctl interface or libgpiod is kept mor...
by Daniel Gessel
Thu Dec 26, 2019 11:23 am
Forum: OpenGLES
Topic: Skin Mesh Animation
Replies: 30
Views: 2572

Re: Skin Mesh Animation

The VC4 is certainly underpowered for some applications, quite capable for others. Glad to hear the VC6 delivers more (it would be a disappointment otherwise).
by Daniel Gessel
Mon Dec 23, 2019 8:24 pm
Forum: Graphics programming
Topic: KMS dumb framebuffers
Replies: 7
Views: 1397

Re: KMS dumb framebuffers

I’m still working on this. I’m going to clean up the code and put together a little demo/test to see if I can nail down when my system hangs, but it has something to do with two monitors and choosing 4096x2160 on the big one (which it doesn’t really support anyway, since it’s UHD)...
by Daniel Gessel
Mon Dec 23, 2019 8:18 pm
Forum: OpenGLES
Topic: Tearing in kmscube on Pi4
Replies: 14
Views: 2083

Re: Tearing in kmscube on Pi4

Thanks for this info. Btw, does anybody know if Kms ioctl setcrtc waits for a vblank? I was trying to use setcrtc only to have a non-vsync path but I still seem to be limited to refresh rate.
by Daniel Gessel
Sat Dec 21, 2019 7:02 pm
Forum: OpenGLES
Topic: Skin Mesh Animation
Replies: 30
Views: 2572

Re: Skin Mesh Animation

I haven’t spent much time with the VC (or Linux GPU) stack - I’m new at this. But on AMD GCN, the compiler can spill registers to scratch in video memory, so we just go slow instead of fail. My understanding is VC4 cannot write directly from shader code, so spilling is not an option. I’ve heard that...
by Daniel Gessel
Sat Dec 21, 2019 4:46 pm
Forum: OpenGLES
Topic: Skin Mesh Animation
Replies: 30
Views: 2572

Re: Skin Mesh Animation

I’m not sure either, but will it compile if you reduce the number of skinning matrices from 50 down to, say 4? I don’t think it’s videocore disassembly, but rather an intermediate step in compilation. It’s not a huge shader... I’m surprised it’s failing to allocate registers, but the large array of ...
by Daniel Gessel
Fri Dec 20, 2019 4:04 pm
Forum: OpenGLES
Topic: Tearing in kmscube on Pi4
Replies: 14
Views: 2083

Tearing in kmscube on Pi4

I modeled some kms based page flipping code on kmscube which I cloned from: https://gitlab.freedesktop.org/mesa/kmscube.git and see tearing on my Pi4 at the top of the screen. So I went back to kmscube and modified the beginning of draw_cube_smooth (in cube-smooth.c) to draw a moving vertical red li...
by Daniel Gessel
Fri Dec 20, 2019 11:55 am
Forum: OpenGLES
Topic: Understanding glxgears performance on Pi4
Replies: 7
Views: 1122

Re: Understanding glxgears performance on Pi4

The keyword is: RAM bandwidth. Theoretical maximum RAM bandwidth in RPi4 should be 12.8 GBps. In reality you have to send commands to the RAM, etc, and the real bandwidth will be much less. For the ARM on RPi4 maximum it can do is something more than 4 GBps but less than 5 GBps (this is what I meas...
by Daniel Gessel
Wed Dec 18, 2019 8:15 pm
Forum: OpenGLES
Topic: Understanding glxgears performance on Pi4
Replies: 7
Views: 1122

Re: Understanding glxgears performance on Pi4

This thread https://www.raspberrypi.org/forums/viewtopic.php?f=67&t=246983 suggests there are “bandwidth limitations” in GLX that are not present in EGL. No idea why... But it seems worth trying EGL to create the context. Will update when I get that sorted out. Update: no magic performance improveme...
by Daniel Gessel
Wed Dec 18, 2019 7:45 pm
Forum: OpenGLES
Topic: Understanding glxgears performance on Pi4
Replies: 7
Views: 1122

Re: Understanding glxgears performance on Pi4

Thanks! My experience with Linux, Raspbian and X is pretty limited, but I found xcompmgr running using htop. If I kill it (nice that it seems to run on the side) my performance goes up to close to 15 fps (only 50 fps on my HD monitor...). I assume xcompmgr uses the GPU, so it makes me wonder where i...
by Daniel Gessel
Wed Dec 18, 2019 5:22 pm
Forum: OpenGLES
Topic: Understanding glxgears performance on Pi4
Replies: 7
Views: 1122

Understanding glxgears performance on Pi4

Apologies if this is naive: glxgears with the window enlarged to 4K, is running on my Pi4 at about 10 FPS and on tears badly on an up-to-date Raspian Buster. My guess would be that Pi4 should be able to do at least 2 GPixels/s fill rate. Assuming an overdraw of 2, there’s about 16 M/pix to draw and ...
by Daniel Gessel
Mon Dec 16, 2019 9:33 pm
Forum: Graphics programming
Topic: KMS dumb framebuffers
Replies: 7
Views: 1397

Re: KMS dumb framebuffers

Thanks. Works for me if I disconnect the second display (furthest from the power supply). My other tests (kmscube with atomic mode setting and the dumb frame buffer test I linked to above, with fixes) work with one display connected. None properly refresh the console on exit, but switching to other ...
by Daniel Gessel
Mon Dec 16, 2019 6:54 pm
Forum: Graphics programming
Topic: KMS dumb framebuffers
Replies: 7
Views: 1397

Re: KMS dumb framebuffers

I’m having some similar troubles with kms cube https://gitlab.freedesktop.org/mesa/kmscube/ . If anybody has that working on Pi4, I’d love to hear how it’s done. I think I worked around the use of the ANDROID specific fence extension (that’s supported on Pi3, since it runs fine there with no modific...
by Daniel Gessel
Mon Dec 16, 2019 1:07 pm
Forum: Graphics programming
Topic: KMS dumb framebuffers
Replies: 7
Views: 1397

Re: KMS dumb framebuffers

Thanks! So, embarrassingly, it was more of the same: using /dev/dri/card1 works but the Pi4 needs even more space for modes. But the displays don’t recover at all on exit; trying to switch out by changing consoles failed, my monitors seemed to lose signal and I ended up rebooting. Changing the code ...
by Daniel Gessel
Sun Dec 15, 2019 8:15 pm
Forum: Graphics programming
Topic: KMS dumb framebuffers
Replies: 7
Views: 1397

KMS dumb framebuffers

I’m following the example code found at http://betteros.org/tut/graphics1.php To try to create a dumb frame buffer. Using fake KMS, It works as expected on Pi3 (withe the caveat that I needed to increase the size of some of the buffers, as the Pi3 supports a large number of nodes). The only thing is...
by Daniel Gessel
Sat Dec 14, 2019 4:01 pm
Forum: Bare metal, Assembly language
Topic: Raspberry PI 4: CPU too powerful/memory too slow?
Replies: 13
Views: 1631

Re: Raspberry PI 4: CPU too powerful/memory too slow?

I think you’re spilling out of the L1 cache with the writes you are doing. If you confine yourself to 32K (which I read is the size of the L1 cache), do you see a bigger performance boost from the simd instructions? I suppose you just have to be doing something of higher arithmetic intensity to gain...
by Daniel Gessel
Sat Dec 14, 2019 10:40 am
Forum: Bare metal, Assembly language
Topic: Raspberry PI 4: CPU too powerful/memory too slow?
Replies: 13
Views: 1631

Re: Raspberry PI 4: CPU too powerful/memory too slow?

Do you think you are saturating cache bandwidth, based on alu <-> cache bus width and clock frequency, or are you thinking there is more to be gained?
by Daniel Gessel
Sat Dec 14, 2019 9:24 am
Forum: Bare metal, Assembly language
Topic: Raspberry PI 4: CPU too powerful/memory too slow?
Replies: 13
Views: 1631

Re: Raspberry PI 4: CPU too powerful/memory too slow?

Your data certainly suggests the Pi4 is largely memory bound (or cache bound, in this case) and SIMD doesn’t give the boost it did on earlier models. I would say that the 30% or so you’re getting is not nothing, though. Would more complex operations, where data lives in registers longer, benefit mor...
by Daniel Gessel
Sat Dec 22, 2018 4:21 am
Forum: C/C++
Topic: Bluetooth BLE C/C++ development
Replies: 2
Views: 2948

Re: Bluetooth BLE C/C++ development

It took me quite some time to wrangle the bluetoothctl code and get BLE writes to a characteristic working from within a c program. I now know more about BLE and DBus than I ever planned on (with, admittedly, lots left to learn). My question now is about performance - my limited scenario (LEGO Power...
by Daniel Gessel
Fri Dec 14, 2018 2:14 pm
Forum: General discussion
Topic: 64-bit operating system
Replies: 356
Views: 136157

Re: 64-bit operating system

I see value in a 64-bit Raspian due to the performance implications of having 64 bit instructions for arbitrary precision arithmetic and the potential to improve the speed of certain applications, e.g. Mathematica. I’d switch to Raspberry Pi desktop if it were 64 bit. What I’m doing isn’t serious en...
by Daniel Gessel
Thu Dec 13, 2018 2:45 pm
Forum: General discussion
Topic: 64-bit operating system
Replies: 356
Views: 136157

Re: 64-bit operating system

My 2 cents is that while I’d love to see a 64 bit “official” Raspian, I’d prioritize 64-bit Rapberry Pi Desktop because I think it would benefit the educational mission of the foundation to get teachers to switch lab computers and their own laptops/desktops to the environment their students are usin...
by Daniel Gessel
Thu Oct 04, 2018 4:03 am
Forum: Automation, sensing and robotics
Topic: Pi-zero robotics board
Replies: 3
Views: 662

Re: Pi-zero robotics board

Thanks! My big vision is a Tabletop Robotic Warehouse where students solve challenges moving and stacking boxes. I think I’ll start with one of Adafruit’s 16 servo hats for a Pi3 “base station” that controls one or more stationary arms. This will give me plenty to work on for a while!
by Daniel Gessel
Wed Oct 03, 2018 12:44 pm
Forum: Automation, sensing and robotics
Topic: Pi-zero robotics board
Replies: 3
Views: 662

Pi-zero robotics board

I’d like a robotics board, designed to fit a pi-zero, that i’d describe as all-in-one: electronics for power either from battery (powering pi and motors) or from transformer (possibly through pi), servo controllers, and a built in 9 dof imu sensor. Any recommendations on existing boards would be wel...

Go to advanced search