Commit fb2420b7 authored by Lyude Paul's avatar Lyude Paul

drm/nouveau/kms/nv50-: Fix disabling dithering

While we expose the ability to turn off hardware dithering for nouveau,
we actually make the mistake of turning it on anyway, due to
dithering_depth containing a non-zero value if our dithering depth isn't
also set to 6 bpc.

So, fix it by never enabling dithering when it's disabled.
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Reviewed-by: default avatarBen Skeggs <bskeggs@redhat.com>
Acked-by: default avatarDave Airlie <airlied@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-6-lyude@redhat.com
parent 9c8e9b79
...@@ -84,18 +84,20 @@ nv50_head_atomic_check_dither(struct nv50_head_atom *armh, ...@@ -84,18 +84,20 @@ nv50_head_atomic_check_dither(struct nv50_head_atom *armh,
{ {
u32 mode = 0x00; u32 mode = 0x00;
if (asyc->dither.mode == DITHERING_MODE_AUTO) { if (asyc->dither.mode) {
if (asyh->base.depth > asyh->or.bpc * 3) if (asyc->dither.mode == DITHERING_MODE_AUTO) {
mode = DITHERING_MODE_DYNAMIC2X2; if (asyh->base.depth > asyh->or.bpc * 3)
} else { mode = DITHERING_MODE_DYNAMIC2X2;
mode = asyc->dither.mode; } else {
} mode = asyc->dither.mode;
}
if (asyc->dither.depth == DITHERING_DEPTH_AUTO) { if (asyc->dither.depth == DITHERING_DEPTH_AUTO) {
if (asyh->or.bpc >= 8) if (asyh->or.bpc >= 8)
mode |= DITHERING_DEPTH_8BPC; mode |= DITHERING_DEPTH_8BPC;
} else { } else {
mode |= asyc->dither.depth; mode |= asyc->dither.depth;
}
} }
asyh->dither.enable = mode; asyh->dither.enable = mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment