|
24 | 24 |
|
25 | 25 | #define VIDCON0 (0x00) |
26 | 26 | #define VIDCON0_INTERLACE (1 << 29) |
27 | | -#define VIDCON0_VIDOUT_MASK (0x3 << 26) |
| 27 | +#define VIDCON0_VIDOUT_MASK (0x7 << 26) |
28 | 28 | #define VIDCON0_VIDOUT_SHIFT (26) |
29 | 29 | #define VIDCON0_VIDOUT_RGB (0x0 << 26) |
30 | 30 | #define VIDCON0_VIDOUT_TV (0x1 << 26) |
31 | 31 | #define VIDCON0_VIDOUT_I80_LDI0 (0x2 << 26) |
32 | 32 | #define VIDCON0_VIDOUT_I80_LDI1 (0x3 << 26) |
| 33 | +#define VIDCON0_VIDOUT_WB_RGB (0x4 << 26) |
| 34 | +#define VIDCON0_VIDOUT_WB_I80_LDI0 (0x6 << 26) |
| 35 | +#define VIDCON0_VIDOUT_WB_I80_LDI1 (0x7 << 26) |
33 | 36 |
|
34 | 37 | #define VIDCON0_L1_DATA_MASK (0x7 << 23) |
35 | 38 | #define VIDCON0_L1_DATA_SHIFT (23) |
|
77 | 80 | #define VIDCON1_LINECNT_MASK (0x7ff << 16) |
78 | 81 | #define VIDCON1_LINECNT_SHIFT (16) |
79 | 82 | #define VIDCON1_LINECNT_GET(_v) (((_v) >> 16) & 0x7ff) |
| 83 | +#define VIDCON1_FSTATUS_EVEN (1 << 15) |
80 | 84 | #define VIDCON1_VSTATUS_MASK (0x3 << 13) |
81 | 85 | #define VIDCON1_VSTATUS_SHIFT (13) |
82 | 86 | #define VIDCON1_VSTATUS_VSYNC (0x0 << 13) |
|
116 | 120 |
|
117 | 121 | /* VIDTCON0 */ |
118 | 122 |
|
| 123 | +#define VIDTCON0 (0x10) |
119 | 124 | #define VIDTCON0_VBPDE_MASK (0xff << 24) |
120 | 125 | #define VIDTCON0_VBPDE_SHIFT (24) |
121 | 126 | #define VIDTCON0_VBPDE_LIMIT (0xff) |
|
138 | 143 |
|
139 | 144 | /* VIDTCON1 */ |
140 | 145 |
|
| 146 | +#define VIDTCON1 (0x14) |
141 | 147 | #define VIDTCON1_VFPDE_MASK (0xff << 24) |
142 | 148 | #define VIDTCON1_VFPDE_SHIFT (24) |
143 | 149 | #define VIDTCON1_VFPDE_LIMIT (0xff) |
|
158 | 164 | #define VIDTCON1_HSPW_LIMIT (0xff) |
159 | 165 | #define VIDTCON1_HSPW(_x) ((_x) << 0) |
160 | 166 |
|
| 167 | +#define VIDTCON2 (0x18) |
161 | 168 | #define VIDTCON2 (0x18) |
162 | 169 | #define VIDTCON2_LINEVAL_E(_x) ((((_x) & 0x800) >> 11) << 23) |
163 | 170 | #define VIDTCON2_LINEVAL_MASK (0x7ff << 11) |
|
173 | 180 |
|
174 | 181 | /* WINCONx */ |
175 | 182 |
|
176 | | - |
| 183 | +#define WINCON(_win) (0x20 + ((_win) * 4)) |
| 184 | +#define WINCONx_CSCWIDTH_MASK (0x3 << 26) |
| 185 | +#define WINCONx_CSCWIDTH_SHIFT (26) |
| 186 | +#define WINCONx_CSCWIDTH_WIDE (0x0 << 26) |
| 187 | +#define WINCONx_CSCWIDTH_NARROW (0x3 << 26) |
| 188 | +#define WINCONx_ENLOCAL (1 << 22) |
| 189 | +#define WINCONx_BUFSTATUS (1 << 21) |
| 190 | +#define WINCONx_BUFSEL (1 << 20) |
| 191 | +#define WINCONx_BUFAUTOEN (1 << 19) |
177 | 192 | #define WINCONx_BITSWP (1 << 18) |
178 | 193 | #define WINCONx_BYTSWP (1 << 17) |
179 | 194 | #define WINCONx_HAWSWP (1 << 16) |
180 | 195 | #define WINCONx_WSWP (1 << 15) |
| 196 | +#define WINCONx_YCbCr (1 << 13) |
181 | 197 | #define WINCONx_BURSTLEN_MASK (0x3 << 9) |
182 | 198 | #define WINCONx_BURSTLEN_SHIFT (9) |
183 | 199 | #define WINCONx_BURSTLEN_16WORD (0x0 << 9) |
184 | 200 | #define WINCONx_BURSTLEN_8WORD (0x1 << 9) |
185 | 201 | #define WINCONx_BURSTLEN_4WORD (0x2 << 9) |
186 | | - |
187 | 202 | #define WINCONx_ENWIN (1 << 0) |
| 203 | + |
188 | 204 | #define WINCON0_BPPMODE_MASK (0xf << 2) |
189 | 205 | #define WINCON0_BPPMODE_SHIFT (2) |
190 | 206 | #define WINCON0_BPPMODE_1BPP (0x0 << 2) |
|
196 | 212 | #define WINCON0_BPPMODE_18BPP_666 (0x8 << 2) |
197 | 213 | #define WINCON0_BPPMODE_24BPP_888 (0xb << 2) |
198 | 214 |
|
| 215 | +#define WINCON1_LOCALSEL_CAMIF (1 << 23) |
199 | 216 | #define WINCON1_BLD_PIX (1 << 6) |
200 | | - |
201 | | -#define WINCON1_ALPHA_SEL (1 << 1) |
202 | 217 | #define WINCON1_BPPMODE_MASK (0xf << 2) |
203 | 218 | #define WINCON1_BPPMODE_SHIFT (2) |
204 | 219 | #define WINCON1_BPPMODE_1BPP (0x0 << 2) |
|
216 | 231 | #define WINCON1_BPPMODE_24BPP_A1887 (0xc << 2) |
217 | 232 | #define WINCON1_BPPMODE_25BPP_A1888 (0xd << 2) |
218 | 233 | #define WINCON1_BPPMODE_28BPP_A4888 (0xd << 2) |
| 234 | +#define WINCON1_ALPHA_SEL (1 << 1) |
219 | 235 |
|
220 | 236 | /* S5PV210 */ |
221 | 237 | #define SHADOWCON (0x34) |
|
225 | 241 | /* Local input channels (windows 0-2) */ |
226 | 242 | #define SHADOWCON_CHx_LOCAL_ENABLE(_win) (1 << (5 + (_win))) |
227 | 243 |
|
| 244 | +/* VIDOSDx */ |
| 245 | + |
| 246 | +#define VIDOSD_BASE (0x40) |
228 | 247 | #define VIDOSDxA_TOPLEFT_X_E(_x) ((((_x) & 0x800) >> 11) << 23) |
229 | 248 | #define VIDOSDxA_TOPLEFT_X_MASK (0x7ff << 11) |
230 | 249 | #define VIDOSDxA_TOPLEFT_X_SHIFT (11) |
|
293 | 312 |
|
294 | 313 | /* Interrupt controls and status */ |
295 | 314 |
|
| 315 | +#define VIDINTCON0 (0x130) |
296 | 316 | #define VIDINTCON0_FIFOINTERVAL_MASK (0x3f << 20) |
297 | 317 | #define VIDINTCON0_FIFOINTERVAL_SHIFT (20) |
298 | 318 | #define VIDINTCON0_FIFOINTERVAL_LIMIT (0x3f) |
|
321 | 341 | #define VIDINTCON0_FIFIOSEL_SHIFT (5) |
322 | 342 | #define VIDINTCON0_FIFIOSEL_WINDOW0 (0x1 << 5) |
323 | 343 | #define VIDINTCON0_FIFIOSEL_WINDOW1 (0x2 << 5) |
| 344 | +#define VIDINTCON0_FIFIOSEL_WINDOW2 (0x10 << 5) |
| 345 | +#define VIDINTCON0_FIFIOSEL_WINDOW3 (0x20 << 5) |
| 346 | +#define VIDINTCON0_FIFIOSEL_WINDOW4 (0x40 << 5) |
324 | 347 |
|
325 | 348 | #define VIDINTCON0_FIFOLEVEL_MASK (0x7 << 2) |
326 | 349 | #define VIDINTCON0_FIFOLEVEL_SHIFT (2) |
|
357 | 380 | #define WxKEYCON1_COLVAL_LIMIT (0xffffff) |
358 | 381 | #define WxKEYCON1_COLVAL(_x) ((_x) << 0) |
359 | 382 |
|
| 383 | +/* Dithering control */ |
| 384 | +#define DITHMODE (0x170) |
| 385 | +#define DITHMODE_R_POS_MASK (0x3 << 5) |
| 386 | +#define DITHMODE_R_POS_SHIFT (5) |
| 387 | +#define DITHMODE_R_POS_8BIT (0x0 << 5) |
| 388 | +#define DITHMODE_R_POS_6BIT (0x1 << 5) |
| 389 | +#define DITHMODE_R_POS_5BIT (0x2 << 5) |
| 390 | +#define DITHMODE_G_POS_MASK (0x3 << 3) |
| 391 | +#define DITHMODE_G_POS_SHIFT (3) |
| 392 | +#define DITHMODE_G_POS_8BIT (0x0 << 3) |
| 393 | +#define DITHMODE_G_POS_6BIT (0x1 << 3) |
| 394 | +#define DITHMODE_G_POS_5BIT (0x2 << 3) |
| 395 | +#define DITHMODE_B_POS_MASK (0x3 << 1) |
| 396 | +#define DITHMODE_B_POS_SHIFT (1) |
| 397 | +#define DITHMODE_B_POS_8BIT (0x0 << 1) |
| 398 | +#define DITHMODE_B_POS_6BIT (0x1 << 1) |
| 399 | +#define DITHMODE_B_POS_5BIT (0x2 << 1) |
| 400 | +#define DITHMODE_DITH_EN (1 << 0) |
360 | 401 |
|
361 | 402 | /* Window blanking (MAP) */ |
362 | | - |
| 403 | +#define WINxMAP(_win) (0x180 + ((_win) * 4)) |
363 | 404 | #define WINxMAP_MAP (1 << 24) |
364 | 405 | #define WINxMAP_MAP_COLOUR_MASK (0xffffff << 0) |
365 | 406 | #define WINxMAP_MAP_COLOUR_SHIFT (0) |
366 | 407 | #define WINxMAP_MAP_COLOUR_LIMIT (0xffffff) |
367 | 408 | #define WINxMAP_MAP_COLOUR(_x) ((_x) << 0) |
368 | 409 |
|
| 410 | +/* Winodw palette control */ |
| 411 | +#define WPALCON (0x1A0) |
369 | 412 | #define WPALCON_PAL_UPDATE (1 << 9) |
| 413 | +#define WPALCON_W4PAL_16BPP_A555 (1 << 8) |
| 414 | +#define WPALCON_W3PAL_16BPP_A555 (1 << 7) |
| 415 | +#define WPALCON_W2PAL_16BPP_A555 (1 << 6) |
370 | 416 | #define WPALCON_W1PAL_MASK (0x7 << 3) |
371 | 417 | #define WPALCON_W1PAL_SHIFT (3) |
372 | 418 | #define WPALCON_W1PAL_25BPP_A888 (0x0 << 3) |
|
376 | 422 | #define WPALCON_W1PAL_18BPP (0x4 << 3) |
377 | 423 | #define WPALCON_W1PAL_16BPP_A555 (0x5 << 3) |
378 | 424 | #define WPALCON_W1PAL_16BPP_565 (0x6 << 3) |
379 | | - |
380 | 425 | #define WPALCON_W0PAL_MASK (0x7 << 0) |
381 | 426 | #define WPALCON_W0PAL_SHIFT (0) |
382 | 427 | #define WPALCON_W0PAL_25BPP_A888 (0x0 << 0) |
|
394 | 439 | #define BLENDCON_NEW_4BIT_ALPHA_VALUE (0 << 0) |
395 | 440 |
|
396 | 441 | #define S3C_FB_MAX_WIN (5) /* number of hardware windows available. */ |
397 | | -#define VIDCON1_FSTATUS_EVEN (1 << 15) |
398 | | - |
399 | | -/* Video timing controls */ |
400 | | -#define VIDTCON0 (0x10) |
401 | | -#define VIDTCON1 (0x14) |
402 | | -#define VIDTCON2 (0x18) |
403 | | - |
404 | | -/* Window position controls */ |
405 | | - |
406 | | -#define WINCON(_win) (0x20 + ((_win) * 4)) |
407 | | - |
408 | | -/* OSD1 and OSD4 do not have register D */ |
409 | | - |
410 | | -#define VIDOSD_BASE (0x40) |
411 | | - |
412 | | -#define VIDINTCON0 (0x130) |
413 | | - |
414 | | -/* WINCONx */ |
415 | | - |
416 | | -#define WINCONx_CSCWIDTH_MASK (0x3 << 26) |
417 | | -#define WINCONx_CSCWIDTH_SHIFT (26) |
418 | | -#define WINCONx_CSCWIDTH_WIDE (0x0 << 26) |
419 | | -#define WINCONx_CSCWIDTH_NARROW (0x3 << 26) |
420 | | - |
421 | | -#define WINCONx_ENLOCAL (1 << 22) |
422 | | -#define WINCONx_BUFSTATUS (1 << 21) |
423 | | -#define WINCONx_BUFSEL (1 << 20) |
424 | | -#define WINCONx_BUFAUTOEN (1 << 19) |
425 | | -#define WINCONx_YCbCr (1 << 13) |
426 | | - |
427 | | -#define WINCON1_LOCALSEL_CAMIF (1 << 23) |
428 | | - |
429 | | -#define WINCON2_LOCALSEL_CAMIF (1 << 23) |
430 | | -#define WINCON2_BLD_PIX (1 << 6) |
431 | | - |
432 | | -#define WINCON2_ALPHA_SEL (1 << 1) |
433 | | -#define WINCON2_BPPMODE_MASK (0xf << 2) |
434 | | -#define WINCON2_BPPMODE_SHIFT (2) |
435 | | -#define WINCON2_BPPMODE_1BPP (0x0 << 2) |
436 | | -#define WINCON2_BPPMODE_2BPP (0x1 << 2) |
437 | | -#define WINCON2_BPPMODE_4BPP (0x2 << 2) |
438 | | -#define WINCON2_BPPMODE_8BPP_1232 (0x4 << 2) |
439 | | -#define WINCON2_BPPMODE_16BPP_565 (0x5 << 2) |
440 | | -#define WINCON2_BPPMODE_16BPP_A1555 (0x6 << 2) |
441 | | -#define WINCON2_BPPMODE_16BPP_I1555 (0x7 << 2) |
442 | | -#define WINCON2_BPPMODE_18BPP_666 (0x8 << 2) |
443 | | -#define WINCON2_BPPMODE_18BPP_A1665 (0x9 << 2) |
444 | | -#define WINCON2_BPPMODE_19BPP_A1666 (0xa << 2) |
445 | | -#define WINCON2_BPPMODE_24BPP_888 (0xb << 2) |
446 | | -#define WINCON2_BPPMODE_24BPP_A1887 (0xc << 2) |
447 | | -#define WINCON2_BPPMODE_25BPP_A1888 (0xd << 2) |
448 | | -#define WINCON2_BPPMODE_28BPP_A4888 (0xd << 2) |
449 | | - |
450 | | -#define WINCON3_BLD_PIX (1 << 6) |
451 | | - |
452 | | -#define WINCON3_ALPHA_SEL (1 << 1) |
453 | | -#define WINCON3_BPPMODE_MASK (0xf << 2) |
454 | | -#define WINCON3_BPPMODE_SHIFT (2) |
455 | | -#define WINCON3_BPPMODE_1BPP (0x0 << 2) |
456 | | -#define WINCON3_BPPMODE_2BPP (0x1 << 2) |
457 | | -#define WINCON3_BPPMODE_4BPP (0x2 << 2) |
458 | | -#define WINCON3_BPPMODE_16BPP_565 (0x5 << 2) |
459 | | -#define WINCON3_BPPMODE_16BPP_A1555 (0x6 << 2) |
460 | | -#define WINCON3_BPPMODE_16BPP_I1555 (0x7 << 2) |
461 | | -#define WINCON3_BPPMODE_18BPP_666 (0x8 << 2) |
462 | | -#define WINCON3_BPPMODE_18BPP_A1665 (0x9 << 2) |
463 | | -#define WINCON3_BPPMODE_19BPP_A1666 (0xa << 2) |
464 | | -#define WINCON3_BPPMODE_24BPP_888 (0xb << 2) |
465 | | -#define WINCON3_BPPMODE_24BPP_A1887 (0xc << 2) |
466 | | -#define WINCON3_BPPMODE_25BPP_A1888 (0xd << 2) |
467 | | -#define WINCON3_BPPMODE_28BPP_A4888 (0xd << 2) |
468 | | - |
469 | | -#define VIDINTCON0_FIFIOSEL_WINDOW2 (0x10 << 5) |
470 | | -#define VIDINTCON0_FIFIOSEL_WINDOW3 (0x20 << 5) |
471 | | -#define VIDINTCON0_FIFIOSEL_WINDOW4 (0x40 << 5) |
472 | | - |
473 | | -#define DITHMODE (0x170) |
474 | | -#define WINxMAP(_win) (0x180 + ((_win) * 4)) |
475 | | - |
476 | | - |
477 | | -#define DITHMODE_R_POS_MASK (0x3 << 5) |
478 | | -#define DITHMODE_R_POS_SHIFT (5) |
479 | | -#define DITHMODE_R_POS_8BIT (0x0 << 5) |
480 | | -#define DITHMODE_R_POS_6BIT (0x1 << 5) |
481 | | -#define DITHMODE_R_POS_5BIT (0x2 << 5) |
482 | | - |
483 | | -#define DITHMODE_G_POS_MASK (0x3 << 3) |
484 | | -#define DITHMODE_G_POS_SHIFT (3) |
485 | | -#define DITHMODE_G_POS_8BIT (0x0 << 3) |
486 | | -#define DITHMODE_G_POS_6BIT (0x1 << 3) |
487 | | -#define DITHMODE_G_POS_5BIT (0x2 << 3) |
488 | | - |
489 | | -#define DITHMODE_B_POS_MASK (0x3 << 1) |
490 | | -#define DITHMODE_B_POS_SHIFT (1) |
491 | | -#define DITHMODE_B_POS_8BIT (0x0 << 1) |
492 | | -#define DITHMODE_B_POS_6BIT (0x1 << 1) |
493 | | -#define DITHMODE_B_POS_5BIT (0x2 << 1) |
494 | | - |
495 | | -#define DITHMODE_DITH_EN (1 << 0) |
496 | | - |
497 | | -#define WPALCON (0x1A0) |
498 | | - |
499 | | -/* Palette control */ |
500 | | -/* Note for S5PC100: you can still use those macros on WPALCON (aka WPALCON_L), |
501 | | - * but make sure that WPALCON_H W2PAL-W4PAL entries are zeroed out */ |
502 | | -#define WPALCON_W4PAL_16BPP_A555 (1 << 8) |
503 | | -#define WPALCON_W3PAL_16BPP_A555 (1 << 7) |
504 | | -#define WPALCON_W2PAL_16BPP_A555 (1 << 6) |
505 | | - |
506 | 442 |
|
507 | 443 | /* Notes on per-window bpp settings |
508 | 444 | * |
|
0 commit comments