diff options
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_connectors.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_encoders.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 17d5659cff03..729207a1e83e 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -183,8 +183,7 @@ static struct drm_display_mode *radeon_fp_native_mode(struct drm_encoder *encode | |||
183 | if (native_mode->hdisplay != 0 && | 183 | if (native_mode->hdisplay != 0 && |
184 | native_mode->vdisplay != 0 && | 184 | native_mode->vdisplay != 0 && |
185 | native_mode->clock != 0) { | 185 | native_mode->clock != 0) { |
186 | mode = drm_mode_create(dev); | 186 | mode = drm_mode_duplicate(dev, native_mode); |
187 | *mode = *native_mode; | ||
188 | mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER; | 187 | mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER; |
189 | drm_mode_set_name(mode); | 188 | drm_mode_set_name(mode); |
190 | 189 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index a9d4e0ab049a..10845f39124a 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c | |||
@@ -175,11 +175,13 @@ void radeon_rmx_mode_fixup(struct drm_encoder *encoder, | |||
175 | 175 | ||
176 | if (mode->hdisplay < native_mode->hdisplay || | 176 | if (mode->hdisplay < native_mode->hdisplay || |
177 | mode->vdisplay < native_mode->vdisplay) { | 177 | mode->vdisplay < native_mode->vdisplay) { |
178 | int mode_id = adjusted_mode->base.id; | ||
178 | *adjusted_mode = *native_mode; | 179 | *adjusted_mode = *native_mode; |
179 | if (!ASIC_IS_AVIVO(rdev)) { | 180 | if (!ASIC_IS_AVIVO(rdev)) { |
180 | adjusted_mode->hdisplay = mode->hdisplay; | 181 | adjusted_mode->hdisplay = mode->hdisplay; |
181 | adjusted_mode->vdisplay = mode->vdisplay; | 182 | adjusted_mode->vdisplay = mode->vdisplay; |
182 | } | 183 | } |
184 | adjusted_mode->base.id = mode_id; | ||
183 | } | 185 | } |
184 | } | 186 | } |
185 | 187 | ||