panel.h revision f29dbc25
1/* Copyright (c) 2005 Advanced Micro Devices, Inc. 2 * 3 * Permission is hereby granted, free of charge, to any person obtaining a copy 4 * of this software and associated documentation files (the "Software"), to 5 * deal in the Software without restriction, including without limitation the 6 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 * sell copies of the Software, and to permit persons to whom the Software is 8 * furnished to do so, subject to the following conditions: 9 * 10 * The above copyright notice and this permission notice shall be included in 11 * all copies or substantial portions of the Software. 12 * 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 * IN THE SOFTWARE. 20 * 21 * Neither the name of the Advanced Micro Devices, Inc. nor the names of its 22 * contributors may be used to endorse or promote products derived from this 23 * software without specific prior written permission. 24 * */ 25 26/* 27 * File Contents: This file contains the Geode frame buffer panel functions 28 * prototypes and it includes panel definitions header file. 29 * 30 * SubModule: Geode FlatPanel library 31 * */ 32 33/* COMPILER OPTION FOR C++ PROGRAMS */ 34 35#ifndef _panel_h 36#define _panel_h 37 38#include "pnl_defs.h" 39 40#ifdef __cplusplus 41extern "C" 42{ 43#endif 44 45/* CLOSE BRACKET FOR C++ COMPLILATION */ 46 47 void Pnl_SetPlatform(int platform); 48 int Pnl_GetPlatform(void); 49 int Pnl_IsPanelPresent(void); 50 void Pnl_SetPanelPresent(int present); 51 void Pnl_SetPanelChip(int panelChip); 52 int Pnl_GetPanelChip(void); 53 void Pnl_SetPanelParam(Pnl_PanelParams * pParam); 54 void Pnl_GetPanelParam(Pnl_PanelParams * pParam); 55 int Pnl_InitPanel(Pnl_PanelParams * pParam); 56 int Detect_Platform(void); 57 void Pnl_SavePanelState(void); 58 void Pnl_RestorePanelState(void); 59 void Pnl_PowerUp(void); 60 void Pnl_PowerDown(void); 61 62 int Pnl_IsPanelEnabledInBIOS(void); 63 void Pnl_GetPanelInfoFromBIOS(int *xres, int *yres, int *bpp, int *hz); 64/* from durango */ 65 66#if defined(_WIN32) /* windows */ 67 extern void gfx_delay_milliseconds(unsigned long milliseconds); 68 extern unsigned long gfx_ind(unsigned short port); 69 extern void gfx_outd(unsigned short port, unsigned long data); 70 extern unsigned char gfx_inb(unsigned short port); 71 extern void gfx_outb(unsigned short port, unsigned char data); 72#endif 73 74#ifdef __cplusplus 75} 76#endif 77 78#endif /* !_panel_h */ 79 80/* END OF FILE */ 81