18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved. 48c2ecf20Sopenharmony_ci * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef __DVI_H__ 98c2ecf20Sopenharmony_ci#define __DVI_H__ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci/*Definition TMDS Device ID register*/ 128c2ecf20Sopenharmony_ci#define VT1632_DEVICE_ID_REG 0x02 138c2ecf20Sopenharmony_ci#define VT1632_DEVICE_ID 0x92 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#define GET_DVI_SIZE_BY_SYSTEM_BIOS 0x01 168c2ecf20Sopenharmony_ci#define GET_DVI_SIZE_BY_VGA_BIOS 0x02 178c2ecf20Sopenharmony_ci#define GET_DVI_SZIE_BY_HW_STRAPPING 0x03 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/* Definition DVI Panel ID*/ 208c2ecf20Sopenharmony_ci/* Resolution: 640x480, Channel: single, Dithering: Enable */ 218c2ecf20Sopenharmony_ci#define DVI_PANEL_ID0_640X480 0x00 228c2ecf20Sopenharmony_ci/* Resolution: 800x600, Channel: single, Dithering: Enable */ 238c2ecf20Sopenharmony_ci#define DVI_PANEL_ID1_800x600 0x01 248c2ecf20Sopenharmony_ci/* Resolution: 1024x768, Channel: single, Dithering: Enable */ 258c2ecf20Sopenharmony_ci#define DVI_PANEL_ID1_1024x768 0x02 268c2ecf20Sopenharmony_ci/* Resolution: 1280x768, Channel: single, Dithering: Enable */ 278c2ecf20Sopenharmony_ci#define DVI_PANEL_ID1_1280x768 0x03 288c2ecf20Sopenharmony_ci/* Resolution: 1280x1024, Channel: dual, Dithering: Enable */ 298c2ecf20Sopenharmony_ci#define DVI_PANEL_ID1_1280x1024 0x04 308c2ecf20Sopenharmony_ci/* Resolution: 1400x1050, Channel: dual, Dithering: Enable */ 318c2ecf20Sopenharmony_ci#define DVI_PANEL_ID1_1400x1050 0x05 328c2ecf20Sopenharmony_ci/* Resolution: 1600x1200, Channel: dual, Dithering: Enable */ 338c2ecf20Sopenharmony_ci#define DVI_PANEL_ID1_1600x1200 0x06 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci/* Define the version of EDID*/ 368c2ecf20Sopenharmony_ci#define EDID_VERSION_1 1 378c2ecf20Sopenharmony_ci#define EDID_VERSION_2 2 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define DEV_CONNECT_DVI 0x01 408c2ecf20Sopenharmony_ci#define DEV_CONNECT_HDMI 0x02 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ciint viafb_dvi_sense(void); 438c2ecf20Sopenharmony_civoid viafb_dvi_disable(void); 448c2ecf20Sopenharmony_civoid viafb_dvi_enable(void); 458c2ecf20Sopenharmony_cibool viafb_tmds_trasmitter_identify(void); 468c2ecf20Sopenharmony_civoid viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, 478c2ecf20Sopenharmony_ci struct tmds_setting_information *tmds_setting); 488c2ecf20Sopenharmony_civoid viafb_dvi_set_mode(const struct fb_var_screeninfo *var, 498c2ecf20Sopenharmony_ci u16 cxres, u16 cyres, int iga); 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#endif /* __DVI_H__ */ 52