summaryrefslogtreecommitdiff
path: root/linux-core/drm_modes.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@jbarnes-mobile.amr.corp.intel.com>2007-04-05 09:27:12 -0700
committerJesse Barnes <jbarnes@jbarnes-mobile.amr.corp.intel.com>2007-04-05 09:27:12 -0700
commit50ee722e018a5f17f886286e3d9eebe93f3cecaa (patch)
tree71ed50a3f809cdce839cdb46e3031c008a845775 /linux-core/drm_modes.c
parent6f3534a13abb0c8afb157511d0871dbc35bc403d (diff)
parent652bbb77f6c9efb7e0a67cc868dfda42b00fc5fb (diff)
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Diffstat (limited to 'linux-core/drm_modes.c')
-rw-r--r--linux-core/drm_modes.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/linux-core/drm_modes.c b/linux-core/drm_modes.c
index 2347a669..940fc981 100644
--- a/linux-core/drm_modes.c
+++ b/linux-core/drm_modes.c
@@ -115,15 +115,18 @@ void drm_mode_set_crtcinfo(struct drm_display_mode *p, int adjust_flags)
EXPORT_SYMBOL(drm_mode_set_crtcinfo);
-struct drm_display_mode *drm_mode_duplicate(struct drm_display_mode *mode)
+struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev, struct drm_display_mode *mode)
{
struct drm_display_mode *nmode;
+ int new_id;
- nmode = kzalloc(sizeof(struct drm_display_mode), GFP_KERNEL);
+ nmode = drm_crtc_mode_create(dev);
if (!nmode)
return NULL;
+ new_id = nmode->mode_id;
*nmode = *mode;
+ nmode->mode_id = new_id;
INIT_LIST_HEAD(&nmode->head);
return nmode;
}