summaryrefslogtreecommitdiff
path: root/linux-core/nv50_crtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/nv50_crtc.c')
-rw-r--r--linux-core/nv50_crtc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/linux-core/nv50_crtc.c b/linux-core/nv50_crtc.c
index 6c3d404f..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;
@@ -264,7 +264,7 @@ static int nv50_crtc_set_scale(struct nv50_crtc *crtc)
outY = crtc->native_mode->vdisplay;
break;
case SCALE_NOSCALE:
- case SCALE_PANEL:
+ case SCALE_NON_GPU:
default:
outX = crtc->mode->hdisplay;
outY = crtc->mode->vdisplay;
@@ -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;