Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are they same thing: Linux's framebuffer and GPU's memory

From my understanding they are different. Linux framebuffer is a software object and GPU's memory is a physical memory mapped to GPU device.

My questions are the following:

1) Is my understanding correct?

2) If so, somehow merging two things into one looks like possible to improve the performance (I guess there are much more technical details why this is not possible and so on...)

3) If not, could you explain how Linux framebuffer and GPU work together?

like image 867
jaeyong Avatar asked Oct 20 '22 11:10

jaeyong


1 Answers

Linux framebuffer device is a virtual device that wraps data it receives to display. So generally answer is no - it is not GPU memory. In theory driver can map GPU memory into fbdev, but it is unlikely anyone doing this. Main problem is that there may be many virtual consoles, but e.g. only one monitor - fbdev must handle this. Other thing is that GPU memory only quite recently became virtualised (directly accessible), on older GPUs you can't just write into GPU memory anything you like.

Aside from that, fbdev provides unified interface, while direct access to GPU memory will require hardware-specific data formats. When there is a difference between formats, fbdev driver performs conversion.

As for performance - it is already very good. There is probably not much benefit to raise it even further.

like image 180
keltar Avatar answered Oct 29 '22 21:10

keltar