18 #include <asm/div64.h>
19 #include <asm/delay.h>
28 if (!cs5535_has_vsa2()) {
35 val = ((hi & 0xff) << 12) | ((lo & 0xfff00000) >> 20);
37 val -= (lo & 0x000fffff);
58 return (xres * (bpp >> 3) + 7) & ~0x7;
65 int hactive, hblankstart, hsyncstart, hsyncend, hblankend, htotal;
66 int vactive, vblankstart, vsyncstart, vsyncend, vblankend, vtotal;
108 ((info->
var.xres * info->
var.bits_per_pixel/8) >> 3) + 2);
116 switch (info->
var.bits_per_pixel) {
133 hactive = info->
var.xres;
134 hblankstart = hactive;
135 hsyncstart = hblankstart + info->
var.right_margin;
136 hsyncend = hsyncstart + info->
var.hsync_len;
137 hblankend = hsyncend + info->
var.left_margin;
140 vactive = info->
var.yres;
141 vblankstart = vactive;
142 vsyncstart = vblankstart + info->
var.lower_margin;
143 vsyncend = vsyncstart + info->
var.vsync_len;
144 vblankend = vsyncend + info->
var.upper_margin;
148 ((htotal - 1) << 16));
150 ((hblankend - 1) << 16));
152 ((hsyncend - 1) << 16));
155 ((vtotal - 1) << 16));
157 ((vblankend - 1) << 16));
159 ((vsyncend - 1) << 16));
178 val = (red << 8) & 0xff0000;
179 val |= (
green) & 0x00ff00;
180 val |= (blue >> 8) & 0x0000ff;