video/drm: panel: Allow to configure bpc (bits per color) from DT

Change-Id: Iad86b7121e4cdfbd981daba6f860fd8b97bca52a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
This commit is contained in:
Wyon Bi 2019-01-28 08:57:26 +08:00
parent 74e3938979
commit 00cdbd6c88
2 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,7 @@ struct rockchip_panel_cmds {
struct rockchip_panel_plat {
bool power_invert;
u32 bus_format;
unsigned int bpc;
struct {
unsigned int prepare;
@ -404,6 +405,7 @@ static int rockchip_panel_ofdata_to_platdata(struct udevice *dev)
plat->bus_format = dev_read_u32_default(dev, "bus-format",
MEDIA_BUS_FMT_RBG888_1X24);
plat->bpc = dev_read_u32_default(dev, "bpc", 8);
data = dev_read_prop(dev, "panel-init-sequence", &len);
if (data) {
@ -515,6 +517,7 @@ static int rockchip_panel_probe(struct udevice *dev)
panel->dev = dev;
panel->bus_format = plat->bus_format;
panel->bpc = plat->bpc;
return 0;
}

View File

@ -21,6 +21,7 @@ struct rockchip_panel_funcs {
struct rockchip_panel {
struct udevice *dev;
u32 bus_format;
unsigned int bpc;
const struct rockchip_panel_funcs *funcs;
const void *data;