drm: panel: simple-panel: add support for bus_format retrieval
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 22 Jul 2014 11:33:59 +0000 (13:33 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 21 Jan 2015 08:45:45 +0000 (09:45 +0100)
Provide a way to specify panel requirement in terms of supported media bus
format (particularly useful for panels connected to an RGB or LVDS bus).

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/panel/panel-simple.c

index e95385bf835634e163cced6947920c688f7cc9a7..450401894663148d47e208a04fa9a7993260a60a 100644 (file)
@@ -61,6 +61,8 @@ struct panel_desc {
                unsigned int disable;
                unsigned int unprepare;
        } delay;
+
+       u32 bus_format;
 };
 
 struct panel_simple {
@@ -111,6 +113,9 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel)
        connector->display_info.bpc = panel->desc->bpc;
        connector->display_info.width_mm = panel->desc->size.width;
        connector->display_info.height_mm = panel->desc->size.height;
+       if (panel->desc->bus_format)
+               drm_display_info_set_bus_formats(&connector->display_info,
+                                                &panel->desc->bus_format, 1);
 
        return num;
 }