Add support for virtual console TTY mode management ioctls required by
Xorg and other display servers. The implementation includes:
- KDGETMODE: Query the current virtual console mode
- KDSETMODE: Switch between text and graphics modes
Virtual consoles utilize the framebuffer with two distinct modes:
- Text mode (default): Kernel renders text characters to framebuffer
- Graphics mode: User space applications gain full framebuffer control
Xorg requires KDSETMODE during initialization to switch to graphics
mode, preventing conflicts where both the kernel and Xorg would
simultaneously attempt to write to the framebuffer. This ensures
proper display handling and eliminates rendering artifacts.
Co-authored-by: Ruihan Li <lrh2000@pku.edu.cn>