Feature #7834


uts: vgatext should use gfx_private

Added by Toomas Soome over 5 years ago. Updated over 3 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


The gfx_private is "forgotten" interface since the illumos fork was created and does already implement most of the vgatext. The purpose of the gfx_private is to provide an mechanism to implement console accesss methods, It is time to start to work on this module so we can get basic support linear framebuffer.

The purpose of this feature is to make sure we have gfx_private implementing features used in vgatext, and so we could remove the code duplication and can have basis for future work.

Since there are some references to vgatext from drm module, this change needs to attend those bits as well.

Actions #1

Updated by Joshua M. Clulow over 3 years ago

Some additional notes that Toomas put on Reviewboard:

The current illumos console does use following chain for displaying the data on the screen:

... skipping streams bits ... -> tem -> vgatext -> screen

The vgatext there is detecting and attaching to primary display. At this time the vgatext does only operate with text mode screen.

This update will plug in the gfx_private module; the idea is actually quite simple and part of the change is already in place as one can see from gfx_private sources.

so this update will set the chain as following:

... skipping streams bits ... -> tem -> vgatext -> gfx_private -> screen

The actual screen handling is managed from tem via visual_io(7I).

The actual screen related calls are implemented in gfx_private, transferred from the vgatext, and with this patch applied, the same text mode console is provided, but the stage is set to followup.

The next logical step is to provide simple software frame buffer via gfx_private:

                       / gfx_vgatext branch
... -> vgatext -> gfx_fb
                       \ gfx_bitmap branch

The mode of the console is picked from boot, the same visual_io(7I) is used and with it, we can have the usable console for both BIOS and UEFI boot. Note, I am skipping over the early console at this time.

This setup is still far from ideal, but does quite good work for now, this is also the current implementation in loader branch and has been presented via demo usb/iso images.

Looking even more forward, obviously the text/software FB based console are for the "generic" case, the proper real console would need KMS driven framebuffer.

Actions #2

Updated by Joshua M. Clulow over 3 years ago

Testing Notes

I built this and booted it as a KVM guest. I tried a few combinations of things that already work:

- booting with and without -kd, interacting with kmdb, etc
- booting -kd with diag-device set to ttya
- starting Xorg with the vesa driver, and exiting it to make sure the VGA text mode console still comes back

Everything appears to work as I would expect.

Actions #3

Updated by Electric Monk over 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 30165b7f6753bc3d48c52319bed7ec7b3ea36b3c

commit  30165b7f6753bc3d48c52319bed7ec7b3ea36b3c
Author: Toomas Soome <>
Date:   2019-01-18T19:23:24.000Z

    7834 uts: vgatext should use gfx_private
    Reviewed by: Yuri Pankov <>
    Reviewed by: John Howard <>
    Reviewed by: Alexander Eremin <>
    Approved by: Joshua M. Clulow <>


Also available in: Atom PDF