summaryrefslogtreecommitdiff
path: root/linux-core/nv50_crtc.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2008-07-20 15:40:40 +0200
committerMaarten Maathuis <madman2003@gmail.com>2008-07-20 15:40:40 +0200
commit685bca02fe6b7406bb157a1a4e0f147b47ba28f8 (patch)
treeb43a7644a3c59f374c7a758e39078ad7620d0770 /linux-core/nv50_crtc.c
parente51cd78cac24df15e32e23d8db73614524e6ff0d (diff)
NV50: delay changing gpu<->non-gpu scaling modes until next modeset
Diffstat (limited to 'linux-core/nv50_crtc.c')
-rw-r--r--linux-core/nv50_crtc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/linux-core/nv50_crtc.c b/linux-core/nv50_crtc.c
index ffb976f4..c4ca7e76 100644
--- a/linux-core/nv50_crtc.c
+++ b/linux-core/nv50_crtc.c
@@ -255,7 +255,7 @@ static int nv50_crtc_set_scale(struct nv50_crtc *crtc)
NV50_DEBUG("\n");
- switch (crtc->scaling_mode) {
+ switch (crtc->requested_scaling_mode) {
case SCALE_ASPECT:
nv50_crtc_calc_scale(crtc, &outX, &outY);
break;
@@ -283,6 +283,9 @@ static int nv50_crtc_set_scale(struct nv50_crtc *crtc)
OUT_MODE(NV50_CRTC0_SCALE_RES1 + offset, outY << 16 | outX);
OUT_MODE(NV50_CRTC0_SCALE_RES2 + offset, outY << 16 | outX);
+ /* processed */
+ crtc->scaling_mode = crtc->requested_scaling_mode;
+
return 0;
}
@@ -492,6 +495,9 @@ int nv50_crtc_create(struct drm_device *dev, int index)
crtc->mode = kzalloc(sizeof(struct nouveau_hw_mode), GFP_KERNEL);
crtc->native_mode = kzalloc(sizeof(struct nouveau_hw_mode), GFP_KERNEL);
+ crtc->requested_scaling_mode = SCALE_INVALID;
+ crtc->scaling_mode = SCALE_INVALID;
+
if (!crtc->mode || !crtc->native_mode) {
rval = -ENOMEM;
goto out;