All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: Alan Cox <alan@linux.intel.com>,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Subject: Re: vt: regression caused by "Fix line garbage in virtual.."
Date: Mon, 19 Nov 2012 20:21:49 +0100	[thread overview]
Message-ID: <20121119202149.46fc89c4@armhf> (raw)
In-Reply-To: <20121119113828.5a66f112@bob.linux.org.uk>

On Mon, 19 Nov 2012 11:38:28 +0000
Alan Cox <alan@linux.intel.com> wrote:

> > There are some garbage after mousedev.c not present on older kernels.
> > 
> > Reverting commit 81732c in v3.7-rc6 fixes the issue.
> 
> Then we should drop this for 3.7 until a fixed one is provided IMHO.
> Its not relevant to most platforms.

Sorry, juggling with the byte offsets and the character indexes was not
so obvious.

Here is a patch towards the kernel 3.7.

Krzysztof, may you check it?

Thanks.

--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -539,25 +539,25 @@
 {
 	unsigned short *p = (unsigned short *) vc->vc_pos;
 
-	scr_memmovew(p + nr, p, vc->vc_cols - vc->vc_x);
+	scr_memmovew(p + nr, p, (vc->vc_cols - vc->vc_x) * 2);
 	scr_memsetw(p, vc->vc_video_erase_char, nr * 2);
 	vc->vc_need_wrap = 0;
 	if (DO_UPDATE(vc))
 		do_update_region(vc, (unsigned long) p,
-			(vc->vc_cols - vc->vc_x) / 2 + 1);
+			vc->vc_cols - vc->vc_x + 1);
 }
 
 static void delete_char(struct vc_data *vc, unsigned int nr)
 {
 	unsigned short *p = (unsigned short *) vc->vc_pos;
 
-	scr_memcpyw(p, p + nr, vc->vc_cols - vc->vc_x - nr);
+	scr_memcpyw(p, p + nr, (vc->vc_cols - vc->vc_x - nr) * 2);
 	scr_memsetw(p + vc->vc_cols - vc->vc_x - nr, vc->vc_video_erase_char,
 			nr * 2);
 	vc->vc_need_wrap = 0;
 	if (DO_UPDATE(vc))
 		do_update_region(vc, (unsigned long) p,
-			(vc->vc_cols - vc->vc_x) / 2);
+			vc->vc_cols - vc->vc_x);
 }
 
 static int softcursor_original;

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

  reply	other threads:[~2012-11-19 19:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-18 11:05 vt: regression caused by "Fix line garbage in virtual.." Krzysztof Mazur
2012-11-19 11:38 ` Alan Cox
2012-11-19 19:21   ` Jean-Francois Moine [this message]
2012-11-19 21:15     ` Krzysztof Mazur
2012-11-20  8:54       ` Jean-Francois Moine
2012-11-20 15:20         ` Krzysztof Mazur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121119202149.46fc89c4@armhf \
    --to=moinejf@free.fr \
    --cc=alan@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysiek@podlesie.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.