aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_display.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-11-12 14:55:14 -0500
committerDave Airlie <airlied@redhat.com>2009-12-01 20:36:43 -0500
commit80297e87bc9728a6ce559063fc4c117eba1f955a (patch)
treef68e1cf3628cf547cf58808c7506824e0000596a /drivers/gpu/drm/radeon/radeon_display.c
parentfe6890c3e8019cf1cebce60a86c19180359d3292 (diff)
drm/radeon/kms: rework scaler handling
Keep requested scaler type in radeon_encoder and the actual scaler type used in radeon_crtc. This prevents us from enabling the scaler when it's not required (i.e., the requested mode is the native mode). Also, always set the adjusted mode equal to the native mode for lvds. Should fix: https://bugzilla.redhat.com/show_bug.cgi?id=522271 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Acked-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_display.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 8b117e82e5e9..5859109f924d 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -750,9 +750,17 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
750 if (encoder->crtc != crtc) 750 if (encoder->crtc != crtc)
751 continue; 751 continue;
752 if (first) { 752 if (first) {
753 radeon_crtc->rmx_type = radeon_encoder->rmx_type; 753 /* set scaling */
754 if (radeon_encoder->rmx_type == RMX_OFF)
755 radeon_crtc->rmx_type = RMX_OFF;
756 else if (mode->hdisplay < radeon_encoder->native_mode.hdisplay ||
757 mode->vdisplay < radeon_encoder->native_mode.vdisplay)
758 radeon_crtc->rmx_type = radeon_encoder->rmx_type;
759 else
760 radeon_crtc->rmx_type = RMX_OFF;
761 /* copy native mode */
754 memcpy(&radeon_crtc->native_mode, 762 memcpy(&radeon_crtc->native_mode,
755 &radeon_encoder->native_mode, 763 &radeon_encoder->native_mode,
756 sizeof(struct drm_display_mode)); 764 sizeof(struct drm_display_mode));
757 first = false; 765 first = false;
758 } else { 766 } else {