From owner-freebsd-bugs Sun Mar 4 18:42:44 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 38A2E37B719 for ; Sun, 4 Mar 2001 18:41:21 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f252fL199687; Sun, 4 Mar 2001 18:41:21 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8C23737B719 for ; Sun, 4 Mar 2001 18:36:27 -0800 (PST) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f252aRD99282; Sun, 4 Mar 2001 18:36:27 -0800 (PST) (envelope-from nobody) Message-Id: <200103050236.f252aRD99282@freefall.freebsd.org> Date: Sun, 4 Mar 2001 18:36:27 -0800 (PST) From: davidx@viasoft.com.cn To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/25536: fix annoying console mouse cursor flicker problem Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 25536 >Category: kern >Synopsis: fix annoying console mouse cursor flicker problem >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 04 18:40:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: David Xu >Release: FreeBSD 4.2-stable >Organization: viasoft >Environment: FreeBSD davidbsd.viasoft.com.cn 4.2-STABLE FreeBSD 4.2-STABLE #10: Fri Mar 2 09 :24:41 CST 2001 root@davidbsd.viasoft.com.cn:/usr/src/sys/compile/xu i386 >Description: here is a patch for the problem reported in PR25439, I found the bug is in /sys/dev/syscons/syscons.c, where function srcn_update detects if text cursor is in a special area, if it is in the area, the function will repeatly hide and show text cursor in very fast speed, the condition remains true until mouse cursor is moved away from such area, cause 20% of CPU time is wasted. >How-To-Repeat: ......................... ......................... .....xxxxxxxxxxxxxxxxxxxx xxxxx@................... ......................... above image represents a screen image, every line represents a screen line, char @ is text cursor position, if mouse cursor is moved into area marked with char x, then mouse cursor flickers weirdly. >Fix: patch for /sys/dev/syscons.c: --- syscons.c.orig Mon Mar 5 08:36:49 2001 +++ syscons.c Mon Mar 5 08:37:11 2001 @@ -1723,6 +1723,7 @@ if ((scp->status & (MOUSE_MOVED | MOUSE_HIDDEN)) || and_region(&s, &e, scp->start, scp->end) || ((scp->status & CURSOR_ENABLED) && + (scp->cursor_pos != scp->cursor_oldpos) && (and_region(&s, &e, scp->cursor_pos, scp->cursor_pos) || and_region(&s, &e, scp->cursor_oldpos, scp->cursor_oldpos))) ) { sc_remove_mouse_image(scp); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message