<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/auxdisplay/charlcd.c, branch v6.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-11-24T10:46:52+00:00</updated>
<entry>
<title>auxdisplay: charlcd: checking for pointer reference before dereferencing</title>
<updated>2021-11-24T10:46:52+00:00</updated>
<author>
<name>Luiz Sampaio</name>
<email>sampaio.ime@gmail.com</email>
</author>
<published>2021-11-09T22:07:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4daa9ff89ef27be43c15995412d6aee393a78200'/>
<id>urn:sha1:4daa9ff89ef27be43c15995412d6aee393a78200</id>
<content type='text'>
Check if the pointer lcd-&gt;ops-&gt;init_display exists before dereferencing it.
If a driver called charlcd_init() without defining the ops, this would
return segmentation fault, as happened to me when implementing a charlcd
driver.  Checking the pointer before dereferencing protects from
segmentation fault.

Signed-off-by: Luiz Sampaio &lt;sampaio.ime@gmail.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>auxdisplay: charlcd: fixing coding style issue</title>
<updated>2021-11-24T10:46:42+00:00</updated>
<author>
<name>Luiz Sampaio</name>
<email>sampaio.ime@gmail.com</email>
</author>
<published>2021-11-09T22:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94047df12fec0e51e860b5317223f67a3ea4eb07'/>
<id>urn:sha1:94047df12fec0e51e860b5317223f67a3ea4eb07</id>
<content type='text'>
Removing 'int' from 'unsigned long int' declaration, which is unnecessary.

Signed-off-by: Luiz Sampaio &lt;sampaio.ime@gmail.com&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style</title>
<updated>2021-07-16T05:42:35+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-07-15T14:41:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ac8c8fa0a8c3a7bc0a9a9cc44ab3650d98662754'/>
<id>urn:sha1:ac8c8fa0a8c3a7bc0a9a9cc44ab3650d98662754</id>
<content type='text'>
For structure initializers the fields are 0 (or NULL) by default, so
there is no need to fill them explicitly. Besides that, much easier
to read when initializers use C99 style. Hence, convert to C99 style
as well.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>auxdisplay: Remove in_interrupt() usage.</title>
<updated>2021-03-16T15:32:40+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2021-02-16T18:27:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=701454bce906241ba7f50e2773881560d6404d29'/>
<id>urn:sha1:701454bce906241ba7f50e2773881560d6404d29</id>
<content type='text'>
charlcd_write() is invoked as a VFS-&gt;write() callback and as such it is
always invoked from preemptible context and may sleep.

charlcd_puts() is invoked from register/unregister callback which is
preemptible. The reboot notifier callback is also invoked from
preemptible context.

Therefore there is no need to use in_interrupt() to figure out if it
is safe to sleep because it always is. in_interrupt() and related
context checks are being removed from non-core code.
Using schedule() to schedule (and be friendly to others) is
discouraged and cond_resched() should be used instead.

Remove in_interrupt() and use cond_resched() to schedule every 32
iterations if needed.

Link: https://lkml.kernel.org/r/20200914204209.256266093@linutronix.de
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
[mo: fixed a couple typos in comment and commit message]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>auxdisplay: charlcd: Do not print chars at end of line</title>
<updated>2020-11-04T10:04:05+00:00</updated>
<author>
<name>Lars Poeschel</name>
<email>poeschel@lemonage.de</email>
</author>
<published>2020-11-03T09:58:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=af9470b26dc6c3a8f9ef460c90e34a66ce4f5f1d'/>
<id>urn:sha1:af9470b26dc6c3a8f9ef460c90e34a66ce4f5f1d</id>
<content type='text'>
Skip printing characters at the end of a display line. This fits to the
behaviour we already had, that the cursor is nailed to the last position
of a line.
This might slightly change behaviour.
On hd44780 displays with one or two lines the previous implementation
did still write characters to the buffer of the display even if they are
currently not visible. The shift_display command could be used to set
the "viewing window" to a new position in the buffer and then you could
see the characters previously written.
This described behaviour does not work for hd44780 displays with more
than two display lines. There simply is not enough buffer.
So the behaviour was a bit inconsistent across different displays.
The new behaviour is to stop writing characters at the end of a visible
line, even if there would be room in the buffer. This allows us to have
an easy implementation, that should behave equal on all supported
displays. This is not hd44780 hardware dependent anymore.

Reviewed-by: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>auxdisplay: Change gotoxy calling interface</title>
<updated>2020-11-04T10:04:04+00:00</updated>
<author>
<name>Lars Poeschel</name>
<email>poeschel@lemonage.de</email>
</author>
<published>2020-11-03T09:58:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40c2b72e4b11f0a80dff19b539fccf36472dc417'/>
<id>urn:sha1:40c2b72e4b11f0a80dff19b539fccf36472dc417</id>
<content type='text'>
Change the calling interface for gotoxy from supplying the x and y
coordinates in the charlcd struct to explicitly supplying x and y in
the function arguments. This is more intuitive and allows for moving
the cursor to positions independent from the position saved in the
charlcd struct.

Reviewed-by: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>auxdisplay: charlcd: replace last device specific stuff</title>
<updated>2020-11-04T10:04:04+00:00</updated>
<author>
<name>Lars Poeschel</name>
<email>poeschel@lemonage.de</email>
</author>
<published>2020-11-03T09:58:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e49eea35886c7f7173796d6a646c8c2c0f6149d'/>
<id>urn:sha1:6e49eea35886c7f7173796d6a646c8c2c0f6149d</id>
<content type='text'>
These are the last bits left in charlcd.c that are device specific and
they are removed now.
In detail this is:
* bwidth, which is the width of the display buffer per line. This is
  replaced by width of the display.
* hwidth, which is the size of the display buffer as a whole. This is
  replaced by looping all chars of a line by all lines.
* the hd44780_common header include can go away.

Reviewed-by: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>auxdisplay: hd44780: Remove clear_fast</title>
<updated>2020-11-04T10:04:04+00:00</updated>
<author>
<name>Lars Poeschel</name>
<email>poeschel@lemonage.de</email>
</author>
<published>2020-11-03T09:58:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=377cf2cbfdb962579eedf2c29845c463c6973f7e'/>
<id>urn:sha1:377cf2cbfdb962579eedf2c29845c463c6973f7e</id>
<content type='text'>
We remove the hd44780_clear_fast (display) clear implementation. With
the new timeout the normal clear_display is reasonably fast. So there is
no need for a clear_fast anymore.

Link: https://lore.kernel.org/lkml/20200922092121.GG16421@1wt.eu/

Signed-off-by: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>auxdisplay: Call charlcd_backlight in place</title>
<updated>2020-11-04T10:04:04+00:00</updated>
<author>
<name>Lars Poeschel</name>
<email>poeschel@lemonage.de</email>
</author>
<published>2020-11-03T09:58:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a2060f288e15a69b2191b7e9df2e3d470e27e433'/>
<id>urn:sha1:a2060f288e15a69b2191b7e9df2e3d470e27e433</id>
<content type='text'>
This moves the call to charlcd_backlight from the end of the switch
into the actual case statement that originates the change of the
backlight. This is more consistent to what is now found in this switch.

Reviewed-by: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>auxdisplay: Move char redefine code to hd44780_common</title>
<updated>2020-11-04T10:04:04+00:00</updated>
<author>
<name>Lars Poeschel</name>
<email>poeschel@lemonage.de</email>
</author>
<published>2020-11-03T09:58:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=339acb082987a6b0aa7c67a5a77b29f6c81962f6'/>
<id>urn:sha1:339acb082987a6b0aa7c67a5a77b29f6c81962f6</id>
<content type='text'>
Take the code to redefine characters out of charlcd and move it to
hd44780_common, as this is hd44780 specific.
There is now a function hd44780_common_redefine_char that drivers use
and charlcd calls it through its ops function pointer.

Reviewed-by: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
</feed>
