logoalt Hacker News

codedokodeyesterday at 10:05 PM1 replyview on HN

As I remember, generic DRM interface allows only writing to a framebuffer and not reading from someone's else framebuffer. Do they use some vendor-specific APIs?


Replies

jchwtoday at 10:01 AM

Not that I'm aware of. I'm on my phone right now but any KMS driver that supports KMS and dma-bufs should work.

The basic idea is to enumerate the CRTCs to get the relevant framebuffer plane resources and then use dma-buf exports to pass them to an encoder. Reality can be a bit more complex due to the existence of overlay planes but that's the idea.

https://github.com/LizardByte/Sunshine/blob/master/src/platf...