/*DDK*************************************************************************/
/*                                                                           */
/* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
/*                                                                           */
/*    The following IBM OS/2 WARP source code is provided to you solely for  */
/*    the purpose of assisting you in your development of OS/2 WARP device   */
/*    drivers. You may use this code in accordance with the IBM License      */
/*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
/*    Copyright statement may not be removed.                                */
/*                                                                           */
/*****************************************************************************/
/*****************************************************************************
 *
 * SOURCE FILE NAME = IPMITYPE.H
 *
 * DESCRIPTIVE NAME = Super VGA specific definitions.
 *
 *
 * VERSION = V2.1
 *
 * DATE
 *
 * DESCRIPTION
 *
 * FUNCTIONS
 *
 * NOTES
 *
 * STRUCTURES
 *
 * EXTERNAL REFERENCES
 *
 * EXTERNAL FUNCTIONS
 *
*/

#define INCL_32
#define INCL_DEF
#define INCL_TYPES

//c-begin
#define INCL_NOPMAPI
#define INCL_BASE               /* ALL of OS/2 Base                       */
#define INCL_OS2STD             /* Needed for NULL definition in OS2STD.H */
#include <os2.h>
//c-end


#include <svgadefs.h>
#ifndef CHIPS_INCL
extern PCHIPNAMES ChipsetName[SVGA_LASTADAPTER];
#endif
#define ADAPTER_NOT_SUPPORTED       0x00
#define ADAPTER_CLOCK_SUPPORTED     0x01
#define ADAPTER_DAC_SUPPORTED       0x02
#define ADAPTER_MODE_SUPPORTED      0x04

/****    VALUES FOR S3 864 CLOCKS SUPPORTED BY VIDEO.CFG          @V3.0YEE01*/
/****    set in OEM.ManufacturerData                              @V3.0YEE01*/
#define ICD2061_CLOCK               0x01                        /*@V3.0YEE01*/
#define SDAC_CLOCK                  0x02                        /*@V3.0YEE01*/
#define ATT409_CLOCK                0x03                        /*@V3.0YEE01*/
/* S3 905/928 generic clock : WARNING belongs to the above range, don't reuse the value! */
#define GENERIC_S3_CLOCK            0x04                        /*          */
#define ATI_MANUFACTURER        UNKNOWN_MANUFACTURER-1
extern APIRET _System OpenScreenDD(VOID);
extern APIRET _System videoIoctl(ULONG ulFunction,
                         VOID *pParam,
                         ULONG ulParamLen);
extern APIRET _System Identify(OEMSVGAINFO *SVGAHardware,OEMINFO *OEMHardware);
extern APIRET _System InitializeAdapterData(OEMSVGAINFO *SVGAHardware,OEMINFO *OEMHardware);
extern APIRET EXPENTRY  pfnSetATI32(PVIDEO_ADAPTER pAdapter,PREGS pRegs);
extern APIRET EXPENTRY  pfnSetS3864ICD(PVIDEO_ADAPTER pAdapter,PREGS pRegs); /*@V3.1YEE02*/
extern APIRET EXPENTRY  pfnSetS3Lacuna(PVIDEO_ADAPTER pAdapter,PREGS pRegs); /*@V3.1YEE02*/

//            Change to _System calling convention.
// extern VOID _Pascal SETDIAMONDCLK(ULONG SerialClkData);      //2061 via 3c2
// extern VOID _Pascal SETDIAMONDCLK_S3(ULONG Hres,ULONG col);//read eeprom + 2061 via crt42
// extern VOID _Pascal SETNUMBER9CLK(ULONG SerialClkData);      //2061 via crt42
extern VOID _System SETDIAMONDCLK(ULONG SerialClkData);      //2061 via 3c2
extern VOID _System SETDIAMONDCLK_S3(ULONG Hres,ULONG col);//read eeprom + 2061 via crt42
extern VOID _System SETNUMBER9CLK(ULONG SerialClkData);      //2061 via crt42

extern VOID _System SetDiaIDCClk(ULONG ClockData);
extern VOID _System SetSTBClock(ULONG ClockData);
extern VOID _System SetS3Clock(ULONG usXResolution, ULONG bBitsPerPixel, ULONG bVrtRefresh);
extern VOID _System SetS3SDACClock(BYTE R0, BYTE R1, BYTE R2, BYTE R3, BYTE R4); /*@V3.0ET001*/
extern VOID _System FixupS3CRTToNONInterlaced(VOID);                     /*@V3.0ET001*/
extern VOID _System FixupS3CRTToInterlaced(VOID);                        /*@V3.0ET001*/
extern APIRET _System SetCirrusClock(PVIDEO_ADAPTER pAdapter);           /*@V3.0JAO01*/
/*
** Global data
*/
extern ULONG hScreenDD;
extern OEMSVGAINFO SVGAHardware;
extern OEMINFO OEMHardware;
extern USHORT DACType;
extern ULONG  flAdapterSupport;
extern ULONG  DIA_ClockTable[27];                                          
extern BOOL   StealthOldScheme;        /*            */
