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)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
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 4b4f907..620434e 100644 (file)
@@ -594,6 +594,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) {
@@ -623,6 +625,14 @@ static int adv7511_get_modes(struct adv7511 *adv7511,
 
        kfree(edid);
 
+       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;
 }