MLK-16986-4: drm: bridge: adv7511: set bus_flags and bus_format
authorRobert Chiras <robert.chiras@nxp.com>
Fri, 24 Nov 2017 12:04:24 +0000 (14:04 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:50:08 +0000 (14:50 -0500)
For a proper initialization of the crtc driving the connector for this
bridge, we need to set the bus_formats and bus_flags of the connector's
display_info.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c

index 4434339..e2f0a8a 100644 (file)
@@ -571,6 +571,8 @@ static int adv7511_get_modes(struct adv7511 *adv7511,
 {
        struct edid *edid;
        unsigned int count;
+       u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24;
+       int ret;
 
        /* Reading the EDID only works if the device is powered */
        if (!adv7511->powered) {
@@ -599,6 +601,14 @@ static int adv7511_get_modes(struct adv7511 *adv7511,
 
        adv7511_set_config_csc(adv7511, connector, adv7511->rgb);
 
+       connector->display_info.bus_flags = DRM_BUS_FLAG_DE_LOW |
+                                           DRM_BUS_FLAG_PIXDATA_NEGEDGE;
+
+       ret = drm_display_info_set_bus_formats(&connector->display_info,
+                                              &bus_format, 1);
+       if (ret)
+               return ret;
+
        return count;
 }