@@ -537,6 +537,17 @@ int drm_display_mode_from_videomode(const struct videomode *vm,
dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
if (vm->flags & DISPLAY_FLAGS_DOUBLECLK)
dmode->flags |= DRM_MODE_FLAG_DBLCLK;
+
+ dmode->pol_flags = 0;
+ if (vm->flags & DISPLAY_FLAGS_DE_LOW)
+ dmode->pol_flags |= DRM_MODE_FLAG_POL_DE_NEGEDGE;
+ if (vm->flags & DISPLAY_FLAGS_DE_HIGH)
+ dmode->pol_flags |= DRM_MODE_FLAG_POL_DE_POSEDGE;
+ if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
+ dmode->pol_flags |= DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE;
+ if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
+ dmode->pol_flags |= DRM_MODE_FLAG_POL_PIXDATA_POSEDGE;
+
drm_mode_set_name(dmode);
return 0;
The patch adds conversion of DISPLAY_FLAGS_DE_* and DISPLAY_FLAGS_PIXDATA_* flags to pol_flags in drm_display_mode_from_videomode function. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/gpu/drm/drm_modes.c | 11 +++++++++++ 1 file changed, 11 insertions(+)