1 /*******************************************************************
2 *Copyright (c) 2012 by Silicon Motion, Inc. (SMI)
3 *Permission is hereby granted, free of charge, to any person obtaining a copy
4 *of this software and associated documentation files (the "Software"), to deal
5 *in the Software without restriction, including without limitation the rights to
6 *use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 *of the Software, and to permit persons to whom the Software is furnished to
8 *do so, subject to the following conditions:
10 *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
11 *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
12 *OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13 *NONINFRINGEMENT. IN NO EVENT SHALL Mill.Chen and Monk.Liu OR COPYRIGHT
14 *HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
15 *WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
16 *FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
17 *OTHER DEALINGS IN THE SOFTWARE.
18 *******************************************************************/
19 #include "ddk750_reg.h"
20 #include "ddk750_help.h"
21 #include "ddk750_display.h"
22 #include "ddk750_power.h"
23 #include "ddk750_dvi.h"
25 #ifdef CONFIG_FB_LYNXFB_DOMAINS
26 #define primaryWaitVerticalSync(delay, domain) waitNextVerticalSync(0, delay, domain)
28 static void setDisplayControl(int ctrl
, int dispState
, int domain
)
30 /* state != 0 means turn on both timing & plane en_bit */
31 unsigned long ulDisplayCtrlReg
, ulReservedBits
= 0;
36 /* Set the primary display control */
38 ulDisplayCtrlReg
= PEEK32(PANEL_DISPLAY_CTRL
, domain
);
39 /* Turn on/off the Panel display control */
41 /* Timing should be enabled first before enabling the plane
42 * because changing at the same time does not guarantee that
43 * the plane will also enabled or disabled.
46 ulDisplayCtrlReg
| (1 <<
47 PANEL_DISPLAY_CTRL_TIMING_LSB
);
48 POKE32(PANEL_DISPLAY_CTRL
, ulDisplayCtrlReg
, domain
);
51 ulDisplayCtrlReg
| (1 <<
52 PANEL_DISPLAY_CTRL_PLANE_LSB
);
53 /* Added some masks to mask out the reserved bits.
54 * Sometimes, the reserved bits are set/reset randomly when
55 * writing to the PRIMARY_DISPLAY_CTRL, therefore, the register
56 * reserved bits are needed to be masked out.
59 (3 << PANEL_DISPLAY_CTRL_RESERVED_1_MASK_LSB
) |
60 (15 << PANEL_DISPLAY_CTRL_RESERVED_2_MASK_LSB
)
62 PANEL_DISPLAY_CTRL_RESERVED_3_MASK_LSB
);
64 /* Somehow the register value on the plane is not set
65 * until a few delay. Need to write
66 * and read it a couple times
70 POKE32(PANEL_DISPLAY_CTRL
,
71 ulDisplayCtrlReg
, domain
);
72 } while ((PEEK32(PANEL_DISPLAY_CTRL
, domain
) &
74 (ulDisplayCtrlReg
& ~ulReservedBits
));
76 * ("Set Panel Plane enbit:after tried %d times\n",
80 /* When turning off, there is no rule on the programming
81 * sequence since whenever the clock is off, then it does not
82 * matter whether the plane is enabled or disabled.
83 * Note: Modifying the plane bit will take effect on the
84 * next vertical sync. Need to find out if it is necessary to
85 * wait for 1 vsync before modifying the timing enable bit.
89 (~(1 << PANEL_DISPLAY_CTRL_PLANE_LSB
));
90 POKE32(PANEL_DISPLAY_CTRL
, ulDisplayCtrlReg
, domain
);
94 (~(1 << PANEL_DISPLAY_CTRL_TIMING_LSB
));
95 POKE32(PANEL_DISPLAY_CTRL
, ulDisplayCtrlReg
, domain
);
99 /* Set the secondary display control */
100 ulDisplayCtrlReg
= PEEK32(CRT_DISPLAY_CTRL
, domain
);
103 /* Timing should be enabled first before enabling the plane because changing at the
104 same time does not guarantee that the plane will also enabled or disabled.
107 ulDisplayCtrlReg
| (1 <<
108 CRT_DISPLAY_CTRL_TIMING_LSB
);
109 POKE32(CRT_DISPLAY_CTRL
, ulDisplayCtrlReg
, domain
);
112 ulDisplayCtrlReg
| (1 <<
113 CRT_DISPLAY_CTRL_PLANE_LSB
);
115 /* Added some masks to mask out the reserved bits.
116 * Sometimes, the reserved bits are set/reset randomly when
117 * writing to the PRIMARY_DISPLAY_CTRL, therefore, the register
118 * reserved bits are needed to be masked out.
122 (0X1F << CRT_DISPLAY_CTRL_RESERVED_1_MASK_LSB
)
123 | (3 << CRT_DISPLAY_CTRL_RESERVED_2_MASK_LSB
) |
124 (1 << CRT_DISPLAY_CTRL_RESERVED_3_MASK_LSB
) |
125 (1 << CRT_DISPLAY_CTRL_RESERVED_4_MASK_LSB
);
128 POKE32(CRT_DISPLAY_CTRL
, ulDisplayCtrlReg
, domain
);
129 } while ((PEEK32(CRT_DISPLAY_CTRL
, domain
) &
131 (ulDisplayCtrlReg
& ~ulReservedBits
));
133 ("Set Crt Plane enbit:after tried %d times\n",
136 /* When turning off, there is no rule on the programming
137 * sequence since whenever the clock is off, then it does not
138 * matter whether the plane is enabled or disabled.
139 * Note: Modifying the plane bit will take effect on the next
140 * vertical sync. Need to find out if it is necessary to
141 * wait for 1 vsync before modifying the timing enable bit.
145 (~(1 << CRT_DISPLAY_CTRL_PLANE_LSB
));
146 POKE32(CRT_DISPLAY_CTRL
, ulDisplayCtrlReg
, domain
);
150 (~(1 << CRT_DISPLAY_CTRL_TIMING_LSB
));
151 POKE32(CRT_DISPLAY_CTRL
, ulDisplayCtrlReg
, domain
);
157 static void waitNextVerticalSync(int ctrl
, int delay
, int domain
)
161 /* primary controller */
163 /* Do not wait when the Primary PLL is off or display control is already off.
164 This will prevent the software to wait forever. */
166 (PEEK32(PANEL_PLL_CTRL
, domain
) >> PANEL_PLL_CTRL_POWER_LSB
))
167 == PANEL_PLL_CTRL_POWER_OFF
)
170 (PEEK32(PANEL_DISPLAY_CTRL
, domain
) >>
171 PANEL_DISPLAY_CTRL_TIMING_LSB
)) ==
172 PANEL_DISPLAY_CTRL_TIMING_DISABLE
)) {
175 while (delay
-- > 0) {
176 /* Wait for end of vsync. */
179 1 & (PEEK32(SYSTEM_CTRL
, domain
) >>
180 SYSTEM_CTRL_PANEL_VSYNC_LSB
);
181 } while (status
== SYSTEM_CTRL_PANEL_VSYNC_ACTIVE
);
183 /* Wait for start of vsync. */
186 1 & (PEEK32(SYSTEM_CTRL
, domain
) >>
187 SYSTEM_CTRL_PANEL_VSYNC_LSB
);
189 SYSTEM_CTRL_PANEL_VSYNC_INACTIVE
);
194 /* Do not wait when the Primary PLL is off or display control is already off.
195 This will prevent the software to wait forever. */
196 if (((1 & (PEEK32(CRT_PLL_CTRL
, domain
) >> CRT_PLL_CTRL_POWER_LSB
))
197 == CRT_PLL_CTRL_POWER_OFF
)
198 || ((1 & (PEEK32(CRT_DISPLAY_CTRL
, domain
) >>
199 CRT_DISPLAY_CTRL_TIMING_LSB
)) ==
200 CRT_DISPLAY_CTRL_TIMING_DISABLE
)) {
204 while (delay
-- > 0) {
205 /* Wait for end of vsync. */
208 1 & (PEEK32(SYSTEM_CTRL
, domain
) >>
209 SYSTEM_CTRL_CRT_VSYNC_LSB
);
210 } while (status
== SYSTEM_CTRL_CRT_VSYNC_ACTIVE
);
212 /* Wait for start of vsync. */
215 1 & (PEEK32(SYSTEM_CTRL
, domain
) >>
216 SYSTEM_CTRL_CRT_VSYNC_LSB
);
217 } while (status
== SYSTEM_CTRL_CRT_VSYNC_INACTIVE
);
222 static void inline swPanelPowerSequence_sm750le(int disp
, int delay
, int domain
)
225 reg
= PEEK32(DISPLAY_CONTROL_750LE
, domain
);
230 POKE32(DISPLAY_CONTROL_750LE
, reg
, domain
);
233 static void swPanelPowerSequence(int disp
, int delay
, int domain
)
237 /* disp should be 1 to open sequence */
238 reg
= PEEK32(PANEL_DISPLAY_CTRL
, domain
);
239 reg
&= ~(1 << PANEL_DISPLAY_CTRL_FPEN_LSB
);
240 reg
= reg
| (disp
<< PANEL_DISPLAY_CTRL_FPEN_LSB
);
241 POKE32(PANEL_DISPLAY_CTRL
, reg
, domain
);
242 primaryWaitVerticalSync(delay
, domain
);
244 reg
= PEEK32(PANEL_DISPLAY_CTRL
, domain
);
245 reg
&= ~(1 << PANEL_DISPLAY_CTRL_DATA_LSB
);
246 reg
= reg
| (disp
<< PANEL_DISPLAY_CTRL_DATA_LSB
);
247 POKE32(PANEL_DISPLAY_CTRL
, reg
, domain
);
248 primaryWaitVerticalSync(delay
, domain
);
250 reg
= PEEK32(PANEL_DISPLAY_CTRL
, domain
);
251 reg
&= ~(1 << PANEL_DISPLAY_CTRL_VBIASEN_LSB
);
252 reg
= reg
| (disp
<< PANEL_DISPLAY_CTRL_VBIASEN_LSB
);
253 POKE32(PANEL_DISPLAY_CTRL
, reg
, domain
);
254 primaryWaitVerticalSync(delay
, domain
);
256 reg
= PEEK32(PANEL_DISPLAY_CTRL
, domain
);
257 reg
&= ~(1 << PANEL_DISPLAY_CTRL_FPEN_LSB
);
258 reg
= reg
| (disp
<< PANEL_DISPLAY_CTRL_FPEN_LSB
);
259 POKE32(PANEL_DISPLAY_CTRL
, reg
, domain
);
260 primaryWaitVerticalSync(delay
, domain
);
264 void ddk750_setLogicalDispOut(disp_output_t output
, int domain
)
267 if (output
& PNL_2_USAGE
) {
268 /* set panel path controller select */
269 reg
= PEEK32(PANEL_DISPLAY_CTRL
, domain
);
270 reg
&= ~(3 << PANEL_DISPLAY_CTRL_SELECT_LSB
);
272 reg
| ((output
& PNL_2_MASK
) >> PNL_2_OFFSET
) <<
273 PANEL_DISPLAY_CTRL_SELECT_LSB
;
274 POKE32(PANEL_DISPLAY_CTRL
, reg
, domain
);
277 if (output
& CRT_2_USAGE
) {
278 /* set crt path controller select */
279 reg
= PEEK32(CRT_DISPLAY_CTRL
, domain
);
280 reg
&= ~(3 << CRT_DISPLAY_CTRL_SELECT_LSB
);
282 reg
| ((output
& CRT_2_MASK
) >> CRT_2_OFFSET
) <<
283 CRT_DISPLAY_CTRL_SELECT_LSB
;
285 reg
= reg
& (~(1 << CRT_DISPLAY_CTRL_BLANK_LSB
));
286 POKE32(CRT_DISPLAY_CTRL
, reg
, domain
);
288 if (output
& PRI_TP_USAGE
) {
289 /* set primary timing and plane en_bit */
291 (output
& PRI_TP_MASK
) >> PRI_TP_OFFSET
, domain
);
294 if (output
& SEC_TP_USAGE
) {
295 /* set secondary timing and plane en_bit */
297 (output
& SEC_TP_MASK
) >> SEC_TP_OFFSET
, domain
);
300 if (output
& PNL_SEQ_USAGE
) {
301 /* set panel sequence */
302 swPanelPowerSequence((output
& PNL_SEQ_MASK
) >>
303 PNL_SEQ_OFFSET
, 4, domain
);
306 if (output
& DAC_USAGE
)
307 setDAC((output
& DAC_MASK
) >> DAC_OFFSET
, domain
);
309 if (output
& DPMS_USAGE
)
310 ddk750_setDPMS((output
& DPMS_MASK
) >> DPMS_OFFSET
, domain
);
313 int ddk750_initDVIDisp(int domain
)
315 /* Initialize DVI. If the dviInit fail and the VendorID or the DeviceID are
316 not zeroed, then set the failure flag. If it is zeroe, it might mean
317 that the system is in Dual CRT Monitor configuration. */
319 /* De-skew enabled with default 111b value.
320 This will fix some artifacts problem in some mode on board 2.2.
321 Somehow this fix does not affect board 2.1.
323 if ((dviInit(1, /* Select Rising Edge */
324 1, /* Select 24-bit bus */
325 0, /* Select Single Edge clock */
326 1, /* Enable HSync as is */
327 1, /* Enable VSync as is */
328 1, /* Enable De-skew */
329 7, /* Set the de-skew setting to maximum setup */
330 1, /* Enable continuous Sync */
331 1, /* Enable PLL Filter */
332 4, /* Use the recommended value for PLL Filter value */
334 ) != 0) && (dviGetVendorID(domain
) != 0x0000)
335 && (dviGetDeviceID(domain
) != 0x0000)) {
339 /* TODO: Initialize other display component */
346 #else /* !CONFIG_FB_LYNXFB_DOMAINS: */
347 #define primaryWaitVerticalSync(delay) waitNextVerticalSync(0, delay)
349 static void setDisplayControl(int ctrl
, int dispState
)
351 /* state != 0 means turn on both timing & plane en_bit */
352 unsigned long ulDisplayCtrlReg
, ulReservedBits
= 0;
357 /* Set the primary display control */
359 ulDisplayCtrlReg
= PEEK32(PANEL_DISPLAY_CTRL
);
360 /* Turn on/off the Panel display control */
362 /* Timing should be enabled first before enabling the plane
363 * because changing at the same time does not guarantee that
364 * the plane will also enabled or disabled.
367 ulDisplayCtrlReg
| (1 <<
368 PANEL_DISPLAY_CTRL_TIMING_LSB
);
369 POKE32(PANEL_DISPLAY_CTRL
, ulDisplayCtrlReg
);
372 ulDisplayCtrlReg
| (1 <<
373 PANEL_DISPLAY_CTRL_PLANE_LSB
);
374 /* Added some masks to mask out the reserved bits.
375 * Sometimes, the reserved bits are set/reset randomly when
376 * writing to the PRIMARY_DISPLAY_CTRL, therefore, the register
377 * reserved bits are needed to be masked out.
380 (3 << PANEL_DISPLAY_CTRL_RESERVED_1_MASK_LSB
) |
381 (15 << PANEL_DISPLAY_CTRL_RESERVED_2_MASK_LSB
)
383 PANEL_DISPLAY_CTRL_RESERVED_3_MASK_LSB
);
385 /* Somehow the register value on the plane is not set
386 * until a few delay. Need to write
387 * and read it a couple times
391 POKE32(PANEL_DISPLAY_CTRL
,
393 } while ((PEEK32(PANEL_DISPLAY_CTRL
) &
395 (ulDisplayCtrlReg
& ~ulReservedBits
));
397 ("Set Panel Plane enbit:after tried %d times\n",
400 /* When turning off, there is no rule on the programming
401 * sequence since whenever the clock is off, then it does not
402 * matter whether the plane is enabled or disabled.
403 * Note: Modifying the plane bit will take effect on the
404 * next vertical sync. Need to find out if it is necessary to
405 * wait for 1 vsync before modifying the timing enable bit.
409 (~(1 << PANEL_DISPLAY_CTRL_PLANE_LSB
));
410 POKE32(PANEL_DISPLAY_CTRL
, ulDisplayCtrlReg
);
414 (~(1 << PANEL_DISPLAY_CTRL_TIMING_LSB
));
415 POKE32(PANEL_DISPLAY_CTRL
, ulDisplayCtrlReg
);
419 /* Set the secondary display control */
420 ulDisplayCtrlReg
= PEEK32(CRT_DISPLAY_CTRL
);
423 /* Timing should be enabled first before enabling the plane because changing at the
424 same time does not guarantee that the plane will also enabled or disabled.
427 ulDisplayCtrlReg
| (1 <<
428 CRT_DISPLAY_CTRL_TIMING_LSB
);
429 POKE32(CRT_DISPLAY_CTRL
, ulDisplayCtrlReg
);
432 ulDisplayCtrlReg
| (1 <<
433 CRT_DISPLAY_CTRL_PLANE_LSB
);
435 /* Added some masks to mask out the reserved bits.
436 * Sometimes, the reserved bits are set/reset randomly when
437 * writing to the PRIMARY_DISPLAY_CTRL, therefore, the register
438 * reserved bits are needed to be masked out.
442 (0X1F << CRT_DISPLAY_CTRL_RESERVED_1_MASK_LSB
)
443 | (3 << CRT_DISPLAY_CTRL_RESERVED_2_MASK_LSB
) |
444 (1 << CRT_DISPLAY_CTRL_RESERVED_3_MASK_LSB
) |
445 (1 << CRT_DISPLAY_CTRL_RESERVED_4_MASK_LSB
);
448 POKE32(CRT_DISPLAY_CTRL
, ulDisplayCtrlReg
);
449 } while ((PEEK32(CRT_DISPLAY_CTRL
) &
451 (ulDisplayCtrlReg
& ~ulReservedBits
));
453 ("Set Crt Plane enbit:after tried %d times\n",
456 /* When turning off, there is no rule on the programming
457 * sequence since whenever the clock is off, then it does not
458 * matter whether the plane is enabled or disabled.
459 * Note: Modifying the plane bit will take effect on the next
460 * vertical sync. Need to find out if it is necessary to
461 * wait for 1 vsync before modifying the timing enable bit.
465 (~(1 << CRT_DISPLAY_CTRL_PLANE_LSB
));
466 POKE32(CRT_DISPLAY_CTRL
, ulDisplayCtrlReg
);
470 (~(1 << CRT_DISPLAY_CTRL_TIMING_LSB
));
471 POKE32(CRT_DISPLAY_CTRL
, ulDisplayCtrlReg
);
477 static void waitNextVerticalSync(int ctrl
, int delay
)
481 /* primary controller */
483 /* Do not wait when the Primary PLL is off or display control is already off.
484 This will prevent the software to wait forever. */
486 (PEEK32(PANEL_PLL_CTRL
) >> PANEL_PLL_CTRL_POWER_LSB
))
487 == PANEL_PLL_CTRL_POWER_OFF
)
490 (PEEK32(PANEL_DISPLAY_CTRL
) >>
491 PANEL_DISPLAY_CTRL_TIMING_LSB
)) ==
492 PANEL_DISPLAY_CTRL_TIMING_DISABLE
)) {
495 while (delay
-- > 0) {
496 /* Wait for end of vsync. */
499 1 & (PEEK32(SYSTEM_CTRL
) >>
500 SYSTEM_CTRL_PANEL_VSYNC_LSB
);
501 } while (status
== SYSTEM_CTRL_PANEL_VSYNC_ACTIVE
);
503 /* Wait for start of vsync. */
506 1 & (PEEK32(SYSTEM_CTRL
) >>
507 SYSTEM_CTRL_PANEL_VSYNC_LSB
);
509 SYSTEM_CTRL_PANEL_VSYNC_INACTIVE
);
514 /* Do not wait when the Primary PLL is off or display control is already off.
515 This will prevent the software to wait forever. */
516 if (((1 & (PEEK32(CRT_PLL_CTRL
) >> CRT_PLL_CTRL_POWER_LSB
))
517 == CRT_PLL_CTRL_POWER_OFF
)
518 || ((1 & (PEEK32(CRT_DISPLAY_CTRL
) >>
519 CRT_DISPLAY_CTRL_TIMING_LSB
)) ==
520 CRT_DISPLAY_CTRL_TIMING_DISABLE
)) {
524 while (delay
-- > 0) {
525 /* Wait for end of vsync. */
528 1 & (PEEK32(SYSTEM_CTRL
) >>
529 SYSTEM_CTRL_CRT_VSYNC_LSB
);
530 } while (status
== SYSTEM_CTRL_CRT_VSYNC_ACTIVE
);
532 /* Wait for start of vsync. */
535 1 & (PEEK32(SYSTEM_CTRL
) >>
536 SYSTEM_CTRL_CRT_VSYNC_LSB
);
537 } while (status
== SYSTEM_CTRL_CRT_VSYNC_INACTIVE
);
542 static void inline swPanelPowerSequence_sm750le(int disp
, int delay
)
545 reg
= PEEK32(DISPLAY_CONTROL_750LE
);
550 POKE32(DISPLAY_CONTROL_750LE
, reg
);
553 static void swPanelPowerSequence(int disp
, int delay
)
557 /* disp should be 1 to open sequence */
558 reg
= PEEK32(PANEL_DISPLAY_CTRL
);
559 reg
&= ~(1 << PANEL_DISPLAY_CTRL_FPEN_LSB
);
560 reg
= reg
| (disp
<< PANEL_DISPLAY_CTRL_FPEN_LSB
);
561 POKE32(PANEL_DISPLAY_CTRL
, reg
);
562 primaryWaitVerticalSync(delay
);
564 reg
= PEEK32(PANEL_DISPLAY_CTRL
);
565 reg
&= ~(1 << PANEL_DISPLAY_CTRL_DATA_LSB
);
566 reg
= reg
| (disp
<< PANEL_DISPLAY_CTRL_DATA_LSB
);
567 POKE32(PANEL_DISPLAY_CTRL
, reg
);
568 primaryWaitVerticalSync(delay
);
570 reg
= PEEK32(PANEL_DISPLAY_CTRL
);
571 reg
&= ~(1 << PANEL_DISPLAY_CTRL_VBIASEN_LSB
);
572 reg
= reg
| (disp
<< PANEL_DISPLAY_CTRL_VBIASEN_LSB
);
573 POKE32(PANEL_DISPLAY_CTRL
, reg
);
574 primaryWaitVerticalSync(delay
);
576 reg
= PEEK32(PANEL_DISPLAY_CTRL
);
577 reg
&= ~(1 << PANEL_DISPLAY_CTRL_FPEN_LSB
);
578 reg
= reg
| (disp
<< PANEL_DISPLAY_CTRL_FPEN_LSB
);
579 POKE32(PANEL_DISPLAY_CTRL
, reg
);
580 primaryWaitVerticalSync(delay
);
584 void ddk750_setLogicalDispOut(disp_output_t output
)
587 if (output
& PNL_2_USAGE
) {
588 /* set panel path controller select */
589 reg
= PEEK32(PANEL_DISPLAY_CTRL
);
590 reg
&= ~(3 << PANEL_DISPLAY_CTRL_SELECT_LSB
);
592 reg
| ((output
& PNL_2_MASK
) >> PNL_2_OFFSET
) <<
593 PANEL_DISPLAY_CTRL_SELECT_LSB
;
594 POKE32(PANEL_DISPLAY_CTRL
, reg
);
597 if (output
& CRT_2_USAGE
) {
598 /* set crt path controller select */
599 reg
= PEEK32(CRT_DISPLAY_CTRL
);
600 reg
&= ~(3 << CRT_DISPLAY_CTRL_SELECT_LSB
);
602 reg
| ((output
& CRT_2_MASK
) >> CRT_2_OFFSET
) <<
603 CRT_DISPLAY_CTRL_SELECT_LSB
;
605 reg
= reg
& (~(1 << CRT_DISPLAY_CTRL_BLANK_LSB
));
606 POKE32(CRT_DISPLAY_CTRL
, reg
);
608 if (output
& PRI_TP_USAGE
) {
609 /* set primary timing and plane en_bit */
611 (output
& PRI_TP_MASK
) >> PRI_TP_OFFSET
);
614 if (output
& SEC_TP_USAGE
) {
615 /* set secondary timing and plane en_bit */
617 (output
& SEC_TP_MASK
) >> SEC_TP_OFFSET
);
620 if (output
& PNL_SEQ_USAGE
) {
621 /* set panel sequence */
622 swPanelPowerSequence((output
& PNL_SEQ_MASK
) >>
626 if (output
& DAC_USAGE
)
627 setDAC((output
& DAC_MASK
) >> DAC_OFFSET
);
629 if (output
& DPMS_USAGE
)
630 ddk750_setDPMS((output
& DPMS_MASK
) >> DPMS_OFFSET
);
633 int ddk750_initDVIDisp()
635 /* Initialize DVI. If the dviInit fail and the VendorID or the DeviceID are
636 not zeroed, then set the failure flag. If it is zeroe, it might mean
637 that the system is in Dual CRT Monitor configuration. */
639 /* De-skew enabled with default 111b value.
640 This will fix some artifacts problem in some mode on board 2.2.
641 Somehow this fix does not affect board 2.1.
643 if ((dviInit(1, /* Select Rising Edge */
644 1, /* Select 24-bit bus */
645 0, /* Select Single Edge clock */
646 1, /* Enable HSync as is */
647 1, /* Enable VSync as is */
648 1, /* Enable De-skew */
649 7, /* Set the de-skew setting to maximum setup */
650 1, /* Enable continuous Sync */
651 1, /* Enable PLL Filter */
652 4 /* Use the recommended value for PLL Filter value */
653 ) != 0) && (dviGetVendorID() != 0x0000)
654 && (dviGetDeviceID() != 0x0000)) {
658 /* TODO: Initialize other display component */
664 #endif /* !CONFIG_FB_LYNXFB_DOMAINS */