summaryrefslogtreecommitdiff
path: root/linux-core/drm_crtc.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-17 18:20:05 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-17 18:20:05 -0700
commitc71c44bb9288e0bf1b319ec19a2e25f4467d9583 (patch)
treecdb4fc7d4a107082cd6d039706991c4118af840d /linux-core/drm_crtc.c
parent4f0841a31cbed315a3e891557eadc55cab0dfd23 (diff)
parentd20aaf485893ed11dd0d68daf63ccadd77b02213 (diff)
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Diffstat (limited to 'linux-core/drm_crtc.c')
-rw-r--r--linux-core/drm_crtc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index 0fb5b9ae..437259d5 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -572,7 +572,7 @@ bool drm_initial_config(drm_device_t *dev, bool can_grow)
/* bind analog output to one crtc */
list_for_each_entry(output, &dev->mode_config.output_list, head) {
- struct drm_display_mode *des_mode;
+ struct drm_display_mode *des_mode = NULL;
if (list_empty(&output->modes))
continue;
@@ -582,6 +582,10 @@ bool drm_initial_config(drm_device_t *dev, bool can_grow)
if (des_mode->flags & DRM_MODE_TYPE_PREFERRED)
break;
}
+
+ if (!des_mode)
+ continue;
+
if (!strncmp(output->name, "VGA", 3)) {
DRM_DEBUG("VGA preferred mode: %s\n", des_mode->name);
drm_setup_output(output, vga_crtc, des_mode);