CNTRL_REG
opti_write_reg(ap, 0x85, CNTRL_REG);
iowrite8(0x85, regio + CNTRL_REG);
out_le32(CNTRL_REG(p,start_addr),
out_le32(CNTRL_REG(p,ctrl), 0x400 | par->ctrl);
out_le32(CNTRL_REG(p,pitch), par->pitch);
out_le32(CNTRL_REG(p,mode), r->mode);
out_le32(CNTRL_REG(p,vram_attr), p->vram_attr);
out_le32(CNTRL_REG(p,start_addr), par->yoffset * par->pitch
out_le32(CNTRL_REG(p,rfrcnt), 0x1e5);
out_le32(CNTRL_REG(p,intr_ena), 0);
out_le32(CNTRL_REG(p,ctrl), par->ctrl);
out_le32(CNTRL_REG(p,vram_attr), 0x31);
out_le32(CNTRL_REG(p,vram_attr), 0x39);
out_le32(CNTRL_REG(p,mon_sense), 7); /* drive all lines high */
out_le32(CNTRL_REG(p,mon_sense), 077); /* turn off drivers */
sense = (in_le32(CNTRL_REG(p,mon_sense)) & 0x1c0) << 2;
out_le32(CNTRL_REG(p,mon_sense), 033); /* drive A low */
sense |= (in_le32(CNTRL_REG(p,mon_sense)) & 0xc0) >> 2;
out_le32(CNTRL_REG(p,mon_sense), 055); /* drive B low */
sense |= ((in_le32(CNTRL_REG(p,mon_sense)) & 0x100) >> 5)
| ((in_le32(CNTRL_REG(p,mon_sense)) & 0x40) >> 4);
out_le32(CNTRL_REG(p,mon_sense), 066); /* drive C low */
sense |= (in_le32(CNTRL_REG(p,mon_sense)) & 0x180) >> 7;
out_le32(CNTRL_REG(p,mon_sense), 077); /* turn off drivers */
ctrl = in_le32(CNTRL_REG(p, ctrl));
out_le32(CNTRL_REG(p,ctrl), ctrl);