18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * linux/drivers/video/kyro/STG4000Interface.h 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (C) 2002 STMicroelectronics 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 78c2ecf20Sopenharmony_ci * License. See the file COPYING in the main directory of this archive 88c2ecf20Sopenharmony_ci * for more details. 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#ifndef _STG4000INTERFACE_H 128c2ecf20Sopenharmony_ci#define _STG4000INTERFACE_H 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include <linux/pci.h> 158c2ecf20Sopenharmony_ci#include <video/kyro.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* 188c2ecf20Sopenharmony_ci * Ramdac Setup 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_ciextern int InitialiseRamdac(volatile STG4000REG __iomem *pSTGReg, u32 displayDepth, 218c2ecf20Sopenharmony_ci u32 displayWidth, u32 displayHeight, 228c2ecf20Sopenharmony_ci s32 HSyncPolarity, s32 VSyncPolarity, 238c2ecf20Sopenharmony_ci u32 *pixelClock); 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ciextern void DisableRamdacOutput(volatile STG4000REG __iomem *pSTGReg); 268c2ecf20Sopenharmony_ciextern void EnableRamdacOutput(volatile STG4000REG __iomem *pSTGReg); 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci/* 298c2ecf20Sopenharmony_ci * Timing generator setup 308c2ecf20Sopenharmony_ci */ 318c2ecf20Sopenharmony_ciextern void DisableVGA(volatile STG4000REG __iomem *pSTGReg); 328c2ecf20Sopenharmony_ciextern void StopVTG(volatile STG4000REG __iomem *pSTGReg); 338c2ecf20Sopenharmony_ciextern void StartVTG(volatile STG4000REG __iomem *pSTGReg); 348c2ecf20Sopenharmony_ciextern void SetupVTG(volatile STG4000REG __iomem *pSTGReg, 358c2ecf20Sopenharmony_ci const struct kyrofb_info * pTiming); 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciextern u32 ProgramClock(u32 refClock, u32 coreClock, u32 *FOut, u32 *ROut, u32 *POut); 388c2ecf20Sopenharmony_ciextern int SetCoreClockPLL(volatile STG4000REG __iomem *pSTGReg, struct pci_dev *pDev); 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci/* 418c2ecf20Sopenharmony_ci * Overlay setup 428c2ecf20Sopenharmony_ci */ 438c2ecf20Sopenharmony_ciextern void ResetOverlayRegisters(volatile STG4000REG __iomem *pSTGReg); 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciextern int CreateOverlaySurface(volatile STG4000REG __iomem *pSTGReg, 468c2ecf20Sopenharmony_ci u32 ulWidth, u32 ulHeight, 478c2ecf20Sopenharmony_ci int bLinear, 488c2ecf20Sopenharmony_ci u32 ulOverlayOffset, 498c2ecf20Sopenharmony_ci u32 * retStride, u32 * retUVStride); 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ciextern int SetOverlayBlendMode(volatile STG4000REG __iomem *pSTGReg, 528c2ecf20Sopenharmony_ci OVRL_BLEND_MODE mode, 538c2ecf20Sopenharmony_ci u32 ulAlpha, u32 ulColorKey); 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciextern int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg, 568c2ecf20Sopenharmony_ci u32 left, u32 top, 578c2ecf20Sopenharmony_ci u32 right, u32 bottom); 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ciextern void EnableOverlayPlane(volatile STG4000REG __iomem *pSTGReg); 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#endif /* _STG4000INTERFACE_H */ 62