drm: introduce bus_flags in drm_display_info
authorStefan Agner <stefan@agner.ch>
Mon, 8 Feb 2016 19:38:14 +0000 (11:38 -0800)
committerStefan Agner <stefan@agner.ch>
Thu, 5 May 2016 17:09:01 +0000 (10:09 -0700)
Introduce bus_flags to specify display bus properties like signal
polarities. This is useful for parallel display buses, e.g. to
specify the pixel clock or data enable polarity.

Suggested-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Manfred Schlaegl <manfred.schlaegl@gmx.at>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Stefan Agner <stefan@agner.ch>
drivers/gpu/drm/panel/panel-simple.c
include/drm/drm_crtc.h

index ceb20486dacf4edb314f16adc241140dba8164c5..77ae07f28b7b9dff0cde8113c9b6b35e1f4f8430 100644 (file)
@@ -72,6 +72,7 @@ struct panel_desc {
        } delay;
 
        u32 bus_format;
+       u32 bus_flags;
 };
 
 struct panel_simple {
@@ -144,6 +145,7 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel)
        if (panel->desc->bus_format)
                drm_display_info_set_bus_formats(&connector->display_info,
                                                 &panel->desc->bus_format, 1);
+       connector->display_info.bus_flags = panel->desc->bus_flags;
 
        return num;
 }
index 4acdaf5e283d7d8314bdf92fe580efda0ceb153a..d1559cd04e3de85849eee8df7189f4ce2e09cad4 100644 (file)
@@ -118,6 +118,14 @@ enum subpixel_order {
 #define DRM_COLOR_FORMAT_RGB444                (1<<0)
 #define DRM_COLOR_FORMAT_YCRCB444      (1<<1)
 #define DRM_COLOR_FORMAT_YCRCB422      (1<<2)
+
+#define DRM_BUS_FLAG_DE_LOW            (1<<0)
+#define DRM_BUS_FLAG_DE_HIGH           (1<<1)
+/* drive data on pos. edge */
+#define DRM_BUS_FLAG_PIXDATA_POSEDGE   (1<<2)
+/* drive data on neg. edge */
+#define DRM_BUS_FLAG_PIXDATA_NEGEDGE   (1<<3)
+
 /*
  * Describes a given display (e.g. CRT or flat panel) and its limitations.
  */
@@ -139,6 +147,7 @@ struct drm_display_info {
 
        const u32 *bus_formats;
        unsigned int num_bus_formats;
+       u32 bus_flags;
 
        /* Mask of supported hdmi deep color modes */
        u8 edid_hdmi_dc_modes;