950ed036a7a476ef4b7443357d5c89d4035a1a50
[openwrt/staging/rmilecki.git] /
1 From 4870e7a4d23d73761d5f3be18e29d9ff960e292c Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 2 Dec 2021 18:16:21 +0000
4 Subject: [PATCH] drm/panel-simple: Allow the bus format to be read
5 from DT for panel-dpi
6
7 The "panel-dpi" compatible string configures panel from device tree,
8 but it doesn't provide any way of configuring the bus format (colour
9 representation), nor does it populate it.
10
11 Add a DT parameter "bus-format" that allows the MEDIA_BUS_FMT_xxx value
12 to be specified from device tree.
13
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
15 ---
16 drivers/gpu/drm/panel/panel-simple.c | 1 +
17 1 file changed, 1 insertion(+)
18
19 --- a/drivers/gpu/drm/panel/panel-simple.c
20 +++ b/drivers/gpu/drm/panel/panel-simple.c
21 @@ -598,6 +598,7 @@ static int panel_dpi_probe(struct device
22
23 of_property_read_u32(np, "width-mm", &desc->size.width);
24 of_property_read_u32(np, "height-mm", &desc->size.height);
25 + of_property_read_u32(np, "bus-format", &desc->bus_format);
26
27 /* Extract bus_flags from display_timing */
28 bus_flags = 0;