adb14fb710b31a35825c1e3098e6829af4c64eba
[openwrt/staging/nbd.git] /
1 From c6be127c2f4d5f75c60d3778594093ff51593a6e Mon Sep 17 00:00:00 2001
2 From: Michael Brown <mbrown@fensystems.co.uk>
3 Date: Sun, 22 Sep 2019 21:51:29 +0100
4 Subject: [PATCH] bcm2708_fb: Fix layout of struct
5 vc4_display_settings_t
6
7 The display parameters returned by the VC4 firmware in response to the
8 RPI_FIRMWARE_FRAMEBUFFER_GET_DISPLAY_SETTINGS tag do not match the
9 layout of struct vc4_display_settings_t: the colour depth and row
10 pitch are erroneously swapped in the kernel definition. This can
11 trigger a kernel warning from pixel_to_pat(), such as:
12
13 pixel_to_pat(): unsupported pixelformat 7296
14
15 Fix by adjusting the layout of struct vc4_display_settings_t to match
16 the layout as used by the VC4 firmware.
17
18 Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
19 ---
20 drivers/video/fbdev/bcm2708_fb.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23 --- a/drivers/video/fbdev/bcm2708_fb.c
24 +++ b/drivers/video/fbdev/bcm2708_fb.c
25 @@ -89,8 +89,8 @@ struct vc4_display_settings_t {
26 u32 display_num;
27 u32 width;
28 u32 height;
29 - u32 pitch;
30 u32 depth;
31 + u32 pitch;
32 u32 virtual_width;
33 u32 virtual_height;
34 u32 virtual_width_offset;