Index: sys/dev/vt/hw/ofwfb/ofwfb.c =================================================================== --- sys/dev/vt/hw/ofwfb/ofwfb.c +++ sys/dev/vt/hw/ofwfb/ofwfb.c @@ -280,6 +282,8 @@ ofwfb_initialize(struct vt_device *vd) { struct ofwfb_softc *sc = vd->vd_softc; + char name[64]; + ihandle_t ih; int i, err; cell_t retval; uint32_t oldpix; @@ -289,6 +293,11 @@ if (sc->fb.fb_flags & FB_FLAG_NOWRITE) return; + /* Open display device, thereby initializing it */ + memset(name, 0, sizeof(name)); + OF_package_to_path(sc->sc_node, name, sizeof(name)); + ih = OF_open(name); + /* * Set up the color map */ @@ -300,7 +309,7 @@ 16, 255, 8, 255, 0); for (i = 0; i < 16; i++) { - err = OF_call_method("color!", sc->sc_handle, 4, 1, + err = OF_call_method("color!", ih, 4, 1, (cell_t)((sc->fb.fb_cmap[i] >> 16) & 0xff), (cell_t)((sc->fb.fb_cmap[i] >> 8) & 0xff), (cell_t)((sc->fb.fb_cmap[i] >> 0) & 0xff), @@ -375,13 +384,6 @@ /* Keep track of the OF node */ sc->sc_node = node; - /* - * Try to use a 32-bit framebuffer if possible. This may be - * unimplemented and fail. That's fine -- it just means we are - * stuck with the defaults. - */ - OF_call_method("set-depth", sc->sc_handle, 1, 1, (cell_t)32, &i); - /* Make sure we have needed properties */ if (OF_getproplen(node, "height") != sizeof(height) || OF_getproplen(node, "width") != sizeof(width) ||