summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Graute <oliver.graute@kococonnector.com>2022-02-10 09:53:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-28 08:41:42 +0200
commitd1641f57a1687206d1703605c8e960d716c96144 (patch)
tree809d4f9714bfb0c9b61999da506e60d5b5f25427
parentce89087966651ad41e103770efc5ce2742046284 (diff)
downloadlinux-stable-d1641f57a1687206d1703605c8e960d716c96144.tar.gz
linux-stable-d1641f57a1687206d1703605c8e960d716c96144.tar.bz2
linux-stable-d1641f57a1687206d1703605c8e960d716c96144.zip
staging: fbtft: fb_st7789v: reset display before initialization
commit b6821b0d9b56386d2bf14806f90ec401468c799f upstream. In rare cases the display is flipped or mirrored. This was observed more often in a low temperature environment. A clean reset on init_display() should help to get registers in a sane state. Fixes: ef8f317795da (staging: fbtft: use init function instead of init sequence) Cc: stable@vger.kernel.org Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Link: https://lore.kernel.org/r/20220210085322.15676-1-oliver.graute@kococonnector.com [sudip: adjust context] Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/fbtft/fb_st7789v.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/fbtft/fb_st7789v.c b/drivers/staging/fbtft/fb_st7789v.c
index 3c3f387936e8..30086ae03605 100644
--- a/drivers/staging/fbtft/fb_st7789v.c
+++ b/drivers/staging/fbtft/fb_st7789v.c
@@ -76,6 +76,8 @@ enum st7789v_command {
*/
static int init_display(struct fbtft_par *par)
{
+ par->fbtftops.reset(par);
+
/* turn off sleep mode */
write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE);
mdelay(120);