diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_encoders.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_encoders.c | 50 |
1 files changed, 8 insertions, 42 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index 3e58c6eccea5..a9d4e0ab049a 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c | |||
@@ -171,49 +171,15 @@ void radeon_rmx_mode_fixup(struct drm_encoder *encoder, | |||
171 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 171 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
172 | struct drm_device *dev = encoder->dev; | 172 | struct drm_device *dev = encoder->dev; |
173 | struct radeon_device *rdev = dev->dev_private; | 173 | struct radeon_device *rdev = dev->dev_private; |
174 | struct radeon_native_mode *native_mode = &radeon_encoder->native_mode; | 174 | struct drm_display_mode *native_mode = &radeon_encoder->native_mode; |
175 | 175 | ||
176 | if (mode->hdisplay < native_mode->panel_xres || | 176 | if (mode->hdisplay < native_mode->hdisplay || |
177 | mode->vdisplay < native_mode->panel_yres) { | 177 | mode->vdisplay < native_mode->vdisplay) { |
178 | if (ASIC_IS_AVIVO(rdev)) { | 178 | *adjusted_mode = *native_mode; |
179 | adjusted_mode->hdisplay = native_mode->panel_xres; | 179 | if (!ASIC_IS_AVIVO(rdev)) { |
180 | adjusted_mode->vdisplay = native_mode->panel_yres; | 180 | adjusted_mode->hdisplay = mode->hdisplay; |
181 | adjusted_mode->htotal = native_mode->panel_xres + native_mode->hblank; | 181 | adjusted_mode->vdisplay = mode->vdisplay; |
182 | adjusted_mode->hsync_start = native_mode->panel_xres + native_mode->hoverplus; | ||
183 | adjusted_mode->hsync_end = adjusted_mode->hsync_start + native_mode->hsync_width; | ||
184 | adjusted_mode->vtotal = native_mode->panel_yres + native_mode->vblank; | ||
185 | adjusted_mode->vsync_start = native_mode->panel_yres + native_mode->voverplus; | ||
186 | adjusted_mode->vsync_end = adjusted_mode->vsync_start + native_mode->vsync_width; | ||
187 | /* update crtc values */ | ||
188 | drm_mode_set_crtcinfo(adjusted_mode, CRTC_INTERLACE_HALVE_V); | ||
189 | /* adjust crtc values */ | ||
190 | adjusted_mode->crtc_hdisplay = native_mode->panel_xres; | ||
191 | adjusted_mode->crtc_vdisplay = native_mode->panel_yres; | ||
192 | adjusted_mode->crtc_htotal = adjusted_mode->crtc_hdisplay + native_mode->hblank; | ||
193 | adjusted_mode->crtc_hsync_start = adjusted_mode->crtc_hdisplay + native_mode->hoverplus; | ||
194 | adjusted_mode->crtc_hsync_end = adjusted_mode->crtc_hsync_start + native_mode->hsync_width; | ||
195 | adjusted_mode->crtc_vtotal = adjusted_mode->crtc_vdisplay + native_mode->vblank; | ||
196 | adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + native_mode->voverplus; | ||
197 | adjusted_mode->crtc_vsync_end = adjusted_mode->crtc_vsync_start + native_mode->vsync_width; | ||
198 | } else { | ||
199 | adjusted_mode->htotal = native_mode->panel_xres + native_mode->hblank; | ||
200 | adjusted_mode->hsync_start = native_mode->panel_xres + native_mode->hoverplus; | ||
201 | adjusted_mode->hsync_end = adjusted_mode->hsync_start + native_mode->hsync_width; | ||
202 | adjusted_mode->vtotal = native_mode->panel_yres + native_mode->vblank; | ||
203 | adjusted_mode->vsync_start = native_mode->panel_yres + native_mode->voverplus; | ||
204 | adjusted_mode->vsync_end = adjusted_mode->vsync_start + native_mode->vsync_width; | ||
205 | /* update crtc values */ | ||
206 | drm_mode_set_crtcinfo(adjusted_mode, CRTC_INTERLACE_HALVE_V); | ||
207 | /* adjust crtc values */ | ||
208 | adjusted_mode->crtc_htotal = adjusted_mode->crtc_hdisplay + native_mode->hblank; | ||
209 | adjusted_mode->crtc_hsync_start = adjusted_mode->crtc_hdisplay + native_mode->hoverplus; | ||
210 | adjusted_mode->crtc_hsync_end = adjusted_mode->crtc_hsync_start + native_mode->hsync_width; | ||
211 | adjusted_mode->crtc_vtotal = adjusted_mode->crtc_vdisplay + native_mode->vblank; | ||
212 | adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + native_mode->voverplus; | ||
213 | adjusted_mode->crtc_vsync_end = adjusted_mode->crtc_vsync_start + native_mode->vsync_width; | ||
214 | } | 182 | } |
215 | adjusted_mode->flags = native_mode->flags; | ||
216 | adjusted_mode->clock = native_mode->dotclock; | ||
217 | } | 183 | } |
218 | } | 184 | } |
219 | 185 | ||