jcea has quit [Read error: Connection reset by peer]
jcea1 is now known as jcea
ungeskriptet1 has joined ##raspberrypi-internals
ungeskriptet has quit [Ping timeout: 264 seconds]
ungeskriptet1 is now known as ungeskriptet
ungeskriptet0 has joined ##raspberrypi-internals
bonda_000 has joined ##raspberrypi-internals
ungeskriptet has quit [Ping timeout: 256 seconds]
ungeskriptet0 is now known as ungeskriptet
bonda_000 has quit [Quit: Leaving]
jcea has quit [Ping timeout: 268 seconds]
jcea has joined ##raspberrypi-internals
jcea has quit [Ping timeout: 268 seconds]
<f_ridge>
<x2x6_/D> Hi, Clever, I went back to the message history to find where you looked up debug information in linux kernel. Can you tell me if this is output is from raspberrypi ?
<f_ridge>
<x2x6_/D> Because as far as I understand raspberry can not support 1.8 voltage.
<f_ridge>
<x2x6_/D> Also I am not sure i understand I see two mmc devices in my own output in linux - mmc0, mmc1, and they are different. mmc1 is in high-speed mode.
<f_ridge>
<x2x6_/D> There is only 1 sd card on the system, I could imagine mmc0, mmc1 are partitions but this is not the case,
<f_ridge>
<clever___/D> `system76` is an x86 laptop i have
<f_ridge>
<clever___/D> its got a native mmc interface, so i can get the same debug as an rpi
<f_ridge>
<x2x6_/D> ok
<f_ridge>
<x2x6_/D> But now I installed raspbian on my rpi3 and observe 2 mmcs.
<f_ridge>
<x2x6_/D> driver type: 0 (driver type B)
<f_ridge>
<x2x6_/D> So even the linux kernel failed to run high-speed on my crappy sdcard, I'll check the other one, If it has same result perhaps this will be solved by shopping
<f_ridge>
<clever___/D> i think the CSD register also gives you the max clock rate
<f_ridge>
<x2x6_/D> Where can I see it in linux
<f_ridge>
<clever___/D> `find /sys -name csd` i believe
<f_ridge>
<x2x6_/D> Do you know from where kernel sources are taken to compile for bookworm?
<f_ridge>
<x2x6_/D> I am receiving H264 compressed video frames from VideoCore ISP , but having troubles with storing them on SD card. Clever tried to help me , but I am stuck for now.
<f_ridge>
<x2x6_/D> So when SD card can not write new frames quickly VideoCore fw just skips the frames and gives me the latest instead, thats why video looks like some bug
<f_ridge>
<x2x6_/D> Looks like in H264 does there is no timestamp bound to each frame, so when frame is skipped - this is invisible to video player it just plays back all the frames it detects with the set framerate
<bonda_000>
so how do I address you so that you get a notification
<bonda_000>
since you are talking through the bridge
<bonda_000>
with a f_ridge:?
<bonda_000>
or what
<f_ridge>
<x2x6_/D> You have discord?
<f_ridge>
<x2x6_/D> telegram
<f_ridge>
<x2x6_/D> ?
<bonda_000>
no only here
<bonda_000>
if I type here
<bonda_000>
can you get a notification there?
<f_ridge>
<x2x6_/D> 1 sec
<bonda_000>
anyway
<clever>
bonda_000: depends on how discord is configured, it has several options
<f_ridge>
<x2x6_/D> thats the block I've bought, chosen randomly
<x^2^x6^>
My powering design was to use it as videoregistrator in car then it uses just usb cable to car power socket. And then you take it out of the car and press the power switch that connects the power line to battery
<x^2^x6^>
But I did not dig much into it, because I'm in sw part right now
<clever>
x^2^x6^: have you tried just reducing the target bitrate in the encoder some more, to a level where the card can always keep up?
<x^2^x6^>
I've done experiments to reduce the target bitrate, and this actually helps to even out the speeds so that no frameloss happens. I can also reduce the image size to smaller values like 800x600 and this will give no skipped frames
<x^2^x6^>
1280x1024 gives almost no bugs.
<x^2^x6^>
Currently I try to figure out what is max possible frame size and quality. But I am stuck on getting SD card work on 50MHz as you know.
<x^2^x6^>
I can not continue, because suddenly many things about sdcard work bad. Like for example I don't get a proper CSD register values as in my post above - its shifted 1 byte, then there are problems with CMD58, etc.
<bonda_000>
what makes you think it is the videocore firmware side issue?
<x^2^x6^>
So I go for a workaround, today I am building whole raspberry pi image including kernel with yocto, to be able to add more logging in kernel to see values that kernel sees in emmc peripheral
<x^2^x6^>
I did not say vidoecore firmware is the issue. To me the issue is that I do not schedule write out part of frame data correctly, mainly - I ask too much from currnet SDcard configuration.
<x^2^x6^>
I want to increase write speed to sdcard x2
<x^2^x6^>
and then see what is the maximum possible image quality without dropped frames
<x^2^x6^>
And then just clean up the IO scheduling and so on
<bonda_000>
if there is Linux working it does mess a lot with videocore activities
<bonda_000>
occupying the data bus
jcea has joined ##raspberrypi-internals
<x^2^x6^>
I only care about linux to the point to see how it initializes EMMC controller on rpi in order to boost it to 50MHz clock (High Speed mode). I am not able to do this correctly.
<x^2^x6^>
There is a high speed bit in one of the control registers in bcm2835 emmc peripheral. But also you have to send specific command to sdcard before setting this bit. But after that sdcard does not work reliably especially on writes
<bonda_000>
creates the sd control struct uVar3 = rtos_malloc_priority(0x8000,0x20,0x40000000,0);
<clever>
ah right, this only runs when certain errors occur
<bonda_000>
this says they left an option for multiple sd cards in the future and each sd control block is of 0xCDC bytes size
<bonda_000>
because
<bonda_000>
everything in videocore is ran as a "ril" interface layer component
<x^2^x6^>
Note that I am using emmc directly from my baremetal code, so I am responsible for writes, videocore only has to provide compressed video frames
<bonda_000>
and you use all that vchiq stuff?
<x^2^x6^>
Yes,
<x^2^x6^>
It seems to do the job
<x^2^x6^>
I have a h264 writeout but also SPI display to where I have to draw a preview picture, so that we could see what is written, in smaller form -320x240
<x^2^x6^>
So MMAL is configured to output image and then shrink it in one of the splitted streams
<x^2^x6^>
So i manage two image streams - one to DMA to spi display, one to sdcard
<x^2^x6^>
one steam is encoded , one is raw
<bonda_000>
try to do the logging on the videocore side
<bonda_000>
the camera code is full of logging inserts
<bonda_000>
when it's not able to do something
<bonda_000>
have you tried this
<clever>
bonda_000: the problem is more that the h264 encoder is generating data too fast, and x^2^x6^'s MMC code cant write it to the card fast enough
<clever>
so its less a problem with the firmware not working right, and more with the MMC not being fast enough
<x^2^x6^>
exactly
<bonda_000>
can you hook up your setup with the uart and show what debug messages the videocore reports