diff options
author | kib <kib@FreeBSD.org> | 2013-06-18 20:19:09 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-06-18 20:19:09 +0000 |
commit | 300e41985de2ce0dbc8cca3022e173a9a2dcccc6 (patch) | |
tree | 3a9eefa7f83d9357b64ba5663d78c04f7507cb20 /sys/dev | |
parent | fe5306317669ed47de0598495c4733a9e70c4ec4 (diff) | |
download | FreeBSD-src-300e41985de2ce0dbc8cca3022e173a9a2dcccc6.zip FreeBSD-src-300e41985de2ce0dbc8cca3022e173a9a2dcccc6.tar.gz |
On some generations of the Intel GPU, disabling of the VGA Display
stops updating the vertical retrace indicator. The text mouse
renderer in syscons is executing from the callout and spins waiting
for the start of next frame. As result, after the X server finishes,
since the VGA cannot be turned on, but syscons does not know about
this, the clock swi spins forever.
Hack around the problem by disabling wait for the retrace if KMS is
activated.
Diagnosed and tested by: Michiel Boland <boland37@xs4all.nl>
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/drm2/i915/intel_fb.c | 3 | ||||
-rw-r--r-- | sys/dev/syscons/scvgarndr.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/drm2/i915/intel_fb.c b/sys/dev/drm2/i915/intel_fb.c index 3cb3b78..e41a49f 100644 --- a/sys/dev/drm2/i915/intel_fb.c +++ b/sys/dev/drm2/i915/intel_fb.c @@ -207,6 +207,8 @@ static void intel_fbdev_destroy(struct drm_device *dev, } } +extern int sc_txtmouse_no_retrace_wait; + int intel_fbdev_init(struct drm_device *dev) { struct intel_fbdev *ifbdev; @@ -229,6 +231,7 @@ 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); + sc_txtmouse_no_retrace_wait = 1; return 0; } diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c index 6e6663c..fc7f02f 100644 --- a/sys/dev/syscons/scvgarndr.c +++ b/sys/dev/syscons/scvgarndr.c @@ -395,6 +395,8 @@ vga_txtblink(scr_stat *scp, int at, int flip) { } +int sc_txtmouse_no_retrace_wait; + #ifndef SC_NO_CUTPASTE static void @@ -445,7 +447,9 @@ draw_txtmouse(scr_stat *scp, int x, int y) #if 1 /* wait for vertical retrace to avoid jitter on some videocards */ crtc_addr = scp->sc->adp->va_crtc_addr; - while (!(inb(crtc_addr + 6) & 0x08)) /* idle */ ; + while (!sc_txtmouse_no_retrace_wait && + !(inb(crtc_addr + 6) & 0x08)) + /* idle */ ; #endif c = scp->sc->mouse_char; vidd_load_font(scp->sc->adp, 0, 32, 8, font_buf, c, 4); |