• Home
  • Raw
  • Download

Lines Matching refs:bochs

12 static void bochs_vga_writeb(struct bochs_device *bochs, u16 ioport, u8 val)  in bochs_vga_writeb()  argument
17 if (bochs->mmio) { in bochs_vga_writeb()
19 writeb(val, bochs->mmio + offset); in bochs_vga_writeb()
25 static u16 bochs_dispi_read(struct bochs_device *bochs, u16 reg) in bochs_dispi_read() argument
29 if (bochs->mmio) { in bochs_dispi_read()
31 ret = readw(bochs->mmio + offset); in bochs_dispi_read()
39 static void bochs_dispi_write(struct bochs_device *bochs, u16 reg, u16 val) in bochs_dispi_write() argument
41 if (bochs->mmio) { in bochs_dispi_write()
43 writew(val, bochs->mmio + offset); in bochs_dispi_write()
52 struct bochs_device *bochs = dev->dev_private; in bochs_hw_init() local
65 bochs->mmio = ioremap(ioaddr, iosize); in bochs_hw_init()
66 if (bochs->mmio == NULL) { in bochs_hw_init()
77 bochs->ioports = 1; in bochs_hw_init()
80 id = bochs_dispi_read(bochs, VBE_DISPI_INDEX_ID); in bochs_hw_init()
81 mem = bochs_dispi_read(bochs, VBE_DISPI_INDEX_VIDEO_MEMORY_64K) in bochs_hw_init()
103 bochs->fb_map = ioremap(addr, size); in bochs_hw_init()
104 if (bochs->fb_map == NULL) { in bochs_hw_init()
108 bochs->fb_base = addr; in bochs_hw_init()
109 bochs->fb_size = size; in bochs_hw_init()
114 bochs->ioports ? "ioports" : "mmio", in bochs_hw_init()
117 if (bochs->mmio && pdev->revision >= 2) { in bochs_hw_init()
118 qext_size = readl(bochs->mmio + 0x600); in bochs_hw_init()
124 writel(0xbebebebe, bochs->mmio + 0x604); in bochs_hw_init()
126 writel(0x1e1e1e1e, bochs->mmio + 0x604); in bochs_hw_init()
129 readl(bochs->mmio + 0x604)); in bochs_hw_init()
139 struct bochs_device *bochs = dev->dev_private; in bochs_hw_fini() local
141 if (bochs->mmio) in bochs_hw_fini()
142 iounmap(bochs->mmio); in bochs_hw_fini()
143 if (bochs->ioports) in bochs_hw_fini()
145 if (bochs->fb_map) in bochs_hw_fini()
146 iounmap(bochs->fb_map); in bochs_hw_fini()
150 void bochs_hw_setmode(struct bochs_device *bochs, in bochs_hw_setmode() argument
153 bochs->xres = mode->hdisplay; in bochs_hw_setmode()
154 bochs->yres = mode->vdisplay; in bochs_hw_setmode()
155 bochs->bpp = 32; in bochs_hw_setmode()
156 bochs->stride = mode->hdisplay * (bochs->bpp / 8); in bochs_hw_setmode()
157 bochs->yres_virtual = bochs->fb_size / bochs->stride; in bochs_hw_setmode()
160 bochs->xres, bochs->yres, bochs->bpp, in bochs_hw_setmode()
161 bochs->yres_virtual); in bochs_hw_setmode()
163 bochs_vga_writeb(bochs, 0x3c0, 0x20); /* unblank */ in bochs_hw_setmode()
165 bochs_dispi_write(bochs, VBE_DISPI_INDEX_ENABLE, 0); in bochs_hw_setmode()
166 bochs_dispi_write(bochs, VBE_DISPI_INDEX_BPP, bochs->bpp); in bochs_hw_setmode()
167 bochs_dispi_write(bochs, VBE_DISPI_INDEX_XRES, bochs->xres); in bochs_hw_setmode()
168 bochs_dispi_write(bochs, VBE_DISPI_INDEX_YRES, bochs->yres); in bochs_hw_setmode()
169 bochs_dispi_write(bochs, VBE_DISPI_INDEX_BANK, 0); in bochs_hw_setmode()
170 bochs_dispi_write(bochs, VBE_DISPI_INDEX_VIRT_WIDTH, bochs->xres); in bochs_hw_setmode()
171 bochs_dispi_write(bochs, VBE_DISPI_INDEX_VIRT_HEIGHT, in bochs_hw_setmode()
172 bochs->yres_virtual); in bochs_hw_setmode()
173 bochs_dispi_write(bochs, VBE_DISPI_INDEX_X_OFFSET, 0); in bochs_hw_setmode()
174 bochs_dispi_write(bochs, VBE_DISPI_INDEX_Y_OFFSET, 0); in bochs_hw_setmode()
176 bochs_dispi_write(bochs, VBE_DISPI_INDEX_ENABLE, in bochs_hw_setmode()
180 void bochs_hw_setbase(struct bochs_device *bochs, in bochs_hw_setbase() argument
184 y * bochs->stride + in bochs_hw_setbase()
185 x * (bochs->bpp / 8); in bochs_hw_setbase()
186 int vy = offset / bochs->stride; in bochs_hw_setbase()
187 int vx = (offset % bochs->stride) * 8 / bochs->bpp; in bochs_hw_setbase()
191 bochs_dispi_write(bochs, VBE_DISPI_INDEX_X_OFFSET, vx); in bochs_hw_setbase()
192 bochs_dispi_write(bochs, VBE_DISPI_INDEX_Y_OFFSET, vy); in bochs_hw_setbase()