All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Sean Young <sean@mess.org>, Arnd Bergmann <arnd@arndb.de>,
	Greg KH <gregkh@linuxfoundation.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 2/5] auxdisplay: charlcd: add flush function
Date: Mon, 12 Feb 2018 21:44:02 +0100	[thread overview]
Message-ID: <CANiq72kfqf+nhioH7nGPPsFh9PU7NsGLy+8bD7oXNiLCWx6ZeQ@mail.gmail.com> (raw)
In-Reply-To: <cdfa0d36f2f2d306e0824205b4fca0b685991ee9.1516008708.git.sean@mess.org>

On Mon, Jan 15, 2018 at 10:58 AM, Sean Young <sean@mess.org> wrote:
> The Sasem Remote Controller has an LCD, which is connnected via usb.
> Multiple write reg or write data commands can be combined into one usb
> packet.
>
> The latency of usb is such that if we send commands one by one, we get
> very obvious tearing on the LCD.
>
> By adding a flush function, we can buffer all commands until either
> the usb packet is full or the lcd changes are complete.
>
> Signed-off-by: Sean Young <sean@mess.org>
> ---
>  drivers/auxdisplay/charlcd.c | 6 ++++++

Cc'ing Arnd and Greg since this touches include/misc as well.

Miguel

>  include/misc/charlcd.h       | 1 +
>  2 files changed, 7 insertions(+)
>
> diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
> index 45ec5ce697c4..a16c72779722 100644
> --- a/drivers/auxdisplay/charlcd.c
> +++ b/drivers/auxdisplay/charlcd.c
> @@ -642,6 +642,9 @@ static ssize_t charlcd_write(struct file *file, const char __user *buf,
>                 charlcd_write_char(the_charlcd, c);
>         }
>
> +       if (the_charlcd->ops->flush)
> +               the_charlcd->ops->flush(the_charlcd);
> +
>         return tmp - buf;
>  }
>
> @@ -703,6 +706,9 @@ static void charlcd_puts(struct charlcd *lcd, const char *s)
>
>                 charlcd_write_char(lcd, *tmp);
>         }
> +
> +       if (lcd->ops->flush)
> +               lcd->ops->flush(lcd);
>  }
>
>  /* initialize the LCD driver */
> diff --git a/include/misc/charlcd.h b/include/misc/charlcd.h
> index 23f61850f363..ff8fd456018e 100644
> --- a/include/misc/charlcd.h
> +++ b/include/misc/charlcd.h
> @@ -32,6 +32,7 @@ struct charlcd_ops {
>         void (*write_cmd_raw4)(struct charlcd *lcd, int cmd);   /* 4-bit only */
>         void (*clear_fast)(struct charlcd *lcd);
>         void (*backlight)(struct charlcd *lcd, int on);
> +       void (*flush)(struct charlcd *lcd);
>  };
>
>  struct charlcd *charlcd_alloc(unsigned int drvdata_size);
> --
> 2.14.3
>

  reply	other threads:[~2018-02-12 20:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15  9:58 [PATCH 0/5] new driver for Ahanix D.Vine 5 IR/VFD Sean Young
2018-01-15  9:58 ` [PATCH 1/5] auxdisplay: charlcd: no need to call charlcd_gotoxy() if nothing changes Sean Young
2018-02-12 13:42   ` Miguel Ojeda
2018-02-12 13:59     ` Geert Uytterhoeven
2018-02-12 17:30       ` Miguel Ojeda
2018-01-15  9:58 ` [PATCH 2/5] auxdisplay: charlcd: add flush function Sean Young
2018-02-12 20:44   ` Miguel Ojeda [this message]
2018-02-13 13:47     ` Andy Shevchenko
2018-01-15  9:58 ` [PATCH 3/5] auxdisplay: charlcd: add escape sequence for brightness on NEC µPD16314 Sean Young
2018-02-12 11:56   ` Miguel Ojeda
2018-02-13 17:34     ` Sean Young
2018-01-15  9:58 ` [PATCH 4/5] media: rc: add keymap for Dign Remote Sean Young
2018-01-15  9:58 ` [PATCH 5/5] media: rc: new driver for Sasem Remote Controller VFD/IR Sean Young

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=CANiq72kfqf+nhioH7nGPPsFh9PU7NsGLy+8bD7oXNiLCWx6ZeQ@mail.gmail.com \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sean@mess.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.