radeon: rmx_fixup() fixes for legacy chips

main
Alex Deucher 2008-09-19 11:19:00 -04:00
parent d6b853cf81
commit 66237cd3c2
1 changed files with 40 additions and 37 deletions

View File

@ -35,9 +35,13 @@ void radeon_rmx_mode_fixup(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode) struct drm_display_mode *adjusted_mode)
{ {
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
struct drm_device *dev = encoder->dev;
struct drm_radeon_private *dev_priv = dev->dev_private;
if (mode->hdisplay < radeon_encoder->panel_xres || if (mode->hdisplay < radeon_encoder->panel_xres ||
mode->vdisplay < radeon_encoder->panel_yres) { mode->vdisplay < radeon_encoder->panel_yres) {
radeon_encoder->flags |= RADEON_USE_RMX; radeon_encoder->flags |= RADEON_USE_RMX;
if (radeon_is_avivo(dev_priv)) {
adjusted_mode->hdisplay = radeon_encoder->panel_xres; adjusted_mode->hdisplay = radeon_encoder->panel_xres;
adjusted_mode->vdisplay = radeon_encoder->panel_yres; adjusted_mode->vdisplay = radeon_encoder->panel_yres;
adjusted_mode->htotal = radeon_encoder->panel_xres + radeon_encoder->hblank; adjusted_mode->htotal = radeon_encoder->panel_xres + radeon_encoder->hblank;
@ -74,8 +78,7 @@ void radeon_rmx_mode_fixup(struct drm_encoder *encoder,
adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + radeon_encoder->voverplus; adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + radeon_encoder->voverplus;
adjusted_mode->crtc_vsync_end = adjusted_mode->crtc_vsync_start + radeon_encoder->vsync_width; adjusted_mode->crtc_vsync_end = adjusted_mode->crtc_vsync_start + radeon_encoder->vsync_width;
} }
adjusted_mode->clock = radeon_encoder->dotclock; }
adjusted_mode->flags = radeon_encoder->flags;
} }