| 1 |
/* |
| 2 |
* |
| 3 |
* mga_vid.h |
| 4 |
* |
| 5 |
* Copyright (C) 1999 Aaron Holtzman |
| 6 |
* |
| 7 |
* Matrox MGA G200/G400 YUV Video Interface module Version 0.1.0 |
| 8 |
* |
| 9 |
* BES == Back End Scaler |
| 10 |
* |
| 11 |
* This software has been released under the terms of the GNU Public |
| 12 |
* license. See http://www.gnu.org/copyleft/gpl.html for details. |
| 13 |
*/ |
| 14 |
|
| 15 |
#ifndef __LINUX_MGAVID_H |
| 16 |
#define __LINUX_MGAVID_H |
| 17 |
|
| 18 |
#ifdef __KERNEL__ |
| 19 |
#include <linux/types.h> |
| 20 |
#else |
| 21 |
#include <inttypes.h> |
| 22 |
#endif |
| 23 |
|
| 24 |
typedef struct mga_vid_config_s |
| 25 |
{ |
| 26 |
uint16_t version; |
| 27 |
uint16_t card_type; |
| 28 |
uint32_t ram_size; |
| 29 |
uint32_t src_width; |
| 30 |
uint32_t src_height; |
| 31 |
uint32_t dest_width; |
| 32 |
uint32_t dest_height; |
| 33 |
uint32_t x_org; |
| 34 |
uint32_t y_org; |
| 35 |
uint8_t colkey_on; |
| 36 |
uint8_t colkey_red; |
| 37 |
uint8_t colkey_green; |
| 38 |
uint8_t colkey_blue; |
| 39 |
uint32_t format; |
| 40 |
uint32_t frame_size; |
| 41 |
uint32_t num_frames; |
| 42 |
} mga_vid_config_t; |
| 43 |
|
| 44 |
#define MGA_VID_FORMAT_YV12 0x32315659 |
| 45 |
#define MGA_VID_FORMAT_YUY2 (('Y'<<24)|('U'<<16)|('Y'<<8)|'2') |
| 46 |
|
| 47 |
#define MGA_VID_CONFIG _IOR('J', 1, mga_vid_config_t) |
| 48 |
#define MGA_VID_ON _IO ('J', 2) |
| 49 |
#define MGA_VID_OFF _IO ('J', 3) |
| 50 |
#define MGA_VID_FSEL _IOR('J', 4, int) |
| 51 |
#define MGA_VID_IRQ_ON _IO ('J', 5) |
| 52 |
#define MGA_VID_IRQ_OFF _IO ('J', 6) |
| 53 |
#define MGA_VID_IRQ2_ON _IO ('J', 7) |
| 54 |
#define MGA_VID_IRQ2_OFF _IO ('J', 8) |
| 55 |
|
| 56 |
#define MGA_G200 0x1234 |
| 57 |
#define MGA_G400 0x5678 |
| 58 |
|
| 59 |
#define MGA_VID_VERSION 0x0201 |
| 60 |
|
| 61 |
#endif |