1f29dbc25Smrg/* Copyright (c) 2005 Advanced Micro Devices, Inc.
2f29dbc25Smrg *
3f29dbc25Smrg * Permission is hereby granted, free of charge, to any person obtaining a copy
4f29dbc25Smrg * of this software and associated documentation files (the "Software"), to
5f29dbc25Smrg * deal in the Software without restriction, including without limitation the
6f29dbc25Smrg * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7f29dbc25Smrg * sell copies of the Software, and to permit persons to whom the Software is
8f29dbc25Smrg * furnished to do so, subject to the following conditions:
9f29dbc25Smrg *
10f29dbc25Smrg * The above copyright notice and this permission notice shall be included in
11f29dbc25Smrg * all copies or substantial portions of the Software.
12f29dbc25Smrg *
13f29dbc25Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14f29dbc25Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15f29dbc25Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16f29dbc25Smrg * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17f29dbc25Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18f29dbc25Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19f29dbc25Smrg * IN THE SOFTWARE.
20f29dbc25Smrg *
21f29dbc25Smrg * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
22f29dbc25Smrg * contributors may be used to endorse or promote products derived from this
23f29dbc25Smrg * software without specific prior written permission.
24f29dbc25Smrg * */
25f29dbc25Smrg
26f29dbc25Smrg/*
27f29dbc25Smrg * File Contents:   This file contains the Geode frame buffer panel
2879d5fcd7Smrg *                  initialization functions.
29f29dbc25Smrg *
30f29dbc25Smrg * SubModule:       Geode FlatPanel library
31f29dbc25Smrg * */
32f29dbc25Smrg
33f29dbc25Smrg#include "panel.h"
34f29dbc25Smrg#include "gfx_regs.h"
35f29dbc25Smrg#include "gfx_type.h"
36f29dbc25Smrg
37f29dbc25Smrg/* defaults
38f29dbc25Smrg * Panel: 		Enabled
39f29dbc25Smrg * Platform: 		Centaurus
40f29dbc25Smrg * 92xx Chip: 		9211 Rev. A
41f29dbc25Smrg * PanelType: 		DSTN
42f29dbc25Smrg * XResxYRes: 		800x600
43f29dbc25Smrg * Depth: 		16
44f29dbc25Smrg * Mono_Color: 		Color
45f29dbc25Smrg */
46f29dbc25Smrgstatic Pnl_PanelParams sPanelParam = {
47f29dbc25Smrg    0, 1, CENTAURUS_PLATFORM, PNL_9211_A,
48f29dbc25Smrg    {PNL_DSTN, 800, 600, 16, PNL_COLOR_PANEL}
49f29dbc25Smrg};
50f29dbc25Smrg
51f29dbc25Smrg#if PLATFORM_DRACO
52f29dbc25Smrg#include "drac9210.c"
53f29dbc25Smrg#endif
54f29dbc25Smrg
55f29dbc25Smrg#if PLATFORM_CENTAURUS
56f29dbc25Smrg#include "cen9211.c"
57f29dbc25Smrg#endif
58f29dbc25Smrg
59f29dbc25Smrg#if PLATFORM_DORADO
60f29dbc25Smrg#include "dora9211.c"
61f29dbc25Smrg#endif
62f29dbc25Smrg
63f29dbc25Smrg#if  PLATFORM_GX2BASED
64f29dbc25Smrg#include "gx2_9211.c"
65f29dbc25Smrg#endif
66f29dbc25Smrg#include "platform.c"
67f29dbc25Smrg
68f29dbc25Smrg/*
69f29dbc25Smrg *	return -1 - UnKnown
70f29dbc25Smrg *	0 - Draco has 9210
71f29dbc25Smrg *	1 - Centaurus has 9211 Rev. A
72f29dbc25Smrg *	2 - Dorado has 9211 Rev. C
73f29dbc25Smrg */
74f29dbc25Smrg
75f29dbc25Smrg/*-----------------------------------------------------------------
76f29dbc25Smrg * Pnl_SetPlatform
77f29dbc25Smrg *
78f29dbc25Smrg * Description:		This function sets the panel with hardware platform.
79f29dbc25Smrg *
80f29dbc25Smrg * parameters:
81f29dbc25Smrg *		platform:	It specify the platform.
82f29dbc25Smrg *
83f29dbc25Smrg * return:			none.
84f29dbc25Smrg *-----------------------------------------------------------------*/
85f29dbc25Smrgvoid
86f29dbc25SmrgPnl_SetPlatform(int platform)
87f29dbc25Smrg{
88f29dbc25Smrg    /* To Be Implemented */
89f29dbc25Smrg    sPanelParam.Platform = platform;
90f29dbc25Smrg
91f29dbc25Smrg}
92f29dbc25Smrg
93f29dbc25Smrg/*-----------------------------------------------------------------
94f29dbc25Smrg * Pnl_GetPlatform
95f29dbc25Smrg *
96f29dbc25Smrg * Description:		This function returns the panel platform.
97f29dbc25Smrg *
98f29dbc25Smrg * parameters:		none.
99f29dbc25Smrg *
100f29dbc25Smrg * return:			On success it returns the panel platform.
101f29dbc25Smrg *-----------------------------------------------------------------*/
102f29dbc25Smrgint
103f29dbc25SmrgPnl_GetPlatform(void)
104f29dbc25Smrg{
105f29dbc25Smrg    sPanelParam.Platform = Detect_Platform();
106f29dbc25Smrg
107f29dbc25Smrg    return sPanelParam.Platform;
108f29dbc25Smrg
109f29dbc25Smrg}
110f29dbc25Smrg
111f29dbc25Smrg/*-----------------------------------------------------------------
112f29dbc25Smrg * Pnl_IsPanelPresent
113f29dbc25Smrg *
114f29dbc25Smrg * Description:		This function specifies whether the panel is prsent
115f29dbc25Smrg *					or not.
116f29dbc25Smrg *
117f29dbc25Smrg * parameters: 		none.
118f29dbc25Smrg *
119f29dbc25Smrg * return: 			On success it returns an integer panel present value.
120f29dbc25Smrg *-----------------------------------------------------------------*/
121f29dbc25Smrgint
122f29dbc25SmrgPnl_IsPanelPresent(void)
123f29dbc25Smrg{
124f29dbc25Smrg    /* To Be Implemented */
125f29dbc25Smrg    return sPanelParam.PanelPresent;
126f29dbc25Smrg}
127f29dbc25Smrg
128f29dbc25Smrg/*-----------------------------------------------------------------
129f29dbc25Smrg * Pnl_SetPanelPresent
130f29dbc25Smrg *
131f29dbc25Smrg * Description:		This function sets the panel_present parameter.
132f29dbc25Smrg *
133f29dbc25Smrg * parameters:
134f29dbc25Smrg * 		present:	It specifies the panel present value.
135f29dbc25Smrg *
136f29dbc25Smrg * return:			none.
137f29dbc25Smrg *-----------------------------------------------------------------*/
138f29dbc25Smrgvoid
139f29dbc25SmrgPnl_SetPanelPresent(int present)
140f29dbc25Smrg{
141f29dbc25Smrg    /* To Be Implemented */
142f29dbc25Smrg    sPanelParam.PanelPresent = present;
143f29dbc25Smrg}
144f29dbc25Smrg
145f29dbc25Smrg/*-----------------------------------------------------------------
146f29dbc25Smrg * Pnl_SetPanelParam
147f29dbc25Smrg *
148f29dbc25Smrg * Description:		This function sets the panel parameters
149f29dbc25Smrg *
150f29dbc25Smrg * parameters:
151f29dbc25Smrg *		pParam:		It specifies the elements of the panel parameter
152f29dbc25Smrg *					structure.
153f29dbc25Smrg *
154f29dbc25Smrg * return:	none.
155f29dbc25Smrg *-----------------------------------------------------------------*/
156f29dbc25Smrgvoid
157f29dbc25SmrgPnl_SetPanelParam(Pnl_PanelParams * pParam)
158f29dbc25Smrg{
159f29dbc25Smrg    if (pParam->Flags & PNL_PANELPRESENT) {
160f29dbc25Smrg        Pnl_SetPanelPresent(pParam->PanelPresent);
161f29dbc25Smrg    }
162f29dbc25Smrg    if (pParam->Flags & PNL_PLATFORM) {
163f29dbc25Smrg        Pnl_SetPlatform(pParam->Platform);
164f29dbc25Smrg    }
165f29dbc25Smrg    if (pParam->Flags & PNL_PANELCHIP) {
166f29dbc25Smrg        Pnl_SetPanelChip(pParam->PanelChip);
167f29dbc25Smrg    }
168f29dbc25Smrg    if (pParam->Flags & PNL_PANELSTAT) {
169f29dbc25Smrg        sPanelParam.PanelStat.XRes = pParam->PanelStat.XRes;
170f29dbc25Smrg        sPanelParam.PanelStat.YRes = pParam->PanelStat.YRes;
171f29dbc25Smrg        sPanelParam.PanelStat.Depth = pParam->PanelStat.Depth;
172f29dbc25Smrg        sPanelParam.PanelStat.MonoColor = pParam->PanelStat.MonoColor;
173f29dbc25Smrg        sPanelParam.PanelStat.Type = pParam->PanelStat.Type;
174f29dbc25Smrg    }
175f29dbc25Smrg}
176f29dbc25Smrg
177f29dbc25Smrg/*-----------------------------------------------------------------
178f29dbc25Smrg * Pnl_PowerUp
179f29dbc25Smrg *
180f29dbc25Smrg * Description:		This function sets the power based on the
181f29dbc25Smrg *					hardware platforms dorado or centaraus.
182f29dbc25Smrg *
183f29dbc25Smrg * parameters:		none.
184f29dbc25Smrg *
185f29dbc25Smrg * return:			none.
186f29dbc25Smrg *-----------------------------------------------------------------*/
187f29dbc25Smrgvoid
188f29dbc25SmrgPnl_PowerUp(void)
189f29dbc25Smrg{
190f29dbc25Smrg    int Platform;
191f29dbc25Smrg    unsigned long dcfg, hw_video;
192f29dbc25Smrg
193f29dbc25Smrg    Platform = Pnl_GetPlatform();
194f29dbc25Smrg
195f29dbc25Smrg#if PLATFORM_CENTAURUS
196f29dbc25Smrg    if (Platform == CENTAURUS_PLATFORM) {
197f29dbc25Smrg        Centaurus_Power_Up();
198f29dbc25Smrg        return;
199f29dbc25Smrg    }
200f29dbc25Smrg#endif
201f29dbc25Smrg
202f29dbc25Smrg#if PLATFORM_DORADO
203f29dbc25Smrg    if (Platform == DORADO_PLATFORM) {
204f29dbc25Smrg        Dorado_Power_Up();
205f29dbc25Smrg        return;
206f29dbc25Smrg    }
207f29dbc25Smrg#endif
208f29dbc25Smrg
209f29dbc25Smrg#if PLATFORM_GX2BASED
210f29dbc25Smrg    if (Platform == REDCLOUD_PLATFORM) {
211f29dbc25Smrg    }
212f29dbc25Smrg#endif
213f29dbc25Smrg
214f29dbc25Smrg    hw_video = gfx_detect_video();
215f29dbc25Smrg
216f29dbc25Smrg    if (hw_video == GFX_VID_CS5530) {
217f29dbc25Smrg        /* READ DISPLAY CONFIG FROM CX5530 */
218f29dbc25Smrg        dcfg = READ_VID32(CS5530_DISPLAY_CONFIG);
219f29dbc25Smrg
220f29dbc25Smrg        /* SET RELEVANT FIELDS */
221f29dbc25Smrg        dcfg |= (CS5530_DCFG_FP_PWR_EN | CS5530_DCFG_FP_DATA_EN);
222f29dbc25Smrg        /* Enable the flatpanel power and data */
223f29dbc25Smrg        WRITE_VID32(CS5530_DISPLAY_CONFIG, dcfg);
22404007ebaSmrg    }
22504007ebaSmrg    else if (hw_video == GFX_VID_SC1200) {
226f29dbc25Smrg        /* READ DISPLAY CONFIG FROM SC1200 */
227f29dbc25Smrg        dcfg = READ_VID32(SC1200_DISPLAY_CONFIG);
228f29dbc25Smrg
229f29dbc25Smrg        /* SET RELEVANT FIELDS */
230f29dbc25Smrg        dcfg |= (SC1200_DCFG_FP_PWR_EN | SC1200_DCFG_FP_DATA_EN);
231f29dbc25Smrg        /* Enable the flatpanel power and data */
232f29dbc25Smrg        WRITE_VID32(SC1200_DISPLAY_CONFIG, dcfg);
23304007ebaSmrg    }
23404007ebaSmrg    else if (hw_video == GFX_VID_REDCLOUD) {
235f29dbc25Smrg        /* READ DISPLAY CONFIG FROM REDCLOUD */
236f29dbc25Smrg        dcfg = READ_VID32(RCDF_DISPLAY_CONFIG);
237f29dbc25Smrg
238f29dbc25Smrg        /* SET RELEVANT FIELDS */
239f29dbc25Smrg        dcfg |= (RCDF_DCFG_FP_PWR_EN | RCDF_DCFG_FP_DATA_EN);
240f29dbc25Smrg        /* Enable the flatpanel power and data */
241f29dbc25Smrg        WRITE_VID32(RCDF_DISPLAY_CONFIG, dcfg);
242f29dbc25Smrg    }
243f29dbc25Smrg
244f29dbc25Smrg}
245f29dbc25Smrg
246f29dbc25Smrg/*-----------------------------------------------------------------
247f29dbc25Smrg * Pnl_PowerDown
248f29dbc25Smrg *
249f29dbc25Smrg * Description:		This function make power down based on the
250f29dbc25Smrg *					hardware platforms dorado or centaraus.
251f29dbc25Smrg *
252f29dbc25Smrg * parameters:		none.
253f29dbc25Smrg *
254f29dbc25Smrg * return:			none.
255f29dbc25Smrg *-----------------------------------------------------------------*/
256f29dbc25Smrgvoid
257f29dbc25SmrgPnl_PowerDown(void)
258f29dbc25Smrg{
259f29dbc25Smrg    int Platform;
260f29dbc25Smrg    unsigned long dcfg, hw_video;
261f29dbc25Smrg
262f29dbc25Smrg    Platform = Pnl_GetPlatform();
263f29dbc25Smrg
264f29dbc25Smrg#if PLATFORM_CENTAURUS
265f29dbc25Smrg    if (Platform == CENTAURUS_PLATFORM) {
266f29dbc25Smrg        Centaurus_Power_Down();
267f29dbc25Smrg        return;
268f29dbc25Smrg    }
269f29dbc25Smrg#endif
270f29dbc25Smrg#if PLATFORM_DORADO
271f29dbc25Smrg    if (Platform == DORADO_PLATFORM) {
272f29dbc25Smrg        Dorado_Power_Down();
273f29dbc25Smrg        return;
274f29dbc25Smrg    }
275f29dbc25Smrg#endif
276f29dbc25Smrg
277f29dbc25Smrg#if PLATFORM_GX2BASED
278f29dbc25Smrg    if (Platform == REDCLOUD_PLATFORM) {
279f29dbc25Smrg    }
280f29dbc25Smrg#endif
281f29dbc25Smrg
282f29dbc25Smrg    hw_video = gfx_detect_video();
283f29dbc25Smrg
284f29dbc25Smrg    if (hw_video == GFX_VID_CS5530) {
285f29dbc25Smrg        /* READ DISPLAY CONFIG FROM CX5530 */
286f29dbc25Smrg        dcfg = READ_VID32(CS5530_DISPLAY_CONFIG);
287f29dbc25Smrg
288f29dbc25Smrg        /* CLEAR RELEVANT FIELDS */
289f29dbc25Smrg        dcfg &= ~(CS5530_DCFG_FP_PWR_EN | CS5530_DCFG_FP_DATA_EN);
290f29dbc25Smrg        /* Disable the flatpanel power and data */
291f29dbc25Smrg        WRITE_VID32(CS5530_DISPLAY_CONFIG, dcfg);
29204007ebaSmrg    }
29304007ebaSmrg    else if (hw_video == GFX_VID_SC1200) {
294f29dbc25Smrg        /* READ DISPLAY CONFIG FROM SC1200 */
295f29dbc25Smrg        dcfg = READ_VID32(SC1200_DISPLAY_CONFIG);
296f29dbc25Smrg
297f29dbc25Smrg        /* CLEAR RELEVANT FIELDS */
298f29dbc25Smrg        dcfg &= ~(SC1200_DCFG_FP_PWR_EN | SC1200_DCFG_FP_DATA_EN);
299f29dbc25Smrg        /* Disable the flatpanel power and data */
300f29dbc25Smrg        WRITE_VID32(SC1200_DISPLAY_CONFIG, dcfg);
30104007ebaSmrg    }
30204007ebaSmrg    else if (hw_video == GFX_VID_REDCLOUD) {
303f29dbc25Smrg        /* READ DISPLAY CONFIG FROM REDCLOUD */
304f29dbc25Smrg        dcfg = READ_VID32(RCDF_DISPLAY_CONFIG);
305f29dbc25Smrg
306f29dbc25Smrg        /* CLEAR RELEVANT FIELDS */
307f29dbc25Smrg        dcfg &= ~(RCDF_DCFG_FP_PWR_EN | RCDF_DCFG_FP_DATA_EN);
308f29dbc25Smrg        /* Disable the flatpanel power and data */
309f29dbc25Smrg        WRITE_VID32(RCDF_DISPLAY_CONFIG, dcfg);
310f29dbc25Smrg    }
311f29dbc25Smrg}
312f29dbc25Smrg
313f29dbc25Smrg/*-----------------------------------------------------------------
314f29dbc25Smrg * Pnl_SavePanelState
315f29dbc25Smrg *
316f29dbc25Smrg * Description:		This function saves the panel state based on the
317f29dbc25Smrg *					hardware platforms dorado or centaraus.
318f29dbc25Smrg *
319f29dbc25Smrg * parameters:		none.
320f29dbc25Smrg *
321f29dbc25Smrg * return:			none.
322f29dbc25Smrg *-----------------------------------------------------------------*/
323f29dbc25Smrgvoid
324f29dbc25SmrgPnl_SavePanelState(void)
325f29dbc25Smrg{
326f29dbc25Smrg    int Platform;
327f29dbc25Smrg
328f29dbc25Smrg    Platform = Pnl_GetPlatform();
329f29dbc25Smrg
330f29dbc25Smrg#if PLATFORM_CENTAURUS
331f29dbc25Smrg    if (Platform == CENTAURUS_PLATFORM) {
332f29dbc25Smrg        Centaurus_Save_Panel_State();
333f29dbc25Smrg        return;
334f29dbc25Smrg    }
335f29dbc25Smrg#endif
336f29dbc25Smrg
337f29dbc25Smrg#if PLATFORM_DORADO
338f29dbc25Smrg    if (Platform == DORADO_PLATFORM) {
339f29dbc25Smrg        Dorado_Save_Panel_State();
340f29dbc25Smrg        return;
341f29dbc25Smrg    }
342f29dbc25Smrg#endif
343f29dbc25Smrg
344f29dbc25Smrg#if PLATFORM_GX2BASED
345f29dbc25Smrg    if (Platform == REDCLOUD_PLATFORM) {
346f29dbc25Smrg    }
347f29dbc25Smrg#endif
348f29dbc25Smrg}
349f29dbc25Smrg
350f29dbc25Smrg/*-----------------------------------------------------------------
351f29dbc25Smrg * Pnl_RestorePanelState
352f29dbc25Smrg *
353f29dbc25Smrg * Description:		This function restore the panel state based on the
354f29dbc25Smrg *					hardware platforms dorado or centaraus.
355f29dbc25Smrg *
356f29dbc25Smrg * parameters:		none.
357f29dbc25Smrg *
358f29dbc25Smrg * return:			none.
359f29dbc25Smrg *-----------------------------------------------------------------*/
360f29dbc25Smrgvoid
361f29dbc25SmrgPnl_RestorePanelState(void)
362f29dbc25Smrg{
363f29dbc25Smrg    int Platform;
364f29dbc25Smrg
365f29dbc25Smrg    Platform = Pnl_GetPlatform();
366f29dbc25Smrg#if PLATFORM_CENTAURUS
367f29dbc25Smrg    if (Platform == CENTAURUS_PLATFORM) {
368f29dbc25Smrg        Centaurus_Restore_Panel_State();
369f29dbc25Smrg        return;
370f29dbc25Smrg    }
371f29dbc25Smrg#endif
372f29dbc25Smrg
373f29dbc25Smrg#if PLATFORM_DORADO
374f29dbc25Smrg    if (Platform == DORADO_PLATFORM) {
375f29dbc25Smrg        Dorado_Restore_Panel_State();
376f29dbc25Smrg        return;
377f29dbc25Smrg    }
378f29dbc25Smrg#endif
379f29dbc25Smrg
380f29dbc25Smrg#if PLATFORM_GX2BASED
381f29dbc25Smrg    if (Platform == REDCLOUD_PLATFORM) {
382f29dbc25Smrg    }
383f29dbc25Smrg#endif
384f29dbc25Smrg}
385f29dbc25Smrg
386f29dbc25Smrg/*-----------------------------------------------------------------
387f29dbc25Smrg * Pnl_GetPanelParam
388f29dbc25Smrg *
389f29dbc25Smrg * Description:		This function gets the panel parameters from the
390f29dbc25Smrg *					hardware platforms dorado or centaraus.
391f29dbc25Smrg *
392f29dbc25Smrg * parameters:
393f29dbc25Smrg * 		pParam:		It specifies the elements of the panel parameter
394f29dbc25Smrg *					structure.
395f29dbc25Smrg *
396f29dbc25Smrg * return:			none.
397f29dbc25Smrg *-----------------------------------------------------------------*/
398f29dbc25Smrgvoid
399f29dbc25SmrgPnl_GetPanelParam(Pnl_PanelParams * pParam)
400f29dbc25Smrg{
401f29dbc25Smrg    if (pParam->Flags & PNL_PANELPRESENT) {
402f29dbc25Smrg        pParam->PanelPresent = Pnl_IsPanelPresent();
403f29dbc25Smrg    }
404f29dbc25Smrg    if (pParam->Flags & PNL_PLATFORM) {
405f29dbc25Smrg        pParam->Platform = Pnl_GetPlatform();
406f29dbc25Smrg    }
407f29dbc25Smrg    if ((pParam->Flags & PNL_PANELCHIP) || (pParam->Flags & PNL_PANELSTAT)) {
408f29dbc25Smrg#if PLATFORM_CENTAURUS
409f29dbc25Smrg        if (pParam->Platform == CENTAURUS_PLATFORM) {
410f29dbc25Smrg            Centaurus_Get_9211_Details(pParam->Flags, pParam);
411f29dbc25Smrg            return;
412f29dbc25Smrg        }
413f29dbc25Smrg#endif
414f29dbc25Smrg
415f29dbc25Smrg#if PLATFORM_DORADO
416f29dbc25Smrg        if (pParam->Platform == DORADO_PLATFORM) {
417f29dbc25Smrg            Dorado_Get_9211_Details(pParam->Flags, pParam);
418f29dbc25Smrg            return;
419f29dbc25Smrg        }
420f29dbc25Smrg#endif
421f29dbc25Smrg
422f29dbc25Smrg#if PLATFORM_GX2BASED
423f29dbc25Smrg        if (pParam->Platform == REDCLOUD_PLATFORM) {
424f29dbc25Smrg        }
425f29dbc25Smrg#endif
426f29dbc25Smrg
427f29dbc25Smrg        /* if unknown platform put unknown */
428f29dbc25Smrg        if (pParam->Flags & PNL_PANELCHIP)
429f29dbc25Smrg            pParam->PanelChip = PNL_UNKNOWN_CHIP;
430f29dbc25Smrg
431f29dbc25Smrg        if (pParam->Flags & PNL_PANELSTAT) {
432f29dbc25Smrg            pParam->PanelStat.XRes = 0;
433f29dbc25Smrg            pParam->PanelStat.YRes = 0;
434f29dbc25Smrg            pParam->PanelStat.Depth = 0;
435f29dbc25Smrg            pParam->PanelStat.MonoColor = PNL_UNKNOWN_COLOR;
436f29dbc25Smrg            pParam->PanelStat.Type = PNL_UNKNOWN_PANEL;
437f29dbc25Smrg        }
438f29dbc25Smrg    }
439f29dbc25Smrg}
440f29dbc25Smrg
441f29dbc25Smrg/*-----------------------------------------------------------------
442f29dbc25Smrg * Pnl_SetPanelChip
443f29dbc25Smrg *
444f29dbc25Smrg * Description:		This function sets the panelchip parameter of panel
445f29dbc25Smrg *					structure.
446f29dbc25Smrg *
447f29dbc25Smrg * parameters:
448f29dbc25Smrg *   	panelChip:	It specifies the panelChip value.
449f29dbc25Smrg *
450f29dbc25Smrg * return:			none.
451f29dbc25Smrg *-----------------------------------------------------------------*/
452f29dbc25Smrg
453f29dbc25Smrgvoid
454f29dbc25SmrgPnl_SetPanelChip(int panelChip)
455f29dbc25Smrg{
456f29dbc25Smrg    /* To Be Implemented */
457f29dbc25Smrg    sPanelParam.PanelChip = panelChip;
458f29dbc25Smrg
459f29dbc25Smrg}
460f29dbc25Smrg
461f29dbc25Smrg/*-----------------------------------------------------------------
462f29dbc25Smrg * Pnl_GetPanelChip
463f29dbc25Smrg *
464f29dbc25Smrg * Description:		This function gets the panelchip parameter of panel
465f29dbc25Smrg *					structure.
466f29dbc25Smrg *
467f29dbc25Smrg * parameters:		none
468f29dbc25Smrg *
469f29dbc25Smrg * return:			On success it returns the panelchip.
470f29dbc25Smrg *-----------------------------------------------------------------*/
471f29dbc25Smrgint
472f29dbc25SmrgPnl_GetPanelChip(void)
473f29dbc25Smrg{
474f29dbc25Smrg    /* To Be Implemented */
475f29dbc25Smrg    return sPanelParam.PanelChip;
476f29dbc25Smrg}
477f29dbc25Smrg
478f29dbc25Smrg/*-----------------------------------------------------------------
479f29dbc25Smrg * Pnl_InitPanel
480f29dbc25Smrg *
481f29dbc25Smrg * Description:		This function initializes the panel with
482f29dbc25Smrg *					hardware platforms dorado or centaraus.
483f29dbc25Smrg *
484f29dbc25Smrg * parameters:
485f29dbc25Smrg * 		pParam:		It specifies the elements of the panel parameter
486f29dbc25Smrg *					structure.
487f29dbc25Smrg *
488f29dbc25Smrg * return:			none.
489f29dbc25Smrg *-----------------------------------------------------------------*/
490f29dbc25Smrgint
491f29dbc25SmrgPnl_InitPanel(Pnl_PanelParams * pParam)
492f29dbc25Smrg{
493f29dbc25Smrg    Pnl_PanelParams *pPtr;
494f29dbc25Smrg
49504007ebaSmrg    if (pParam == 0x0)          /* NULL  use the static table */
496f29dbc25Smrg        pPtr = &sPanelParam;
497f29dbc25Smrg    else
498f29dbc25Smrg        pPtr = pParam;
499f29dbc25Smrg
500f29dbc25Smrg    if (!pPtr->PanelPresent) {
50104007ebaSmrg        return -1;              /* error */
50204007ebaSmrg    }
50304007ebaSmrg    else {
504f29dbc25Smrg        if ((pPtr->PanelChip < 0) || (pPtr->Platform < 0))
50504007ebaSmrg            return -1;          /* error */
506f29dbc25Smrg
507f29dbc25Smrg#if PLATFORM_DRACO
508f29dbc25Smrg        /* check we are init. the right one */
509f29dbc25Smrg        if ((pPtr->Platform == DRACO_PLATFORM)
510f29dbc25Smrg            && (pPtr->PanelChip == PNL_9210)) {
511f29dbc25Smrg            Draco9210Init(&(pPtr->PanelStat));
512f29dbc25Smrg        }
513f29dbc25Smrg#endif
514f29dbc25Smrg
515f29dbc25Smrg#if PLATFORM_CENTAURUS
516f29dbc25Smrg        /* check we are init. the right one */
517f29dbc25Smrg        if (pPtr->Platform == CENTAURUS_PLATFORM) {
518f29dbc25Smrg            Centaurus_9211init(&(pPtr->PanelStat));
519f29dbc25Smrg        }
520f29dbc25Smrg#endif
521f29dbc25Smrg
522f29dbc25Smrg#if PLATFORM_DORADO
523f29dbc25Smrg        /* check we are init. the right one */
524f29dbc25Smrg        if ((pPtr->Platform == DORADO_PLATFORM) &&
525f29dbc25Smrg            (pPtr->PanelChip == PNL_9211_C)) {
526f29dbc25Smrg            Dorado9211Init(&(pPtr->PanelStat));
527f29dbc25Smrg        }
528f29dbc25Smrg#endif
529f29dbc25Smrg#if PLATFORM_GX2BASED
530f29dbc25Smrg        if (pPtr->Platform == REDCLOUD_PLATFORM) {
531f29dbc25Smrg            Redcloud_9211init(&(pPtr->PanelStat));
532f29dbc25Smrg        }
533f29dbc25Smrg#endif
53404007ebaSmrg    }                           /* else  end */
535f29dbc25Smrg    return 1;
536f29dbc25Smrg}
537