Lines Matching +full:sync +full:- +full:freq

1 /*-*- linux-c -*-
2 * linux/drivers/video/i810_main.h -- Intel 810 Non-discrete Video Timings
20 * FIFO and Watermark tables - based almost wholly on i810_wmark.c in
26 u32 freq; member
116 * i810fb_encode_registers - encode @var to hardware register values
128 u8 __iomem *mmio = par->mmio_start_virtual; in i810fb_encode_registers()
133 n = ((xres + var->right_margin + var->hsync_len + in i810fb_encode_registers()
134 var->left_margin) >> 3) - 5; in i810fb_encode_registers()
135 par->regs.cr00 = (u8) n; in i810fb_encode_registers()
136 par->regs.cr35 = (u8) ((n >> 8) & 1); in i810fb_encode_registers()
139 par->regs.cr01 = (u8) ((xres >> 3) - 1); in i810fb_encode_registers()
142 blank_e = (xres + var->right_margin + var->hsync_len + in i810fb_encode_registers()
143 var->left_margin) >> 3; in i810fb_encode_registers()
144 blank_e--; in i810fb_encode_registers()
145 blank_s = blank_e - 127; in i810fb_encode_registers()
148 par->regs.cr02 = (u8) blank_s; in i810fb_encode_registers()
149 par->regs.cr03 = (u8) (blank_e & 0x1F); in i810fb_encode_registers()
150 par->regs.cr05 = (u8) ((blank_e & (1 << 5)) << 2); in i810fb_encode_registers()
151 par->regs.cr39 = (u8) ((blank_e >> 6) & 1); in i810fb_encode_registers()
154 par->regs.cr04 = (u8) ((xres + var->right_margin) >> 3); in i810fb_encode_registers()
155 par->regs.cr05 |= (u8) (((xres + var->right_margin + in i810fb_encode_registers()
156 var->hsync_len) >> 3) & 0x1F); in i810fb_encode_registers()
160 n = yres + var->lower_margin + var->vsync_len + var->upper_margin - 2; in i810fb_encode_registers()
161 par->regs.cr06 = (u8) (n & 0xFF); in i810fb_encode_registers()
162 par->regs.cr30 = (u8) ((n >> 8) & 0x0F); in i810fb_encode_registers()
165 n = yres + var->lower_margin; in i810fb_encode_registers()
166 par->regs.cr10 = (u8) (n & 0xFF); in i810fb_encode_registers()
167 par->regs.cr32 = (u8) ((n >> 8) & 0x0F); in i810fb_encode_registers()
168 par->regs.cr11 = i810_readb(CR11, mmio) & ~0x0F; in i810fb_encode_registers()
169 par->regs.cr11 |= (u8) ((yres + var->lower_margin + in i810fb_encode_registers()
170 var->vsync_len) & 0x0F); in i810fb_encode_registers()
173 n = yres - 1; in i810fb_encode_registers()
174 par->regs.cr12 = (u8) (n & 0xFF); in i810fb_encode_registers()
175 par->regs.cr31 = (u8) ((n >> 8) & 0x0F); in i810fb_encode_registers()
178 blank_e = yres + var->lower_margin + var->vsync_len + in i810fb_encode_registers()
179 var->upper_margin; in i810fb_encode_registers()
180 blank_e--; in i810fb_encode_registers()
181 blank_s = blank_e - 127; in i810fb_encode_registers()
184 par->regs.cr15 = (u8) (blank_s & 0xFF); in i810fb_encode_registers()
185 par->regs.cr33 = (u8) ((blank_s >> 8) & 0x0F); in i810fb_encode_registers()
186 par->regs.cr16 = (u8) (blank_e & 0xFF); in i810fb_encode_registers()
187 par->regs.cr09 = 0; in i810fb_encode_registers()
189 /* sync polarity */ in i810fb_encode_registers()
190 if (!(var->sync & FB_SYNC_HOR_HIGH_ACT)) in i810fb_encode_registers()
192 if (!(var->sync & FB_SYNC_VERT_HIGH_ACT)) in i810fb_encode_registers()
194 par->regs.msr = msr; in i810fb_encode_registers()
197 if (var->vmode & FB_VMODE_INTERLACED) in i810fb_encode_registers()
198 par->interlace = (1 << 7) | ((u8) (var->yres >> 4)); in i810fb_encode_registers()
200 par->interlace = 0; in i810fb_encode_registers()
202 if (var->vmode & FB_VMODE_DOUBLE) in i810fb_encode_registers()
203 par->regs.cr09 |= 1 << 7; in i810fb_encode_registers()
206 par->ovract = ((var->xres + var->right_margin + var->hsync_len + in i810fb_encode_registers()
207 var->left_margin - 32) | ((var->xres - 32) << 16)); in i810fb_encode_registers()
213 * i810_get_watermark - gets watermark
230 if (par->mem_freq == 100) { in i810_get_watermark()
231 switch (var->bits_per_pixel) { in i810_get_watermark()
246 switch(var->bits_per_pixel) { in i810_get_watermark()
262 pixclock = 1000000/var->pixclock; in i810_get_watermark()
265 if (pixclock <= wmark[i].freq) in i810_get_watermark()
266 diff = wmark[i].freq - pixclock; in i810_get_watermark()
268 diff = pixclock - wmark[i].freq; in i810_get_watermark()