-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tinyx: disable fbcon while server is running
Use the TTYSETMODE ioctl to stop the fbcon from drawing to the same framebuffer xserver is using JIRA: RTOS-906, RTOS-925
- Loading branch information
1 parent
ffec3f6
commit bc10b61
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
diff -ruN a/kdrive/phoenix/phoenix.c b/kdrive/phoenix/phoenix.c | ||
--- a/kdrive/phoenix/phoenix.c 2024-10-01 15:21:58.698012684 +0200 | ||
+++ b/kdrive/phoenix/phoenix.c 2024-10-02 13:10:42.440162376 +0200 | ||
@@ -5,6 +5,7 @@ | ||
#include <errno.h> | ||
#include <signal.h> | ||
#include <termios.h> | ||
+#include <phoenix/fbcon.h> | ||
#include <sys/stat.h> | ||
#include <sys/ioctl.h> | ||
#include <X11/keysym.h> | ||
@@ -24,6 +25,10 @@ | ||
if (ioctl(fd, TIOCNOTTY, NULL) < 0) { | ||
FatalError("PhoenixInit: TIOCNOTTY failed\n"); | ||
} | ||
+ | ||
+ if (ioctl(fd, FBCONSETMODE, FBCON_DISABLED) < 0) { | ||
+ FatalError("PhoenixInit: FBCONSETMODE failed\n"); | ||
+ } | ||
close(fd); | ||
|
||
return 1; | ||
@@ -47,6 +52,16 @@ | ||
|
||
static void PhoenixFini(void) | ||
{ | ||
+ int fd; | ||
+ if ((fd = open("/dev/tty0", O_WRONLY, 0)) < 0) { | ||
+ FatalError("PhoenixInit: Cannot open /dev/tty0 (%s)\n", | ||
+ strerror(errno)); | ||
+ } | ||
+ | ||
+ if (ioctl(fd, FBCONSETMODE, FBCON_ENABLED) < 0) { | ||
+ FatalError("PhoenixInit: FBCONSETMODE failed\n"); | ||
+ } | ||
+ close(fd); | ||
} | ||
|
||
static const KdOsFuncs PhoenixFuncs = { |