linux framebuffer驱动是视频卡驱动吗?

时间:2023-02-07 20:03:21

I have little background on how these hardware actually works, but now I'm required to learn how to write a Linux frame buffer driver for Android devices.

我没有关于这些硬件是如何工作的背景知识,但是现在我需要学习如何为Android设备编写一个Linux框架缓冲区驱动程序。

I'm confused by Linux graphics stack. From what I understand, on a desktop computer the compositing window manager interacts with DRM, which then sends data to specific video card driver. On the other hand there are some kind of controllers retrieving data from GPU's memory through DMA and send it to the monitor, as suggested by the answer here . Also by diagram at page 29 of this book, I figured that a frame buffer driver is on top of actual graphic devices, so it must need to interact with specific video card driver, for example, an nVidia driver.

我被Linux图形堆栈搞糊涂了。据我所知,在台式计算机上,合成窗口管理器与DRM交互,然后DRM将数据发送到特定的显卡驱动程序。另一方面,有一些控制器通过DMA方式从GPU的内存中检索数据并将其发送给监视器,如这里的答案所示。同样,在本书第29页的图表中,我发现一个帧缓冲驱动程序位于实际的图形设备之上,因此它必须与特定的视频卡驱动程序交互,例如nVidia驱动程序。

But when I google writing a frame buffer driver for an embedded device, the results show that as if the driver is directly responsible for contacting with the LCD, so it looks like it's even below a video card driver.

但是当我为一个嵌入式设备编写一个帧缓冲驱动程序时,结果表明,如果驱动程序直接负责与LCD进行联系,那么它看起来甚至比显卡驱动程序还要低。

So is a frame buffer driver actually a video card driver?

那么帧缓冲驱动程序实际上是视频卡驱动程序吗?

1 个解决方案

#1


2  

A framebuffer driver provides an interface for

framebuffer驱动程序提供了一个接口。

  1. Modesetting
  2. Modesetting
  3. Memory access to the video buffer
  4. 对视频缓冲区的内存访问
  5. Basic 2D acceleration operations (e.g. for scrolling)
  6. 基本的2D加速操作(例如滚动)

To provide this interface, the framebuffer driver generally talks to the hardware directly.

要提供这个接口,framebuffer驱动程序通常直接与硬件进行对话。

For example, the vesafb framebuffer driver will use the VESA standard interface to talk to the video hardware. However, this standard is limited, so there isn't really much hardware acceleration going on and drawing is slow. Another example is the intelfb framebuffer driver. It talks to some intel hardware using a proprietary interface, that exposes more acceleration facilities, so it is faster.

例如,vesafb framebuffer驱动程序将使用VESA标准接口与视频硬件对话。但是,这个标准是有限的,所以并没有太多的硬件加速,绘制速度也很慢。另一个例子是intelfb framebuffer驱动程序。它使用一个专有接口与一些英特尔硬件进行对话,该接口暴露了更多的加速设备,因此速度更快。

Nowadays, KMS drivers are used instead for most hardware. They do both expose a framebuffer and also access to other GPU functionality, e.g. OpenGL, through DRM.

现在,大多数硬件都使用KMS驱动程序。它们既公开一个framebuffer,也通过DRM访问其他GPU功能,例如OpenGL。

Your confusion seems to arise from the fact, that the framebuffer driver and the X11 GPU driver are in fact competing! This is why, if you have a KMS system, the switch between graphical and text consoles is instant, however, with a non-KMS system, it is slow, as both the fb driver and the X11 driver need to re-initialize the video hardware on console switch.

您的困惑似乎源于这样一个事实,即framebuffer驱动程序和X11 GPU驱动程序实际上是相互竞争的!这就是为什么,如果你有一个KMS系统,图形和文本控制台之间的切换是即时的,然而,对于非KMS系统,它是缓慢的,因为fb驱动程序和X11驱动程序都需要重新初始化控制台交换机上的视频硬件。

Find more information in the comprehensive talk Linux Graphics Demystified by Martin Fiedler: http://keyj.emphy.de/files/linuxgraphics_en.pdf

在Martin Fiedler的综合谈话Linux图形解构中可以找到更多信息:http://keyj.emphy.de/files/linuxgraphics_en.pdf

#1


2  

A framebuffer driver provides an interface for

framebuffer驱动程序提供了一个接口。

  1. Modesetting
  2. Modesetting
  3. Memory access to the video buffer
  4. 对视频缓冲区的内存访问
  5. Basic 2D acceleration operations (e.g. for scrolling)
  6. 基本的2D加速操作(例如滚动)

To provide this interface, the framebuffer driver generally talks to the hardware directly.

要提供这个接口,framebuffer驱动程序通常直接与硬件进行对话。

For example, the vesafb framebuffer driver will use the VESA standard interface to talk to the video hardware. However, this standard is limited, so there isn't really much hardware acceleration going on and drawing is slow. Another example is the intelfb framebuffer driver. It talks to some intel hardware using a proprietary interface, that exposes more acceleration facilities, so it is faster.

例如,vesafb framebuffer驱动程序将使用VESA标准接口与视频硬件对话。但是,这个标准是有限的,所以并没有太多的硬件加速,绘制速度也很慢。另一个例子是intelfb framebuffer驱动程序。它使用一个专有接口与一些英特尔硬件进行对话,该接口暴露了更多的加速设备,因此速度更快。

Nowadays, KMS drivers are used instead for most hardware. They do both expose a framebuffer and also access to other GPU functionality, e.g. OpenGL, through DRM.

现在,大多数硬件都使用KMS驱动程序。它们既公开一个framebuffer,也通过DRM访问其他GPU功能,例如OpenGL。

Your confusion seems to arise from the fact, that the framebuffer driver and the X11 GPU driver are in fact competing! This is why, if you have a KMS system, the switch between graphical and text consoles is instant, however, with a non-KMS system, it is slow, as both the fb driver and the X11 driver need to re-initialize the video hardware on console switch.

您的困惑似乎源于这样一个事实,即framebuffer驱动程序和X11 GPU驱动程序实际上是相互竞争的!这就是为什么,如果你有一个KMS系统,图形和文本控制台之间的切换是即时的,然而,对于非KMS系统,它是缓慢的,因为fb驱动程序和X11驱动程序都需要重新初始化控制台交换机上的视频硬件。

Find more information in the comprehensive talk Linux Graphics Demystified by Martin Fiedler: http://keyj.emphy.de/files/linuxgraphics_en.pdf

在Martin Fiedler的综合谈话Linux图形解构中可以找到更多信息:http://keyj.emphy.de/files/linuxgraphics_en.pdf