summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2009-03-11 22:48:34 +1000
committerBen Skeggs <bskeggs@redhat.com>2009-03-11 22:48:34 +1000
commitd6f6108ad0be7e3d0159341e7d5addca6062c61e (patch)
tree716ed72c1e32c314a475f0860aad3bd61c46b68e
parentaeae747a69334d990b47afe878ca783c5308a1d1 (diff)
nv50: add update flag to set_dither()
-rw-r--r--linux-core/nouveau_crtc.h2
-rw-r--r--linux-core/nv50_connector.c5
-rw-r--r--linux-core/nv50_crtc.c6
3 files changed, 6 insertions, 7 deletions
diff --git a/linux-core/nouveau_crtc.h b/linux-core/nouveau_crtc.h
index c65994f0..53b95840 100644
--- a/linux-core/nouveau_crtc.h
+++ b/linux-core/nouveau_crtc.h
@@ -51,7 +51,7 @@ struct nouveau_crtc {
int depth;
} lut;
- int (*set_dither) (struct nouveau_crtc *crtc);
+ int (*set_dither) (struct nouveau_crtc *crtc, bool update);
int (*set_scale) (struct nouveau_crtc *crtc, int mode, bool update);
int (*set_clock) (struct nouveau_crtc *crtc, struct drm_display_mode *);
int (*set_clock_mode) (struct nouveau_crtc *crtc);
diff --git a/linux-core/nv50_connector.c b/linux-core/nv50_connector.c
index 2c6952b8..f70cb426 100644
--- a/linux-core/nv50_connector.c
+++ b/linux-core/nv50_connector.c
@@ -362,13 +362,10 @@ static int nv50_connector_set_property(struct drm_connector *drm_connector,
/* update hw state */
crtc->use_dithering = connector->use_dithering;
- rval = crtc->set_dither(crtc);
+ rval = crtc->set_dither(crtc, true);
if (rval)
return rval;
- /* process command buffer */
- OUT_MODE(NV50_UPDATE_DISPLAY, 0);
-
return 0;
}
diff --git a/linux-core/nv50_crtc.c b/linux-core/nv50_crtc.c
index 20045714..95b5fc96 100644
--- a/linux-core/nv50_crtc.c
+++ b/linux-core/nv50_crtc.c
@@ -130,7 +130,7 @@ nv50_crtc_blank(struct nouveau_crtc *crtc, bool blanked)
return 0;
}
-static int nv50_crtc_set_dither(struct nouveau_crtc *crtc)
+static int nv50_crtc_set_dither(struct nouveau_crtc *crtc, bool update)
{
struct drm_device *dev = crtc->base.dev;
uint32_t offset = crtc->index * 0x400;
@@ -140,6 +140,8 @@ static int nv50_crtc_set_dither(struct nouveau_crtc *crtc)
OUT_MODE(NV50_CRTC0_DITHERING_CTRL + offset, crtc->use_dithering ?
NV50_CRTC0_DITHERING_CTRL_ON : NV50_CRTC0_DITHERING_CTRL_OFF);
+ if (update)
+ OUT_MODE(NV50_UPDATE_DISPLAY, 0);
return 0;
}
@@ -663,7 +665,7 @@ nv50_crtc_mode_set(struct drm_crtc *drm_crtc, struct drm_display_mode *mode,
(vunk2b - 1) << 16 | (vunk2a - 1));
}
- crtc->set_dither(crtc);
+ crtc->set_dither(crtc, false);
/* This is the actual resolution of the mode. */
OUT_MODE(NV50_CRTC0_REAL_RES + offset,