![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-or-later */ 0002 /* 0003 * controlfb_hw.h: Constants of all sorts for controlfb 0004 * 0005 * Copyright (C) 1998 Daniel Jacobowitz <dan@debian.org> 0006 * 0007 * Based on an awful lot of code, including: 0008 * 0009 * control.c: Console support for PowerMac "control" display adaptor. 0010 * Copyright (C) 1996 Paul Mackerras. 0011 * 0012 * The so far unpublished platinumfb.c 0013 * Copyright (C) 1998 Jon Howell 0014 */ 0015 0016 /* 0017 * Structure of the registers for the RADACAL colormap device. 0018 */ 0019 struct cmap_regs { 0020 unsigned char addr; /* index for both cmap and misc registers */ 0021 char pad1[15]; 0022 unsigned char crsr; /* cursor palette */ 0023 char pad2[15]; 0024 unsigned char dat; /* RADACAL misc register data */ 0025 char pad3[15]; 0026 unsigned char lut; /* cmap data */ 0027 char pad4[15]; 0028 }; 0029 0030 /* 0031 * Structure of the registers for the "control" display adaptor. 0032 */ 0033 #define PAD(x) char x[12] 0034 0035 struct preg { /* padded register */ 0036 unsigned r; 0037 char pad[12]; 0038 }; 0039 0040 struct control_regs { 0041 struct preg vcount; /* vertical counter */ 0042 /* Vertical parameters are in units of 1/2 scan line */ 0043 struct preg vswin; /* between vsblank and vssync */ 0044 struct preg vsblank; /* vert start blank */ 0045 struct preg veblank; /* vert end blank (display start) */ 0046 struct preg vewin; /* between vesync and veblank */ 0047 struct preg vesync; /* vert end sync */ 0048 struct preg vssync; /* vert start sync */ 0049 struct preg vperiod; /* vert period */ 0050 struct preg piped; /* pipe delay hardware cursor */ 0051 /* Horizontal params are in units of 2 pixels */ 0052 struct preg hperiod; /* horiz period - 2 */ 0053 struct preg hsblank; /* horiz start blank */ 0054 struct preg heblank; /* horiz end blank */ 0055 struct preg hesync; /* horiz end sync */ 0056 struct preg hssync; /* horiz start sync */ 0057 struct preg heq; /* half horiz sync len */ 0058 struct preg hlfln; /* half horiz period */ 0059 struct preg hserr; /* horiz period - horiz sync len */ 0060 struct preg cnttst; 0061 struct preg ctrl; /* display control */ 0062 struct preg start_addr; /* start address: 5 lsbs zero */ 0063 struct preg pitch; /* addrs diff between scan lines */ 0064 struct preg mon_sense; /* monitor sense bits */ 0065 struct preg vram_attr; /* enable vram banks */ 0066 struct preg mode; 0067 struct preg rfrcnt; /* refresh count */ 0068 struct preg intr_ena; /* interrupt enable */ 0069 struct preg intr_stat; /* interrupt status */ 0070 struct preg res[5]; 0071 }; 0072 0073 struct control_regints { 0074 /* Vertical parameters are in units of 1/2 scan line */ 0075 unsigned vswin; /* between vsblank and vssync */ 0076 unsigned vsblank; /* vert start blank */ 0077 unsigned veblank; /* vert end blank (display start) */ 0078 unsigned vewin; /* between vesync and veblank */ 0079 unsigned vesync; /* vert end sync */ 0080 unsigned vssync; /* vert start sync */ 0081 unsigned vperiod; /* vert period */ 0082 unsigned piped; /* pipe delay hardware cursor */ 0083 /* Horizontal params are in units of 2 pixels */ 0084 /* Except, apparently, for hres > 1024 (or == 1280?) */ 0085 unsigned hperiod; /* horiz period - 2 */ 0086 unsigned hsblank; /* horiz start blank */ 0087 unsigned heblank; /* horiz end blank */ 0088 unsigned hesync; /* horiz end sync */ 0089 unsigned hssync; /* horiz start sync */ 0090 unsigned heq; /* half horiz sync len */ 0091 unsigned hlfln; /* half horiz period */ 0092 unsigned hserr; /* horiz period - horiz sync len */ 0093 }; 0094 0095 /* 0096 * Dot clock rate is 0097 * 3.9064MHz * 2**clock_params[2] * clock_params[1] / clock_params[0]. 0098 */ 0099 struct control_regvals { 0100 unsigned regs[16]; /* for vswin .. hserr */ 0101 unsigned char mode; 0102 unsigned char radacal_ctrl; 0103 unsigned char clock_params[3]; 0104 }; 0105 0106 #define CTRLFB_OFF 16 /* position of pixel 0 in frame buffer */ 0107 0108 0109 /* 0110 * Best cmode supported by control 0111 */ 0112 struct max_cmodes { 0113 int m[2]; /* 0: 2MB vram, 1: 4MB vram */ 0114 }; 0115 0116 /* 0117 * Video modes supported by macmodes.c 0118 */ 0119 static struct max_cmodes control_mac_modes[] = { 0120 {{-1,-1}}, /* 512x384, 60Hz interlaced (NTSC) */ 0121 {{-1,-1}}, /* 512x384, 60Hz */ 0122 {{-1,-1}}, /* 640x480, 50Hz interlaced (PAL) */ 0123 {{-1,-1}}, /* 640x480, 60Hz interlaced (NTSC) */ 0124 {{ 2, 2}}, /* 640x480, 60Hz (VGA) */ 0125 {{ 2, 2}}, /* 640x480, 67Hz */ 0126 {{-1,-1}}, /* 640x870, 75Hz (portrait) */ 0127 {{-1,-1}}, /* 768x576, 50Hz (PAL full frame) */ 0128 {{ 2, 2}}, /* 800x600, 56Hz */ 0129 {{ 2, 2}}, /* 800x600, 60Hz */ 0130 {{ 2, 2}}, /* 800x600, 72Hz */ 0131 {{ 2, 2}}, /* 800x600, 75Hz */ 0132 {{ 1, 2}}, /* 832x624, 75Hz */ 0133 {{ 1, 2}}, /* 1024x768, 60Hz */ 0134 {{ 1, 2}}, /* 1024x768, 70Hz (or 72Hz?) */ 0135 {{ 1, 2}}, /* 1024x768, 75Hz (VESA) */ 0136 {{ 1, 2}}, /* 1024x768, 75Hz */ 0137 {{ 1, 2}}, /* 1152x870, 75Hz */ 0138 {{ 0, 1}}, /* 1280x960, 75Hz */ 0139 {{ 0, 1}}, /* 1280x1024, 75Hz */ 0140 {{ 1, 2}}, /* 1152x768, 60Hz */ 0141 {{ 0, 1}}, /* 1600x1024, 60Hz */ 0142 }; 0143
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |