mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-04 23:38:02 +02:00
nv50: add update flag to set_dither()
This commit is contained in:
parent
aeae747a69
commit
d6f6108ad0
3 changed files with 6 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue