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