summaryrefslogtreecommitdiff
path: root/src/gfx/gfx_priv.h
blob: 7b255a5e31e19262b38096ed7a48441e11bba72a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
/* Copyright (c) 2005 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 *
 * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from this
 * software without specific prior written permission.
 * */

/* 
 * This header file contains the prototypes for local and private routines.
 * */

/*---------------------------------*/
/* FIRST GENERATION INITIALIZATION */
/*---------------------------------*/

#if GFX_INIT_GU1

/* PRIVATE ROUTINES */

unsigned char gfx_gxm_config_read(unsigned char index);

/* DYNAMIC ROUTINES */

#if GFX_INIT_DYNAMIC
unsigned long gu1_get_core_freq(void);
unsigned long gu1_get_cpu_register_base(void);
unsigned long gu1_get_graphics_register_base(void);
unsigned long gu1_get_frame_buffer_base(void);
unsigned long gu1_get_frame_buffer_size(void);
unsigned long gu1_get_vid_register_base(void);
unsigned long gu1_get_vip_register_base(void);
#endif

#endif

/*----------------------------------*/
/* SECOND GENERATION INITIALIZATION */
/*----------------------------------*/

#if GFX_INIT_GU2

/* DYNAMIC ROUTINES */

#if GFX_INIT_DYNAMIC
unsigned long gu2_get_core_freq(void);
unsigned long gu2_get_cpu_register_base(void);
unsigned long gu2_get_graphics_register_base(void);
unsigned long gu2_get_frame_buffer_base(void);
unsigned long gu2_get_frame_buffer_size(void);
unsigned long gu2_get_vid_register_base(void);
unsigned long gu2_get_vip_register_base(void);
#endif

#endif

/*----------------------------------*/
/* MSR ROUTINES                     */
/*----------------------------------*/

#if GFX_MSR_REDCLOUD

/* DYNAMIC ROUTINES */

#if GFX_MSR_DYNAMIC
int redcloud_msr_init(void);
DEV_STATUS redcloud_id_msr_device(MSR * pDev, unsigned long address);
DEV_STATUS redcloud_get_msr_dev_address(unsigned int device,
                                        unsigned long *address);
DEV_STATUS redcloud_get_glink_id_at_address(unsigned int *device,
                                            unsigned long address);
DEV_STATUS redcloud_msr_read(unsigned int device, unsigned int msrRegister,
                             Q_WORD * msrValue);
DEV_STATUS redcloud_msr_write(unsigned int device, unsigned int msrRegister,
                              Q_WORD * msrValue);
#endif

#endif

void gfx_set_display_video_enable(int enable);
void gfx_set_display_video_size(unsigned short width, unsigned short height);
void gfx_set_display_video_offset(unsigned long offset);
unsigned long gfx_get_display_video_offset(void);
unsigned long gfx_get_display_video_size(void);

/*----------------------------------*/
/* FIRST GENERATION DISPLAY         */
/*----------------------------------*/

#if GFX_DISPLAY_GU1

/* PRIVATE ROUTINES */

void gu1_enable_compression(void);
void gu1_disable_compression(void);
void gu1_delay_approximate(unsigned long milliseconds);
void gu1_delay_precise(unsigned long milliseconds);

/* DYNAMIC ROUTINES */

#if GFX_DISPLAY_DYNAMIC
void gu1_set_display_video_enable(int enable);
void gu1_set_display_video_size(unsigned short width, unsigned short height);
void gu1_set_display_video_offset(unsigned long offset);
unsigned long gu1_get_display_video_offset(void);
unsigned long gu1_get_display_video_size(void);
int gu1_set_display_bpp(unsigned short bpp);
int gu1_is_display_mode_supported(int xres, int yres, int bpp, int hz);
int gu1_set_display_mode(int xres, int yres, int bpp, int hz);
int gu1_set_display_timings(unsigned short bpp, unsigned short flags,
                            unsigned short hactive, unsigned short hblank_start,
                            unsigned short hsync_start,
                            unsigned short hsync_end, unsigned short hblank_end,
                            unsigned short htotal, unsigned short vactive,
                            unsigned short vblank_start,
                            unsigned short vsync_start,
                            unsigned short vsync_end, unsigned short vblank_end,
                            unsigned short vtotal, unsigned long frequency);
int gu1_set_vtotal(unsigned short vtotal);
void gu1_set_display_pitch(unsigned short pitch);
void gu1_set_display_offset(unsigned long offset);
int gu1_set_display_palette_entry(unsigned long index, unsigned long palette);
int gu1_set_display_palette(unsigned long *palette);
void gu1_video_shutdown(void);
void gu1_set_cursor_enable(int enable);
void gu1_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor);
void gu1_set_cursor_position(unsigned long memoffset,
                             unsigned short xpos, unsigned short ypos,
                             unsigned short xhotspot, unsigned short yhotspot);
void gu1_set_cursor_shape32(unsigned long memoffset,
                            unsigned long *andmask, unsigned long *xormask);
int gu1_set_compression_enable(int enable);
int gu1_set_compression_offset(unsigned long offset);
int gu1_set_compression_pitch(unsigned short pitch);
int gu1_set_compression_size(unsigned short size);
void gu1_set_display_priority_high(int enable);
int gu1_test_timing_active(void);
int gu1_test_vertical_active(void);
int gu1_wait_vertical_blank(void);
void gu1_delay_milliseconds(unsigned long milliseconds);
void gu1_delay_microseconds(unsigned long microseconds);
void gu1_enable_panning(int x, int y);
int gu1_set_fixed_timings(int panelResX, int panelResY, unsigned short width,
                          unsigned short height, unsigned short bpp);
int gu1_set_panel_present(int panelResX, int panelResY, unsigned short width,
                          unsigned short height, unsigned short bpp);
void gu1_reset_timing_lock(void);
int gu1_get_display_details(unsigned int mode, int *xres, int *yres, int *hz);
unsigned short gu1_get_display_pitch(void);
unsigned long gu1_get_max_supported_pixel_clock(void);
int gu1_mode_frequency_supported(int xres, int yres, int bpp,
                                 unsigned long frequency);
int gu1_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz,
                                       unsigned long frequency);
int gu1_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz,
                                  unsigned long frequency);
int gu1_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz,
                                       int *frequency);
int gu1_get_display_mode_count(void);
int gu1_get_display_mode(int *xres, int *yres, int *bpp, int *hz);
unsigned long gu1_get_frame_buffer_line_size(void);
unsigned short gu1_get_hactive(void);
unsigned short gu1_get_hblank_start(void);
unsigned short gu1_get_hsync_start(void);
unsigned short gu1_get_hsync_end(void);
unsigned short gu1_get_hblank_end(void);
unsigned short gu1_get_htotal(void);
unsigned short gu1_get_vactive(void);
unsigned short gu1_get_vline(void);
unsigned short gu1_get_vblank_start(void);
unsigned short gu1_get_vsync_start(void);
unsigned short gu1_get_vsync_end(void);
unsigned short gu1_get_vblank_end(void);
unsigned short gu1_get_vtotal(void);
unsigned short gu1_get_display_bpp(void);
unsigned long gu1_get_display_offset(void);
int gu1_get_display_palette_entry(unsigned long index, unsigned long *palette);
void gu1_get_display_palette(unsigned long *palette);
unsigned long gu1_get_cursor_enable(void);
unsigned long gu1_get_cursor_offset(void);
unsigned long gu1_get_cursor_position(void);
unsigned long gu1_get_cursor_clip(void);
unsigned long gu1_get_cursor_color(int color);
unsigned long gu1_get_icon_enable(void);
unsigned long gu1_get_icon_offset(void);
unsigned long gu1_get_icon_position(void);
unsigned long gu1_get_icon_color(int color);
int gu1_get_compression_enable(void);
unsigned long gu1_get_compression_offset(void);
unsigned short gu1_get_compression_pitch(void);
unsigned short gu1_get_compression_size(void);
int gu1_get_display_priority_high(void);
int gu1_get_valid_bit(int line);
#endif

#endif

void gfx_set_display_video_format(unsigned long format);
void gfx_set_display_video_yuv_offsets(unsigned long yoffset,
                                       unsigned long uoffset,
                                       unsigned long voffset);
void gfx_set_display_video_yuv_pitch(unsigned long ypitch,
                                     unsigned long uvpitch);
void gfx_set_display_video_downscale(unsigned short srch, unsigned short dsth);
void gfx_set_display_video_vertical_downscale_enable(int enable);
void gfx_get_display_video_yuv_offsets(unsigned long *yoffset,
                                       unsigned long *uoffset,
                                       unsigned long *voffset);
void gfx_get_display_video_yuv_pitch(unsigned long *ypitch,
                                     unsigned long *uvpitch);
unsigned long gfx_get_display_video_downscale_delta(void);
int gfx_get_display_video_downscale_enable(void);

/*----------------------------------*/
/* SECOND GENERATION DISPLAY        */
/*----------------------------------*/

#if GFX_DISPLAY_GU2

/* DYNAMIC ROUTINES */

#if GFX_DISPLAY_DYNAMIC
void gu2_get_display_video_yuv_offsets(unsigned long *yoffset,
                                       unsigned long *uoffset,
                                       unsigned long *voffset);
void gu2_get_display_video_yuv_pitch(unsigned long *ypitch,
                                     unsigned long *uvpitch);
unsigned long gu2_get_display_video_downscale_delta(void);
int gu2_get_display_video_downscale_enable(void);
void gu2_set_display_video_yuv_offsets(unsigned long yoffset,
                                       unsigned long uoffset,
                                       unsigned long voffset);
void gu2_set_display_video_format(unsigned long format);
void gu2_set_display_video_yuv_pitch(unsigned long ypitch,
                                     unsigned long uvpitch);
void gu2_set_display_video_downscale(unsigned short srch, unsigned short dsth);
void gu2_set_display_video_vertical_downscale_enable(int enable);
void gu2_set_display_video_enable(int enable);
void gu2_set_display_video_size(unsigned short width, unsigned short height);
void gu2_set_display_video_offset(unsigned long offset);
unsigned long gu2_get_display_video_offset(void);
unsigned long gu2_get_display_video_size(void);
int gu2_set_display_bpp(unsigned short bpp);
int gu2_is_display_mode_supported(int xres, int yres, int bpp, int hz);
int gu2_set_display_mode(int xres, int yres, int bpp, int hz);
int gu2_set_display_timings(unsigned short bpp, unsigned short flags,
                            unsigned short hactive, unsigned short hblank_start,
                            unsigned short hsync_start,
                            unsigned short hsync_end, unsigned short hblank_end,
                            unsigned short htotal, unsigned short vactive,
                            unsigned short vblank_start,
                            unsigned short vsync_start,
                            unsigned short vsync_end, unsigned short vblank_end,
                            unsigned short vtotal, unsigned long frequency);
int gu2_set_vtotal(unsigned short vtotal);
void gu2_set_display_pitch(unsigned short pitch);
void gu2_set_display_offset(unsigned long offset);
int gu2_set_display_palette_entry(unsigned long index, unsigned long palette);
int gu2_set_display_palette(unsigned long *palette);
void gu2_set_cursor_enable(int enable);
void gu2_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor);
void gu2_set_cursor_position(unsigned long memoffset,
                             unsigned short xpos, unsigned short ypos,
                             unsigned short xhotspot, unsigned short yhotspot);
void gu2_set_cursor_shape32(unsigned long memoffset,
                            unsigned long *andmask, unsigned long *xormask);
void gu2_set_cursor_shape64(unsigned long memoffset,
                            unsigned long *andmask, unsigned long *xormask);
void gu2_set_icon_enable(int enable);
void gu2_set_icon_colors(unsigned long color0, unsigned long color1,
                         unsigned long color2);
void gu2_set_icon_position(unsigned long memoffset, unsigned short xpos);
void gu2_set_icon_shape64(unsigned long memoffset, unsigned long *andmask,
                          unsigned long *xormask, unsigned int lines);
int gu2_set_compression_enable(int enable);
int gu2_set_compression_offset(unsigned long offset);
int gu2_set_compression_pitch(unsigned short pitch);
int gu2_set_compression_size(unsigned short size);
void gu2_set_display_priority_high(int enable);
int gu2_test_timing_active(void);
int gu2_test_vertical_active(void);
int gu2_wait_vertical_blank(void);
void gu2_delay_milliseconds(unsigned long milliseconds);
void gu2_delay_microseconds(unsigned long microseconds);
void gu2_enable_panning(int x, int y);
int gu2_is_panel_mode_supported(int panelResX, int panelResY,
                                unsigned short width, unsigned short height,
                                unsigned short bpp);
int gu2_set_fixed_timings(int panelResX, int panelResY, unsigned short width,
                          unsigned short height, unsigned short bpp);
int gu2_set_panel_present(int panelResX, int panelResY, unsigned short width,
                          unsigned short height, unsigned short bpp);
void gu2_reset_timing_lock(void);
int gu2_get_display_details(unsigned int mode, int *xres, int *yres, int *hz);
unsigned short gu2_get_display_pitch(void);
unsigned long gu2_get_max_supported_pixel_clock(void);
int gu2_mode_frequency_supported(int xres, int yres, int bpp,
                                 unsigned long frequency);
int gu2_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz,
                                       unsigned long frequency);
int gu2_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz,
                                  unsigned long frequency);
int gu2_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz,
                                       int *frequency);
int gu2_get_display_mode_count(void);
int gu2_get_display_mode(int *xres, int *yres, int *bpp, int *hz);
unsigned long gu2_get_frame_buffer_line_size(void);
unsigned short gu2_get_hactive(void);
unsigned short gu2_get_hblank_start(void);
unsigned short gu2_get_hsync_start(void);
unsigned short gu2_get_hsync_end(void);
unsigned short gu2_get_hblank_end(void);
unsigned short gu2_get_htotal(void);
unsigned short gu2_get_vactive(void);
unsigned short gu2_get_vline(void);
unsigned short gu2_get_vblank_start(void);
unsigned short gu2_get_vsync_start(void);
unsigned short gu2_get_vsync_end(void);
unsigned short gu2_get_vblank_end(void);
unsigned short gu2_get_vtotal(void);
unsigned short gu2_get_display_bpp(void);
unsigned long gu2_get_display_offset(void);
int gu2_get_display_palette_entry(unsigned long index, unsigned long *palette);
void gu2_get_display_palette(unsigned long *palette);
unsigned long gu2_get_cursor_enable(void);
unsigned long gu2_get_cursor_offset(void);
unsigned long gu2_get_cursor_position(void);
unsigned long gu2_get_cursor_clip(void);
unsigned long gu2_get_cursor_color(int color);
unsigned long gu2_get_icon_enable(void);
unsigned long gu2_get_icon_offset(void);
unsigned long gu2_get_icon_position(void);
unsigned long gu2_get_icon_color(int color);
int gu2_get_compression_enable(void);
unsigned long gu2_get_compression_offset(void);
unsigned short gu2_get_compression_pitch(void);
unsigned short gu2_get_compression_size(void);
int gu2_get_valid_bit(int line);
#endif

#endif

/*----------------------------------*/
/* FIRST GENERATION 2D ACCELERATION */
/*----------------------------------*/

#if GFX_2DACCEL_GU1

/* PRIVATE ROUTINES */

void gu1_solid_fill(unsigned short x, unsigned short y,
                    unsigned short width, unsigned short height,
                    unsigned long color);
void gu1_detect_blt_buffer_base(void);

/* DYNAMIC ROUTINES */

#if GFX_2DACCEL_DYNAMIC
void gu1_set_bpp(unsigned short bpp);
void gu1_set_solid_pattern(unsigned long color);
void gu1_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor,
                          unsigned long data0, unsigned long data1,
                          unsigned char transparency);
void gu1_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor,
                           unsigned long data0, unsigned long data1,
                           unsigned long data2, unsigned long data3,
                           unsigned char transparency);
void gu1_load_color_pattern_line(short y, unsigned long *pattern_8x8);
void gu1_set_solid_source(unsigned long color);
void gu1_set_mono_source(unsigned long bgcolor, unsigned long fgcolor,
                         unsigned short transparent);
void gu1_set_pattern_flags(unsigned short flags);
void gu1_set_raster_operation(unsigned char rop);
void gu1_pattern_fill(unsigned short x, unsigned short y,
                      unsigned short width, unsigned short height);
void gu1_color_pattern_fill(unsigned short x, unsigned short y,
                            unsigned short width, unsigned short height,
                            unsigned long *pattern);
void gu1_screen_to_screen_blt(unsigned short srcx, unsigned short srcy,
                              unsigned short dstx, unsigned short dsty,
                              unsigned short width, unsigned short height);
void gu1_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy,
                               unsigned short dstx, unsigned short dsty,
                               unsigned short width, unsigned short height,
                               unsigned long color);
void gu1_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy,
                                    unsigned short dstx, unsigned short dsty,
                                    unsigned short width, unsigned short height,
                                    unsigned char *data, long pitch);
void gu1_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy,
                                     unsigned short dstx, unsigned short dsty,
                                     unsigned short width,
                                     unsigned short height, unsigned char *data,
                                     long pitch, unsigned long color);
void gu1_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy,
                                   unsigned short dstx, unsigned short dsty,
                                   unsigned short width, unsigned short height,
                                   unsigned char *data, short pitch);
void gu1_text_blt(unsigned short dstx, unsigned short dsty,
                  unsigned short width, unsigned short height,
                  unsigned char *data);
void gu1_bresenham_line(unsigned short x, unsigned short y,
                        unsigned short length, unsigned short initerr,
                        unsigned short axialerr, unsigned short diagerr,
                        unsigned short flags);
void gu1_wait_until_idle(void);
int gu1_test_blt_pending(void);
#endif

#endif

/*-----------------------------------*/
/* SECOND GENERATION 2D ACCELERATION */
/*-----------------------------------*/

#if GFX_2DACCEL_GU2

/* DYNAMIC ROUTINES */

#if GFX_2DACCEL_DYNAMIC
void gfx_reset_pitch(unsigned short pitch);
void gu2_reset_pitch(unsigned short pitch);
void gu2_set_bpp(unsigned short bpp);
void gu2_set_solid_pattern(unsigned long color);
void gu2_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor,
                          unsigned long data0, unsigned long data1,
                          unsigned char transparency);
void gu2_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor,
                           unsigned long data0, unsigned long data1,
                           unsigned long data2, unsigned long data3,
                           unsigned char transparency);
void gu2_load_color_pattern_line(short y, unsigned long *pattern_8x8);
void gu2_set_solid_source(unsigned long color);
void gu2_set_mono_source(unsigned long bgcolor, unsigned long fgcolor,
                         unsigned short transparent);
void gu2_set_pattern_flags(unsigned short flags);
void gu2_set_raster_operation(unsigned char rop);
void gu2_pattern_fill(unsigned short x, unsigned short y,
                      unsigned short width, unsigned short height);
void gu2_color_pattern_fill(unsigned short x, unsigned short y,
                            unsigned short width, unsigned short height,
                            unsigned long *pattern);
void gu2_screen_to_screen_blt(unsigned short srcx, unsigned short srcy,
                              unsigned short dstx, unsigned short dsty,
                              unsigned short width, unsigned short height);
void gu2_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy,
                               unsigned short dstx, unsigned short dsty,
                               unsigned short width, unsigned short height,
                               unsigned long color);
void gu2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy,
                                    unsigned short dstx, unsigned short dsty,
                                    unsigned short width, unsigned short height,
                                    unsigned char *data, long pitch);
void gu2_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy,
                                     unsigned short dstx, unsigned short dsty,
                                     unsigned short width,
                                     unsigned short height, unsigned char *data,
                                     long pitch, unsigned long color);
void gu2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy,
                                   unsigned short dstx, unsigned short dsty,
                                   unsigned short width, unsigned short height,
                                   unsigned char *data, short pitch);
void gu2_text_blt(unsigned short dstx, unsigned short dsty,
                  unsigned short width, unsigned short height,
                  unsigned char *data);
void gu2_bresenham_line(unsigned short x, unsigned short y,
                        unsigned short length, unsigned short initerr,
                        unsigned short axialerr, unsigned short diagerr,
                        unsigned short flags);
void gu2_wait_until_idle(void);
int gu2_test_blt_pending(void);

void gu22_set_source_stride(unsigned short stride);
void gu22_set_destination_stride(unsigned short stride);
void gu22_set_pattern_origin(int x, int y);
void gu22_set_source_transparency(unsigned long color, unsigned long mask);
void gu22_set_alpha_mode(int mode);
void gu22_set_alpha_value(unsigned char value);
void gu22_pattern_fill(unsigned long dstoffset, unsigned short width,
                       unsigned short height);
void gu22_color_pattern_fill(unsigned long dstoffset, unsigned short width,
                             unsigned short height, unsigned long *pattern);
void gu22_screen_to_screen_blt(unsigned long srcoffset,
                               unsigned long dstoffset, unsigned short width,
                               unsigned short height, int flags);
void gu22_mono_expand_blt(unsigned long srcbase, unsigned short srcx,
                          unsigned short srcy, unsigned long dstoffset,
                          unsigned short width, unsigned short height,
                          int byte_packed);
void gu22_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy,
                                     unsigned long dstoffset,
                                     unsigned short width,
                                     unsigned short height, unsigned char *data,
                                     short pitch);
void gu22_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy,
                                    unsigned long dstoffset,
                                    unsigned short width, unsigned short height,
                                    unsigned char *data, short pitch);
void gu22_text_blt(unsigned long dstoffset, unsigned short width,
                   unsigned short height, unsigned char *data);
void gu22_bresenham_line(unsigned long dstoffset, unsigned short length,
                         unsigned short initerr, unsigned short axialerr,
                         unsigned short diagerr, unsigned short flags);
void gu22_sync_to_vblank(void);
#endif

#endif

void gfx_reset_video(void);
int gfx_set_display_control(int sync_polarities);
int gfx_set_screen_enable(int enable);

/*-----------------------*/
/* CS5530 VIDEO ROUTINES */
/*-----------------------*/

#if GFX_VIDEO_CS5530

/* PRIVATE ROUTINES */

/* DYNAMIC ROUTINES */

#if GFX_VIDEO_DYNAMIC
void cs5530_reset_video(void);
int cs5530_set_display_control(int sync_polarities);
void cs5530_set_clock_frequency(unsigned long frequency);
unsigned long cs5530_get_clock_frequency(void);
int cs5530_set_crt_enable(int enable);
int cs5530_get_sync_polarities(void);
int cs5530_get_vsa2_softvga_enable(void);
int cs5530_set_video_enable(int enable);
int cs5530_set_video_format(unsigned long format);
int cs5530_set_video_size(unsigned short width, unsigned short height);
int cs5530_set_video_offset(unsigned long offset);
int cs5530_set_video_window(short x, short y, unsigned short w,
                            unsigned short h);
int cs5530_set_video_left_crop(unsigned short x);
int cs5530_set_video_scale(unsigned short srcw, unsigned short srch,
                           unsigned short dstw, unsigned short dsth);
int cs5530_set_video_color_key(unsigned long key, unsigned long mask,
                               int bluescreen);
int cs5530_set_video_filter(int xfilter, int yfilter);
int cs5530_set_video_palette(unsigned long *palette);
int cs5530_set_video_palette_entry(unsigned long index, unsigned long color);
int cs5530_disable_softvga(void);
int cs5530_enable_softvga(void);
unsigned long cs5530_get_max_video_width(void);

/* READ ROUTINES IN GFX_VID.C */

int cs5530_get_video_enable(void);
int cs5530_get_video_format(void);
unsigned long cs5530_get_video_src_size(void);
unsigned long cs5530_get_video_line_size(void);
unsigned long cs5530_get_video_xclip(void);
unsigned long cs5530_get_video_offset(void);
unsigned long cs5530_get_video_upscale(void);
unsigned long cs5530_get_video_scale(void);
unsigned long cs5530_get_video_dst_size(void);
unsigned long cs5530_get_video_position(void);
unsigned long cs5530_get_video_color_key(void);
unsigned long cs5530_get_video_color_key_mask(void);
int cs5530_get_video_palette_entry(unsigned long index, unsigned long *palette);
int cs5530_get_video_color_key_src(void);
int cs5530_get_video_filter(void);
unsigned long cs5530_read_crc(void);
#endif
#endif

/*-----------------------*/
/* SC1200 VIDEO ROUTINES */
/*-----------------------*/

#if GFX_VIDEO_SC1200

/* PRIVATE ROUTINES */

/* DYNAMIC ROUTINES */

#if GFX_VIDEO_DYNAMIC
void sc1200_reset_video(void);
int sc1200_set_display_control(int sync_polarities);
int sc1200_set_screen_enable(int enable);
void sc1200_set_clock_frequency(unsigned long frequency);
unsigned long sc1200_get_clock_frequency(void);
int sc1200_set_crt_enable(int enable);
int sc1200_get_sync_polarities(void);
int sc1200_get_vsa2_softvga_enable(void);
int sc1200_set_video_enable(int enable);
int sc1200_set_video_format(unsigned long format);
int sc1200_set_video_size(unsigned short width, unsigned short height);
int sc1200_set_video_offset(unsigned long offset);
int sc1200_set_video_window(short x, short y, unsigned short w,
                            unsigned short h);
int sc1200_set_video_left_crop(unsigned short x);
int sc1200_set_video_upscale(unsigned short srcw, unsigned short srch,
                             unsigned short dstw, unsigned short dsth);
int sc1200_set_video_scale(unsigned short srcw, unsigned short srch,
                           unsigned short dstw, unsigned short dsth);
int sc1200_set_video_downscale_config(unsigned short type, unsigned short m);
int sc1200_set_video_color_key(unsigned long key, unsigned long mask,
                               int bluescreen);
int sc1200_set_video_filter(int xfilter, int yfilter);
int sc1200_set_video_palette(unsigned long *palette);
int sc1200_set_video_palette_bypass(int enable);
int sc1200_set_video_palette_entry(unsigned long index, unsigned long color);
int sc1200_set_video_downscale_coefficients(unsigned short coef1,
                                            unsigned short coef2,
                                            unsigned short coef3,
                                            unsigned short coef4);
int sc1200_set_video_downscale_enable(int enable);
int sc1200_set_video_source(VideoSourceType source);
int sc1200_set_vbi_source(VbiSourceType source);
int sc1200_set_vbi_lines(unsigned long even, unsigned long odd);
int sc1200_set_vbi_total(unsigned long even, unsigned long odd);
int sc1200_set_video_interlaced(int enable);
int sc1200_set_color_space_YUV(int enable);
int sc1200_set_vertical_scaler_offset(char offset);
int sc1200_set_top_line_in_odd(int enable);
int sc1200_set_genlock_delay(unsigned long delay);
int sc1200_set_genlock_enable(int flags);
int sc1200_set_video_cursor(unsigned long key, unsigned long mask,
                            unsigned short select_color2, unsigned long color1,
                            unsigned long color2);
int sc1200_set_video_request(short x, short y);

int sc1200_select_alpha_region(int region);
int sc1200_set_alpha_enable(int enable);
int sc1200_set_alpha_window(short x, short y,
                            unsigned short width, unsigned short height);
int sc1200_set_alpha_value(unsigned char alpha, char delta);
int sc1200_set_alpha_priority(int priority);
int sc1200_set_alpha_color(unsigned long color);
int sc1200_set_alpha_color_enable(int enable);
int sc1200_set_no_ck_outside_alpha(int enable);
int sc1200_disable_softvga(void);
int sc1200_enable_softvga(void);
int sc1200_set_macrovision_enable(int enable);
unsigned long sc1200_get_max_video_width(void);

/* READ ROUTINES IN GFX_VID.C */

int sc1200_get_video_enable(void);
int sc1200_get_video_format(void);
unsigned long sc1200_get_video_src_size(void);
unsigned long sc1200_get_video_line_size(void);
unsigned long sc1200_get_video_xclip(void);
unsigned long sc1200_get_video_offset(void);
unsigned long sc1200_get_video_upscale(void);
unsigned long sc1200_get_video_scale(void);
int sc1200_get_video_downscale_config(unsigned short *type, unsigned short *m);
void sc1200_get_video_downscale_coefficients(unsigned short *coef1,
                                             unsigned short *coef2,
                                             unsigned short *coef3,
                                             unsigned short *coef4);
void sc1200_get_video_downscale_enable(int *enable);
unsigned long sc1200_get_video_dst_size(void);
unsigned long sc1200_get_video_position(void);
unsigned long sc1200_get_video_color_key(void);
unsigned long sc1200_get_video_color_key_mask(void);
int sc1200_get_video_palette_entry(unsigned long index, unsigned long *palette);
int sc1200_get_video_color_key_src(void);
int sc1200_get_video_filter(void);
int sc1200_get_video_request(short *x, short *y);
int sc1200_get_video_source(VideoSourceType * source);
int sc1200_get_vbi_source(VbiSourceType * source);
unsigned long sc1200_get_vbi_lines(int odd);
unsigned long sc1200_get_vbi_total(int odd);
int sc1200_get_video_interlaced(void);
int sc1200_get_color_space_YUV(void);
int sc1200_get_vertical_scaler_offset(char *offset);
unsigned long sc1200_get_genlock_delay(void);
int sc1200_get_genlock_enable(void);
int sc1200_get_video_cursor(unsigned long *key, unsigned long *mask,
                            unsigned short *select_color2,
                            unsigned long *color1, unsigned short *color2);
unsigned long sc1200_read_crc(void);
int sc1200_get_macrovision_enable(void);

void sc1200_get_alpha_enable(int *enable);
void sc1200_get_alpha_size(unsigned short *x, unsigned short *y,
                           unsigned short *width, unsigned short *height);
void sc1200_get_alpha_value(unsigned char *alpha, char *delta);
void sc1200_get_alpha_priority(int *priority);
void sc1200_get_alpha_color(unsigned long *color);
#endif
#endif

/*-------------------------*/
/* REDCLOUD VIDEO ROUTINES */
/*-------------------------*/

#if GFX_VIDEO_REDCLOUD

/* PRIVATE ROUTINES */

/* DYNAMIC ROUTINES */

#if GFX_VIDEO_DYNAMIC
void redcloud_reset_video(void);
int redcloud_set_display_control(int sync_polarities);
void redcloud_set_clock_frequency(unsigned long frequency);
unsigned long redcloud_get_clock_frequency(void);
int redcloud_set_crt_enable(int enable);
int redcloud_get_sync_polarities(void);
int redcloud_set_video_enable(int enable);
int redcloud_set_video_format(unsigned long format);
int redcloud_set_video_size(unsigned short width, unsigned short height);
int redcloud_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch);
int redcloud_set_video_offset(unsigned long offset);
int redcloud_set_video_yuv_offsets(unsigned long yoffset,
                                   unsigned long uoffset,
                                   unsigned long voffset);
int redcloud_set_video_window(short x, short y, unsigned short w,
                              unsigned short h);
int redcloud_set_video_left_crop(unsigned short x);
int redcloud_set_video_scale(unsigned short srcw, unsigned short srch,
                             unsigned short dstw, unsigned short dsth);
int redcloud_set_video_vertical_downscale(unsigned short srch,
                                          unsigned short dsth);
void redcloud_set_video_vertical_downscale_enable(int enable);
int redcloud_set_video_downscale_config(unsigned short type, unsigned short m);
int redcloud_set_video_color_key(unsigned long key, unsigned long mask,
                                 int bluescreen);
int redcloud_set_video_filter(int xfilter, int yfilter);
int redcloud_set_video_palette(unsigned long *palette);
int redcloud_set_graphics_palette(unsigned long *palette);
int redcloud_set_video_palette_bypass(int enable);
int redcloud_set_video_palette_entry(unsigned long index, unsigned long color);
int redcloud_set_graphics_palette_entry(unsigned long index,
                                        unsigned long color);
int redcloud_set_video_downscale_coefficients(unsigned short coef1,
                                              unsigned short coef2,
                                              unsigned short coef3,
                                              unsigned short coef4);
int redcloud_set_video_downscale_enable(int enable);
int redcloud_set_video_cursor(unsigned long key, unsigned long mask,
                              unsigned short select_color2,
                              unsigned long color1, unsigned long color2);
int redcloud_set_video_cursor_enable(int enable);

int redcloud_select_alpha_region(int region);
int redcloud_set_alpha_enable(int enable);
int redcloud_set_alpha_window(short x, short y,
                              unsigned short width, unsigned short height);
int redcloud_set_alpha_value(unsigned char alpha, char delta);
int redcloud_set_alpha_priority(int priority);
int redcloud_set_alpha_color(unsigned long color);
int redcloud_set_alpha_color_enable(int enable);
int redcloud_set_no_ck_outside_alpha(int enable);
int redcloud_set_video_request(short x, short y);

/* READ ROUTINES IN GFX_VID.C */

int redcloud_get_video_enable(void);
int redcloud_get_video_format(void);
unsigned long redcloud_get_video_src_size(void);
unsigned long redcloud_get_video_line_size(void);
unsigned long redcloud_get_video_xclip(void);
unsigned long redcloud_get_video_offset(void);
void redcloud_get_video_yuv_offsets(unsigned long *yoffset,
                                    unsigned long *uoffset,
                                    unsigned long *voffset);
void redcloud_get_video_yuv_pitch(unsigned long *ypitch,
                                  unsigned long *uvpitch);
unsigned long redcloud_get_video_scale(void);
unsigned long redcloud_get_video_downscale_delta(void);
int redcloud_get_video_vertical_downscale_enable(void);
int redcloud_get_video_downscale_config(unsigned short *type,
                                        unsigned short *m);
void redcloud_get_video_downscale_coefficients(unsigned short *coef1,
                                               unsigned short *coef2,
                                               unsigned short *coef3,
                                               unsigned short *coef4);
void redcloud_get_video_downscale_enable(int *enable);
unsigned long redcloud_get_video_dst_size(void);
unsigned long redcloud_get_video_position(void);
unsigned long redcloud_get_video_color_key(void);
unsigned long redcloud_get_video_color_key_mask(void);
int redcloud_get_video_palette_entry(unsigned long index,
                                     unsigned long *palette);
int redcloud_get_video_color_key_src(void);
int redcloud_get_video_filter(void);
int redcloud_get_video_cursor(unsigned long *key, unsigned long *mask,
                              unsigned short *select_color2,
                              unsigned long *color1, unsigned short *color2);
unsigned long redcloud_read_crc(void);
unsigned long redcloud_read_crc32(void);
unsigned long redcloud_read_window_crc(int source, unsigned short x,
                                       unsigned short y, unsigned short width,
                                       unsigned short height, int crc32);

void redcloud_get_alpha_enable(int *enable);
void redcloud_get_alpha_size(unsigned short *x, unsigned short *y,
                             unsigned short *width, unsigned short *height);
void redcloud_get_alpha_value(unsigned char *alpha, char *delta);
void redcloud_get_alpha_priority(int *priority);
void redcloud_get_alpha_color(unsigned long *color);
int redcloud_get_video_request(short *x, short *y);
#endif
#endif

/*--------------*/
/* VIP ROUTINES */
/*--------------*/

#if GFX_VIP_SC1200

/* DYNAMIC ROUTINES */

#if GFX_VIP_DYNAMIC
int sc1200_set_vip_enable(int enable);
int sc1200_set_vip_capture_run_mode(int mode);
int sc1200_set_vip_base(unsigned long even, unsigned long odd);
int sc1200_set_vip_pitch(unsigned long pitch);
int sc1200_set_vip_mode(int mode);
int sc1200_set_vbi_enable(int enable);
int sc1200_set_vbi_mode(int mode);
int sc1200_set_vbi_base(unsigned long even, unsigned long odd);
int sc1200_set_vbi_pitch(unsigned long pitch);
int sc1200_set_vbi_direct(unsigned long even_lines, unsigned long odd_lines);
int sc1200_set_vbi_interrupt(int enable);
int sc1200_set_vip_bus_request_threshold_high(int enable);
int sc1200_set_vip_last_line(int last_line);
int sc1200_test_vip_odd_field(void);
int sc1200_test_vip_bases_updated(void);
int sc1200_test_vip_fifo_overflow(void);
int sc1200_get_vip_line(void);
int sc1200_get_vip_enable(void);
unsigned long sc1200_get_vip_base(int odd);
unsigned long sc1200_get_vip_pitch(void);
int sc1200_get_vip_mode(void);
int sc1200_get_vbi_enable(void);
int sc1200_get_vbi_mode(void);
unsigned long sc1200_get_vbi_base(int odd);
unsigned long sc1200_get_vbi_pitch(void);
unsigned long sc1200_get_vbi_direct(int odd);
int sc1200_get_vbi_interrupt(void);
int sc1200_get_vip_bus_request_threshold_high(void);
#endif
#endif

/* DECODER ROUTINES */

#if GFX_DECODER_SAA7114

/* PRIVATE ROUTINES */

int saa7114_write_reg(unsigned char reg, unsigned char val);
int saa7114_read_reg(unsigned char reg, unsigned char *val);

/* DYNAMIC ROUTINES */

#if GFX_DECODER_DYNAMIC
int saa7114_set_decoder_defaults(void);
int saa7114_set_decoder_analog_input(unsigned char input);
int saa7114_set_decoder_brightness(unsigned char brightness);
int saa7114_set_decoder_contrast(unsigned char contrast);
int saa7114_set_decoder_hue(char hue);
int saa7114_set_decoder_saturation(unsigned char saturation);
int saa7114_set_decoder_input_offset(unsigned short x, unsigned short y);
int saa7114_set_decoder_input_size(unsigned short width, unsigned short height);
int saa7114_set_decoder_output_size(unsigned short width,
                                    unsigned short height);
int saa7114_set_decoder_scale(unsigned short srcw, unsigned short srch,
                              unsigned short dstw, unsigned short dsth);
int saa7114_set_decoder_vbi_format(int start, int end, int format);
int saa7114_set_decoder_vbi_enable(int enable);
int saa7114_set_decoder_vbi_upscale(void);
int saa7114_set_decoder_TV_standard(TVStandardType TVStandard);
int saa7114_set_decoder_luminance_filter(unsigned char lufi);
int saa7114_decoder_software_reset(void);
int saa7114_decoder_detect_macrovision(void);
int saa7114_decoder_detect_video(void);
unsigned char saa7114_get_decoder_brightness(void);
unsigned char saa7114_get_decoder_contrast(void);
char saa7114_get_decoder_hue(void);
unsigned char saa7114_get_decoder_saturation(void);
unsigned long saa7114_get_decoder_input_offset(void);
unsigned long saa7114_get_decoder_input_size(void);
unsigned long saa7114_get_decoder_output_size(void);
int saa7114_get_decoder_vbi_format(int line);
#endif
#endif

/* ACCESS I2C ROUTINES */

#if GFX_I2C_ACCESS

#if GFX_I2C_DYNAMIC
int acc_i2c_reset(unsigned char busnum, short adr, char freq);
int acc_i2c_write(unsigned char busnum, unsigned char chipadr,
                  unsigned char subadr, unsigned char bytes,
                  unsigned char *data);
int acc_i2c_read(unsigned char busnum, unsigned char chipadr,
                 unsigned char subadr, unsigned char bytes,
                 unsigned char *data);
int acc_i2c_select_gpio(int clock, int data);
int acc_i2c_init(void);
void acc_i2c_cleanup(void);
#endif
#endif

/* GPIO I2C ROUTINES */

#if GFX_I2C_GPIO

#if GFX_I2C_DYNAMIC
int gpio_i2c_reset(unsigned char busnum, short adr, char freq);
int gpio_i2c_write(unsigned char busnum, unsigned char chipadr,
                   unsigned char subadr, unsigned char bytes,
                   unsigned char *data);
int gpio_i2c_read(unsigned char busnum, unsigned char chipadr,
                  unsigned char subadr, unsigned char bytes,
                  unsigned char *data);
int gpio_i2c_select_gpio(int clock, int data);
int gpio_i2c_init(void);
void gpio_i2c_cleanup(void);
#endif
#endif

/* TV ROUTINES */

#if GFX_TV_SC1200

#if GFX_TV_DYNAMIC
int sc1200_set_tv_format(TVStandardType format, GfxOnTVType resolution);
int sc1200_set_tv_output(int output);
int sc1200_set_tv_enable(int enable);
int sc1200_set_tv_flicker_filter(int ff);
int sc1200_set_tv_sub_carrier_reset(int screset);
int sc1200_set_tv_vphase(int vphase);
int sc1200_set_tv_YC_delay(int delay);
int sc1200_set_tvenc_reset_interval(int interval);
int sc1200_set_tv_cc_enable(int enable);
int sc1200_set_tv_cc_data(unsigned char data1, unsigned char data2);
int sc1200_set_tv_display(int width, int height);
int sc1200_test_tvout_odd_field(void);
int sc1200_test_tvenc_odd_field(void);
int sc1200_set_tv_field_status_invert(int enable);
int sc1200_get_tv_vphase(void);
int sc1200_get_tv_enable(unsigned int *p_on);
int sc1200_get_tv_output(void);
int sc1200_get_tv_mode_count(TVStandardType format);
int sc1200_get_tv_display_mode(int *width, int *height, int *bpp, int *hz);
int sc1200_get_tv_display_mode_frequency(unsigned short width,
                                         unsigned short height,
                                         TVStandardType format, int *frequency);
int sc1200_is_tv_display_mode_supported(unsigned short width,
                                        unsigned short height,
                                        TVStandardType format);
unsigned char cc_add_parity_bit(unsigned char data);

#endif
#endif

/* FS450 ROUTINES */

#if GFX_TV_FS451

#if GFX_TV_DYNAMIC
int fs450_set_tv_format(TVStandardType format, GfxOnTVType resolution);
int fs450_set_tv_output(int output);
int fs450_set_tv_enable(int enable);
int fs450_get_tv_standard(unsigned long *p_standard);
int fs450_get_available_tv_standards(unsigned long *p_standards);
int fs450_set_tv_standard(unsigned long standard);
int fs450_get_tv_vga_mode(unsigned long *p_vga_mode);
int fs450_get_available_tv_vga_modes(unsigned long *p_vga_modes);
int fs450_set_tv_vga_mode(unsigned long vga_mode);
int fs450_get_tvout_mode(unsigned long *p_tvout_mode);
int fs450_set_tvout_mode(unsigned long tvout_mode);
int fs450_get_sharpness(int *p_sharpness);
int fs450_set_sharpness(int sharpness);
int fs450_get_flicker_filter(int *p_flicker);
int fs450_set_flicker_filter(int flicker);
int fs450_get_overscan(int *p_x, int *p_y);
int fs450_set_overscan(int x, int y);
int fs450_get_position(int *p_x, int *p_y);
int fs450_set_position(int x, int y);
int fs450_get_color(int *p_color);
int fs450_set_color(int color);
int fs450_get_brightness(int *p_brightness);
int fs450_set_brightness(int brightness);
int fs450_get_contrast(int *p_contrast);
int fs450_set_contrast(int contrast);
int fs450_get_yc_filter(unsigned int *p_yc_filter);
int fs450_set_yc_filter(unsigned int yc_filter);
int fs450_get_aps_trigger_bits(unsigned int *p_trigger_bits);
int fs450_set_aps_trigger_bits(unsigned int trigger_bits);
#endif
#endif