summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/xorg/xorg_output.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-11-24 14:53:03 +0100
committerJakob Bornecrantz <jakob@vmware.com>2009-11-24 14:53:03 +0100
commit7fac8ce73bb26147f36acc60870a7e816b2f5b4f (patch)
tree78560e5615a44e47fe45d7de0e66a6e57b8a50dc /src/gallium/state_trackers/xorg/xorg_output.c
parentee40b20e7aff5dc9d11230e991355c338a64da00 (diff)
st/xorg: Pass mode types from the kernel to X
Diffstat (limited to 'src/gallium/state_trackers/xorg/xorg_output.c')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_output.c b/src/gallium/state_trackers/xorg/xorg_output.c
index 60eef9307d..251f331ea7 100644
--- a/src/gallium/state_trackers/xorg/xorg_output.c
+++ b/src/gallium/state_trackers/xorg/xorg_output.c
@@ -110,7 +110,6 @@ output_get_modes(xf86OutputPtr output)
mode = xcalloc(1, sizeof(DisplayModeRec));
if (!mode)
continue;
- mode->type = 0;
mode->Clock = drm_mode->clock;
mode->HDisplay = drm_mode->hdisplay;
mode->HSyncStart = drm_mode->hsync_start;
@@ -125,6 +124,11 @@ output_get_modes(xf86OutputPtr output)
mode->VScan = drm_mode->vscan;
mode->VRefresh = xf86ModeVRefresh(mode);
mode->Private = (void *)drm_mode;
+ mode->type = 0;
+ if (drm_mode->type & DRM_MODE_TYPE_PREFERRED)
+ mode->type |= M_T_PREFERRED;
+ if (drm_mode->type & DRM_MODE_TYPE_DRIVER)
+ mode->type |= M_T_DRIVER;
xf86SetModeDefaultName(mode);
modes = xf86ModesAdd(modes, mode);
xf86PrintModeline(0, mode);