ecore-drm: Set mode flag for preferred if this is the preferred mode
authorChris Michael <cp.michael@samsung.com>
Tue, 7 Apr 2015 16:26:19 +0000 (12:26 -0400)
committerStefan Schmidt <s.schmidt@samsung.com>
Thu, 9 Apr 2015 15:46:14 +0000 (17:46 +0200)
Summary: This fixes a minor oversight in ecore_drm_output_mode_add
which was not setting the mode->flag to preferred if this is a
preferred mode.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_drm/ecore_drm_output.c

index 4fe6c7d..ab7ee31 100644 (file)
@@ -239,8 +239,8 @@ _ecore_drm_output_mode_add(Ecore_Drm_Output *output, drmModeModeInfo *info)
    mode->refresh = refresh;
    mode->info = *info;
 
-   /* DBG("Added Mode: %dx%d@%d to Output %d",  */
-   /*     mode->width, mode->height, mode->refresh, output->crtc_id); */
+   if (info->type & DRM_MODE_TYPE_PREFERRED)
+     mode->flags |= DRM_MODE_TYPE_PREFERRED;
 
    output->modes = eina_list_append(output->modes, mode);