Documentation/driver-api/frame-buffer.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

Frame Buffer Library

fbdev의 핵심 screeninfo structure와 memory·colormap·mode database API를 설명합니다.

Source pathDocumentation/driver-api/frame-buffer.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

frame-buffer.rst:1-62

Frame Buffer Library는 kernel 전용 `fb_info`와 userspace에 노출 가능한 mode structure를 중심으로 구성됩니다. 뒤쪽 kernel-doc 지시문은 fbmem, colormap, 일반·Macintosh mode database API를 연결합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 Frame Buffer Library
2 ====================
3
4 The frame buffer drivers depend heavily on four data structures. These
5 structures are declared in include/linux/fb.h. They are fb_info,
6 fb_var_screeninfo, fb_fix_screeninfo and fb_monospecs. The last
7 three can be made available to and from userland.
8
9 fb_info defines the current state of a particular video card. Inside
10 fb_info, there exists a fb_ops structure which is a collection of
11 needed functions to make fbdev and fbcon work. fb_info is only visible
12 to the kernel.
13
14 fb_var_screeninfo is used to describe the features of a video card
15 that are user defined. With fb_var_screeninfo, things such as depth
16 and the resolution may be defined.
17
18 The next structure is fb_fix_screeninfo. This defines the properties
19 of a card that are created when a mode is set and can't be changed
20 otherwise. A good example of this is the start of the frame buffer
21 memory. This "locks" the address of the frame buffer memory, so that it
22 cannot be changed or moved.
23
24 The last structure is fb_monospecs. In the old API, there was little
25 importance for fb_monospecs. This allowed for forbidden things such as
26 setting a mode of 800x600 on a fix frequency monitor. With the new API,
27 fb_monospecs prevents such things, and if used correctly, can prevent a
28 monitor from being cooked. fb_monospecs will not be useful until
29 kernels 2.5.x.
30
31 Frame Buffer Memory
32 -------------------
33
34 .. kernel-doc:: drivers/video/fbdev/core/fbmem.c
35 :export:
36
37 Frame Buffer Colormap
38 ---------------------
39
40 .. kernel-doc:: drivers/video/fbdev/core/fbcmap.c
41 :export:
42
43 Frame Buffer Video Mode Database
44 --------------------------------
45
46 .. kernel-doc:: drivers/video/fbdev/core/modedb.c
47 :internal:
48
49 .. kernel-doc:: drivers/video/fbdev/core/modedb.c
50 :export:
51
52 Frame Buffer Macintosh Video Mode Database
53 ------------------------------------------
54
55 .. kernel-doc:: drivers/video/fbdev/macmodes.c
56 :export:
57
58 Frame Buffer Fonts
59 ------------------
60
61 Refer to the file lib/fonts/fonts.c for more information.
62
63

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Frame buffer 핵심 data structure

1-30

문서 제목은 `Frame Buffer Library`입니다.

Frame buffer driver는 `include/linux/fb.h`에 선언된 네 data structure, 즉 `fb_info`, `fb_var_screeninfo`, `fb_fix_screeninfo`, `fb_monospecs`에 크게 의존합니다. 마지막 세 structure는 userland와 주고받을 수 있습니다.

`fb_info`는 특정 video card의 현재 상태를 정의합니다. 내부의 `fb_ops`는 `fbdev`와 `fbcon`을 동작시키는 데 필요한 function 집합이며, `fb_info` 자체는 kernel에서만 볼 수 있습니다.

`fb_var_screeninfo`는 depth와 resolution처럼 사용자가 정의할 수 있는 video card 기능을 설명합니다.

`fb_fix_screeninfo`는 mode를 설정할 때 만들어지고 그 밖에는 바꿀 수 없는 card 속성을 정의합니다. 대표적으로 frame buffer memory의 시작 주소가 있으며, 이 주소를 고정해 변경되거나 이동하지 못하게 합니다.

마지막 `fb_monospecs`는 구 API에서는 중요도가 낮아 fixed-frequency monitor에 800x600 같은 금지된 mode를 설정할 수 있었습니다. 새 API에서는 이를 막아 올바르게 사용할 경우 monitor 손상을 방지합니다. 원문 기준으로 `fb_monospecs`는 kernel 2.5.x부터 유용해집니다.

Frame buffer data structure 역할
Structure역할Userspace 교환
fb_infoVideo card 현재 상태와 fb_ops아니요
fb_var_screeninfoDepth·resolution 등 가변 mode
fb_fix_screeninfoMode 설정 후 고정되는 속성
fb_monospecsMonitor가 허용하는 mode 제약

Kernel 전용 상태와 userspace 교환 가능 정보를 구분합니다.

Frame Buffer Memory

31-36

Frame Buffer Memory API 문서는 `drivers/video/fbdev/core/fbmem.c`에서 export된 항목을 가져옵니다.

.. kernel-doc:: drivers/video/fbdev/core/fbmem.c
   :export:

Frame Buffer Colormap

37-42

Frame Buffer Colormap API 문서는 `drivers/video/fbdev/core/fbcmap.c`에서 export된 항목을 가져옵니다.

.. kernel-doc:: drivers/video/fbdev/core/fbcmap.c
   :export:

Frame Buffer video mode database

43-57

일반 video mode database의 internal·export API 문서는 `drivers/video/fbdev/core/modedb.c`에서 가져옵니다.

.. kernel-doc:: drivers/video/fbdev/core/modedb.c
   :internal:
.. kernel-doc:: drivers/video/fbdev/core/modedb.c
   :export:

Macintosh video mode database의 export API 문서는 `drivers/video/fbdev/macmodes.c`에서 가져옵니다.

.. kernel-doc:: drivers/video/fbdev/macmodes.c
   :export:

Frame Buffer Fonts

58-62

Frame buffer font에 관한 자세한 내용은 source path `lib/fonts/fonts.c`를 참조합니다.