← Documents Documentation/arch/arm/omap/dss.rst GitHub 원문 ↗

Linux 6.18.37 · Architecture

OMAP2/3 Display Subsystem

OMAP DSS2의 출력·overlay·manager·display 구조, 오디오 상태, sysfs 제어, LCD·DVI·TV 라우팅 예제와 부팅 인자를 설명합니다.

Source pathDocumentation/arch/arm/omap/dss.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

dss.rst:1-372

DSS2는 단일 framebuffer 장치가 아니라 framebuffer, overlay, overlay manager, 물리 display를 분리해 연결하는 디스플레이 파이프라인입니다. 이 분리 덕분에 같은 framebuffer를 여러 출력으로 복제하거나 LCD에서 DVI로 목적지를 바꾸는 구성을 sysfs에서 시험할 수 있습니다.

오디오 인터페이스는 sleep 가능한 준비·구성 단계와 atomic context에서 빠르게 실행해야 하는 시작·중지 단계를 구분합니다. VRFB, CMA, DSI DPLL처럼 메모리와 clock 제약을 함께 이해해야 실제 보드에서 안정적으로 구성할 수 있습니다.

OMAP DSS2 파이프라인
단계주요 책임연결 규칙
Framebufferpixel data 보관여러 overlay에 연결 가능
Overlay입력 영역·출력 크기·위치manager 하나에 연결
Overlay manageroverlay 합성display 하나에 연결
Display실제 LCD·DVI·TV 등manager 종류별 제약 적용
Overlay 제약DISPC overlay와 virtual overlay는 각자 같은 종류의 manager에만 연결됩니다.
TV 제약TV manager는 TV display에만 연결됩니다.

pixel 저장 영역과 물리 출력 사이의 책임을 네 단계로 나눕니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 =========================
2 OMAP2/3 Display Subsystem
3 =========================
4
5 This is an almost total rewrite of the OMAP FB driver in drivers/video/omap
6 (let's call it DSS1). The main differences between DSS1 and DSS2 are DSI,
7 TV-out and multiple display support, but there are lots of small improvements
8 also.
9
10 The DSS2 driver (omapdss module) is in arch/arm/plat-omap/dss/, and the FB,
11 panel and controller drivers are in drivers/video/omap2/. DSS1 and DSS2 live
12 currently side by side, you can choose which one to use.
13
14 Features
15 --------
16
17 Working and tested features include:
18
19 - MIPI DPI (parallel) output
20 - MIPI DSI output in command mode
21 - MIPI DBI (RFBI) output
22 - SDI output
23 - TV output
24 - All pieces can be compiled as a module or inside kernel
25 - Use DISPC to update any of the outputs
26 - Use CPU to update RFBI or DSI output
27 - OMAP DISPC planes
28 - RGB16, RGB24 packed, RGB24 unpacked
29 - YUV2, UYVY
30 - Scaling
31 - Adjusting DSS FCK to find a good pixel clock
32 - Use DSI DPLL to create DSS FCK
33
34 Tested boards include:
35 - OMAP3 SDP board
36 - Beagle board
37 - N810
38
39 omapdss driver
40 --------------
41
42 The DSS driver does not itself have any support for Linux framebuffer, V4L or
43 such like the current ones, but it has an internal kernel API that upper level
44 drivers can use.
45
46 The DSS driver models OMAP's overlays, overlay managers and displays in a
47 flexible way to enable non-common multi-display configuration. In addition to
48 modelling the hardware overlays, omapdss supports virtual overlays and overlay
49 managers. These can be used when updating a display with CPU or system DMA.
50
51 omapdss driver support for audio
52 --------------------------------
53 There exist several display technologies and standards that support audio as
54 well. Hence, it is relevant to update the DSS device driver to provide an audio
55 interface that may be used by an audio driver or any other driver interested in
56 the functionality.
57
58 The audio_enable function is intended to prepare the relevant
59 IP for playback (e.g., enabling an audio FIFO, taking in/out of reset
60 some IP, enabling companion chips, etc). It is intended to be called before
61 audio_start. The audio_disable function performs the reverse operation and is
62 intended to be called after audio_stop.
63
64 While a given DSS device driver may support audio, it is possible that for
65 certain configurations audio is not supported (e.g., an HDMI display using a
66 VESA video timing). The audio_supported function is intended to query whether
67 the current configuration of the display supports audio.
68
69 The audio_config function is intended to configure all the relevant audio
70 parameters of the display. In order to make the function independent of any
71 specific DSS device driver, a struct omap_dss_audio is defined. Its purpose
72 is to contain all the required parameters for audio configuration. At the
73 moment, such structure contains pointers to IEC-60958 channel status word
74 and CEA-861 audio infoframe structures. This should be enough to support
75 HDMI and DisplayPort, as both are based on CEA-861 and IEC-60958.
76
77 The audio_enable/disable, audio_config and audio_supported functions could be
78 implemented as functions that may sleep. Hence, they should not be called
79 while holding a spinlock or a readlock.
80
81 The audio_start/audio_stop function is intended to effectively start/stop audio
82 playback after the configuration has taken place. These functions are designed
83 to be used in an atomic context. Hence, audio_start should return quickly and be
84 called only after all the needed resources for audio playback (audio FIFOs,
85 DMA channels, companion chips, etc) have been enabled to begin data transfers.
86 audio_stop is designed to only stop the audio transfers. The resources used
87 for playback are released using audio_disable.
88
89 The enum omap_dss_audio_state may be used to help the implementations of
90 the interface to keep track of the audio state. The initial state is _DISABLED;
91 then, the state transitions to _CONFIGURED, and then, when it is ready to
92 play audio, to _ENABLED. The state _PLAYING is used when the audio is being
93 rendered.
94
95
96 Panel and controller drivers
97 ----------------------------
98
99 The drivers implement panel or controller specific functionality and are not
100 usually visible to users except through omapfb driver. They register
101 themselves to the DSS driver.
102
103 omapfb driver
104 -------------
105
106 The omapfb driver implements arbitrary number of standard linux framebuffers.
107 These framebuffers can be routed flexibly to any overlays, thus allowing very
108 dynamic display architecture.
109
110 The driver exports some omapfb specific ioctls, which are compatible with the
111 ioctls in the old driver.
112
113 The rest of the non standard features are exported via sysfs. Whether the final
114 implementation will use sysfs, or ioctls, is still open.
115
116 V4L2 drivers
117 ------------
118
119 V4L2 is being implemented in TI.
120
121 From omapdss point of view the V4L2 drivers should be similar to framebuffer
122 driver.
123
124 Architecture
125 --------------------
126
127 Some clarification what the different components do:
128
129 - Framebuffer is a memory area inside OMAP's SRAM/SDRAM that contains the
130 pixel data for the image. Framebuffer has width and height and color
131 depth.
132 - Overlay defines where the pixels are read from and where they go on the
133 screen. The overlay may be smaller than framebuffer, thus displaying only
134 part of the framebuffer. The position of the overlay may be changed if
135 the overlay is smaller than the display.
136 - Overlay manager combines the overlays in to one image and feeds them to
137 display.
138 - Display is the actual physical display device.
139
140 A framebuffer can be connected to multiple overlays to show the same pixel data
141 on all of the overlays. Note that in this case the overlay input sizes must be
142 the same, but, in case of video overlays, the output size can be different. Any
143 framebuffer can be connected to any overlay.
144
145 An overlay can be connected to one overlay manager. Also DISPC overlays can be
146 connected only to DISPC overlay managers, and virtual overlays can be only
147 connected to virtual overlays.
148
149 An overlay manager can be connected to one display. There are certain
150 restrictions which kinds of displays an overlay manager can be connected:
151
152 - DISPC TV overlay manager can be only connected to TV display.
153 - Virtual overlay managers can only be connected to DBI or DSI displays.
154 - DISPC LCD overlay manager can be connected to all displays, except TV
155 display.
156
157 Sysfs
158 -----
159 The sysfs interface is mainly used for testing. I don't think sysfs
160 interface is the best for this in the final version, but I don't quite know
161 what would be the best interfaces for these things.
162
163 The sysfs interface is divided to two parts: DSS and FB.
164
165 /sys/class/graphics/fb? directory:
166 mirror 0=off, 1=on
167 rotate Rotation 0-3 for 0, 90, 180, 270 degrees
168 rotate_type 0 = DMA rotation, 1 = VRFB rotation
169 overlays List of overlay numbers to which framebuffer pixels go
170 phys_addr Physical address of the framebuffer
171 virt_addr Virtual address of the framebuffer
172 size Size of the framebuffer
173
174 /sys/devices/platform/omapdss/overlay? directory:
175 enabled 0=off, 1=on
176 input_size width,height (ie. the framebuffer size)
177 manager Destination overlay manager name
178 name
179 output_size width,height
180 position x,y
181 screen_width width
182 global_alpha global alpha 0-255 0=transparent 255=opaque
183
184 /sys/devices/platform/omapdss/manager? directory:
185 display Destination display
186 name
187 alpha_blending_enabled 0=off, 1=on
188 trans_key_enabled 0=off, 1=on
189 trans_key_type gfx-destination, video-source
190 trans_key_value transparency color key (RGB24)
191 default_color default background color (RGB24)
192
193 /sys/devices/platform/omapdss/display? directory:
194
195 =============== =============================================================
196 ctrl_name Controller name
197 mirror 0=off, 1=on
198 update_mode 0=off, 1=auto, 2=manual
199 enabled 0=off, 1=on
200 name
201 rotate Rotation 0-3 for 0, 90, 180, 270 degrees
202 timings Display timings (pixclock,xres/hfp/hbp/hsw,yres/vfp/vbp/vsw)
203 When writing, two special timings are accepted for tv-out:
204 "pal" and "ntsc"
205 panel_name
206 tear_elim Tearing elimination 0=off, 1=on
207 output_type Output type (video encoder only): "composite" or "svideo"
208 =============== =============================================================
209
210 There are also some debugfs files at <debugfs>/omapdss/ which show information
211 about clocks and registers.
212
213 Examples
214 --------
215
216 The following definitions have been made for the examples below::
217
218 ovl0=/sys/devices/platform/omapdss/overlay0
219 ovl1=/sys/devices/platform/omapdss/overlay1
220 ovl2=/sys/devices/platform/omapdss/overlay2
221
222 mgr0=/sys/devices/platform/omapdss/manager0
223 mgr1=/sys/devices/platform/omapdss/manager1
224
225 lcd=/sys/devices/platform/omapdss/display0
226 dvi=/sys/devices/platform/omapdss/display1
227 tv=/sys/devices/platform/omapdss/display2
228
229 fb0=/sys/class/graphics/fb0
230 fb1=/sys/class/graphics/fb1
231 fb2=/sys/class/graphics/fb2
232
233 Default setup on OMAP3 SDP
234 --------------------------
235
236 Here's the default setup on OMAP3 SDP board. All planes go to LCD. DVI
237 and TV-out are not in use. The columns from left to right are:
238 framebuffers, overlays, overlay managers, displays. Framebuffers are
239 handled by omapfb, and the rest by the DSS::
240
241 FB0 --- GFX -\ DVI
242 FB1 --- VID1 --+- LCD ---- LCD
243 FB2 --- VID2 -/ TV ----- TV
244
245 Example: Switch from LCD to DVI
246 -------------------------------
247
248 ::
249
250 w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1`
251 h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1`
252
253 echo "0" > $lcd/enabled
254 echo "" > $mgr0/display
255 fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h
256 # at this point you have to switch the dvi/lcd dip-switch from the omap board
257 echo "dvi" > $mgr0/display
258 echo "1" > $dvi/enabled
259
260 After this the configuration looks like:::
261
262 FB0 --- GFX -\ -- DVI
263 FB1 --- VID1 --+- LCD -/ LCD
264 FB2 --- VID2 -/ TV ----- TV
265
266 Example: Clone GFX overlay to LCD and TV
267 ----------------------------------------
268
269 ::
270
271 w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1`
272 h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1`
273
274 echo "0" > $ovl0/enabled
275 echo "0" > $ovl1/enabled
276
277 echo "" > $fb1/overlays
278 echo "0,1" > $fb0/overlays
279
280 echo "$w,$h" > $ovl1/output_size
281 echo "tv" > $ovl1/manager
282
283 echo "1" > $ovl0/enabled
284 echo "1" > $ovl1/enabled
285
286 echo "1" > $tv/enabled
287
288 After this the configuration looks like (only relevant parts shown)::
289
290 FB0 +-- GFX ---- LCD ---- LCD
291 \- VID1 ---- TV ---- TV
292
293 Misc notes
294 ----------
295
296 OMAP FB allocates the framebuffer memory using the standard dma allocator. You
297 can enable Contiguous Memory Allocator (CONFIG_CMA) to improve the dma
298 allocator, and if CMA is enabled, you use "cma=" kernel parameter to increase
299 the global memory area for CMA.
300
301 Using DSI DPLL to generate pixel clock it is possible produce the pixel clock
302 of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI.
303
304 Rotation and mirroring currently only supports RGB565 and RGB8888 modes. VRFB
305 does not support mirroring.
306
307 VRFB rotation requires much more memory than non-rotated framebuffer, so you
308 probably need to increase your vram setting before using VRFB rotation. Also,
309 many applications may not work with VRFB if they do not pay attention to all
310 framebuffer parameters.
311
312 Kernel boot arguments
313 ---------------------
314
315 omapfb.mode=<display>:<mode>[,...]
316 - Default video mode for specified displays. For example,
317 "dvi:800x400MR-24@60". See drivers/video/modedb.c.
318 There are also two special modes: "pal" and "ntsc" that
319 can be used to tv out.
320
321 omapfb.vram=<fbnum>:<size>[@<physaddr>][,...]
322 - VRAM allocated for a framebuffer. Normally omapfb allocates vram
323 depending on the display size. With this you can manually allocate
324 more or define the physical address of each framebuffer. For example,
325 "1:4M" to allocate 4M for fb1.
326
327 omapfb.debug=<y|n>
328 - Enable debug printing. You have to have OMAPFB debug support enabled
329 in kernel config.
330
331 omapfb.test=<y|n>
332 - Draw test pattern to framebuffer whenever framebuffer settings change.
333 You need to have OMAPFB debug support enabled in kernel config.
334
335 omapfb.vrfb=<y|n>
336 - Use VRFB rotation for all framebuffers.
337
338 omapfb.rotate=<angle>
339 - Default rotation applied to all framebuffers.
340 0 - 0 degree rotation
341 1 - 90 degree rotation
342 2 - 180 degree rotation
343 3 - 270 degree rotation
344
345 omapfb.mirror=<y|n>
346 - Default mirror for all framebuffers. Only works with DMA rotation.
347
348 omapdss.def_disp=<display>
349 - Name of default display, to which all overlays will be connected.
350 Common examples are "lcd" or "tv".
351
352 omapdss.debug=<y|n>
353 - Enable debug printing. You have to have DSS debug support enabled in
354 kernel config.
355
356 TODO
357 ----
358
359 DSS locking
360
361 Error checking
362
363 - Lots of checks are missing or implemented just as BUG()
364
365 System DMA update for DSI
366
367 - Can be used for RGB16 and RGB24P modes. Probably not for RGB24U (how
368 to skip the empty byte?)
369
370 OMAP1 support
371
372 - Not sure if needed
373

3. 한국어 전문 번역

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

OMAP2/3 디스플레이 서브시스템

1-13

이 문서는 `drivers/video/omap`에 있던 OMAP FB 드라이버, 즉 DSS1을 거의 전면 재작성한 DSS2를 설명합니다. DSS1과 비교한 주요 차이는 DSI, TV-out, 다중 디스플레이 지원이며 그 밖에도 여러 세부 개선이 포함됩니다.

DSS2 드라이버인 `omapdss` 모듈은 `arch/arm/plat-omap/dss/`에 있고, FB·패널·컨트롤러 드라이버는 `drivers/video/omap2/`에 있습니다. 당시에는 DSS1과 DSS2가 나란히 존재하므로 사용할 구현을 선택할 수 있습니다.

기능

14-38

작동이 확인되고 시험된 기능은 다음과 같습니다.

  • MIPI DPI 병렬 출력
  • 명령 모드의 MIPI DSI 출력
  • MIPI DBI(RFBI) 출력
  • SDI 출력과 TV 출력
  • 모든 구성 요소의 모듈 또는 커널 내장 빌드
  • DISPC를 이용한 모든 출력 갱신
  • CPU를 이용한 RFBI 또는 DSI 출력 갱신
  • OMAP DISPC plane
  • RGB16, packed RGB24, unpacked RGB24
  • YUV2와 UYVY
  • 스케일링
  • 적절한 pixel clock을 찾기 위한 DSS FCK 조정
  • DSI DPLL을 이용한 DSS FCK 생성

시험된 보드는 OMAP3 SDP 보드, Beagle 보드, N810입니다.

omapdss 드라이버

39-50

DSS 드라이버 자체는 기존 드라이버처럼 Linux framebuffer나 V4L 등을 직접 지원하지 않습니다. 대신 상위 계층 드라이버가 사용할 수 있는 내부 커널 API를 제공합니다.

DSS 드라이버는 흔하지 않은 다중 디스플레이 구성도 표현할 수 있도록 OMAP의 overlay, overlay manager, display를 유연하게 모델링합니다. 하드웨어 overlay뿐 아니라 가상 overlay와 가상 overlay manager도 지원하며, 이 가상 구성 요소는 CPU 또는 system DMA로 디스플레이를 갱신할 때 사용할 수 있습니다.

omapdss 드라이버의 오디오 지원

51-95

여러 디스플레이 기술과 표준은 오디오도 지원합니다. 따라서 DSS 장치 드라이버는 오디오 드라이버나 이 기능을 필요로 하는 다른 드라이버가 사용할 오디오 인터페이스를 제공해야 합니다.

`audio_enable`은 오디오 FIFO 활성화, IP reset 진입·해제, companion chip 활성화처럼 재생에 필요한 IP와 자원을 준비하며 `audio_start`보다 먼저 호출합니다. `audio_disable`은 그 반대 작업을 수행하고 `audio_stop` 뒤에 호출합니다.

DSS 장치 드라이버가 오디오 기능을 제공하더라도 특정 구성, 예를 들어 VESA video timing을 사용하는 HDMI display에서는 오디오를 지원하지 않을 수 있습니다. `audio_supported`는 현재 디스플레이 구성이 오디오를 지원하는지 조회합니다.

`audio_config`는 관련 오디오 매개변수를 구성합니다. 특정 DSS 장치 드라이버에 종속되지 않도록 `struct omap_dss_audio`를 정의했으며, 이 구조체는 오디오 구성에 필요한 값을 담습니다. 당시 구조체에는 IEC-60958 channel status word와 CEA-861 audio infoframe 구조체를 가리키는 포인터가 들어 있습니다. HDMI와 DisplayPort가 모두 CEA-861 및 IEC-60958에 기반하므로 이 정보로 두 규격을 지원할 수 있습니다.

`audio_enable`, `audio_disable`, `audio_config`, `audio_supported`는 sleep할 수 있는 함수로 구현될 수 있으므로 spinlock이나 readlock을 잡은 채 호출하면 안 됩니다.

`audio_start`와 `audio_stop`은 구성이 끝난 뒤 실제 오디오 재생을 시작하고 멈춥니다. 두 함수는 atomic context에서 쓰도록 설계되었습니다. 따라서 `audio_start`는 빨리 반환해야 하며, audio FIFO, DMA channel, companion chip 등 전송에 필요한 자원을 모두 활성화한 뒤 호출해야 합니다. `audio_stop`은 오디오 전송만 중단하고, 재생 자원은 `audio_disable`로 해제합니다.

`enum omap_dss_audio_state`를 사용하면 인터페이스 구현이 오디오 상태를 추적할 수 있습니다.

상태의미와 전이 시점
`_DISABLED`초기 상태, 오디오 기능이 비활성화됨
`_CONFIGURED`오디오 매개변수 구성이 완료됨
`_ENABLED`오디오를 재생할 준비가 완료됨
`_PLAYING`오디오가 실제로 렌더링되는 중

패널 및 컨트롤러 드라이버

96-102

이 드라이버들은 패널 또는 컨트롤러 고유 기능을 구현합니다. 보통 사용자는 `omapfb` 드라이버를 통하지 않고는 이들을 직접 보지 않으며, 각 드라이버는 자신을 DSS 드라이버에 등록합니다.

omapfb 드라이버

103-115

`omapfb` 드라이버는 임의 개수의 표준 Linux framebuffer를 구현합니다. 각 framebuffer를 어떤 overlay로도 유연하게 라우팅할 수 있어 매우 동적인 디스플레이 구성이 가능합니다.

드라이버는 이전 드라이버의 ioctl과 호환되는 몇 가지 `omapfb` 전용 ioctl을 내보냅니다. 나머지 비표준 기능은 sysfs로 노출하지만, 최종 구현이 sysfs와 ioctl 가운데 어느 쪽을 사용할지는 이 문서 시점에 결정되지 않았습니다.

V4L2 드라이버

116-123

V4L2 구현은 TI에서 진행 중입니다. `omapdss` 관점에서 V4L2 드라이버는 framebuffer 드라이버와 비슷하게 동작해야 합니다.

아키텍처

124-156

각 구성 요소의 역할은 다음과 같습니다.

구성 요소역할
FramebufferOMAP SRAM/SDRAM 안에서 이미지 pixel data를 담는 메모리 영역이며 너비, 높이, color depth를 가집니다.
Overlaypixel을 어디에서 읽어 화면의 어디로 보낼지 정합니다. framebuffer보다 작을 수 있어 일부만 표시할 수 있고, display보다 작으면 위치를 바꿀 수 있습니다.
Overlay manager여러 overlay를 한 이미지로 합쳐 display에 공급합니다.
Display실제 물리 디스플레이 장치입니다.

하나의 framebuffer를 여러 overlay에 연결해 동일한 pixel data를 모두 표시할 수 있습니다. 이때 overlay의 입력 크기는 같아야 하지만 video overlay의 출력 크기는 서로 달라도 됩니다. 어떤 framebuffer도 어떤 overlay에든 연결할 수 있습니다.

overlay는 하나의 overlay manager에 연결됩니다. DISPC overlay는 DISPC overlay manager에만, virtual overlay는 virtual overlay manager에만 연결할 수 있습니다.

overlay manager연결 가능한 display
DISPC TV overlay managerTV display만 가능
Virtual overlay managerDBI 또는 DSI display만 가능
DISPC LCD overlay managerTV display를 제외한 모든 display 가능

Sysfs 인터페이스

157-212

sysfs 인터페이스는 주로 시험에 사용합니다. 저자는 최종 버전에 가장 적합한 인터페이스라고 보지는 않았지만, 더 나은 인터페이스가 무엇인지는 아직 정하지 못했습니다. 인터페이스는 DSS 부분과 FB 부분으로 나뉩니다.

`/sys/class/graphics/fb?` 디렉터리의 항목입니다.

항목값 또는 의미
`mirror``0`=off, `1`=on
`rotate``0`~`3`: 0, 90, 180, 270도 회전
`rotate_type``0`=DMA rotation, `1`=VRFB rotation
`overlays`framebuffer pixel이 전달되는 overlay 번호 목록
`phys_addr`framebuffer의 물리 주소
`virt_addr`framebuffer의 가상 주소
`size`framebuffer 크기

`/sys/devices/platform/omapdss/overlay?` 디렉터리의 항목입니다.

항목값 또는 의미
`enabled``0`=off, `1`=on
`input_size``width,height`, 즉 framebuffer 크기
`manager`목적지 overlay manager 이름
`name`overlay 이름
`output_size``width,height`
`position``x,y`
`screen_width`화면 너비
`global_alpha``0`~`255`: `0`=transparent, `255`=opaque

`/sys/devices/platform/omapdss/manager?` 디렉터리의 항목입니다.

항목값 또는 의미
`display`목적지 display
`name`manager 이름
`alpha_blending_enabled``0`=off, `1`=on
`trans_key_enabled``0`=off, `1`=on
`trans_key_type``gfx-destination` 또는 `video-source`
`trans_key_value`투명 color key(RGB24)
`default_color`기본 background color(RGB24)

`/sys/devices/platform/omapdss/display?` 디렉터리의 항목입니다.

항목값 또는 의미
`ctrl_name`controller 이름
`mirror``0`=off, `1`=on
`update_mode``0`=off, `1`=auto, `2`=manual
`enabled``0`=off, `1`=on
`name`display 이름
`rotate``0`~`3`: 0, 90, 180, 270도 회전
`timings``pixclock,xres/hfp/hbp/hsw,yres/vfp/vbp/vsw`; 기록할 때 TV-out용 `pal`, `ntsc`도 허용
`panel_name`panel 이름
`tear_elim`tearing elimination: `0`=off, `1`=on
`output_type`video encoder 출력 형식: `composite` 또는 `svideo`

또한 `<debugfs>/omapdss/` 아래에는 clock과 register 정보를 보여 주는 debugfs 파일이 있습니다.

예제에서 쓰는 정의

213-232

뒤의 예제에서는 다음 shell 변수를 사용합니다.

ovl0=/sys/devices/platform/omapdss/overlay0
ovl1=/sys/devices/platform/omapdss/overlay1
ovl2=/sys/devices/platform/omapdss/overlay2

mgr0=/sys/devices/platform/omapdss/manager0
mgr1=/sys/devices/platform/omapdss/manager1

lcd=/sys/devices/platform/omapdss/display0
dvi=/sys/devices/platform/omapdss/display1
tv=/sys/devices/platform/omapdss/display2

fb0=/sys/class/graphics/fb0
fb1=/sys/class/graphics/fb1
fb2=/sys/class/graphics/fb2

OMAP3 SDP의 기본 구성

233-244

OMAP3 SDP 보드의 기본 구성에서는 모든 plane이 LCD로 향하고 DVI와 TV-out은 사용하지 않습니다. 원문의 열은 왼쪽부터 framebuffer, overlay, overlay manager, display입니다. framebuffer는 `omapfb`가, 나머지는 DSS가 처리합니다.

OMAP3 SDP 기본 표시 경로
FB0GFXLCD managerLCD display
FB1VID1LCD managerLCD display
FB2VID2LCD managerLCD display
TV managerTV display
DVI display (미사용)

세 framebuffer가 각 overlay를 거쳐 LCD manager로 합쳐지고 LCD display로 출력됩니다. TV manager와 TV display의 연결은 존재하지만 framebuffer 입력은 없고 DVI도 사용하지 않습니다.

예제: LCD에서 DVI로 전환

245-265

DVI timing에서 너비와 높이를 읽고 LCD를 끈 다음 manager의 기존 display 연결을 해제합니다. `fb0` 해상도를 DVI에 맞춘 뒤 보드의 DVI/LCD DIP switch를 바꾸고 manager를 DVI에 연결해 DVI를 활성화합니다.

w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1`
h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1`

echo "0" > $lcd/enabled
echo "" > $mgr0/display
fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h
# at this point you have to switch the dvi/lcd dip-switch from the omap board
echo "dvi" > $mgr0/display
echo "1" > $dvi/enabled
DVI 전환 뒤 표시 경로
FB0GFXLCD managerDVI display
FB1VID1LCD managerDVI display
FB2VID2LCD managerDVI display
TV managerTV display
LCD display (연결 해제)

FB0, FB1, FB2는 각각 GFX, VID1, VID2 overlay를 거쳐 LCD manager에 합쳐지지만 manager의 목적지는 이제 DVI display입니다. TV manager와 TV display 경로는 그대로입니다.

예제: GFX overlay를 LCD와 TV로 복제

266-292

TV timing에서 출력 크기를 구한 뒤 `ovl0`과 `ovl1`을 잠시 끕니다. `fb1`의 overlay 연결을 비우고 `fb0`을 overlay 0과 1에 함께 연결합니다. `ovl1`의 출력 크기를 TV에 맞추고 TV manager에 연결한 다음 두 overlay와 TV를 다시 활성화합니다.

w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1`
h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1`

echo "0" > $ovl0/enabled
echo "0" > $ovl1/enabled

echo "" > $fb1/overlays
echo "0,1" > $fb0/overlays

echo "$w,$h" > $ovl1/output_size
echo "tv" > $ovl1/manager

echo "1" > $ovl0/enabled
echo "1" > $ovl1/enabled

echo "1" > $tv/enabled
GFX 복제 뒤 관련 경로
FB0GFXLCD managerLCD display
FB0VID1TV managerTV display

동일한 FB0 pixel data가 GFX overlay를 통해 LCD로, VID1 overlay를 통해 TV로 동시에 전달됩니다.

기타 참고 사항

293-311

OMAP FB는 표준 DMA allocator로 framebuffer 메모리를 할당합니다. `CONFIG_CMA`로 Contiguous Memory Allocator를 활성화하면 DMA allocator를 개선할 수 있고, CMA가 켜져 있을 때 `cma=` 커널 매개변수로 전역 CMA 메모리 영역을 늘릴 수 있습니다.

DSI DPLL로 pixel clock을 만들면 가능한 최대값인 86.5MHz를 생성할 수 있으며, 이 clock으로 DVI에서 `1280x1024@57` 출력을 얻을 수 있습니다.

회전과 미러링은 당시 RGB565 및 RGB8888 mode만 지원하고 VRFB는 미러링을 지원하지 않습니다. VRFB 회전은 회전하지 않는 framebuffer보다 훨씬 많은 메모리가 필요하므로 사용 전에 `vram` 설정을 늘려야 할 수 있습니다. framebuffer의 모든 매개변수를 주의해서 다루지 않는 응용 프로그램은 VRFB와 함께 제대로 동작하지 않을 수 있습니다.

커널 부팅 인자

312-355
인자설명
`omapfb.mode=<display>:<mode>[,...]`지정 display의 기본 video mode. 예: `dvi:800x400MR-24@60`. `drivers/video/modedb.c`를 참조하며 TV-out에는 `pal`, `ntsc` 특수 mode도 쓸 수 있습니다.
`omapfb.vram=<fbnum>:<size>[@<physaddr>][,...]`framebuffer용 VRAM. display 크기에 따른 자동 할당 대신 더 크게 할당하거나 물리 주소를 지정할 수 있습니다. `1:4M`은 `fb1`에 4M를 할당합니다.
`omapfb.debug=<y|n>`debug 출력을 켭니다. 커널 설정에서 OMAPFB debug 지원도 활성화해야 합니다.
`omapfb.test=<y|n>`framebuffer 설정이 바뀔 때마다 test pattern을 그립니다. OMAPFB debug 지원이 필요합니다.
`omapfb.vrfb=<y|n>`모든 framebuffer에 VRFB rotation을 사용합니다.
`omapfb.rotate=<angle>`모든 framebuffer의 기본 회전. `0`, `1`, `2`, `3`은 각각 0, 90, 180, 270도입니다.
`omapfb.mirror=<y|n>`모든 framebuffer의 기본 mirror. DMA rotation에서만 동작합니다.
`omapdss.def_disp=<display>`모든 overlay를 연결할 기본 display 이름. 흔한 예는 `lcd`, `tv`입니다.
`omapdss.debug=<y|n>`debug 출력을 켭니다. 커널 설정에서 DSS debug 지원도 활성화해야 합니다.

남은 작업

356-372

문서가 열거한 남은 작업은 다음과 같습니다.

  • DSS locking
  • Error checking: 많은 검사가 빠져 있거나 단순히 `BUG()`로 구현되어 있음
  • DSI용 System DMA update: RGB16과 RGB24P에는 사용할 수 있지만 빈 byte를 건너뛰어야 하는 RGB24U에는 사용하기 어려울 가능성이 있음
  • OMAP1 support가 필요한지는 불확실함