drm/radeon/kms: fix legacy rmx
authorAlex Deucher <alexdeucher@gmail.com>
Thu, 17 Dec 2009 06:24:59 +0000 (01:24 -0500)
committerDave Airlie <airlied@redhat.com>
Wed, 23 Dec 2009 01:14:03 +0000 (11:14 +1000)
This makes 640x480 on my R100 work again, both
in aspect and centered mode.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Tested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_encoders.c
drivers/gpu/drm/radeon/radeon_legacy_crtc.c
drivers/gpu/drm/radeon/radeon_legacy_encoders.c

index 547fe10..ccba95f 100644 (file)
@@ -233,6 +233,8 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
                if (!ASIC_IS_AVIVO(rdev)) {
                        adjusted_mode->hdisplay = mode->hdisplay;
                        adjusted_mode->vdisplay = mode->vdisplay;
+                       adjusted_mode->crtc_hdisplay = mode->hdisplay;
+                       adjusted_mode->crtc_vdisplay = mode->vdisplay;
                }
                adjusted_mode->base.id = mode_id;
        }
index b82ede9..cc27485 100644 (file)
@@ -43,8 +43,7 @@ static void radeon_overscan_setup(struct drm_crtc *crtc,
 }
 
 static void radeon_legacy_rmx_mode_set(struct drm_crtc *crtc,
-                                      struct drm_display_mode *mode,
-                                      struct drm_display_mode *adjusted_mode)
+                                      struct drm_display_mode *mode)
 {
        struct drm_device *dev = crtc->dev;
        struct radeon_device *rdev = dev->dev_private;
@@ -1059,7 +1058,7 @@ static int radeon_crtc_mode_set(struct drm_crtc *crtc,
        radeon_set_pll(crtc, adjusted_mode);
        radeon_overscan_setup(crtc, adjusted_mode);
        if (radeon_crtc->crtc_id == 0) {
-               radeon_legacy_rmx_mode_set(crtc, mode, adjusted_mode);
+               radeon_legacy_rmx_mode_set(crtc, adjusted_mode);
        } else {
                if (radeon_crtc->rmx_type != RMX_OFF) {
                        /* FIXME: only first crtc has rmx what should we
index df00515..981508f 100644 (file)
@@ -207,6 +207,8 @@ static bool radeon_legacy_mode_fixup(struct drm_encoder *encoder,
                *adjusted_mode = *native_mode;
                adjusted_mode->hdisplay = mode->hdisplay;
                adjusted_mode->vdisplay = mode->vdisplay;
+               adjusted_mode->crtc_hdisplay = mode->hdisplay;
+               adjusted_mode->crtc_vdisplay = mode->vdisplay;
                adjusted_mode->base.id = mode_id;
        }