From f0bf5f8b5609fd141aca20dbfb995c83eb253dbc Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 24 Mar 2022 20:01:13 +0100 Subject: [PATCH] 4.9-stable patches added patches: staging-fbtft-fb_st7789v-reset-display-before-initialization.patch --- queue-4.9/series | 1 + ...-reset-display-before-initialization.patch | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 queue-4.9/staging-fbtft-fb_st7789v-reset-display-before-initialization.patch diff --git a/queue-4.9/series b/queue-4.9/series index 4d0b0d0004e..8df2c63b9c5 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1,2 +1,3 @@ nfc-st21nfca-fix-potential-buffer-overflows-in-evt_transaction.patch net-ipv6-fix-skb_over_panic-in-__ip6_append_data.patch +staging-fbtft-fb_st7789v-reset-display-before-initialization.patch diff --git a/queue-4.9/staging-fbtft-fb_st7789v-reset-display-before-initialization.patch b/queue-4.9/staging-fbtft-fb_st7789v-reset-display-before-initialization.patch new file mode 100644 index 00000000000..ad54a4d5252 --- /dev/null +++ b/queue-4.9/staging-fbtft-fb_st7789v-reset-display-before-initialization.patch @@ -0,0 +1,35 @@ +From b6821b0d9b56386d2bf14806f90ec401468c799f Mon Sep 17 00:00:00 2001 +From: Oliver Graute +Date: Thu, 10 Feb 2022 09:53:22 +0100 +Subject: staging: fbtft: fb_st7789v: reset display before initialization + +From: Oliver Graute + +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 +Link: https://lore.kernel.org/r/20220210085322.15676-1-oliver.graute@kococonnector.com +[sudip: adjust context] +Signed-off-by: Sudip Mukherjee +Signed-off-by: Greg Kroah-Hartman +--- + drivers/staging/fbtft/fb_st7789v.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/staging/fbtft/fb_st7789v.c ++++ b/drivers/staging/fbtft/fb_st7789v.c +@@ -85,6 +85,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); -- 2.47.3