1*f7018c21STomi Valkeinen /* 2*f7018c21STomi Valkeinen * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved. 3*f7018c21STomi Valkeinen * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. 4*f7018c21STomi Valkeinen 5*f7018c21STomi Valkeinen * This program is free software; you can redistribute it and/or 6*f7018c21STomi Valkeinen * modify it under the terms of the GNU General Public 7*f7018c21STomi Valkeinen * License as published by the Free Software Foundation; 8*f7018c21STomi Valkeinen * either version 2, or (at your option) any later version. 9*f7018c21STomi Valkeinen 10*f7018c21STomi Valkeinen * This program is distributed in the hope that it will be useful, 11*f7018c21STomi Valkeinen * but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even 12*f7018c21STomi Valkeinen * the implied warranty of MERCHANTABILITY or FITNESS FOR 13*f7018c21STomi Valkeinen * A PARTICULAR PURPOSE.See the GNU General Public License 14*f7018c21STomi Valkeinen * for more details. 15*f7018c21STomi Valkeinen 16*f7018c21STomi Valkeinen * You should have received a copy of the GNU General Public License 17*f7018c21STomi Valkeinen * along with this program; if not, write to the Free Software 18*f7018c21STomi Valkeinen * Foundation, Inc., 19*f7018c21STomi Valkeinen * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20*f7018c21STomi Valkeinen */ 21*f7018c21STomi Valkeinen 22*f7018c21STomi Valkeinen #ifndef __DVI_H__ 23*f7018c21STomi Valkeinen #define __DVI_H__ 24*f7018c21STomi Valkeinen 25*f7018c21STomi Valkeinen /*Definition TMDS Device ID register*/ 26*f7018c21STomi Valkeinen #define VT1632_DEVICE_ID_REG 0x02 27*f7018c21STomi Valkeinen #define VT1632_DEVICE_ID 0x92 28*f7018c21STomi Valkeinen 29*f7018c21STomi Valkeinen #define GET_DVI_SIZE_BY_SYSTEM_BIOS 0x01 30*f7018c21STomi Valkeinen #define GET_DVI_SIZE_BY_VGA_BIOS 0x02 31*f7018c21STomi Valkeinen #define GET_DVI_SZIE_BY_HW_STRAPPING 0x03 32*f7018c21STomi Valkeinen 33*f7018c21STomi Valkeinen /* Definition DVI Panel ID*/ 34*f7018c21STomi Valkeinen /* Resolution: 640x480, Channel: single, Dithering: Enable */ 35*f7018c21STomi Valkeinen #define DVI_PANEL_ID0_640X480 0x00 36*f7018c21STomi Valkeinen /* Resolution: 800x600, Channel: single, Dithering: Enable */ 37*f7018c21STomi Valkeinen #define DVI_PANEL_ID1_800x600 0x01 38*f7018c21STomi Valkeinen /* Resolution: 1024x768, Channel: single, Dithering: Enable */ 39*f7018c21STomi Valkeinen #define DVI_PANEL_ID1_1024x768 0x02 40*f7018c21STomi Valkeinen /* Resolution: 1280x768, Channel: single, Dithering: Enable */ 41*f7018c21STomi Valkeinen #define DVI_PANEL_ID1_1280x768 0x03 42*f7018c21STomi Valkeinen /* Resolution: 1280x1024, Channel: dual, Dithering: Enable */ 43*f7018c21STomi Valkeinen #define DVI_PANEL_ID1_1280x1024 0x04 44*f7018c21STomi Valkeinen /* Resolution: 1400x1050, Channel: dual, Dithering: Enable */ 45*f7018c21STomi Valkeinen #define DVI_PANEL_ID1_1400x1050 0x05 46*f7018c21STomi Valkeinen /* Resolution: 1600x1200, Channel: dual, Dithering: Enable */ 47*f7018c21STomi Valkeinen #define DVI_PANEL_ID1_1600x1200 0x06 48*f7018c21STomi Valkeinen 49*f7018c21STomi Valkeinen /* Define the version of EDID*/ 50*f7018c21STomi Valkeinen #define EDID_VERSION_1 1 51*f7018c21STomi Valkeinen #define EDID_VERSION_2 2 52*f7018c21STomi Valkeinen 53*f7018c21STomi Valkeinen #define DEV_CONNECT_DVI 0x01 54*f7018c21STomi Valkeinen #define DEV_CONNECT_HDMI 0x02 55*f7018c21STomi Valkeinen 56*f7018c21STomi Valkeinen int viafb_dvi_sense(void); 57*f7018c21STomi Valkeinen void viafb_dvi_disable(void); 58*f7018c21STomi Valkeinen void viafb_dvi_enable(void); 59*f7018c21STomi Valkeinen bool viafb_tmds_trasmitter_identify(void); 60*f7018c21STomi Valkeinen void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, 61*f7018c21STomi Valkeinen struct tmds_setting_information *tmds_setting); 62*f7018c21STomi Valkeinen void viafb_dvi_set_mode(const struct fb_var_screeninfo *var, 63*f7018c21STomi Valkeinen u16 cxres, u16 cyres, int iga); 64*f7018c21STomi Valkeinen 65*f7018c21STomi Valkeinen #endif /* __DVI_H__ */ 66