Documentation/fb/viafb.rst GitHub 원문 ↗

Linux 6.18.37 · Frame Buffer

VIA Integration Graphic Chip Console Framebuffer Driver

VIA UniChrome 출력·SAMM·fbset·proc IGA routing의 전문 번역입니다.

Source pathDocumentation/fb/viafb.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

viafb.rst:1-297

`viafb`는 VIA UniChrome 계열의 CRT/LCD/DVI 출력, 2D 가속과 SAMM을 지원하며 모듈 옵션·fbset·`/proc/viafb`를 통해 mode와 IGA routing을 제어합니다.

viafb 제어 계층
module/boot optionprimary·secondary mode와 SAMM`fbset` mode/depth`/proc/viafb/iga*/output_devices`IGA1/IGA2에서 CRT/LCD/DVI 라우팅

부팅 옵션부터 실행 중 output routing까지 여러 경로가 같은 표시 장치를 제어합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 =======================================================
2 VIA Integration Graphic Chip Console Framebuffer Driver
3 =======================================================
4
5 Platform
6 --------
7 The console framebuffer driver is for graphics chips of
8 VIA UniChrome Family
9 (CLE266, PM800 / CN400 / CN300,
10 P4M800CE / P4M800Pro / CN700 / VN800,
11 CX700 / VX700, K8M890, P4M890,
12 CN896 / P4M900, VX800, VX855)
13
14 Driver features
15 ---------------
16 Device: CRT, LCD, DVI
17
18 Support viafb_mode::
19
20 CRT:
21 640x480(60, 75, 85, 100, 120 Hz), 720x480(60 Hz),
22 720x576(60 Hz), 800x600(60, 75, 85, 100, 120 Hz),
23 848x480(60 Hz), 856x480(60 Hz), 1024x512(60 Hz),
24 1024x768(60, 75, 85, 100 Hz), 1152x864(75 Hz),
25 1280x768(60 Hz), 1280x960(60 Hz), 1280x1024(60, 75, 85 Hz),
26 1440x1050(60 Hz), 1600x1200(60, 75 Hz), 1280x720(60 Hz),
27 1920x1080(60 Hz), 1400x1050(60 Hz), 800x480(60 Hz)
28
29 color depth: 8 bpp, 16 bpp, 32 bpp supports.
30
31 Support 2D hardware accelerator.
32
33 Using the viafb module
34 ----------------------
35 Start viafb with default settings::
36
37 #modprobe viafb
38
39 Start viafb with user options::
40
41 #modprobe viafb viafb_mode=800x600 viafb_bpp=16 viafb_refresh=60
42 viafb_active_dev=CRT+DVI viafb_dvi_port=DVP1
43 viafb_mode1=1024x768 viafb_bpp=16 viafb_refresh1=60
44 viafb_SAMM_ON=1
45
46 viafb_mode:
47 - 640x480 (default)
48 - 720x480
49 - 800x600
50 - 1024x768
51
52 viafb_bpp:
53 - 8, 16, 32 (default:32)
54
55 viafb_refresh:
56 - 60, 75, 85, 100, 120 (default:60)
57
58 viafb_lcd_dsp_method:
59 - 0 : expansion (default)
60 - 1 : centering
61
62 viafb_lcd_mode:
63 0 : LCD panel with LSB data format input (default)
64 1 : LCD panel with MSB data format input
65
66 viafb_lcd_panel_id:
67 - 0 : Resolution: 640x480, Channel: single, Dithering: Enable
68 - 1 : Resolution: 800x600, Channel: single, Dithering: Enable
69 - 2 : Resolution: 1024x768, Channel: single, Dithering: Enable (default)
70 - 3 : Resolution: 1280x768, Channel: single, Dithering: Enable
71 - 4 : Resolution: 1280x1024, Channel: dual, Dithering: Enable
72 - 5 : Resolution: 1400x1050, Channel: dual, Dithering: Enable
73 - 6 : Resolution: 1600x1200, Channel: dual, Dithering: Enable
74
75 - 8 : Resolution: 800x480, Channel: single, Dithering: Enable
76 - 9 : Resolution: 1024x768, Channel: dual, Dithering: Enable
77 - 10: Resolution: 1024x768, Channel: single, Dithering: Disable
78 - 11: Resolution: 1024x768, Channel: dual, Dithering: Disable
79 - 12: Resolution: 1280x768, Channel: single, Dithering: Disable
80 - 13: Resolution: 1280x1024, Channel: dual, Dithering: Disable
81 - 14: Resolution: 1400x1050, Channel: dual, Dithering: Disable
82 - 15: Resolution: 1600x1200, Channel: dual, Dithering: Disable
83 - 16: Resolution: 1366x768, Channel: single, Dithering: Disable
84 - 17: Resolution: 1024x600, Channel: single, Dithering: Enable
85 - 18: Resolution: 1280x768, Channel: dual, Dithering: Enable
86 - 19: Resolution: 1280x800, Channel: single, Dithering: Enable
87
88 viafb_accel:
89 - 0 : No 2D Hardware Acceleration
90 - 1 : 2D Hardware Acceleration (default)
91
92 viafb_SAMM_ON:
93 - 0 : viafb_SAMM_ON disable (default)
94 - 1 : viafb_SAMM_ON enable
95
96 viafb_mode1: (secondary display device)
97 - 640x480 (default)
98 - 720x480
99 - 800x600
100 - 1024x768
101
102 viafb_bpp1: (secondary display device)
103 - 8, 16, 32 (default:32)
104
105 viafb_refresh1: (secondary display device)
106 - 60, 75, 85, 100, 120 (default:60)
107
108 viafb_active_dev:
109 This option is used to specify active devices.(CRT, DVI, CRT+LCD...)
110 DVI stands for DVI or HDMI, E.g., If you want to enable HDMI,
111 set viafb_active_dev=DVI. In SAMM case, the previous of
112 viafb_active_dev is primary device, and the following is
113 secondary device.
114
115 For example:
116
117 To enable one device, such as DVI only, we can use::
118
119 modprobe viafb viafb_active_dev=DVI
120
121 To enable two devices, such as CRT+DVI::
122
123 modprobe viafb viafb_active_dev=CRT+DVI;
124
125 For DuoView case, we can use::
126
127 modprobe viafb viafb_active_dev=CRT+DVI
128
129 OR::
130
131 modprobe viafb viafb_active_dev=DVI+CRT...
132
133 For SAMM case:
134
135 If CRT is primary and DVI is secondary, we should use::
136
137 modprobe viafb viafb_active_dev=CRT+DVI viafb_SAMM_ON=1...
138
139 If DVI is primary and CRT is secondary, we should use::
140
141 modprobe viafb viafb_active_dev=DVI+CRT viafb_SAMM_ON=1...
142
143 viafb_display_hardware_layout:
144 This option is used to specify display hardware layout for CX700 chip.
145
146 - 1 : LCD only
147 - 2 : DVI only
148 - 3 : LCD+DVI (default)
149 - 4 : LCD1+LCD2 (internal + internal)
150 - 16: LCD1+ExternalLCD2 (internal + external)
151
152 viafb_second_size:
153 This option is used to set second device memory size(MB) in SAMM case.
154 The minimal size is 16.
155
156 viafb_platform_epia_dvi:
157 This option is used to enable DVI on EPIA - M
158
159 - 0 : No DVI on EPIA - M (default)
160 - 1 : DVI on EPIA - M
161
162 viafb_bus_width:
163 When using 24 - Bit Bus Width Digital Interface,
164 this option should be set.
165
166 - 12: 12-Bit LVDS or 12-Bit TMDS (default)
167 - 24: 24-Bit LVDS or 24-Bit TMDS
168
169 viafb_device_lcd_dualedge:
170 When using Dual Edge Panel, this option should be set.
171
172 - 0 : No Dual Edge Panel (default)
173 - 1 : Dual Edge Panel
174
175 viafb_lcd_port:
176 This option is used to specify LCD output port,
177 available values are "DVP0" "DVP1" "DFP_HIGHLOW" "DFP_HIGH" "DFP_LOW".
178
179 for external LCD + external DVI on CX700(External LCD is on DVP0),
180 we should use::
181
182 modprobe viafb viafb_lcd_port=DVP0...
183
184 Notes:
185 1. CRT may not display properly for DuoView CRT & DVI display at
186 the "640x480" PAL mode with DVI overscan enabled.
187 2. SAMM stands for single adapter multi monitors. It is different from
188 multi-head since SAMM support multi monitor at driver layers, thus fbcon
189 layer doesn't even know about it; SAMM's second screen doesn't have a
190 device node file, thus a user mode application can't access it directly.
191 When SAMM is enabled, viafb_mode and viafb_mode1, viafb_bpp and
192 viafb_bpp1, viafb_refresh and viafb_refresh1 can be different.
193 3. When console is depending on viafbinfo1, dynamically change resolution
194 and bpp, need to call VIAFB specified ioctl interface VIAFB_SET_DEVICE
195 instead of calling common ioctl function FBIOPUT_VSCREENINFO since
196 viafb doesn't support multi-head well, or it will cause screen crush.
197
198
199 Configure viafb with "fbset" tool
200 ---------------------------------
201
202 "fbset" is an inbox utility of Linux.
203
204 1. Inquire current viafb information, type::
205
206 # fbset -i
207
208 2. Set various resolutions and viafb_refresh rates::
209
210 # fbset <resolution-vertical_sync>
211
212 example::
213
214 # fbset "1024x768-75"
215
216 or::
217
218 # fbset -g 1024 768 1024 768 32
219
220 Check the file "/etc/fb.modes" to find display modes available.
221
222 3. Set the color depth::
223
224 # fbset -depth <value>
225
226 example::
227
228 # fbset -depth 16
229
230
231 Configure viafb via /proc
232 -------------------------
233 The following files exist in /proc/viafb
234
235 supported_output_devices
236 This read-only file contains a full ',' separated list containing all
237 output devices that could be available on your platform. It is likely
238 that not all of those have a connector on your hardware but it should
239 provide a good starting point to figure out which of those names match
240 a real connector.
241
242 Example::
243
244 # cat /proc/viafb/supported_output_devices
245
246 iga1/output_devices, iga2/output_devices
247 These two files are readable and writable. iga1 and iga2 are the two
248 independent units that produce the screen image. Those images can be
249 forwarded to one or more output devices. Reading those files is a way
250 to query which output devices are currently used by an iga.
251
252 Example::
253
254 # cat /proc/viafb/iga1/output_devices
255
256 If there are no output devices printed the output of this iga is lost.
257 This can happen for example if only one (the other) iga is used.
258 Writing to these files allows adjusting the output devices during
259 runtime. One can add new devices, remove existing ones or switch
260 between igas. Essentially you can write a ',' separated list of device
261 names (or a single one) in the same format as the output to those
262 files. You can add a '+' or '-' as a prefix allowing simple addition
263 and removal of devices. So a prefix '+' adds the devices from your list
264 to the already existing ones, '-' removes the listed devices from the
265 existing ones and if no prefix is given it replaces all existing ones
266 with the listed ones. If you remove devices they are expected to turn
267 off. If you add devices that are already part of the other iga they are
268 removed there and added to the new one.
269
270 Examples:
271
272 Add CRT as output device to iga1::
273
274 # echo +CRT > /proc/viafb/iga1/output_devices
275
276 Remove (turn off) DVP1 and LVDS1 as output devices of iga2::
277
278 # echo -DVP1,LVDS1 > /proc/viafb/iga2/output_devices
279
280 Replace all iga1 output devices by CRT::
281
282 # echo CRT > /proc/viafb/iga1/output_devices
283
284
285 Bootup with viafb
286 -----------------
287
288 Add the following line to your grub.conf::
289
290 append = "video=viafb:viafb_mode=1024x768,viafb_bpp=32,viafb_refresh=85"
291
292
293 VIA Framebuffer modes
294 =====================
295
296 .. include:: viafb.modes
297 :literal:
298

3. 한국어 전문 번역

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

UniChrome 플랫폼과 표시 기능

1-32

이 console framebuffer 드라이버는 VIA UniChrome 계열 그래픽 칩용입니다. 지원 칩은 CLE266, PM800/CN400/CN300, P4M800CE/P4M800Pro/CN700/VN800, CX700/VX700, K8M890, P4M890, CN896/P4M900, VX800, VX855입니다.

출력 장치는 CRT, LCD, DVI를 지원합니다. `viafb_mode`의 CRT mode는 640x480부터 1920x1080까지 다양한 해상도와 60~120 Hz 조합을 포함합니다. 구체적으로 640x480은 60/75/85/100/120 Hz, 800x600도 60/75/85/100/120 Hz, 1024x768은 60/75/85/100 Hz, 1280x1024는 60/75/85 Hz, 1600x1200은 60/75 Hz 등을 지원합니다.

색 깊이는 8, 16, 32 bpp이며 2D hardware accelerator를 지원합니다.

viafb 지원 개요
영역지원 내용
CLE266부터 VX855까지 VIA UniChrome 계열
출력CRT, LCD, DVI/HDMI
해상도640x480~1920x1080의 지정 mode 목록
색 깊이8/16/32 bpp
가속2D hardware acceleration

=======================================================
VIA Integration Graphic Chip Console Framebuffer Driver
=======================================================

Platform
--------
    The console framebuffer driver is for graphics chips of
    VIA UniChrome Family
    (CLE266, PM800 / CN400 / CN300,
    P4M800CE / P4M800Pro / CN700 / VN800,
    CX700 / VX700, K8M890, P4M890,
    CN896 / P4M900, VX800, VX855)

Driver features
---------------
    Device: CRT, LCD, DVI

    Support viafb_mode::

        CRT:
            640x480(60, 75, 85, 100, 120 Hz), 720x480(60 Hz),
            720x576(60 Hz), 800x600(60, 75, 85, 100, 120 Hz),
            848x480(60 Hz), 856x480(60 Hz), 1024x512(60 Hz),
            1024x768(60, 75, 85, 100 Hz), 1152x864(75 Hz),
            1280x768(60 Hz), 1280x960(60 Hz), 1280x1024(60, 75, 85 Hz),
            1440x1050(60 Hz), 1600x1200(60, 75 Hz), 1280x720(60 Hz),
            1920x1080(60 Hz), 1400x1050(60 Hz), 800x480(60 Hz)

    color depth: 8 bpp, 16 bpp, 32 bpp supports.

    Support 2D hardware accelerator.

모듈 시작과 기본 표시 옵션

33-65

기본 설정으로 시작하려면 `modprobe viafb`를 실행합니다. 사용자 설정 예는 `viafb_mode=800x600`, `viafb_bpp=16`, `viafb_refresh=60`, `viafb_active_dev=CRT+DVI`, `viafb_dvi_port=DVP1`, 보조 mode `viafb_mode1=1024x768`, 보조 refresh `viafb_refresh1=60`, `viafb_SAMM_ON=1`을 전달합니다.

`viafb_mode`의 대표 선택값은 640x480(기본), 720x480, 800x600, 1024x768입니다. `viafb_bpp`는 8, 16, 32 중 하나이며 기본은 32입니다. `viafb_refresh`는 60, 75, 85, 100, 120 Hz이고 기본은 60입니다.

`viafb_lcd_dsp_method=0`은 expansion이며 기본값이고, 1은 centering입니다. `viafb_lcd_mode=0`은 LSB data format 입력 LCD panel로 기본값이며, 1은 MSB data format 입력입니다.

viafb 기본 옵션
옵션기본
`viafb_mode`640x480/720x480/800x600/1024x768640x480
`viafb_bpp`8/16/3232
`viafb_refresh`60/75/85/100/12060
`viafb_lcd_dsp_method`0 expansion / 1 centering0
`viafb_lcd_mode`0 LSB / 1 MSB0

Using the viafb module
----------------------
    Start viafb with default settings::

        #modprobe viafb

    Start viafb with user options::

        #modprobe viafb viafb_mode=800x600 viafb_bpp=16 viafb_refresh=60
                  viafb_active_dev=CRT+DVI viafb_dvi_port=DVP1
                  viafb_mode1=1024x768 viafb_bpp=16 viafb_refresh1=60
                  viafb_SAMM_ON=1

    viafb_mode:
        - 640x480 (default)
        - 720x480
        - 800x600
        - 1024x768

    viafb_bpp:
        - 8, 16, 32 (default:32)

    viafb_refresh:
        - 60, 75, 85, 100, 120 (default:60)

    viafb_lcd_dsp_method:
        - 0 : expansion (default)
        - 1 : centering

    viafb_lcd_mode:
        0 : LCD panel with LSB data format input (default)
        1 : LCD panel with MSB data format input

LCD panel ID와 보조 표시 설정

66-107

`viafb_lcd_panel_id`는 해상도, single/dual channel, dithering 조합을 번호로 선택합니다. ID 0은 640x480 single dithering, 1은 800x600 single dithering, 기본 2는 1024x768 single dithering입니다. 3~6은 1280x768 single, 1280x1024 dual, 1400x1050 dual, 1600x1200 dual이며 모두 dithering을 켭니다.

ID 8~19에는 800x480, 1024x768, 1280x768, 1280x1024, 1400x1050, 1600x1200, 1366x768, 1024x600, 1280x800 조합이 있으며 channel 수와 dithering on/off가 번호마다 정해집니다.

`viafb_accel=0`은 2D acceleration을 끄고 1은 켜며 기본값입니다. `viafb_SAMM_ON=0`은 SAMM을 끄는 기본값이고 1은 켭니다.

보조 display의 `viafb_mode1`은 640x480(기본), 720x480, 800x600, 1024x768이고 `viafb_bpp1`은 8/16/32(기본 32), `viafb_refresh1`은 60/75/85/100/120(기본 60)입니다.

viafb panel·보조 화면
설정내용
`viafb_lcd_panel_id`0~19의 resolution/channel/dithering 조합
기본 panel ID2 = 1024x768, single, dithering enabled
`viafb_accel`0 off / 1 on(기본)
`viafb_SAMM_ON`0 off(기본) / 1 on
`mode1/bpp1/refresh1`보조 display의 mode·색 깊이·주사율

viafb_lcd_panel_id:
    - 0 : Resolution: 640x480, Channel: single, Dithering: Enable
    - 1 : Resolution: 800x600, Channel: single, Dithering: Enable
    - 2 : Resolution: 1024x768, Channel: single, Dithering: Enable (default)
    - 3 : Resolution: 1280x768, Channel: single, Dithering: Enable
    - 4 : Resolution: 1280x1024, Channel: dual, Dithering: Enable
    - 5 : Resolution: 1400x1050, Channel: dual, Dithering: Enable
    - 6 : Resolution: 1600x1200, Channel: dual, Dithering: Enable

    - 8 : Resolution: 800x480, Channel: single, Dithering: Enable
    - 9 : Resolution: 1024x768, Channel: dual, Dithering: Enable
    - 10: Resolution: 1024x768, Channel: single, Dithering: Disable
    - 11: Resolution: 1024x768, Channel: dual, Dithering: Disable
    - 12: Resolution: 1280x768, Channel: single, Dithering: Disable
    - 13: Resolution: 1280x1024, Channel: dual, Dithering: Disable
    - 14: Resolution: 1400x1050, Channel: dual, Dithering: Disable
    - 15: Resolution: 1600x1200, Channel: dual, Dithering: Disable
    - 16: Resolution: 1366x768, Channel: single, Dithering: Disable
    - 17: Resolution: 1024x600, Channel: single, Dithering: Enable
    - 18: Resolution: 1280x768, Channel: dual, Dithering: Enable
    - 19: Resolution: 1280x800, Channel: single, Dithering: Enable

viafb_accel:
    - 0 : No 2D Hardware Acceleration
    - 1 : 2D Hardware Acceleration (default)

viafb_SAMM_ON:
    - 0 : viafb_SAMM_ON disable (default)
    - 1 : viafb_SAMM_ON enable

viafb_mode1: (secondary display device)
    - 640x480 (default)
    - 720x480
    - 800x600
    - 1024x768

viafb_bpp1: (secondary display device)
    - 8, 16, 32 (default:32)

viafb_refresh1: (secondary display device)
    - 60, 75, 85, 100, 120 (default:60)

active device와 DuoView·SAMM 순서

108-142

`viafb_active_dev`는 CRT, DVI, CRT+LCD 같은 활성 장치를 지정합니다. 여기서 DVI는 DVI 또는 HDMI를 뜻하므로 HDMI를 켜려면 `viafb_active_dev=DVI`로 설정합니다.

SAMM에서는 `viafb_active_dev`의 앞 장치가 primary, 뒤 장치가 secondary입니다. DVI 하나만 켤 때는 `modprobe viafb viafb_active_dev=DVI`, CRT+DVI 두 장치를 켤 때는 `modprobe viafb viafb_active_dev=CRT+DVI`를 사용합니다.

DuoView에서는 `CRT+DVI`와 `DVI+CRT` 어느 순서도 사용할 수 있습니다. SAMM에서 CRT primary/DVI secondary는 `viafb_active_dev=CRT+DVI viafb_SAMM_ON=1`, 반대 순서는 `viafb_active_dev=DVI+CRT viafb_SAMM_ON=1`입니다.

viafb active device 해석
`viafb_active_dev` 문자열 해석DVI는 DVI 또는 HDMI를 의미한 장치면 단독 출력DuoView는 조합 순서와 무관SAMM은 앞=primary, 뒤=secondary`viafb_SAMM_ON=1`로 SAMM 활성화

같은 장치 문자열도 SAMM에서는 순서가 역할을 결정합니다.

viafb_active_dev:
    This option is used to specify active devices.(CRT, DVI, CRT+LCD...)
    DVI stands for DVI or HDMI, E.g., If you want to enable HDMI,
    set viafb_active_dev=DVI. In SAMM case, the previous of
    viafb_active_dev is primary device, and the following is
    secondary device.

    For example:

    To enable one device, such as DVI only, we can use::

        modprobe viafb viafb_active_dev=DVI

    To enable two devices, such as CRT+DVI::

        modprobe viafb viafb_active_dev=CRT+DVI;

    For DuoView case, we can use::

        modprobe viafb viafb_active_dev=CRT+DVI

    OR::

        modprobe viafb viafb_active_dev=DVI+CRT...

    For SAMM case:

    If CRT is primary and DVI is secondary, we should use::

        modprobe viafb viafb_active_dev=CRT+DVI viafb_SAMM_ON=1...

    If DVI is primary and CRT is secondary, we should use::

        modprobe viafb viafb_active_dev=DVI+CRT viafb_SAMM_ON=1...

CX700 layout와 digital interface 옵션

143-183

`viafb_display_hardware_layout`은 CX700의 display hardware layout을 지정합니다. 1은 LCD only, 2는 DVI only, 기본 3은 LCD+DVI, 4는 내부 LCD1+내부 LCD2, 16은 내부 LCD1+외부 ExternalLCD2입니다.

`viafb_second_size`는 SAMM에서 두 번째 장치 메모리 크기를 MB로 정하며 최소 16입니다. `viafb_platform_epia_dvi=1`은 EPIA-M의 DVI를 켜고 기본 0은 끕니다.

24-bit bus-width digital interface를 쓰면 `viafb_bus_width=24`로 설정합니다. 기본 12는 12-bit LVDS 또는 TMDS, 24는 24-bit LVDS 또는 TMDS입니다. dual-edge panel은 `viafb_device_lcd_dualedge=1`로 켜며 기본 0은 끕니다.

`viafb_lcd_port`는 LCD output port를 `DVP0`, `DVP1`, `DFP_HIGHLOW`, `DFP_HIGH`, `DFP_LOW` 중에서 지정합니다. CX700에서 DVP0의 외부 LCD와 외부 DVI를 함께 쓸 때는 `modprobe viafb viafb_lcd_port=DVP0`를 사용합니다.

viafb hardware layout 옵션
옵션값/의미
`viafb_display_hardware_layout`1 LCD, 2 DVI, 3 LCD+DVI, 4 LCD1+LCD2, 16 internal+external
`viafb_second_size`SAMM 두 번째 memory MB, 최소 16
`viafb_platform_epia_dvi`EPIA-M DVI 0/1
`viafb_bus_width`12-bit 또는 24-bit LVDS/TMDS
`viafb_device_lcd_dualedge`dual-edge panel 0/1
`viafb_lcd_port`DVP0/DVP1/DFP_HIGHLOW/DFP_HIGH/DFP_LOW

viafb_display_hardware_layout:
    This option is used to specify display hardware layout for CX700 chip.

    - 1 : LCD only
    - 2 : DVI only
    - 3 : LCD+DVI (default)
    - 4 : LCD1+LCD2 (internal + internal)
    - 16: LCD1+ExternalLCD2 (internal + external)

viafb_second_size:
    This option is used to set second device memory size(MB) in SAMM case.
    The minimal size is 16.

viafb_platform_epia_dvi:
    This option is used to enable DVI on EPIA - M

    - 0 : No DVI on EPIA - M (default)
    - 1 : DVI on EPIA - M

viafb_bus_width:
    When using 24 - Bit Bus Width Digital Interface,
    this option should be set.

    - 12: 12-Bit LVDS or 12-Bit TMDS (default)
    - 24: 24-Bit LVDS or 24-Bit TMDS

viafb_device_lcd_dualedge:
    When using Dual Edge Panel, this option should be set.

    - 0 : No Dual Edge Panel (default)
    - 1 : Dual Edge Panel

viafb_lcd_port:
    This option is used to specify LCD output port,
    available values are "DVP0" "DVP1" "DFP_HIGHLOW" "DFP_HIGH" "DFP_LOW".

    for external LCD + external DVI on CX700(External LCD is on DVP0),
    we should use::

        modprobe viafb viafb_lcd_port=DVP0...

DuoView·SAMM·ioctl 주의 사항

184-198

DVI overscan을 켠 640x480 PAL mode에서 DuoView CRT와 DVI를 함께 쓰면 CRT가 올바르게 표시되지 않을 수 있습니다.

SAMM은 single adapter multi monitors의 약자입니다. driver layer에서 여러 monitor를 지원하므로 `fbcon`은 이를 알지 못하고, 두 번째 화면에는 device node file이 없어 사용자 공간 응용이 직접 접근할 수 없습니다. SAMM을 켜면 `viafb_mode/mode1`, `viafb_bpp/bpp1`, `viafb_refresh/refresh1`을 서로 다르게 설정할 수 있습니다.

console이 `viafbinfo1`에 의존할 때 해상도와 bpp를 동적으로 바꾸려면 공통 `FBIOPUT_VSCREENINFO` 대신 VIAFB 전용 ioctl `VIAFB_SET_DEVICE`를 호출해야 합니다. `viafb`의 multi-head 지원이 충분하지 않아 공통 ioctl을 쓰면 화면이 망가질 수 있습니다.

viafb 운영 주의
상황조치/제약
640x480 PAL + DVI overscanDuoView CRT 표시 불량 가능
SAMM 두 번째 화면device node 없음, user mode 직접 접근 불가
SAMM modeprimary/secondary mode·bpp·refresh를 다르게 지정 가능
`viafbinfo1` 동적 변경`VIAFB_SET_DEVICE` 사용
피해야 할 ioctl`FBIOPUT_VSCREENINFO`는 화면 손상 가능

Notes:
    1. CRT may not display properly for DuoView CRT & DVI display at
       the "640x480" PAL mode with DVI overscan enabled.
    2. SAMM stands for single adapter multi monitors. It is different from
       multi-head since SAMM support multi monitor at driver layers, thus fbcon
       layer doesn't even know about it; SAMM's second screen doesn't have a
       device node file, thus a user mode application can't access it directly.
       When SAMM is enabled, viafb_mode and viafb_mode1, viafb_bpp and
       viafb_bpp1, viafb_refresh and viafb_refresh1 can be different.
    3. When console is depending on viafbinfo1, dynamically change resolution
       and bpp, need to call VIAFB specified ioctl interface VIAFB_SET_DEVICE
       instead of calling common ioctl function FBIOPUT_VSCREENINFO since
       viafb doesn't support multi-head well, or it will cause screen crush.

`fbset`으로 mode와 색 깊이 설정

199-230

`fbset`은 Linux에 포함된 utility입니다. 현재 `viafb` 정보를 확인하려면 `fbset -i`를 실행합니다.

해상도와 `viafb_refresh`를 설정하려면 `fbset <resolution-vertical_sync>`를 사용합니다. 예는 `fbset "1024x768-75"`입니다. 또는 geometry를 직접 지정해 `fbset -g 1024 768 1024 768 32`를 사용할 수 있습니다. 가능한 display mode는 `/etc/fb.modes`에서 확인합니다.

색 깊이는 `fbset -depth <value>`로 정하며 예는 `fbset -depth 16`입니다.

viafb fbset 작업
`fbset -i`로 현재 정보 조회`/etc/fb.modes`에서 지원 mode 확인`fbset "1024x768-75"` 또는 `-g` 적용`fbset -depth 16`으로 색 깊이 설정

조회 후 mode 또는 geometry와 depth를 적용합니다.

Configure viafb with "fbset" tool
---------------------------------

    "fbset" is an inbox utility of Linux.

    1. Inquire current viafb information, type::

           # fbset -i

    2. Set various resolutions and viafb_refresh rates::

           # fbset <resolution-vertical_sync>

       example::

           # fbset "1024x768-75"

       or::

           # fbset -g 1024 768 1024 768 32

       Check the file "/etc/fb.modes" to find display modes available.

    3. Set the color depth::

           # fbset -depth <value>

       example::

           # fbset -depth 16

`/proc/viafb`의 IGA 출력 라우팅

231-284

`/proc/viafb/supported_output_devices`는 플랫폼에서 사용할 가능성이 있는 모든 출력 장치 이름을 쉼표로 구분해 제공하는 read-only 파일입니다. 실제 하드웨어에 모든 connector가 있지는 않지만 실제 connector 이름을 찾는 출발점이 됩니다.

`iga1/output_devices`와 `iga2/output_devices`는 읽고 쓸 수 있습니다. IGA1과 IGA2는 화면 image를 만드는 독립 unit이며 각각 하나 이상의 output device로 전달할 수 있습니다. 파일을 읽으면 현재 IGA가 쓰는 출력 장치를 확인합니다. 아무 장치도 나오지 않으면 그 IGA output은 버려지고 있는 상태입니다.

파일에 장치 이름 목록을 쓰면 실행 중 output routing을 조정할 수 있습니다. 접두 `+`는 기존 목록에 추가하고 `-`는 제거하며 접두사가 없으면 기존 목록 전체를 새 목록으로 교체합니다. 제거한 장치는 꺼져야 하고, 다른 IGA에 이미 속한 장치를 추가하면 그 IGA에서 제거되어 새 IGA로 이동합니다.

IGA1에 CRT를 추가하려면 `echo +CRT > /proc/viafb/iga1/output_devices`, IGA2에서 DVP1과 LVDS1을 제거하려면 `echo -DVP1,LVDS1 > /proc/viafb/iga2/output_devices`, IGA1 출력을 CRT 하나로 교체하려면 `echo CRT > /proc/viafb/iga1/output_devices`를 사용합니다.

IGA output_devices 쓰기 규칙
입력효과
`+device`기존 목록에 추가`+CRT`
`-device`기존 목록에서 제거·출력 끄기`-DVP1,LVDS1`
접두사 없음목록 전체 교체`CRT`
다른 IGA의 device 추가기존 IGA에서 새 IGA로 이동장치 ownership 전환

Configure viafb via /proc
-------------------------
    The following files exist in /proc/viafb

    supported_output_devices
        This read-only file contains a full ',' separated list containing all
        output devices that could be available on your platform. It is likely
        that not all of those have a connector on your hardware but it should
        provide a good starting point to figure out which of those names match
        a real connector.

        Example::

                # cat /proc/viafb/supported_output_devices

    iga1/output_devices, iga2/output_devices
        These two files are readable and writable. iga1 and iga2 are the two
        independent units that produce the screen image. Those images can be
        forwarded to one or more output devices. Reading those files is a way
        to query which output devices are currently used by an iga.

        Example::

                # cat /proc/viafb/iga1/output_devices

        If there are no output devices printed the output of this iga is lost.
        This can happen for example if only one (the other) iga is used.
        Writing to these files allows adjusting the output devices during
        runtime. One can add new devices, remove existing ones or switch
        between igas. Essentially you can write a ',' separated list of device
        names (or a single one) in the same format as the output to those
        files. You can add a '+' or '-' as a prefix allowing simple addition
        and removal of devices. So a prefix '+' adds the devices from your list
        to the already existing ones, '-' removes the listed devices from the
        existing ones and if no prefix is given it replaces all existing ones
        with the listed ones. If you remove devices they are expected to turn
        off. If you add devices that are already part of the other iga they are
        removed there and added to the new one.

        Examples:

        Add CRT as output device to iga1::

                # echo +CRT > /proc/viafb/iga1/output_devices

        Remove (turn off) DVP1 and LVDS1 as output devices of iga2::

                # echo -DVP1,LVDS1 > /proc/viafb/iga2/output_devices

        Replace all iga1 output devices by CRT::

                # echo CRT > /proc/viafb/iga1/output_devices

GRUB 부팅 설정과 mode include

285-297

부팅 때 `viafb`를 설정하려면 `grub.conf`에 `append = "video=viafb:viafb_mode=1024x768,viafb_bpp=32,viafb_refresh=85"`를 추가합니다.

VIA framebuffer mode 목록은 `viafb.modes`를 literal include하여 제공합니다. 즉 원문 마지막의 `.. include:: viafb.modes`와 `:literal:`이 별도 mode 데이터 파일을 그대로 문서에 포함합니다.

viafb 부팅 구성
`grub.conf` 편집`video=viafb:` option 문자열 추가mode=1024x768, bpp=32, refresh=85 설정`viafb.modes` literal 목록 참조부팅 시 VIA framebuffer 초기화

GRUB 명령행과 별도 mode 데이터가 초기 표시 설정을 만듭니다.

Bootup with viafb
-----------------

Add the following line to your grub.conf::

    append = "video=viafb:viafb_mode=1024x768,viafb_bpp=32,viafb_refresh=85"


VIA Framebuffer modes
=====================

.. include:: viafb.modes
   :literal: