8b334a83f6a45178788bb1fa84f7a5f84692b1c1
[openwrt/staging/rmilecki.git] /
1 From bf3a33942d66722e9526392edb2f619466d2528e Mon Sep 17 00:00:00 2001
2 From: Serge Schneider <serge@raspberrypi.com>
3 Date: Mon, 26 Oct 2020 16:38:21 +0000
4 Subject: [PATCH] rpisense-fb: Set pseudo_pallete to prevent crash on
5 fbcon takeover
6
7 Signed-off-by: Serge Schneider <serge@raspberrypi.com>
8 ---
9 drivers/video/fbdev/rpisense-fb.c | 3 +++
10 1 file changed, 3 insertions(+)
11
12 --- a/drivers/video/fbdev/rpisense-fb.c
13 +++ b/drivers/video/fbdev/rpisense-fb.c
14 @@ -52,6 +52,8 @@ static u8 gamma_low[32] = {0x00, 0x01, 0
15
16 static u8 gamma_user[32];
17
18 +static u32 pseudo_palette[16];
19 +
20 static struct rpisense_fb_param rpisense_fb_param = {
21 .vmem = NULL,
22 .vmemsize = 128,
23 @@ -225,6 +227,7 @@ static int rpisense_fb_probe(struct plat
24 info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
25 info->screen_base = rpisense_fb_param.vmem;
26 info->screen_size = rpisense_fb_param.vmemsize;
27 + info->pseudo_palette = pseudo_palette;
28
29 if (lowlight)
30 rpisense_fb_param.gamma = gamma_low;