In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Introduction 1
1.1 History of Plane 1
1.2 function 1 of Plane
1.3 Type 1 of Plane
1.4 Test case 2 for Plane
1. Brief introduction
In DRM (Direct Rendering Manager), you learned the usage of drmModePageFlip and drmModeSetCrtc. But these two interfaces can only display the contents of Framebuffer in full screen, so how can you display only part of framebuffer on the screen? This article will introduce another important drawing interface of DRM: drmModeSetPlane.
First of all, let's find out what Plane is. Briefly describe the concept of Plane, that is, the hardware layer. Take a closer look at the concept of Plane, that is, Plane in DRM and Plane in our common YUV/YCbCr graphics format are two completely different concepts. Plane in YUV graphic format refers to the arrangement of image data in memory. Generally, Y channel occupies one continuous memory block, and UV channel occupies another continuous memory block, which is called YUV-2Plane (also called YUV 2 plane), which belongs to the software level. Plane in DRM refers to a single hardware layer module used for multi-layer synthesis in Display Controller, which belongs to the hardware level. Don't confuse the two conceptually.
History of 1.1Plane
With the continuous update of software technology, the performance requirements of hardware are getting higher and higher. Under the premise of meeting the normal use of functions, the requirements for power consumption are becoming more and more stringent. Originally, GPU can handle all graphics tasks, but because of its high power consumption, designers decided to leave some simple tasks to Display Controller (such as synthesis), and let GPU focus on the main task of drawing (that is, rendering) to reduce the burden of GPU, so as to achieve the purpose of reducing power consumption and improving performance. As a result, Plane (hardware layer Unit) was born.
The function of 1.2Plane
Plane is the link between FB and CRTC and is the porter of memory.
The parameter meaning of Plane:
When SRC_X/Y and CRTC_X/Y are not equal, the translation effect is achieved.
When SRC_W/H and CRTC_W/H are not equal, the scaling effect is achieved.
When SRC_W/H and FB_W/H are not equal, the effect of clipping is achieved.
The simple code shown in figure 2.1
Figure 2.1 Code implementation of Plane
Type of 1.3Plane
In the DRM framework, Plane is divided into the following three types: Cursor (cursor layer, generally used for PC system, used to display the mouse), Overlay (overlay layer, usually used for video layer in YUV format), and Primary (main layer, usually used for simple layers that only support RGB format). It is important to note that not all Display Controller supports Plane, and as you can see from the drmModeSetCrtc function in the previous Single-Buffer case, the screen will display normally even without plane_id. For example, ARM9 SoC such as s3c2440, its LCDC does not have the concept of Plane. But the DRM framework stipulates that any CRTC must have a Primary Plane. Even if S3C2440 is a Display Controller without real Plane hardware, you need to think that its Primary Plane is LCDC itself, because it implements data handling from Framebuffer to CRTC, which is the most basic function of a Plane.
Test cases for 1.4Plane
In the Google Android project, the external/libdrm/tests/planetest/planetest.c file, for demonstration convenience, only implements the simplest call to drmModeSetPlane (). It is important to note that before this function is called, the entire display link must be initialized through drmModeSetCrtc (), otherwise the Plane setting will not be valid. After the program runs, the screen displays full screen white; when entering enter, the screen will display the rectangle of (100150) in FrameBuffer to the position of (50 ~ 50) on the screen; after entering enter again, the program exits.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.