videomode: combine videomode dmt_flags and data_flags
Both videomode and display_timing contain flags describing the modes. These are stored in dmt_flags and data_flags. There's no need to separate these flags, and having separate fields just makes the flags more difficult to use. This patch combines the fields and renames VESA_DMT_* flags to DISPLAY_FLAGS_*. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
This commit is contained in:
@@ -523,17 +523,17 @@ int drm_display_mode_from_videomode(const struct videomode *vm,
|
||||
dmode->clock = vm->pixelclock / 1000;
|
||||
|
||||
dmode->flags = 0;
|
||||
if (vm->dmt_flags & VESA_DMT_HSYNC_HIGH)
|
||||
if (vm->flags & DISPLAY_FLAGS_HSYNC_HIGH)
|
||||
dmode->flags |= DRM_MODE_FLAG_PHSYNC;
|
||||
else if (vm->dmt_flags & VESA_DMT_HSYNC_LOW)
|
||||
else if (vm->flags & DISPLAY_FLAGS_HSYNC_LOW)
|
||||
dmode->flags |= DRM_MODE_FLAG_NHSYNC;
|
||||
if (vm->dmt_flags & VESA_DMT_VSYNC_HIGH)
|
||||
if (vm->flags & DISPLAY_FLAGS_VSYNC_HIGH)
|
||||
dmode->flags |= DRM_MODE_FLAG_PVSYNC;
|
||||
else if (vm->dmt_flags & VESA_DMT_VSYNC_LOW)
|
||||
else if (vm->flags & DISPLAY_FLAGS_VSYNC_LOW)
|
||||
dmode->flags |= DRM_MODE_FLAG_NVSYNC;
|
||||
if (vm->data_flags & DISPLAY_FLAGS_INTERLACED)
|
||||
if (vm->flags & DISPLAY_FLAGS_INTERLACED)
|
||||
dmode->flags |= DRM_MODE_FLAG_INTERLACE;
|
||||
if (vm->data_flags & DISPLAY_FLAGS_DOUBLESCAN)
|
||||
if (vm->flags & DISPLAY_FLAGS_DOUBLESCAN)
|
||||
dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
|
||||
drm_mode_set_name(dmode);
|
||||
|
||||
|
Reference in New Issue
Block a user