Go to advanced search

by hjimbens
Tue Aug 20, 2019 10:08 am
Forum: Graphics programming
Topic: Relationship between mode set with `tvservice` and DRM
Replies: 8
Views: 1637

Re: Relationship between mode set with `tvservice` and DRM

After cloning and building https://cgit.freedesktop.org/mesa/drm/t ... s/modetest and calling with

Code: Select all

builddir/tests/modetest/modetest -M vc4 -d -s [email protected]:1920x1080-60
I get

Code: Select all

setting mode [email protected] on connectors 51, crtc 49
failed to set mode: Permission denied
and nothing changes.
by hjimbens
Thu Aug 01, 2019 10:21 am
Forum: Graphics programming
Topic: Playing video in an OpenGL(ES) application on Pi4
Replies: 1
Views: 939

Playing video in an OpenGL(ES) application on Pi4

I am trying to integrate hardware accelerated video playback in an OpenGL(ES) application with zero copy. /opt/vc/src/hello_pi/hello_videocube/video.c shows how to do that for a Pi1-3 with OpenMAX egl_render. For the Pi4 there are some challenges. First of all there are two different ways to do Open...
by hjimbens
Tue Jul 02, 2019 8:47 am
Forum: OpenGLES
Topic: Full screen OpenGL ES on Pi 4
Replies: 22
Views: 4304

Re: Full screen OpenGL ES on Pi 4

- is is possible to make OpenGL ES render to a dispmanx layer as in older RPis using new drivers? No, as far as I can tell that is not possible. - is it possible to use OpenGL ES without X? Yes, by using GBM/DRM. My application (RPi3-) application used OpenGL ES on Dispmanx, OpenMax to render video...
by hjimbens
Thu Jun 27, 2019 8:31 am
Forum: OpenGLES
Topic: Full screen OpenGL ES on Pi 4
Replies: 22
Views: 4304

Re: Full screen OpenGL ES on Pi 4

In another thread https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=243372&start=400#p1486236 , 6by9 explained There is no firmware driver for the 3D hardware on the Pi4, therefore there will be no "legacy" OpenGLES driver. . In the past I used gbm (drm) with the fkms driver to use full screen...
by hjimbens
Wed Jun 26, 2019 1:27 pm
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 861
Views: 88754

Re: Raspberry Pi 4 Thread - general discussion

When I change to hello_triangle demo to not bail out on a Pi 4, it hangs in the same eglCreateContext. Is there any way to get OpenGL ES/Dispmanx applications working on the Pi 4? No it will need minor changes to the code. The good news is after the changes the code will run unchanged on earlier Pi...
by hjimbens
Wed Jun 26, 2019 12:22 pm
Forum: OpenGLES
Topic: Full screen OpenGL ES on Pi 4
Replies: 22
Views: 4304

Full screen OpenGL ES on Pi 4

The Pi 4 seems to be very exciting new hardware. I can't wait to see the performance improvements. My application uses the legacy OpenGL ES driver in combination with Dispmanx. I compiled my application on a fresh Buster image and everything works fine on a Pi 3 B+. Unfortunately the application doe...
by hjimbens
Wed Jun 26, 2019 11:01 am
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 861
Views: 88754

Re: Raspberry Pi 4 Thread - general discussion

My application that is similar to the hello_pi demos hangs in the eglCreateContext call on a Pi 4. I disabled the FKMS driver in config.txt and I am using a buster image that works fine on a Pi 3B+. When I change to hello_triangle demo to not bail out on a Pi 4, it hangs in the same eglCreateContext...
by hjimbens
Thu Apr 19, 2018 12:08 pm
Forum: Troubleshooting
Topic: Raspberry Pi 3 B+ lockups
Replies: 464
Views: 57225

Re: Raspberry Pi 3 B+ lockups

I just did an update with sudo rpi-update . I also added arm_freq=1200 to /boot/config.txt so it is running with arm_freq=1200 and sdram_freq=450. It is more stable than before, but it still locks up under load (I am running an application that decodes two mpeg-dash streams and displays them using O...
by hjimbens
Mon Apr 16, 2018 7:53 am
Forum: OpenGLES
Topic: function to return available GPU memory?
Replies: 2
Views: 6083

Re: function to return available GPU memory?

As far as I know there is no direct call to query this, but popen ("sudo vcdbg reloc stats", "r") returns a FILE pointer to a file containing something like total space allocated is 236M, with 234M relocatable, 2.3M legacy and 0 offline 143M free memory in 35 free block(s) You can parse it to read t...
by hjimbens
Thu Apr 05, 2018 2:57 pm
Forum: Troubleshooting
Topic: Raspberry Pi 3 B+ lockups
Replies: 464
Views: 57225

Re: Raspberry Pi 3 B+ lockups

Earlier in this thread I reported that I have two Pi 3 B+'s, one of which repeatedly freezes after a few minutes, even with "arm_freq=700". However after adding "arm_freq=1200 and "sdram_freq=450" to config.txt I have not seen any freezes yet. Right now I am trying with only "sdram_freq=450" and I h...
by hjimbens
Wed Mar 28, 2018 7:38 am
Forum: Troubleshooting
Topic: Raspberry Pi 3 B+ lockups
Replies: 464
Views: 57225

Re: Raspberry Pi 3 B+ lockups

I have a similar situation. I have two Pi 3 B+. The first one locks up after five or ten minutes of operation. Screen freezes, ssh connections freeze, the Pi no longer responds to keyboard. Both red and green leds are on. I am using the official power supply. I monitor temperature via a separate ssh...
by hjimbens
Mon Jan 08, 2018 8:07 am
Forum: Advanced users
Topic: Boot sometimes fails with kernel panic
Replies: 5
Views: 3150

Re: Boot sometimes fails with kernel panic

To investigate the issue I monitor the serial port of three Pi's from a fourth Pi. I didn't know you could monitor more than one serial port from a single Pi. How are you doing this? Are you using USB to serial adaptors? Yes, I am using three USB to serial adapters. As for the crashes, try underclo...
by hjimbens
Mon Jan 08, 2018 8:01 am
Forum: Advanced users
Topic: Boot sometimes fails with kernel panic
Replies: 5
Views: 3150

Re: Boot sometimes fails with kernel panic

You are doing a proper shutdown on your Pi's before it switches off the wall outlet that the three Pi's take there power from, waits 15 seconds and switches it on again. Aren't you? No, the whole point is that some of our Pi's get switched off at night by just cutting power. Some of them don't come...
by hjimbens
Thu Jan 04, 2018 1:28 pm
Forum: Advanced users
Topic: Boot sometimes fails with kernel panic
Replies: 5
Views: 3150

Boot sometimes fails with kernel panic

Sometimes booting my Raspberry Pi fails with a kernel panic. To investigate the issue I monitor the serial port of three Pi's from a fourth Pi. When the fourth Pi detects that all three Pi's are up and running (by making a http connection to all three Pi's) it switches off the wall outlet that the t...
by hjimbens
Fri Dec 04, 2015 9:00 am
Forum: General discussion
Topic: Pi Zero, using USB for networking
Replies: 3
Views: 4190

Re: Pi Zero, using USB for networking

The obvious work around for the Zero is to forego connecting a keyboard or hub to the Pi using the OTG cable adapter and only compile the gadgets driver. The comments on https://github.com/raspberrypi/linux/issues/881 make me doubt whether that will work. There is a new issue https://github.com/ras...
by hjimbens
Thu Dec 03, 2015 2:41 pm
Forum: General discussion
Topic: Pi Zero, using USB for networking
Replies: 3
Views: 4190

Pi Zero, using USB for networking

Setting up a Pi Zero and ssh-ing into it, would be a lot easier if you could connect it to a PC with a USB OTG cable and it would automatically make an Ethernet-over-USB connection. All you need to get started, would be a single USB cable (the same one you use to charge you phone) instead of a power...
by hjimbens
Fri Feb 06, 2015 9:45 am
Forum: General discussion
Topic: The Raspberry Pi 2 Q&A thread
Replies: 442
Views: 111465

Re: The Raspberry Pi 2 Q&A thread

I'm also seeing timing issues on the Pi 2, I've boiled them down to this example which takes 20sec! on a Pi 2 This affects usleep, and subsequently Python's sleep command, which makes code like our Display-o-Tron 3000 examples run in sloooow moootion. #include <unistd.h> int main() { int x = 0; for...
by hjimbens
Mon Feb 02, 2015 8:38 am
Forum: C/C++
Topic: Compiling for Raspberry Pi 2
Replies: 25
Views: 45107

Compiling for Raspberry Pi 2

When I compile for Raspberry Pi 1 with gcc I use: CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -p...
by hjimbens
Mon Dec 22, 2014 1:54 pm
Forum: OpenMAX
Topic: OpenMAX IL demos
Replies: 14
Views: 15558

Re: OpenMAX IL demos

Somewhere in your makefile you link to libopenmaxil with "-lopenmaxil". You should link to libvcos as well with "-lvcos" to reference the symbol 'vcos_pthreads_map_errno'. You probably have to add "-lvchiq_arm -lbcm_host" as well.
by hjimbens
Wed Nov 05, 2014 2:51 pm
Forum: General discussion
Topic: Bubble scopes?
Replies: 5
Views: 1341

Re: Bubble scopes?

I wanted to utilize this for 360degree CCTV camera recording, but have no idea how to implement the software side of it. You should post this question in http://www.raspberrypi.org/forums/viewforum.php?f=67 or http://www.raspberrypi.org/forums/viewforum.php?f=68 . The easiest way to do this with a ...
by hjimbens
Mon Oct 20, 2014 6:19 am
Forum: General discussion
Topic: Webcam Server please
Replies: 10
Views: 1978

Re: Webcam Server please

maybe run apt-get update
Did you try to "sudo apt-get update"?
by hjimbens
Wed Jul 09, 2014 12:00 pm
Forum: Graphics programming
Topic: UDP Image Transfer
Replies: 12
Views: 4948

Re: UDP Image Transfer

You say 'there was a bug in the gist code' what is 'gist'? A gist is a small repository on github. Does the code on github have the bug or is it fixed? Yes, but there is another bug with texture coordinates. It may result in the frames being displayed upside down. Your code seems to use EGL - which...
by hjimbens
Tue Jul 08, 2014 12:37 pm
Forum: Graphics programming
Topic: UDP Image Transfer
Replies: 12
Views: 4948

Re: UDP Image Transfer

Hi Mike, I wrote a short program that reads UDP packets, copies them into a texture and displays the texture on the screen. You can find it here: https://gist.github.com/imbens/cec3f3db278dfaca6937 . I also wrote some test code to send images from my pc. Both sides seem to work (I use your scheme of...
by hjimbens
Sun Jun 29, 2014 8:38 am
Forum: C/C++
Topic: the following code
Replies: 2
Views: 917

Re: the following code

All macros are from the Linux kernel, they all use gcc extensions for very specific tasks. 1)#define __lockfunc __attribute__((section(".spinlock.text"))) This is a macro definition, used in function definitions that tells the compiler/linker? to put the function in a code section named spinlock. Th...
by hjimbens
Fri Jun 27, 2014 12:48 pm
Forum: OpenMAX
Topic: how to decode a h264 file?
Replies: 2
Views: 2241

Re: how to decode a h264 file?

You should use egl_render ( http://home.nouwen.name/RaspberryPi/documentation/ilcomponents/egl_render.html ) instead of video_render. The video will be rendered to a texture. I am not sure you can read this texture with glGetTexImage. If you can't, you can render the texture to a framebuffer object ...

Go to advanced search