Lines Matching refs:dev
56 #include <dev/fb/fbreg.h>
57 #include <dev/fb/vgareg.h>
63 vga_suspend(device_t dev)
68 sc = device_get_softc(dev);
80 device_printf(dev, "saving %d bytes of video state\n", nbytes);
82 device_printf(dev, "failed to save state (nbytes=%d)\n",
96 device_printf(dev, "saving color palette\n");
98 device_printf(dev, "failed to save palette\n");
105 vga_resume(device_t dev)
109 sc = device_get_softc(dev);
113 device_printf(dev, "failed to reload state\n");
119 device_printf(dev, "failed to reload palette\n");
160 isavga_probe(device_t dev)
166 if (isa_get_vendorid(dev))
169 error = vga_probe_unit(device_get_unit(dev), &adp, device_get_flags(dev));
171 device_set_desc(dev, "Generic ISA VGA");
172 bus_set_resource(dev, SYS_RES_IOPORT, 0,
174 bus_set_resource(dev, SYS_RES_MEMORY, 0,
177 isa_set_port(dev, adp.va_io_base);
178 isa_set_portsize(dev, adp.va_io_size);
179 isa_set_maddr(dev, adp.va_mem_base);
180 isa_set_msize(dev, adp.va_mem_size);
187 isavga_attach(device_t dev)
194 unit = device_get_unit(dev);
195 sc = device_get_softc(dev);
198 bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid,
201 bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
204 error = vga_attach_unit(unit, sc, device_get_flags(dev));
219 device_add_child(dev, "fb", -1);
220 bus_generic_attach(dev);
227 isavga_suspend(device_t dev)
231 error = bus_generic_suspend(dev);
234 vga_suspend(dev);
240 isavga_resume(device_t dev)
243 vga_resume(dev);
245 return (bus_generic_resume(dev));
251 isavga_open(struct cdev *dev, int flag, int mode, struct thread *td)
253 return (vga_open(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td));
257 isavga_close(struct cdev *dev, int flag, int mode, struct thread *td)
259 return (vga_close(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td));
263 isavga_read(struct cdev *dev, struct uio *uio, int flag)
265 return (vga_read(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag));
269 isavga_write(struct cdev *dev, struct uio *uio, int flag)
271 return (vga_write(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag));
275 isavga_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
277 return (vga_ioctl(dev, VGA_SOFTC(VGA_UNIT(dev)), cmd, arg, flag, td));
281 isavga_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr,
284 return (vga_mmap(dev, VGA_SOFTC(VGA_UNIT(dev)), offset, paddr, prot,
319 vgapm_probe(device_t dev)
322 device_set_desc(dev, "VGA suspend/resume");
323 device_quiet(dev);
329 vgapm_attach(device_t dev)
332 bus_generic_probe(dev);
333 bus_generic_attach(dev);
339 vgapm_suspend(device_t dev)
344 error = bus_generic_suspend(dev);
356 vgapm_resume(device_t dev)
364 return (bus_generic_resume(dev));