요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=============================
Frame Buffer device internals
=============================
This is a first start for some documentation about frame buffer device
internals.
Authors:
- Geert Uytterhoeven <[email protected]>, 21 July 1998
- James Simmons <[email protected]>, Nov 26 2002
--------------------------------------------------------------------------------
Structures used by the frame buffer device API
==============================================
The following structures play a role in the game of frame buffer devices. They
are defined in <linux/fb.h>.
1. Outside the kernel (user space)
- struct fb_fix_screeninfo
Device independent unchangeable information about a frame buffer device and
a specific video mode. This can be obtained using the FBIOGET_FSCREENINFO
ioctl.
- struct fb_var_screeninfo
Device independent changeable information about a frame buffer device and a
specific video mode. This can be obtained using the FBIOGET_VSCREENINFO
ioctl, and updated with the FBIOPUT_VSCREENINFO ioctl. If you want to pan
the screen only, you can use the FBIOPAN_DISPLAY ioctl.
- struct fb_cmap
Device independent colormap information. You can get and set the colormap
using the FBIOGETCMAP and FBIOPUTCMAP ioctls.
2. Inside the kernel
- struct fb_info
Generic information, API and low level information about a specific frame
buffer device instance (slot number, board address, ...).
- struct `par`
Device dependent information that uniquely defines the video mode for this
particular piece of hardware.
Visuals used by the frame buffer device API
===========================================
Monochrome (FB_VISUAL_MONO01 and FB_VISUAL_MONO10)
--------------------------------------------------
Each pixel is either black or white.
Pseudo color (FB_VISUAL_PSEUDOCOLOR and FB_VISUAL_STATIC_PSEUDOCOLOR)
---------------------------------------------------------------------
The whole pixel value is fed through a programmable lookup table that has one
color (including red, green, and blue intensities) for each possible pixel
value, and that color is displayed.
True color (FB_VISUAL_TRUECOLOR)
--------------------------------
The pixel value is broken up into red, green, and blue fields.
Direct color (FB_VISUAL_DIRECTCOLOR)
------------------------------------
The pixel value is broken up into red, green, and blue fields, each of which
are looked up in separate red, green, and blue lookup tables.
Grayscale displays
------------------
Grayscale and static grayscale are special variants of pseudo color and static
pseudo color, where the red, green and blue components are always equal to
each other.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
프레임 버퍼 내부 문서와 API 구조체
1-20이 문서는 프레임 버퍼 장치 내부 구조를 설명하기 위한 첫 출발점입니다. Geert Uytterhoeven이 1998년 7월 21일, James Simmons가 2002년 11월 26일에 작성했습니다.
프레임 버퍼 장치 API에서 사용하는 구조체는 `<linux/fb.h>`에 정의됩니다. 다음 절은 user space에서 보이는 구조체와 kernel 내부 구조체를 구분합니다.
공통 헤더가 사용자 API와 커널 내부 정보를 함께 정의합니다.
=============================
Frame Buffer device internals
=============================
This is a first start for some documentation about frame buffer device
internals.
Authors:
- Geert Uytterhoeven <[email protected]>, 21 July 1998
- James Simmons <[email protected]>, Nov 26 2002
--------------------------------------------------------------------------------
Structures used by the frame buffer device API
==============================================
The following structures play a role in the game of frame buffer devices. They
are defined in <linux/fb.h>.
사용자 공간과 커널 내부 구조체
21-54`struct fb_fix_screeninfo`는 특정 프레임 버퍼 장치와 비디오 모드의 장치 독립적이고 변경할 수 없는 정보를 담습니다. `FBIOGET_FSCREENINFO` ioctl로 얻습니다.
`struct fb_var_screeninfo`는 장치 독립적이지만 변경 가능한 비디오 모드 정보를 담습니다. `FBIOGET_VSCREENINFO`로 읽고 `FBIOPUT_VSCREENINFO`로 갱신하며, 화면 pan만 필요하면 `FBIOPAN_DISPLAY`를 사용합니다.
`struct fb_cmap`은 장치 독립적인 color map 정보이며 `FBIOGETCMAP`과 `FBIOPUTCMAP` ioctl로 읽고 설정합니다.
커널 내부의 `struct fb_info`는 특정 프레임 버퍼 인스턴스의 일반 정보, API와 slot 번호·board address 같은 저수준 정보를 보관합니다. `struct par`는 특정 하드웨어의 비디오 모드를 고유하게 정의하는 장치 종속 정보입니다.
1. Outside the kernel (user space)
- struct fb_fix_screeninfo
Device independent unchangeable information about a frame buffer device and
a specific video mode. This can be obtained using the FBIOGET_FSCREENINFO
ioctl.
- struct fb_var_screeninfo
Device independent changeable information about a frame buffer device and a
specific video mode. This can be obtained using the FBIOGET_VSCREENINFO
ioctl, and updated with the FBIOPUT_VSCREENINFO ioctl. If you want to pan
the screen only, you can use the FBIOPAN_DISPLAY ioctl.
- struct fb_cmap
Device independent colormap information. You can get and set the colormap
using the FBIOGETCMAP and FBIOPUTCMAP ioctls.
2. Inside the kernel
- struct fb_info
Generic information, API and low level information about a specific frame
buffer device instance (slot number, board address, ...).
- struct `par`
Device dependent information that uniquely defines the video mode for this
particular piece of hardware.
프레임 버퍼 visual 형식
55-86`FB_VISUAL_MONO01`과 `FB_VISUAL_MONO10`은 각 픽셀이 검정 또는 흰색인 monochrome 형식입니다.
`FB_VISUAL_PSEUDOCOLOR`와 `FB_VISUAL_STATIC_PSEUDOCOLOR`에서는 전체 픽셀 값이 programmable lookup table의 인덱스가 됩니다. 가능한 각 픽셀 값에 빨강·초록·파랑 강도를 포함한 하나의 색이 대응합니다.
`FB_VISUAL_TRUECOLOR`는 픽셀 값을 빨강, 초록, 파랑 field로 직접 나눕니다. `FB_VISUAL_DIRECTCOLOR`도 RGB field로 나누지만 각 field를 별도의 red, green, blue lookup table에서 조회합니다.
grayscale과 static grayscale은 pseudo color와 static pseudo color의 특수한 변형이며 빨강, 초록, 파랑 성분이 항상 서로 같습니다.
Visuals used by the frame buffer device API
===========================================
Monochrome (FB_VISUAL_MONO01 and FB_VISUAL_MONO10)
--------------------------------------------------
Each pixel is either black or white.
Pseudo color (FB_VISUAL_PSEUDOCOLOR and FB_VISUAL_STATIC_PSEUDOCOLOR)
---------------------------------------------------------------------
The whole pixel value is fed through a programmable lookup table that has one
color (including red, green, and blue intensities) for each possible pixel
value, and that color is displayed.
True color (FB_VISUAL_TRUECOLOR)
--------------------------------
The pixel value is broken up into red, green, and blue fields.
Direct color (FB_VISUAL_DIRECTCOLOR)
------------------------------------
The pixel value is broken up into red, green, and blue fields, each of which
are looked up in separate red, green, and blue lookup tables.
Grayscale displays
------------------
Grayscale and static grayscale are special variants of pseudo color and static
pseudo color, where the red, green and blue components are always equal to
each other.
요약·해설
internals.rst:1-86fbdev 내부 문서는 사용자 ioctl 구조체와 커널 인스턴스 구조체를 구분하고 monochrome, pseudocolor, truecolor, directcolor, grayscale의 픽셀 해석 차이를 설명합니다.
사용자 요청이 공통 구조체를 거쳐 장치별 상태에 연결됩니다.