diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2012-03-13 14:35:51 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-03-15 13:52:51 +0400 |
commit | c3c50e8b651887bcefcc13beb3739c00b2379b5c (patch) | |
tree | 087ae3ec7c437125bee9a40d50a2de79685348ed /drivers/gpu/drm/nouveau/nv50_sor.c | |
parent | d63f5e6bf6f2a1573ea39c9937cdf5ab0b3a4b77 (diff) | |
download | linux-c3c50e8b651887bcefcc13beb3739c00b2379b5c.tar.xz |
drm: Add drm_mode_copy()
Add a helper function to copy a display mode. Use it in
drm_mode_duplicate() and nouveau mode_fixup hooks.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_sor.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_sor.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c index 9a5c2c98658c..a7844ab6a50c 100644 --- a/drivers/gpu/drm/nouveau/nv50_sor.c +++ b/drivers/gpu/drm/nouveau/nv50_sor.c @@ -342,11 +342,8 @@ nv50_sor_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, } if (connector->scaling_mode != DRM_MODE_SCALE_NONE && - connector->native_mode) { - int id = adjusted_mode->base.id; - *adjusted_mode = *connector->native_mode; - adjusted_mode->base.id = id; - } + connector->native_mode) + drm_mode_copy(adjusted_mode, connector->native_mode); return true; } |