1/* <LIC_AMD_STD>
2 * Copyright (C) 2005 Advanced Micro Devices, Inc.  All Rights Reserved.
3 * </LIC_AMD_STD>  */
4/* <CTL_AMD_STD>
5 * </CTL_AMD_STD>  */
6/* Copyright (c) 2005 Advanced Micro Devices, Inc.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to
10 * deal in the Software without restriction, including without limitation the
11 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 * sell copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 * IN THE SOFTWARE.
25 *
26 * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
27 * contributors may be used to endorse or promote products derived from this
28 * software without specific prior written permission.
29 * */
30
31/*
32 * This file contains routines to control the video overlay window.
33 *
34 * Video overlay routines:
35 *
36 *    gfx_set_clock_frequency
37 *    gfx_set_crt_enable
38 *    gfx_set_video_enable
39 *    gfx_set_video_format
40 *    gfx_set_video_size
41 *    gfx_set_video_offset
42 *    gfx_set_video_yuv_offsets
43 *    gfx_set_video_yuv_pitch
44 *    gfx_set_video_scale
45 *    gfx_set_video_upscale
46 *    gfx_set_video_downscale_config
47 *    gfx_set_video_downscale_coefficients
48 *    gfx_set_video_downscale_enable
49 *    gfx_set_video_vertical_downscale
50 *    gfx_set_video_vertical_downscale_enable
51 *    gfx_set_video_window
52 *    gfx_set_video_left_crop
53 *    gfx_set_video_color_key
54 *    gfx_set_video_filter
55 *    gfx_set_video_palette
56 *    gfx_set_video_request
57 *    gfx_set_video_source
58 *    gfx_set_vbi_source
59 *    gfx_set_vbi_lines
60 *    gfx_set_vbi_total
61 *    gfx_set_video_interlaced
62 *    gfx_set_color_space_YUV
63 *    gfx_set_vertical_scaler_offset
64 *    gfx_set_top_line_in_odd
65 *    gfx_set_genlock_delay
66 *    gfx_set_genlock_enable
67 *    gfx_set_video_cursor
68 *    gfx_set_video_cursor_enable
69 *
70 * Alpha blending routines (SC1200 ONLY):
71 *
72 *    gfx_select_alpha_region
73 *	  gfx_set_alpha_enable
74 *	  gfx_set_alpha_window
75 *    gfx_set_alpha_value
76 *    gfx_set_alpha_priority
77 *    gfx_set_alpha_color
78 *    gfx_set_alpha_color_enable
79 *    gfx_set_no_ck_outside_alpha
80 *    gfx_test_tvout_odd_field
81 *
82 * And the following routines if GFX_READ_ROUTINES is set:
83 *
84 *    gfx_get_sync_polarities
85 *    gfx_get_video_enable
86 *    gfx_get_video_format
87 *    gfx_get_video_src_size
88 *    gfx_get_video_line_size
89 *    gfx_get_video_xclip
90 *    gfx_get_video_offset
91 *    gfx_get_video_yuv_offsets
92 *    gfx_get_video_yuv_pitch
93 *    gfx_get_video_scale
94 *    gfx_get_video_upscale
95 *    gfx_get_video_downscale_config
96 *    gfx_get_video_downscale_coefficients
97 *    gfx_get_video_downscale_enable
98 *    gfx_get_video_downscale_delta
99 *    gfx_get_video_vertical_downscale_enable
100 *    gfx_get_video_dst_size
101 *    gfx_get_video_position
102 *    gfx_get_video_color_key
103 *    gfx_get_video_color_key_mask
104 *    gfx_get_video_color_key_src
105 *    gfx_get_video_filter
106 *    gfx_get_video_request
107 *    gfx_get_video_source
108 *    gfx_get_vbi_source
109 *    gfx_get_vbi_lines
110 *    gfx_get_vbi_total
111 *    gfx_get_video_interlaced
112 *    gfx_get_color_space_YUV
113 *    gfx_get_vertical_scaler_offset
114 *    gfx_get_genlock_delay
115 *    gfx_get_genlock_enable
116 *    gfx_get_video_cursor
117 *    gfx_get_clock_frequency
118 *    gfx_read_crc
119 *
120 * Alpha blending read routines (SC1200 ONLY):
121 *
122 *    gfx_get_alpha_enable
123 *    gfx_get_alpha_size
124 *    gfx_get_alpha_value
125 *    gfx_get_alpha_priority
126 *    gfx_get_alpha_color
127 * */
128
129/* STATIC VARIABLES FOR VIDEO OVERLAY CONTROL */
130/* These are saved to allow these routines to do clipping. */
131
132unsigned long gfx_vid_offset = 0;       /* copy from last gfx_set_video_offset  */
133unsigned long gfx_vid_uoffset = 0;      /* copy from last
134                                         * gfx_set_video_yuv_offsets                        */
135unsigned long gfx_vid_voffset = 0;      /* copy from last
136                                         * gfx_set_video_yuv_offsets                        */
137unsigned long gfx_vid_srcw = 300;       /* copy from last gfx_set_video_scale       */
138unsigned long gfx_vid_srch = 300;       /* copy from last gfx_set_video_scale       */
139unsigned long gfx_vid_dstw = 300;       /* copy from last gfx_set_video_scale       */
140unsigned long gfx_vid_dsth = 300;       /* copy from last gfx_set_video_scale       */
141short gfx_vid_xpos = 0;         /* copy from last gfx_set_video_window      */
142short gfx_vid_ypos = 0;         /* copy from last gfx_set_video_window      */
143unsigned short gfx_vid_width = 0;       /* copy from last gfx_set_video_window      */
144unsigned short gfx_vid_height = 0;      /* copy from last gfx_set_video_window      */
145
146int gfx_alpha_select = 0;       /* currently selected alpha region          */
147
148int gfx_set_screen_enable(int enable);  /* forward declaration                           */
149
150/* INCLUDE SUPPORT FOR CS5530, IF SPECIFIED. */
151
152#if GFX_VIDEO_CS5530
153#include "vid_5530.c"
154#endif
155
156/* INCLUDE SUPPORT FOR SC1200, IF SPECIFIED. */
157
158#if GFX_VIDEO_SC1200
159#include "vid_1200.c"
160#endif
161
162/* INCLUDE SUPPORT FOR REDCLOUD, IF SPECIFIED. */
163
164#if GFX_VIDEO_REDCLOUD
165#include "vid_rdcl.c"
166#endif
167
168/*---------------------------------------------------------------------------
169 * gfx_select_alpha_region
170 *
171 * This routine selects which alpha region should be used for future
172 * updates.  The SC1200, for example, has 3 alpha windows available,
173 * so valid parameter values are 0..2.
174 *---------------------------------------------------------------------------
175 */
176int
177gfx_select_alpha_region(int region)
178{
179    if (region > 2)
180        return (GFX_STATUS_BAD_PARAMETER);
181
182    gfx_alpha_select = region;
183    return (GFX_STATUS_OK);
184}
185
186/* WRAPPERS IF DYNAMIC SELECTION */
187/* Extra layer to call either CS5530 or SC1200 routines. */
188
189#if GFX_VIDEO_DYNAMIC
190
191/*---------------------------------------------------------------------------
192 * gfx_reset_video (PRIVATE ROUTINE: NOT PART OF DURANGO API)
193 *
194 * This routine is used to disable all components of video overlay before
195 * performing a mode switch.
196 *---------------------------------------------------------------------------
197 */
198void
199gfx_reset_video(void)
200{
201#if GFX_VIDEO_CS5530
202    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
203        cs5530_reset_video();
204#endif
205#if GFX_VIDEO_SC1200
206    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
207        sc1200_reset_video();
208#endif
209#if GFX_VIDEO_REDCLOUD
210    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
211        redcloud_reset_video();
212#endif
213}
214
215/*---------------------------------------------------------------------------
216 * gfx_set_display_control (PRIVATE ROUTINE: NOT PART OF DURANGO API)
217 *
218 * This routine is used to configure the display output during a modeset
219 *---------------------------------------------------------------------------
220 */
221int
222gfx_set_display_control(int sync_polarities)
223{
224    int status = GFX_STATUS_UNSUPPORTED;
225
226#if GFX_VIDEO_CS5530
227    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
228        status = cs5530_set_display_control(sync_polarities);
229#endif
230#if GFX_VIDEO_SC1200
231    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
232        status = sc1200_set_display_control(sync_polarities);
233#endif
234#if GFX_VIDEO_REDCLOUD
235    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
236        status = redcloud_set_display_control(sync_polarities);
237#endif
238    return (status);
239}
240
241/*----------------------------------------------------------------------------
242 * gfx_set_clock_frequency
243 *----------------------------------------------------------------------------
244 */
245void
246gfx_set_clock_frequency(unsigned long frequency)
247{
248#if GFX_VIDEO_CS5530
249    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
250        cs5530_set_clock_frequency(frequency);
251#endif
252#if GFX_VIDEO_SC1200
253    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
254        sc1200_set_clock_frequency(frequency);
255#endif
256#if GFX_VIDEO_REDCLOUD
257    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
258        redcloud_set_clock_frequency(frequency);
259#endif
260}
261
262/*----------------------------------------------------------------------------
263 * gfx_set_crt_enable
264 *----------------------------------------------------------------------------
265 */
266int
267gfx_set_crt_enable(int enable)
268{
269    int status = GFX_STATUS_UNSUPPORTED;
270
271#if GFX_VIDEO_SC1200
272    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
273        status = sc1200_set_crt_enable(enable);
274#endif
275#if GFX_VIDEO_CS5530
276    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
277        status = cs5530_set_crt_enable(enable);
278#endif
279#if GFX_VIDEO_REDCLOUD
280    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
281        status = redcloud_set_crt_enable(enable);
282#endif
283    return (status);
284}
285
286/*----------------------------------------------------------------------------
287 * gfx_set_video_enable
288 *----------------------------------------------------------------------------
289 */
290int
291gfx_set_video_enable(int enable)
292{
293    int status = GFX_STATUS_UNSUPPORTED;
294
295#if GFX_VIDEO_CS5530
296    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
297        status = cs5530_set_video_enable(enable);
298#endif
299#if GFX_VIDEO_SC1200
300    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
301        status = sc1200_set_video_enable(enable);
302#endif
303#if GFX_VIDEO_REDCLOUD
304    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
305        status = redcloud_set_video_enable(enable);
306#endif
307    return (status);
308}
309
310/*---------------------------------------------------------------------------
311 * gfx_set_screen_enable (PRIVATE ROUTINE: NOT PART OF DURANGO API)
312 *
313 * This routine enables or disables the graphics display logic of the video
314 * processor.
315 *---------------------------------------------------------------------------
316 */
317int
318gfx_set_screen_enable(int enable)
319{
320    int status = GFX_STATUS_UNSUPPORTED;
321
322#if GFX_VIDEO_SC1200
323    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
324        status = sc1200_set_screen_enable(enable);
325#endif
326    return (status);
327}
328
329/*----------------------------------------------------------------------------
330 * gfx_set_video_format
331 *----------------------------------------------------------------------------
332 */
333int
334gfx_set_video_format(unsigned long format)
335{
336    int status = GFX_STATUS_UNSUPPORTED;
337
338#if GFX_VIDEO_CS5530
339    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
340        status = cs5530_set_video_format(format);
341#endif
342#if GFX_VIDEO_SC1200
343    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
344        status = sc1200_set_video_format(format);
345#endif
346#if GFX_VIDEO_REDCLOUD
347    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
348        status = redcloud_set_video_format(format);
349#endif
350    return (status);
351}
352
353/*----------------------------------------------------------------------------
354 * gfx_set_video_size
355 *----------------------------------------------------------------------------
356 */
357int
358gfx_set_video_size(unsigned short width, unsigned short height)
359{
360    int status = GFX_STATUS_UNSUPPORTED;
361
362#if GFX_VIDEO_CS5530
363    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
364        status = cs5530_set_video_size(width, height);
365#endif
366#if GFX_VIDEO_SC1200
367    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
368        status = sc1200_set_video_size(width, height);
369#endif
370#if GFX_VIDEO_REDCLOUD
371    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
372        status = redcloud_set_video_size(width, height);
373#endif
374    return (status);
375}
376
377/*----------------------------------------------------------------------------
378 * gfx_set_video_yuv_pitch
379 *----------------------------------------------------------------------------
380 */
381int
382gfx_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch)
383{
384    int status = GFX_STATUS_UNSUPPORTED;
385
386#if GFX_VIDEO_REDCLOUD
387    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
388        status = redcloud_set_video_yuv_pitch(ypitch, uvpitch);
389#endif
390    return (status);
391}
392
393/*----------------------------------------------------------------------------
394 * gfx_set_video_offset
395 *----------------------------------------------------------------------------
396 */
397int
398gfx_set_video_offset(unsigned long offset)
399{
400    int status = GFX_STATUS_UNSUPPORTED;
401
402#if GFX_VIDEO_CS5530
403    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
404        status = cs5530_set_video_offset(offset);
405#endif
406#if GFX_VIDEO_SC1200
407    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
408        status = sc1200_set_video_offset(offset);
409#endif
410#if GFX_VIDEO_REDCLOUD
411    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
412        status = redcloud_set_video_offset(offset);
413#endif
414    return (status);
415}
416
417/*----------------------------------------------------------------------------
418 * gfx_set_video_yuv_offsets
419 *----------------------------------------------------------------------------
420 */
421int
422gfx_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset,
423                          unsigned long voffset)
424{
425    int status = GFX_STATUS_UNSUPPORTED;
426
427#if GFX_VIDEO_REDCLOUD
428    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
429        status = redcloud_set_video_yuv_offsets(yoffset, uoffset, voffset);
430#endif
431    return (status);
432}
433
434/*---------------------------------------------------------------------------
435 * gfx_set_video_scale
436 *---------------------------------------------------------------------------
437 */
438int
439gfx_set_video_scale(unsigned short srcw, unsigned short srch,
440                    unsigned short dstw, unsigned short dsth)
441{
442    int status = GFX_STATUS_UNSUPPORTED;
443
444#if GFX_VIDEO_CS5530
445    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
446        status = cs5530_set_video_scale(srcw, srch, dstw, dsth);
447#endif
448#if GFX_VIDEO_SC1200
449    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
450        status = sc1200_set_video_scale(srcw, srch, dstw, dsth);
451#endif
452#if GFX_VIDEO_REDCLOUD
453    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
454        status = redcloud_set_video_scale(srcw, srch, dstw, dsth);
455#endif
456    return (status);
457}
458
459/*---------------------------------------------------------------------------
460 * gfx_set_video_upscale
461 *---------------------------------------------------------------------------
462 */
463int
464gfx_set_video_upscale(unsigned short srcw, unsigned short srch,
465                      unsigned short dstw, unsigned short dsth)
466{
467    int status = GFX_STATUS_UNSUPPORTED;
468
469#if GFX_VIDEO_SC1200
470    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
471        status = sc1200_set_video_upscale(srcw, srch, dstw, dsth);
472#endif
473    return (status);
474}
475
476/*---------------------------------------------------------------------------
477 * gfx_set_video_vertical_downscale
478 *---------------------------------------------------------------------------
479 */
480int
481gfx_set_video_vertical_downscale(unsigned short srch, unsigned short dsth)
482{
483    int status = GFX_STATUS_UNSUPPORTED;
484
485#if GFX_VIDEO_REDCLOUD
486    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
487        status = redcloud_set_video_vertical_downscale(srch, dsth);
488#endif
489    return (status);
490}
491
492/*---------------------------------------------------------------------------
493 * gfx_set_video_vertical_downscale_enable
494 *---------------------------------------------------------------------------
495 */
496void
497gfx_set_video_vertical_downscale_enable(int enable)
498{
499#if GFX_VIDEO_REDCLOUD
500    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
501        redcloud_set_video_vertical_downscale_enable(enable);
502#endif
503}
504
505/*---------------------------------------------------------------------------
506 * gfx_set_video_downscale_config
507 *---------------------------------------------------------------------------
508 */
509int
510gfx_set_video_downscale_config(unsigned short type, unsigned short m)
511{
512    int status = GFX_STATUS_UNSUPPORTED;
513
514#if GFX_VIDEO_SC1200
515    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
516        status = sc1200_set_video_downscale_config(type, m);
517#endif
518#if GFX_VIDEO_REDCLOUD
519    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
520        status = redcloud_set_video_downscale_config(type, m);
521#endif
522    return (status);
523}
524
525/*---------------------------------------------------------------------------
526 * gfx_set_video_downscale_coefficients
527 *---------------------------------------------------------------------------
528 */
529int
530gfx_set_video_downscale_coefficients(unsigned short coef1,
531                                     unsigned short coef2, unsigned short coef3,
532                                     unsigned short coef4)
533{
534    int status = GFX_STATUS_UNSUPPORTED;
535
536#if GFX_VIDEO_SC1200
537    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
538        status =
539            sc1200_set_video_downscale_coefficients(coef1, coef2, coef3, coef4);
540#endif
541#if GFX_VIDEO_REDCLOUD
542    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
543        status =
544            redcloud_set_video_downscale_coefficients(coef1, coef2, coef3,
545                                                      coef4);
546#endif
547    return (status);
548}
549
550/*---------------------------------------------------------------------------
551 * gfx_set_video_downscale_enable
552 *---------------------------------------------------------------------------
553 */
554int
555gfx_set_video_downscale_enable(int enable)
556{
557    int status = GFX_STATUS_UNSUPPORTED;
558
559#if GFX_VIDEO_SC1200
560    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
561        status = sc1200_set_video_downscale_enable(enable);
562#endif
563#if GFX_VIDEO_REDCLOUD
564    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
565        status = redcloud_set_video_downscale_enable(enable);
566#endif
567    return (status);
568}
569
570/*---------------------------------------------------------------------------
571 * gfx_set_video_window
572 *---------------------------------------------------------------------------
573 */
574int
575gfx_set_video_window(short x, short y, unsigned short w, unsigned short h)
576{
577    int status = GFX_STATUS_UNSUPPORTED;
578
579#if GFX_VIDEO_CS5530
580    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
581        status = cs5530_set_video_window(x, y, w, h);
582#endif
583#if GFX_VIDEO_SC1200
584    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
585        status = sc1200_set_video_window(x, y, w, h);
586#endif
587#if GFX_VIDEO_REDCLOUD
588    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
589        status = redcloud_set_video_window(x, y, w, h);
590#endif
591    return (status);
592}
593
594/*---------------------------------------------------------------------------
595 * gfx_set_video_left_crop
596 *---------------------------------------------------------------------------
597 */
598int
599gfx_set_video_left_crop(unsigned short x)
600{
601    int status = GFX_STATUS_UNSUPPORTED;
602
603#if GFX_VIDEO_SC1200
604    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
605        status = sc1200_set_video_left_crop(x);
606#endif
607#if GFX_VIDEO_CS5530
608    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
609        status = cs5530_set_video_left_crop(x);
610#endif
611#if GFX_VIDEO_REDCLOUD
612    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
613        status = redcloud_set_video_left_crop(x);
614#endif
615    return (status);
616}
617
618/*---------------------------------------------------------------------------
619 * gfx_set_video_color_key
620 *---------------------------------------------------------------------------
621 */
622int
623gfx_set_video_color_key(unsigned long key, unsigned long mask, int graphics)
624{
625    int status = GFX_STATUS_UNSUPPORTED;
626
627#if GFX_VIDEO_CS5530
628    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
629        status = cs5530_set_video_color_key(key, mask, graphics);
630#endif
631#if GFX_VIDEO_SC1200
632    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
633        status = sc1200_set_video_color_key(key, mask, graphics);
634#endif
635#if GFX_VIDEO_REDCLOUD
636    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
637        status = redcloud_set_video_color_key(key, mask, graphics);
638#endif
639    return (status);
640}
641
642/*---------------------------------------------------------------------------
643 * gfx_set_video_filter
644 *---------------------------------------------------------------------------
645 */
646int
647gfx_set_video_filter(int xfilter, int yfilter)
648{
649    int status = GFX_STATUS_UNSUPPORTED;
650
651#if GFX_VIDEO_CS5530
652    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
653        status = cs5530_set_video_filter(xfilter, yfilter);
654#endif
655#if GFX_VIDEO_SC1200
656    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
657        status = sc1200_set_video_filter(xfilter, yfilter);
658#endif
659#if GFX_VIDEO_REDCLOUD
660    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
661        status = redcloud_set_video_filter(xfilter, yfilter);
662#endif
663    return (status);
664}
665
666/*---------------------------------------------------------------------------
667 * gfx_set_video_palette
668 *---------------------------------------------------------------------------
669 */
670int
671gfx_set_video_palette(unsigned long *palette)
672{
673    int status = GFX_STATUS_UNSUPPORTED;
674
675#if GFX_VIDEO_CS5530
676    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
677        status = cs5530_set_video_palette(palette);
678#endif
679#if GFX_VIDEO_SC1200
680    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
681        status = sc1200_set_video_palette(palette);
682#endif
683#if GFX_VIDEO_REDCLOUD
684    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
685        status = redcloud_set_video_palette(palette);
686#endif
687    return (status);
688}
689
690/*---------------------------------------------------------------------------
691 * gfx_set_graphics_palette
692 *---------------------------------------------------------------------------
693 */
694int
695gfx_set_graphics_palette(unsigned long *palette)
696{
697    int status = GFX_STATUS_UNSUPPORTED;
698
699#if GFX_VIDEO_REDCLOUD
700    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
701        status = redcloud_set_graphics_palette(palette);
702#endif
703
704    return (status);
705}
706
707/*---------------------------------------------------------------------------
708 * gfx_set_video_palette_entry
709 *---------------------------------------------------------------------------
710 */
711int
712gfx_set_video_palette_entry(unsigned long index, unsigned long palette)
713{
714    int status = GFX_STATUS_UNSUPPORTED;
715
716#if GFX_VIDEO_CS5530
717    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
718        status = cs5530_set_video_palette_entry(index, palette);
719#endif
720#if GFX_VIDEO_SC1200
721    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
722        status = sc1200_set_video_palette_entry(index, palette);
723#endif
724#if GFX_VIDEO_REDCLOUD
725    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
726        status = redcloud_set_video_palette_entry(index, palette);
727#endif
728    return (status);
729}
730
731/*---------------------------------------------------------------------------
732 * gfx_set_graphics_palette_entry
733 *---------------------------------------------------------------------------
734 */
735int
736gfx_set_graphics_palette_entry(unsigned long index, unsigned long palette)
737{
738    int status = GFX_STATUS_UNSUPPORTED;
739
740#if GFX_VIDEO_REDCLOUD
741    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
742        status = redcloud_set_graphics_palette_entry(index, palette);
743#endif
744
745    return (status);
746}
747
748/*---------------------------------------------------------------------------
749 * gfx_set_video_palette_bypass
750 *---------------------------------------------------------------------------
751 */
752int
753gfx_set_video_palette_bypass(int enable)
754{
755    int status = GFX_STATUS_UNSUPPORTED;
756
757#if GFX_VIDEO_SC1200
758    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
759        status = sc1200_set_video_palette_bypass(enable);
760#endif
761#if GFX_VIDEO_REDCLOUD
762    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
763        status = redcloud_set_video_palette_bypass(enable);
764#endif
765    return (status);
766}
767
768/*---------------------------------------------------------------------------
769 * gfx_set_video_request
770 *---------------------------------------------------------------------------
771 */
772int
773gfx_set_video_request(short x, short y)
774{
775    int status = GFX_STATUS_UNSUPPORTED;
776
777#if GFX_VIDEO_SC1200
778    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
779        status = sc1200_set_video_request(x, y);
780#endif
781#if GFX_VIDEO_REDCLOUD
782    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
783        status = redcloud_set_video_request(x, y);
784#endif
785    return (status);
786}
787
788/*---------------------------------------------------------------------------
789 * gfx_set_video_source
790 *---------------------------------------------------------------------------
791 */
792int
793gfx_set_video_source(VideoSourceType source)
794{
795    int status = GFX_STATUS_UNSUPPORTED;
796
797#if GFX_VIDEO_SC1200
798    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
799        status = sc1200_set_video_source(source);
800#endif
801    return (status);
802}
803
804/*---------------------------------------------------------------------------
805 * gfx_set_vbi_source
806 *---------------------------------------------------------------------------
807 */
808int
809gfx_set_vbi_source(VbiSourceType source)
810{
811    int status = GFX_STATUS_UNSUPPORTED;
812
813#if GFX_VIDEO_SC1200
814    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
815        status = sc1200_set_vbi_source(source);
816#endif
817    return (status);
818}
819
820/*---------------------------------------------------------------------------
821 * gfx_set_vbi_lines
822 *---------------------------------------------------------------------------
823 */
824int
825gfx_set_vbi_lines(unsigned long even, unsigned long odd)
826{
827    int status = GFX_STATUS_UNSUPPORTED;
828
829#if GFX_VIDEO_SC1200
830    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
831        status = sc1200_set_vbi_lines(even, odd);
832#endif
833    return (status);
834}
835
836/*---------------------------------------------------------------------------
837 * gfx_set_vbi_total
838 *---------------------------------------------------------------------------
839 */
840int
841gfx_set_vbi_total(unsigned long even, unsigned long odd)
842{
843    int status = GFX_STATUS_UNSUPPORTED;
844
845#if GFX_VIDEO_SC1200
846    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
847        status = sc1200_set_vbi_total(even, odd);
848#endif
849    return (status);
850}
851
852/*---------------------------------------------------------------------------
853 * gfx_set_video_interlaced
854 *---------------------------------------------------------------------------
855 */
856int
857gfx_set_video_interlaced(int enable)
858{
859    int status = GFX_STATUS_UNSUPPORTED;
860
861#if GFX_VIDEO_SC1200
862    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
863        status = sc1200_set_video_interlaced(enable);
864#endif
865    return (status);
866}
867
868/*---------------------------------------------------------------------------
869 * gfx_set_color_space_YUV
870 *---------------------------------------------------------------------------
871 */
872int
873gfx_set_color_space_YUV(int enable)
874{
875    int status = GFX_STATUS_UNSUPPORTED;
876
877#if GFX_VIDEO_SC1200
878    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
879        status = sc1200_set_color_space_YUV(enable);
880#endif
881    return (status);
882}
883
884/*---------------------------------------------------------------------------
885 * gfx_set_vertical_scaler_offset
886 *---------------------------------------------------------------------------
887 */
888int
889gfx_set_vertical_scaler_offset(char offset)
890{
891    int status = GFX_STATUS_UNSUPPORTED;
892
893#if GFX_VIDEO_SC1200
894    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
895        status = sc1200_set_vertical_scaler_offset(offset);
896#endif
897    return (status);
898}
899
900/*---------------------------------------------------------------------------
901 * gfx_set_top_line_in_odd
902 *---------------------------------------------------------------------------
903 */
904int
905gfx_set_top_line_in_odd(int enable)
906{
907    int status = GFX_STATUS_UNSUPPORTED;
908
909#if GFX_VIDEO_SC1200
910    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
911        status = sc1200_set_top_line_in_odd(enable);
912#endif
913    return (status);
914}
915
916/*---------------------------------------------------------------------------
917 * gfx_set_genlock_delay
918 *---------------------------------------------------------------------------
919 */
920int
921gfx_set_genlock_delay(unsigned long delay)
922{
923    int status = GFX_STATUS_UNSUPPORTED;
924
925#if GFX_VIDEO_SC1200
926    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
927        status = sc1200_set_genlock_delay(delay);
928#endif
929    return (status);
930}
931
932/*---------------------------------------------------------------------------
933 * gfx_set_genlock_enable
934 *---------------------------------------------------------------------------
935 */
936int
937gfx_set_genlock_enable(int flags)
938{
939    int status = GFX_STATUS_UNSUPPORTED;
940
941#if GFX_VIDEO_SC1200
942    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
943        status = sc1200_set_genlock_enable(flags);
944#endif
945    return (status);
946}
947
948/*---------------------------------------------------------------------------
949 * gfx_set_video_cursor
950 *---------------------------------------------------------------------------
951 */
952int
953gfx_set_video_cursor(unsigned long key, unsigned long mask,
954                     unsigned short select_color2, unsigned long color1,
955                     unsigned long color2)
956{
957    int status = GFX_STATUS_UNSUPPORTED;
958
959#if GFX_VIDEO_SC1200
960    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
961        status =
962            sc1200_set_video_cursor(key, mask, select_color2, color1, color2);
963#endif
964#if GFX_VIDEO_REDCLOUD
965    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
966        status =
967            redcloud_set_video_cursor(key, mask, select_color2, color1, color2);
968#endif
969    return (status);
970}
971
972/*---------------------------------------------------------------------------
973 * gfx_set_video_cursor_enable
974 *---------------------------------------------------------------------------
975 */
976int
977gfx_set_video_cursor_enable(int enable)
978{
979    int status = GFX_STATUS_UNSUPPORTED;
980
981#if GFX_VIDEO_REDCLOUD
982    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
983        status = redcloud_set_video_cursor_enable(enable);
984#endif
985    return (status);
986}
987
988/*---------------------------------------------------------------------------
989 * gfx_set_alpha_enable
990 *---------------------------------------------------------------------------
991 */
992int
993gfx_set_alpha_enable(int enable)
994{
995    int status = GFX_STATUS_UNSUPPORTED;
996
997#if GFX_VIDEO_SC1200
998    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
999        status = sc1200_set_alpha_enable(enable);
1000#endif
1001#if GFX_VIDEO_REDCLOUD
1002    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1003        status = redcloud_set_alpha_enable(enable);
1004#endif
1005    return (status);
1006}
1007
1008/*---------------------------------------------------------------------------
1009 * gfx_set_alpha_window
1010 *---------------------------------------------------------------------------
1011 */
1012int
1013gfx_set_alpha_window(short x, short y,
1014                     unsigned short width, unsigned short height)
1015{
1016    int status = GFX_STATUS_UNSUPPORTED;
1017
1018#if GFX_VIDEO_SC1200
1019    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1020        status = sc1200_set_alpha_window(x, y, width, height);
1021#endif
1022#if GFX_VIDEO_REDCLOUD
1023    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1024        status = redcloud_set_alpha_window(x, y, width, height);
1025#endif
1026    return (status);
1027}
1028
1029/*---------------------------------------------------------------------------
1030 * gfx_set_alpha_value
1031 *---------------------------------------------------------------------------
1032 */
1033int
1034gfx_set_alpha_value(unsigned char alpha, char delta)
1035{
1036    int status = GFX_STATUS_UNSUPPORTED;
1037
1038#if GFX_VIDEO_SC1200
1039    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1040        status = sc1200_set_alpha_value(alpha, delta);
1041#endif
1042#if GFX_VIDEO_REDCLOUD
1043    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1044        status = redcloud_set_alpha_value(alpha, delta);
1045#endif
1046    return (status);
1047}
1048
1049/*---------------------------------------------------------------------------
1050 * gfx_set_alpha_priority
1051 *---------------------------------------------------------------------------
1052 */
1053int
1054gfx_set_alpha_priority(int priority)
1055{
1056    int status = GFX_STATUS_UNSUPPORTED;
1057
1058#if GFX_VIDEO_SC1200
1059    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1060        status = sc1200_set_alpha_priority(priority);
1061#endif
1062#if GFX_VIDEO_REDCLOUD
1063    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1064        status = redcloud_set_alpha_priority(priority);
1065#endif
1066    return (status);
1067}
1068
1069/*---------------------------------------------------------------------------
1070 * gfx_set_alpha_color
1071 *---------------------------------------------------------------------------
1072 */
1073int
1074gfx_set_alpha_color(unsigned long color)
1075{
1076    int status = GFX_STATUS_UNSUPPORTED;
1077
1078#if GFX_VIDEO_SC1200
1079    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1080        status = sc1200_set_alpha_color(color);
1081#endif
1082#if GFX_VIDEO_REDCLOUD
1083    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1084        status = redcloud_set_alpha_color(color);
1085#endif
1086    return (status);
1087}
1088
1089/*---------------------------------------------------------------------------
1090 * gfx_set_alpha_color_enable
1091 *---------------------------------------------------------------------------
1092 */
1093int
1094gfx_set_alpha_color_enable(int enable)
1095{
1096    int status = GFX_STATUS_UNSUPPORTED;
1097
1098#if GFX_VIDEO_SC1200
1099    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1100        status = sc1200_set_alpha_color_enable(enable);
1101#endif
1102#if GFX_VIDEO_REDCLOUD
1103    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1104        status = redcloud_set_alpha_color_enable(enable);
1105#endif
1106    return (status);
1107}
1108
1109/*---------------------------------------------------------------------------
1110 * gfx_set_no_ck_outside_alpha
1111 *---------------------------------------------------------------------------
1112 */
1113int
1114gfx_set_no_ck_outside_alpha(int enable)
1115{
1116    int status = GFX_STATUS_UNSUPPORTED;
1117
1118#if GFX_VIDEO_SC1200
1119    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1120        status = sc1200_set_no_ck_outside_alpha(enable);
1121#endif
1122#if GFX_VIDEO_REDCLOUD
1123    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1124        status = redcloud_set_no_ck_outside_alpha(enable);
1125#endif
1126    return (status);
1127}
1128
1129/*---------------------------------------------------------------------------
1130 * gfx_set_macrovision_enable
1131 *---------------------------------------------------------------------------
1132 */
1133int
1134gfx_set_macrovision_enable(int enable)
1135{
1136    int status = GFX_STATUS_UNSUPPORTED;
1137
1138#if GFX_VIDEO_SC1200
1139    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1140        status = sc1200_set_macrovision_enable(enable);
1141#endif
1142    return (status);
1143}
1144
1145/*---------------------------------------------------------------------------
1146 * gfx_disable_softvga
1147 *---------------------------------------------------------------------------
1148 */
1149int
1150gfx_disable_softvga(void)
1151{
1152    int status = 0;
1153
1154#if GFX_VIDEO_CS5530
1155    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1156        status = cs5530_disable_softvga();
1157#endif
1158#if GFX_VIDEO_SC1200
1159    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1160        status = sc1200_disable_softvga();
1161#endif
1162    return (status);
1163}
1164
1165/*---------------------------------------------------------------------------
1166 * gfx_enable_softvga
1167 *---------------------------------------------------------------------------
1168 */
1169int
1170gfx_enable_softvga(void)
1171{
1172    int status = 0;
1173
1174#if GFX_VIDEO_CS5530
1175    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1176        status = cs5530_enable_softvga();
1177#endif
1178#if GFX_VIDEO_SC1200
1179    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1180        status = sc1200_enable_softvga();
1181#endif
1182    return (status);
1183}
1184
1185/*---------------------------------------------------------------------------
1186 * gfx_get_clock_frequency
1187 *---------------------------------------------------------------------------
1188 */
1189unsigned long
1190gfx_get_clock_frequency(void)
1191{
1192    unsigned long frequency = 0;
1193
1194#if GFX_VIDEO_CS5530
1195    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1196        frequency = cs5530_get_clock_frequency();
1197#endif
1198#if GFX_VIDEO_SC1200
1199    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1200        frequency = sc1200_get_clock_frequency();
1201#endif
1202#if GFX_VIDEO_REDCLOUD
1203    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1204        frequency = redcloud_get_clock_frequency();
1205#endif
1206    return (frequency);
1207}
1208
1209/*---------------------------------------------------------------------------
1210 * gfx_get_max_video_width
1211 *---------------------------------------------------------------------------
1212 */
1213unsigned long
1214gfx_get_max_video_width(void)
1215{
1216    unsigned long width = 0;
1217
1218#if GFX_VIDEO_CS5530
1219    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1220        width = cs5530_get_max_video_width();
1221#endif
1222#if GFX_VIDEO_SC1200
1223    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1224        width = sc1200_get_max_video_width();
1225#endif
1226    return (width);
1227}
1228
1229/*************************************************************/
1230/*  READ ROUTINES  |  INCLUDED FOR DIAGNOSTIC PURPOSES ONLY  */
1231/*************************************************************/
1232
1233#if GFX_READ_ROUTINES
1234
1235/*---------------------------------------------------------------------------
1236 * gfx_get_vsa2_softvga_enable
1237 *---------------------------------------------------------------------------
1238 */
1239int
1240gfx_get_vsa2_softvga_enable(void)
1241{
1242    int enable = 0;
1243
1244#if GFX_VIDEO_CS5530
1245    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1246        enable = cs5530_get_vsa2_softvga_enable();
1247#endif
1248#if GFX_VIDEO_SC1200
1249    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1250        enable = sc1200_get_vsa2_softvga_enable();
1251#endif
1252    return enable;
1253
1254}
1255
1256/*---------------------------------------------------------------------------
1257 * gfx_get_sync_polarities
1258 *---------------------------------------------------------------------------
1259 */
1260int
1261gfx_get_sync_polarities(void)
1262{
1263    int polarities = 0;
1264
1265#if GFX_VIDEO_CS5530
1266    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1267        polarities = cs5530_get_sync_polarities();
1268#endif
1269#if GFX_VIDEO_SC1200
1270    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1271        polarities = sc1200_get_sync_polarities();
1272#endif
1273#if GFX_VIDEO_REDCLOUD
1274    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1275        polarities = redcloud_get_sync_polarities();
1276#endif
1277    return (polarities);
1278}
1279
1280/*---------------------------------------------------------------------------
1281 * gfx_get_video_palette_entry
1282 *---------------------------------------------------------------------------
1283 */
1284int
1285gfx_get_video_palette_entry(unsigned long index, unsigned long *palette)
1286{
1287    int status = GFX_STATUS_UNSUPPORTED;
1288
1289#if GFX_VIDEO_CS5530
1290    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1291        status = cs5530_get_video_palette_entry(index, palette);
1292#endif
1293#if GFX_VIDEO_SC1200
1294    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1295        status = sc1200_get_video_palette_entry(index, palette);
1296#endif
1297#if GFX_VIDEO_REDCLOUD
1298    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1299        status = redcloud_get_video_palette_entry(index, palette);
1300#endif
1301    return (status);
1302}
1303
1304/*----------------------------------------------------------------------------
1305 * gfx_get_video_enable
1306 *----------------------------------------------------------------------------
1307 */
1308int
1309gfx_get_video_enable(void)
1310{
1311    int enable = 0;
1312
1313#if GFX_VIDEO_CS5530
1314    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1315        enable = cs5530_get_video_enable();
1316#endif
1317#if GFX_VIDEO_SC1200
1318    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1319        enable = sc1200_get_video_enable();
1320#endif
1321#if GFX_VIDEO_REDCLOUD
1322    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1323        enable = redcloud_get_video_enable();
1324#endif
1325    return (enable);
1326}
1327
1328/*----------------------------------------------------------------------------
1329 * gfx_get_video_format
1330 *----------------------------------------------------------------------------
1331 */
1332int
1333gfx_get_video_format(void)
1334{
1335    int format = 0;
1336
1337#if GFX_VIDEO_CS5530
1338    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1339        format = cs5530_get_video_format();
1340#endif
1341#if GFX_VIDEO_SC1200
1342    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1343        format = sc1200_get_video_format();
1344#endif
1345#if GFX_VIDEO_REDCLOUD
1346    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1347        format = redcloud_get_video_format();
1348#endif
1349    return (format);
1350}
1351
1352/*----------------------------------------------------------------------------
1353 * gfx_get_video_src_size
1354 *----------------------------------------------------------------------------
1355 */
1356unsigned long
1357gfx_get_video_src_size(void)
1358{
1359    unsigned long size = 0;
1360
1361#if GFX_VIDEO_CS5530
1362    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1363        size = cs5530_get_video_src_size();
1364#endif
1365#if GFX_VIDEO_SC1200
1366    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1367        size = sc1200_get_video_src_size();
1368#endif
1369#if GFX_VIDEO_REDCLOUD
1370    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1371        size = redcloud_get_video_src_size();
1372#endif
1373    return (size);
1374}
1375
1376/*----------------------------------------------------------------------------
1377 * gfx_get_video_line_size
1378 *----------------------------------------------------------------------------
1379 */
1380unsigned long
1381gfx_get_video_line_size(void)
1382{
1383    unsigned long size = 0;
1384
1385#if GFX_VIDEO_CS5530
1386    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1387        size = cs5530_get_video_line_size();
1388#endif
1389#if GFX_VIDEO_SC1200
1390    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1391        size = sc1200_get_video_line_size();
1392#endif
1393#if GFX_VIDEO_REDCLOUD
1394    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1395        size = redcloud_get_video_line_size();
1396#endif
1397    return (size);
1398}
1399
1400/*----------------------------------------------------------------------------
1401 * gfx_get_video_xclip
1402 *----------------------------------------------------------------------------
1403 */
1404unsigned long
1405gfx_get_video_xclip(void)
1406{
1407    unsigned long size = 0;
1408
1409#if GFX_VIDEO_CS5530
1410    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1411        size = cs5530_get_video_xclip();
1412#endif
1413#if GFX_VIDEO_SC1200
1414    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1415        size = sc1200_get_video_xclip();
1416#endif
1417#if GFX_VIDEO_REDCLOUD
1418    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1419        size = redcloud_get_video_xclip();
1420#endif
1421    return (size);
1422}
1423
1424/*----------------------------------------------------------------------------
1425 * gfx_get_video_offset
1426 *----------------------------------------------------------------------------
1427 */
1428unsigned long
1429gfx_get_video_offset(void)
1430{
1431    unsigned long offset = 0;
1432
1433#if GFX_VIDEO_CS5530
1434    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1435        offset = cs5530_get_video_offset();
1436#endif
1437#if GFX_VIDEO_SC1200
1438    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1439        offset = sc1200_get_video_offset();
1440#endif
1441#if GFX_VIDEO_REDCLOUD
1442    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1443        offset = redcloud_get_video_offset();
1444#endif
1445    return (offset);
1446}
1447
1448/*----------------------------------------------------------------------------
1449 * gfx_get_video_yuv_offsets
1450 *----------------------------------------------------------------------------
1451 */
1452void
1453gfx_get_video_yuv_offsets(unsigned long *yoffset, unsigned long *uoffset,
1454                          unsigned long *voffset)
1455{
1456#if GFX_VIDEO_REDCLOUD
1457    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1458        redcloud_get_video_yuv_offsets(yoffset, uoffset, voffset);
1459#endif
1460}
1461
1462/*----------------------------------------------------------------------------
1463 * gfx_get_video_yuv_pitch
1464 *----------------------------------------------------------------------------
1465 */
1466void
1467gfx_get_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch)
1468{
1469#if GFX_VIDEO_REDCLOUD
1470    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1471        redcloud_get_video_yuv_pitch(ypitch, uvpitch);
1472#endif
1473}
1474
1475/*---------------------------------------------------------------------------
1476 * gfx_get_video_upscale
1477 *---------------------------------------------------------------------------
1478 */
1479unsigned long
1480gfx_get_video_upscale(void)
1481{
1482    unsigned long scale = 0;
1483
1484#if GFX_VIDEO_SC1200
1485    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1486        scale = sc1200_get_video_upscale();
1487#endif
1488    return (scale);
1489}
1490
1491/*---------------------------------------------------------------------------
1492 * gfx_get_video_scale
1493 *---------------------------------------------------------------------------
1494 */
1495unsigned long
1496gfx_get_video_scale(void)
1497{
1498    unsigned long scale = 0;
1499
1500#if GFX_VIDEO_CS5530
1501    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1502        scale = cs5530_get_video_scale();
1503#endif
1504#if GFX_VIDEO_SC1200
1505    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1506        scale = sc1200_get_video_scale();
1507#endif
1508#if GFX_VIDEO_REDCLOUD
1509    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1510        scale = redcloud_get_video_scale();
1511#endif
1512    return (scale);
1513}
1514
1515/*---------------------------------------------------------------------------
1516 * gfx_get_video_downscale_delta
1517 *---------------------------------------------------------------------------
1518 */
1519unsigned long
1520gfx_get_video_downscale_delta(void)
1521{
1522    unsigned long delta = 0;
1523
1524#if GFX_VIDEO_REDCLOUD
1525    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1526        delta = redcloud_get_video_downscale_delta();
1527#endif
1528    return (delta);
1529}
1530
1531/*---------------------------------------------------------------------------
1532 * gfx_get_video_vertical_downscale_enable
1533 *---------------------------------------------------------------------------
1534 */
1535int
1536gfx_get_video_vertical_downscale_enable(void)
1537{
1538    int enable = 0;
1539
1540#if GFX_VIDEO_REDCLOUD
1541    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1542        enable = redcloud_get_video_vertical_downscale_enable();
1543#endif
1544    return (enable);
1545}
1546
1547/*---------------------------------------------------------------------------
1548 * gfx_get_video_downscale_config
1549 *---------------------------------------------------------------------------
1550 */
1551int
1552gfx_get_video_downscale_config(unsigned short *type, unsigned short *m)
1553{
1554    int status = GFX_STATUS_UNSUPPORTED;
1555
1556#if GFX_VIDEO_SC1200
1557    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1558        status = sc1200_get_video_downscale_config(type, m);
1559#endif
1560#if GFX_VIDEO_REDCLOUD
1561    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1562        status = redcloud_get_video_downscale_config(type, m);
1563#endif
1564    return (status);
1565}
1566
1567/*---------------------------------------------------------------------------
1568 * gfx_get_video_downscale_coefficients
1569 *---------------------------------------------------------------------------
1570 */
1571void
1572gfx_get_video_downscale_coefficients(unsigned short *coef1,
1573                                     unsigned short *coef2,
1574                                     unsigned short *coef3,
1575                                     unsigned short *coef4)
1576{
1577#if GFX_VIDEO_SC1200
1578    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1579        sc1200_get_video_downscale_coefficients(coef1, coef2, coef3, coef4);
1580#endif
1581#if GFX_VIDEO_REDCLOUD
1582    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1583        redcloud_get_video_downscale_coefficients(coef1, coef2, coef3, coef4);
1584#endif
1585}
1586
1587/*---------------------------------------------------------------------------
1588 * gfx_get_video_downscale_enable
1589 *---------------------------------------------------------------------------
1590 */
1591void
1592gfx_get_video_downscale_enable(int *enable)
1593{
1594#if GFX_VIDEO_SC1200
1595    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1596        sc1200_get_video_downscale_enable(enable);
1597#endif
1598#if GFX_VIDEO_REDCLOUD
1599    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1600        redcloud_get_video_downscale_enable(enable);
1601#endif
1602}
1603
1604/*---------------------------------------------------------------------------
1605 * gfx_get_video_dst_size
1606 *---------------------------------------------------------------------------
1607 */
1608unsigned long
1609gfx_get_video_dst_size(void)
1610{
1611    unsigned long size = 0;
1612
1613#if GFX_VIDEO_CS5530
1614    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1615        size = cs5530_get_video_dst_size();
1616#endif
1617#if GFX_VIDEO_SC1200
1618    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1619        size = sc1200_get_video_dst_size();
1620#endif
1621#if GFX_VIDEO_REDCLOUD
1622    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1623        size = redcloud_get_video_dst_size();
1624#endif
1625    return (size);
1626}
1627
1628/*---------------------------------------------------------------------------
1629 * gfx_get_video_position
1630 *---------------------------------------------------------------------------
1631 */
1632unsigned long
1633gfx_get_video_position(void)
1634{
1635    unsigned long position = 0;
1636
1637#if GFX_VIDEO_CS5530
1638    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1639        position = cs5530_get_video_position();
1640#endif
1641#if GFX_VIDEO_SC1200
1642    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1643        position = sc1200_get_video_position();
1644#endif
1645#if GFX_VIDEO_REDCLOUD
1646    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1647        position = redcloud_get_video_position();
1648#endif
1649    return (position);
1650}
1651
1652/*---------------------------------------------------------------------------
1653 * gfx_get_video_color_key
1654 *---------------------------------------------------------------------------
1655 */
1656unsigned long
1657gfx_get_video_color_key(void)
1658{
1659    unsigned long key = 0;
1660
1661#if GFX_VIDEO_CS5530
1662    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1663        key = cs5530_get_video_color_key();
1664#endif
1665#if GFX_VIDEO_SC1200
1666    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1667        key = sc1200_get_video_color_key();
1668#endif
1669#if GFX_VIDEO_REDCLOUD
1670    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1671        key = redcloud_get_video_color_key();
1672#endif
1673    return (key);
1674}
1675
1676/*---------------------------------------------------------------------------
1677 * gfx_get_video_color_key_mask
1678 *---------------------------------------------------------------------------
1679 */
1680unsigned long
1681gfx_get_video_color_key_mask(void)
1682{
1683    unsigned long mask = 0;
1684
1685#if GFX_VIDEO_CS5530
1686    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1687        mask = cs5530_get_video_color_key_mask();
1688#endif
1689#if GFX_VIDEO_SC1200
1690    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1691        mask = sc1200_get_video_color_key_mask();
1692#endif
1693#if GFX_VIDEO_REDCLOUD
1694    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1695        mask = redcloud_get_video_color_key_mask();
1696#endif
1697    return (mask);
1698}
1699
1700/*---------------------------------------------------------------------------
1701 * gfx_get_video_color_key_src
1702 *---------------------------------------------------------------------------
1703 */
1704int
1705gfx_get_video_color_key_src(void)
1706{
1707    int src = 0;
1708
1709#if GFX_VIDEO_CS5530
1710    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1711        src = cs5530_get_video_color_key_src();
1712#endif
1713#if GFX_VIDEO_SC1200
1714    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1715        src = sc1200_get_video_color_key_src();
1716#endif
1717#if GFX_VIDEO_REDCLOUD
1718    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1719        src = redcloud_get_video_color_key_src();
1720#endif
1721    return (src);
1722}
1723
1724/*---------------------------------------------------------------------------
1725 * gfx_get_video_filter
1726 *---------------------------------------------------------------------------
1727 */
1728int
1729gfx_get_video_filter(void)
1730{
1731    int filter = 0;
1732
1733#if GFX_VIDEO_CS5530
1734    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1735        filter = cs5530_get_video_filter();
1736#endif
1737#if GFX_VIDEO_SC1200
1738    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1739        filter = sc1200_get_video_filter();
1740#endif
1741#if GFX_VIDEO_REDCLOUD
1742    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1743        filter = redcloud_get_video_filter();
1744#endif
1745    return (filter);
1746}
1747
1748/*---------------------------------------------------------------------------
1749 * gfx_get_video_request
1750 *---------------------------------------------------------------------------
1751 */
1752int
1753gfx_get_video_request(short *x, short *y)
1754{
1755    int status = GFX_STATUS_UNSUPPORTED;
1756
1757#if GFX_VIDEO_SC1200
1758    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1759        status = sc1200_get_video_request(x, y);
1760#endif
1761#if GFX_VIDEO_REDCLOUD
1762    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1763        status = redcloud_get_video_request(x, y);
1764#endif
1765    return (status);
1766}
1767
1768/*---------------------------------------------------------------------------
1769 * gfx_get_video_source
1770 *---------------------------------------------------------------------------
1771 */
1772int
1773gfx_get_video_source(VideoSourceType * source)
1774{
1775    int status = GFX_STATUS_UNSUPPORTED;
1776
1777#if GFX_VIDEO_SC1200
1778    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1779        status = sc1200_get_video_source(source);
1780#endif
1781    return (status);
1782}
1783
1784/*---------------------------------------------------------------------------
1785 * gfx_get_vbi_source
1786 *---------------------------------------------------------------------------
1787 */
1788int
1789gfx_get_vbi_source(VbiSourceType * source)
1790{
1791    int status = GFX_STATUS_UNSUPPORTED;
1792
1793#if GFX_VIDEO_SC1200
1794    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1795        status = sc1200_get_vbi_source(source);
1796#endif
1797    return (status);
1798}
1799
1800/*---------------------------------------------------------------------------
1801 * gfx_get_vbi_lines
1802 *---------------------------------------------------------------------------
1803 */
1804unsigned long
1805gfx_get_vbi_lines(int odd)
1806{
1807    unsigned long lines = (unsigned long) GFX_STATUS_UNSUPPORTED;
1808
1809#if GFX_VIDEO_SC1200
1810    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1811        lines = sc1200_get_vbi_lines(odd);
1812#endif
1813    return (lines);
1814}
1815
1816/*---------------------------------------------------------------------------
1817 * gfx_get_vbi_total
1818 *---------------------------------------------------------------------------
1819 */
1820unsigned long
1821gfx_get_vbi_total(int odd)
1822{
1823    unsigned long total = (unsigned long) GFX_STATUS_UNSUPPORTED;
1824
1825#if GFX_VIDEO_SC1200
1826    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1827        total = sc1200_get_vbi_total(odd);
1828#endif
1829    return (total);
1830}
1831
1832/*---------------------------------------------------------------------------
1833 * gfx_get_video_interlaced
1834 *---------------------------------------------------------------------------
1835 */
1836int
1837gfx_get_video_interlaced(void)
1838{
1839    int interlaced = GFX_STATUS_UNSUPPORTED;
1840
1841#if GFX_VIDEO_SC1200
1842    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1843        interlaced = sc1200_get_video_interlaced();
1844#endif
1845    return (interlaced);
1846}
1847
1848/*---------------------------------------------------------------------------
1849 * gfx_get_color_space_YUV
1850 *---------------------------------------------------------------------------
1851 */
1852int
1853gfx_get_color_space_YUV(void)
1854{
1855    int color_space = GFX_STATUS_UNSUPPORTED;
1856
1857#if GFX_VIDEO_SC1200
1858    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1859        color_space = sc1200_get_color_space_YUV();
1860#endif
1861    return (color_space);
1862}
1863
1864/*---------------------------------------------------------------------------
1865 * gfx_get_vertical_scaler_offset
1866 *---------------------------------------------------------------------------
1867 */
1868int
1869gfx_get_vertical_scaler_offset(char *offset)
1870{
1871    int status = GFX_STATUS_UNSUPPORTED;
1872
1873#if GFX_VIDEO_SC1200
1874    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1875        status = sc1200_get_vertical_scaler_offset(offset);
1876#endif
1877    return (status);
1878}
1879
1880/*---------------------------------------------------------------------------
1881 * gfx_get_genlock_delay
1882 *---------------------------------------------------------------------------
1883 */
1884unsigned long
1885gfx_get_genlock_delay(void)
1886{
1887    unsigned long delay = (unsigned long) GFX_STATUS_UNSUPPORTED;
1888
1889#if GFX_VIDEO_SC1200
1890    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1891        delay = sc1200_get_genlock_delay();
1892#endif
1893    return (delay);
1894}
1895
1896/*---------------------------------------------------------------------------
1897 * gfx_get_genlock_enable
1898 *---------------------------------------------------------------------------
1899 */
1900int
1901gfx_get_genlock_enable(void)
1902{
1903    int enable = GFX_STATUS_UNSUPPORTED;
1904
1905#if GFX_VIDEO_SC1200
1906    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1907        enable = sc1200_get_genlock_enable();
1908#endif
1909    return (enable);
1910}
1911
1912/*---------------------------------------------------------------------------
1913 * gfx_get_video_cursor
1914 *---------------------------------------------------------------------------
1915 */
1916int
1917gfx_get_video_cursor(unsigned long *key, unsigned long *mask,
1918                     unsigned short *select_color2, unsigned long *color1,
1919                     unsigned short *color2)
1920{
1921    int enable = GFX_STATUS_UNSUPPORTED;
1922
1923#if GFX_VIDEO_SC1200
1924    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1925        enable =
1926            sc1200_get_video_cursor(key, mask, select_color2, color1, color2);
1927#endif
1928#if GFX_VIDEO_REDCLOUD
1929    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1930        enable =
1931            redcloud_get_video_cursor(key, mask, select_color2, color1, color2);
1932#endif
1933    return (enable);
1934}
1935
1936/*---------------------------------------------------------------------------
1937 * gfx_read_crc
1938 *---------------------------------------------------------------------------
1939 */
1940unsigned long
1941gfx_read_crc(void)
1942{
1943    unsigned long crc = 0;
1944
1945#if GFX_VIDEO_CS5530
1946    if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
1947        crc = cs5530_read_crc();
1948#endif
1949#if GFX_VIDEO_SC1200
1950    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
1951        crc = sc1200_read_crc();
1952#endif
1953#if GFX_VIDEO_REDCLOUD
1954    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1955        crc = redcloud_read_crc();
1956#endif
1957    return (crc);
1958}
1959
1960/*---------------------------------------------------------------------------
1961 * gfx_read_crc32
1962 *---------------------------------------------------------------------------
1963 */
1964unsigned long
1965gfx_read_crc32(void)
1966{
1967    unsigned long crc = 0;
1968
1969#if GFX_VIDEO_REDCLOUD
1970    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1971        crc = redcloud_read_crc32();
1972#endif
1973    return (crc);
1974}
1975
1976/*---------------------------------------------------------------------------
1977 * gfx_read_window_crc
1978 *---------------------------------------------------------------------------
1979 */
1980unsigned long
1981gfx_read_window_crc(int source, unsigned short x, unsigned short y,
1982                    unsigned short width, unsigned short height, int crc32)
1983{
1984    unsigned long crc = 0;
1985
1986#if GFX_VIDEO_REDCLOUD
1987    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
1988        crc = redcloud_read_window_crc(source, x, y, width, height, crc32);
1989#endif
1990    return (crc);
1991}
1992
1993/*-----------------------------------------------------------------------------
1994 * gfx_get_macrovision_enable
1995 *-----------------------------------------------------------------------------
1996 */
1997int
1998gfx_get_macrovision_enable(void)
1999{
2000    int enable = 0;
2001
2002#if GFX_VIDEO_SC1200
2003    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
2004        enable = sc1200_get_video_enable();
2005#endif
2006    return (enable);
2007}
2008
2009/*---------------------------------------------------------------------------
2010 * gfx_get_alpha_enable
2011 *---------------------------------------------------------------------------
2012 */
2013void
2014gfx_get_alpha_enable(int *enable)
2015{
2016#if GFX_VIDEO_SC1200
2017    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
2018        sc1200_get_alpha_enable(enable);
2019#endif
2020#if GFX_VIDEO_REDCLOUD
2021    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
2022        redcloud_get_alpha_enable(enable);
2023#endif
2024    return;
2025}
2026
2027/*---------------------------------------------------------------------------
2028 * gfx_get_alpha_size
2029 *---------------------------------------------------------------------------
2030 */
2031void
2032gfx_get_alpha_size(unsigned short *x, unsigned short *y,
2033                   unsigned short *width, unsigned short *height)
2034{
2035#if GFX_VIDEO_SC1200
2036    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
2037        sc1200_get_alpha_size(x, y, width, height);
2038#endif
2039#if GFX_VIDEO_REDCLOUD
2040    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
2041        redcloud_get_alpha_size(x, y, width, height);
2042#endif
2043    return;
2044}
2045
2046/*---------------------------------------------------------------------------
2047 * gfx_get_alpha_value
2048 *---------------------------------------------------------------------------
2049 */
2050void
2051gfx_get_alpha_value(unsigned char *alpha, char *delta)
2052{
2053#if GFX_VIDEO_SC1200
2054    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
2055        sc1200_get_alpha_value(alpha, delta);
2056#endif
2057#if GFX_VIDEO_REDCLOUD
2058    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
2059        redcloud_get_alpha_value(alpha, delta);
2060#endif
2061    return;
2062}
2063
2064/*---------------------------------------------------------------------------
2065 * gfx_get_alpha_priority
2066 *---------------------------------------------------------------------------
2067 */
2068void
2069gfx_get_alpha_priority(int *priority)
2070{
2071#if GFX_VIDEO_SC1200
2072    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
2073        sc1200_get_alpha_priority(priority);
2074#endif
2075#if GFX_VIDEO_REDCLOUD
2076    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
2077        redcloud_get_alpha_priority(priority);
2078#endif
2079    return;
2080}
2081
2082/*---------------------------------------------------------------------------
2083 * gfx_get_alpha_color
2084 *---------------------------------------------------------------------------
2085 */
2086void
2087gfx_get_alpha_color(unsigned long *color)
2088{
2089#if GFX_VIDEO_SC1200
2090    if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
2091        sc1200_get_alpha_color(color);
2092#endif
2093#if GFX_VIDEO_REDCLOUD
2094    if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
2095        redcloud_get_alpha_color(color);
2096#endif
2097    return;
2098}
2099
2100#endif                          /* GFX_READ_ROUTINES */
2101
2102#endif                          /* GFX_VIDEO_DYNAMIC */
2103
2104/* END OF FILE */
2105