From b3ab7dcf5a6d89c1cd4e527953b12c6fe6866a8f Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Fri, 15 Nov 2024 19:03:31 -0800 Subject: [PATCH] remove unnecessary code --- rpi/drm.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/rpi/drm.c b/rpi/drm.c index 3d4c39d..dd2e7dc 100644 --- a/rpi/drm.c +++ b/rpi/drm.c @@ -11,27 +11,6 @@ #define ALIGN(x, a) ((x) + (a - 1)) & (~(a - 1)) -int set_tty(int mode) -{ - /*int tty_fd = open("/dev/tty0", O_RDWR); - if (tty_fd == -1) { - fprintf(stderr, "Failed to open /dev/tty\n"); - return 0; - } - if (ioctl(tty_fd, KDSETMODE, mode) < 0) { - fprintf(stderr, "Failed to set KDSETMODE: %s (%i)\n", strerror(errno), errno); - return 0; - } - close(tty_fd);*/ - - /*if (ioctl(STDIN_FILENO, KDSETMODE, mode) < 0) { - fprintf(stderr, "Failed to set KDSETMODE: %s (%i)\n", strerror(errno), errno); - return 0; - }*/ - - return 1; -} - int initialize_drm(vanilla_drm_ctx_t *ctx) { // Open DRM @@ -40,10 +19,6 @@ int initialize_drm(vanilla_drm_ctx_t *ctx) return 0; } - if (!set_tty(KD_GRAPHICS)) { - return 0; - } - int ret = 0; // Find DRM output @@ -92,8 +67,6 @@ int free_drm(vanilla_drm_ctx_t *ctx) drmModeRmFB(ctx->fd, ctx->fb_id); } - set_tty(KD_TEXT); - // Close DRM drmClose(ctx->fd); }