Am Mittwoch, den 25.05.2016, 08:11 +0200 schrieb Lothar WaÃmann: [...] > > > @@ -81,10 +87,27 @@ static int imx_pd_connector_get_modes(struct > > > drm_connector *connector) > > > > > > if (np) { > > > struct drm_display_mode *mode = drm_mode_create(connector->dev); > > > + struct videomode vm; > > > + int ret; > > > > > > if (!mode) > > > return -EINVAL; > > > - of_get_drm_display_mode(np, &imxpd->mode, OF_USE_NATIVE_MODE); > > > + > > > + ret = of_get_videomode(np, &vm, OF_USE_NATIVE_MODE); > > > + if (ret) > > > + return ret; > > > + drm_display_mode_from_videomode(&vm, &imxpd->mode); > > > + drm_mode_debug_printmodeline(&imxpd->mode); > > > + > > > + if (vm.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE) > > > + imxpd->bus_flags |= DRM_BUS_FLAG_PIXDATA_POSEDGE; > > > + if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) > > > + imxpd->bus_flags |= DRM_BUS_FLAG_PIXDATA_NEGEDGE; > > > + > > > + if (vm.flags & DISPLAY_FLAGS_DE_LOW) > > > + imxpd->bus_flags |= DRM_BUS_FLAG_DE_LOW; > > > + if (vm.flags & DISPLAY_FLAGS_DE_HIGH) > > > + imxpd->bus_flags |= DRM_BUS_FLAG_DE_HIGH; > > > > This could be shared between ldb and parallel drivers if you extended > > of_get_drm_display_mode to also return bus_flags, for example. The flags > > translation could be put into a drm_bus_flags_from_videomode helper. > > > I had that in mind also, but hesitated to change the generic > of_get_drm_display_mode() to implement some i.MX specific functionality.
Since the videomode obtained from DT includes both the timing and pin polarity information, and the drm way to express these are drm_display_mode and bus_flags, respectively, there's nothing i.MX specific about this. regards Philipp