All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dave Mielke <Dave@mielke.cc>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] vt: coherence validation code for the unicode screen buffer
Date: Mon, 18 Jun 2018 21:52:01 -0700	[thread overview]
Message-ID: <800831730e3aeaf4da23f7f97cfa80103236c3cb.camel@perches.com> (raw)
In-Reply-To: <nycvar.YSQ.7.76.1806182110450.16670@knanqh.ubzr>

On Mon, 2018-06-18 at 21:50 -0400, Nicolas Pitre wrote:
> On Tue, 19 Jun 2018, Andy Shevchenko wrote:
[]
> > > +       /*
> > > +        * Make sure our unicode screen translates into the same glyphs
> > > +        * as the actual screen. This is brutal indeed.
> > > +        */
> > > +       p = (unsigned short *)vc->vc_origin;
> > > +       mask = vc->vc_hi_font_mask | 0xff;
> > > +       for (y = 0; y < vc->vc_rows; y++) {
> > > +               char32_t *line = uniscr->lines[y];
> > > +               for (x = 0; x < vc->vc_cols; x++) {
> > > +                       u16 glyph = scr_readw(p++) & mask;
> > > +                       char32_t uc = line[x];
> > > +                       int tc = conv_uni_to_pc(vc, uc);
> > > +                       if (tc == -4)
> > > +                               tc = conv_uni_to_pc(vc, 0xfffd);
> > > +                       if (tc == -4)
> > > +                               tc = conv_uni_to_pc(vc, '?');
> > > +                       if (tc != glyph)
> > > +                               pr_notice("%s: mismatch at %d,%d: "
> > > +                                         "glyph=%#x tc=%#x\n", __func__,
> > > +                                         x, y, glyph, tc);
> > 
> > Don't split format string in printk(). checkpatch will not warn on longer lines.
> 
> I didn't do it like that for checkpatch but to keep the code readable.
> I don't particularly care either ways though.

If one glyph is off, then perhaps others are off too.
Perhaps this message should be ratelimited.


  reply	other threads:[~2018-06-19  4:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-17 19:07 [PATCH v2 0/4] have the vt console preserve unicode characters Nicolas Pitre
2018-06-17 19:07 ` [PATCH v2 1/4] vt: preserve unicode values corresponding to screen characters Nicolas Pitre
2018-06-17 22:59   ` valdis.kletnieks
2018-06-17 23:17     ` Nicolas Pitre
2018-06-17 23:23       ` valdis.kletnieks
2018-06-17 19:07 ` [PATCH v2 2/4] vt: introduce unicode mode for /dev/vcs Nicolas Pitre
2018-06-17 19:07 ` [PATCH v2 3/4] vt: unicode fallback for scrollback Nicolas Pitre
2018-06-17 19:07 ` [PATCH v2 4/4] vt: coherence validation code for the unicode screen buffer Nicolas Pitre
2018-06-18 22:01   ` Andy Shevchenko
2018-06-19  1:50     ` Nicolas Pitre
2018-06-19  4:52       ` Joe Perches [this message]
2018-06-19 12:14         ` Nicolas Pitre
2018-06-19 13:09 ` [PATCH v2 0/4] have the vt console preserve unicode characters Adam Borowski
2018-06-19 13:52   ` Dave Mielke
2018-06-19 15:14     ` Adam Borowski
2018-06-19 15:30       ` Dave Mielke
2018-06-19 15:34   ` Nicolas Pitre
2018-06-21  1:43     ` Adam Borowski
2018-06-21  2:21       ` Dave Mielke
2018-06-21  3:03         ` Nicolas Pitre
2018-06-22  1:54         ` Adam Borowski
2018-06-22  6:41           ` Samuel Thibault
2018-06-22 15:59           ` Alan Cox
2018-06-22 16:28             ` Nicolas Pitre
2018-06-22 17:51               ` Alan Cox
2018-06-21  2:59       ` Nicolas Pitre
2018-06-25  0:33         ` Adam Borowski

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=800831730e3aeaf4da23f7f97cfa80103236c3cb.camel@perches.com \
    --to=joe@perches.com \
    --cc=Dave@mielke.cc \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=samuel.thibault@ens-lyon.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.