diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-11-12 14:55:14 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-02 11:36:43 +1000 |
commit | 80297e87bc9728a6ce559063fc4c117eba1f955a (patch) | |
tree | f68e1cf3628cf547cf58808c7506824e0000596a /drivers/gpu/drm/radeon/radeon_display.c | |
parent | fe6890c3e8019cf1cebce60a86c19180359d3292 (diff) | |
download | lwn-80297e87bc9728a6ce559063fc4c117eba1f955a.tar.gz lwn-80297e87bc9728a6ce559063fc4c117eba1f955a.zip |
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.c | 12 |
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, if (encoder->crtc != crtc) continue; if (first) { - radeon_crtc->rmx_type = radeon_encoder->rmx_type; + /* set scaling */ + if (radeon_encoder->rmx_type == RMX_OFF) + radeon_crtc->rmx_type = RMX_OFF; + else if (mode->hdisplay < radeon_encoder->native_mode.hdisplay || + mode->vdisplay < radeon_encoder->native_mode.vdisplay) + radeon_crtc->rmx_type = radeon_encoder->rmx_type; + else + radeon_crtc->rmx_type = RMX_OFF; + /* copy native mode */ memcpy(&radeon_crtc->native_mode, - &radeon_encoder->native_mode, + &radeon_encoder->native_mode, sizeof(struct drm_display_mode)); first = false; } else { |