From 4a87818e07c074e8c30cd4eedbfbbf939bbc8d82 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 21 Jul 2014 16:38:05 +0000 Subject: [PATCH] Hide syscons-specific workaround under DEV_SC This change is a bit ugly, but so is the coupling between the i915 driver and syscons. It isn't worth developing a more elegant solution only to support the legacy syscons console. --- sys/dev/drm2/i915/intel_fb.c | 5 +++++ sys/dev/vt/vt_core.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/drm2/i915/intel_fb.c b/sys/dev/drm2/i915/intel_fb.c index 29579203e9ed..f8a68ec92b39 100644 --- a/sys/dev/drm2/i915/intel_fb.c +++ b/sys/dev/drm2/i915/intel_fb.c @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_syscons.h" #include #include #include @@ -216,7 +217,9 @@ static void intel_fbdev_destroy(struct drm_device *dev, } } +#ifdef DEV_SC extern int sc_txtmouse_no_retrace_wait; +#endif int intel_fbdev_init(struct drm_device *dev) { @@ -240,7 +243,9 @@ int intel_fbdev_init(struct drm_device *dev) drm_fb_helper_single_add_all_connectors(&ifbdev->helper); drm_fb_helper_initial_config(&ifbdev->helper, 32); +#ifdef DEV_SC sc_txtmouse_no_retrace_wait = 1; +#endif return 0; } diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 915526c64567..72ccce8d42cc 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -111,9 +111,6 @@ const struct terminal_class vt_termclass = { #define VT_UNIT(vw) ((vw)->vw_device->vd_unit * VT_MAXWINDOWS + \ (vw)->vw_number) -/* XXX while syscons is here. */ -int sc_txtmouse_no_retrace_wait; - static SYSCTL_NODE(_kern, OID_AUTO, vt, CTLFLAG_RD, 0, "vt(9) parameters"); VT_SYSCTL_INT(enable_altgr, 1, "Enable AltGr key (Do not assume R.Alt as Alt)"); VT_SYSCTL_INT(debug, 0, "vt(9) debug level");