Posts
5521
Following
349
Followers
547
.

Jarkko Sakkinen

Edited 3 months ago
Stream signaling for vcam: output_fd when read returns (sequence, flags) pairs. Currently there is only a single flag: VCAM_CONTROL_STREAM_ON.

Blocking read() and poll() can be then used to in the source to see client app starts or stops streaming video.
1
0
0

Jarkko Sakkinen

I have a project of finishing everything in open source that I've started as side quests within last 2-3 years but never finished.

I already created tpm2-protocol and tpm2sh for "stackless" hacking of TPMs and vcam is on the way in near future.

After these the backlog contains:

1. TPM2 asymmetric keys (or possibly more generic hardware asymmetric keys).
2. zmodem2/lrzsz2. There's a few bugs I need to sort out :-)
3. Refreshing and refining dhowell's old container patches.

I'll definitely start with bullet three as it has waited far too long, about the same time as vcam was on hold :-) (rt @neal).
1
0
2

Jarkko Sakkinen

Edited 3 months ago
Refining my test program for vcam just a bit:

1. "Thread" A creates /dev/videoX through /dev/vcam and starts producing checker board animation.
2. "Thread" B opens /dev/videoX and uses optionally shared DMA-BUF to establish zero-copy.
3. For the time being B displays the animation on screen but in a headless kselftest it would do frame comparison.

I'm not actually sure if I even use threads. It could also execute the steps in sequence I think. Neither sure if this ends up as a kselftest but it is very possible.

Probably makes sense to turn this into kselftest as minifb is the only outside dependency and that sequential approach gives means to do headless comparative testing...

E.g., it could be further refined to iterate through all supported formats and stuff like that.
0
0
0

Jarkko Sakkinen

@jani, Didn't DRM documentation have some nice way to embed and include documentation from source files?

In vcam, I will have at least documentation blocks for theory of operation and very like locking hierarchy (depending on complexity). It would be nice to have in Documentation/ something that includes those snippets.

Just looking for tips and too lazy for RTFM ATM :-)
1
0
1

Jarkko Sakkinen

For bare-metal kernel testing there is nothing as awesome as Raspberry Pi 400 :-)

Keyboard and GPIOs (for e.g. attaching TPM chip) make it optimal.
0
0
1

Jarkko Sakkinen

AI-based product guaranteed to exist at some point: memorial versions of people after they die.
1
0
0

Jarkko Sakkinen

my favorite GUI app for couple of years: foot :-)

it really nailed terminal for wayland, and please never make it cross-platform!
0
0
0

Jarkko Sakkinen

vcamera is probably a better name (vs. v4l2-vcam) and v4l2-core is wrong place for the driver so for RFC review I just place it straights under drivers/media. No reason to try to be smart here...
0
1
1

Jarkko Sakkinen

vcamera is probably a better name (vs. v4l2-vcam) and v4l2-core is wrong place for the driver so for RFC review I just place it straights under drivers/media. No reason to try to be smart here...
0
1
1

Jarkko Sakkinen

Edited 3 months ago
Let me present v4l2-vcam:

https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/log/?h=vcam

Vcam user driver is created by opening /dev/vcam and then issuing V4L2_VCAM_IOC_NEW. This will emit /dev/videoX for readers. Reader semantics enforces single reader limitation.

In addition:

1. Supports zero-copy operation for a shared capture and output buffer (enabled automatically when possible).
2. Uses DMA contig allocator automatically when possible (falls back to vmalloc).
3. VB2 framework used for the pipeline.

These all are BTW unresolved in the OOT driver, and should help with getting better picture and frame rates over what we can do outside of kernel.

The code will code about 777 rounds of cleanups and tweaks and then I'll send the RFC patch ;-)
1
2
1

Jarkko Sakkinen

v4l2-vcam represents a rare situation where I'm testing a patch with the host kernel (or finalizing).
1
1
0

Jarkko Sakkinen

lol, who would guessed: tony blair is in the executive board

... and trump just called brits who participated to Nato wars as "losers"

🇬🇧
0
0
1

Jarkko Sakkinen

Solid state batteries from Finland:

https://www.pcmag.com/news/donut-labs-solid-state-battery-powered-motorcycle-turned-heads-ces-2026

Svolt CEO has declared this as scam based on that "if China cannot deliver solid state, neither can anyone else" 🤷
0
0
1

Jarkko Sakkinen

This is a life-saver if you need a framebuffer and pixels: https://github.com/emoon/minifb

my favorite graphics library :-)
0
0
0

Jarkko Sakkinen

Edited 4 months ago
Not actually sure what would be correct location in the kernel tree for video loopback driver. It's ATM in v4l2-core which is probably where it should NOT be...
0
0
0

Jarkko Sakkinen

Edited 4 months ago
Fuck, it is hard to touch over year old kernel code and it looks ugly as hell but I finally moved my ass and started to decompose and compose video-loop's code. First goal is to get it behind file descriptor life-cycle, limit /dev/videoX only for readers and stream with VB2.

In OOT driver the single biggest glitch is to have a racy produce-consumer model based on device node. Many have asked me to revisit the thread that discussed it in LKML but I actually have not done it because I can immediately see what is wrong in big picture. It's that and also common issue for OOT driver i.e., they tend to become "wish baskets of features" where nothing is ever removed and things are piled up inconsistently.

It would totally worthless to spend time on reading comments on a design that I don't believe in and could distract on being productive ;-) And I can stand any shit storm, it's a professional skill really and like any other day at the office so fuck with that...

I hope I get something running tonight :-)
1
0
0
Show older