Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
amdgpu driver, question about temporal dithering.
I'm inquiring about the amdgpu driver and temporal dithering. Let me
give you a quick overview of the relevant parts of my setup.
Monitor: BenQ GW2760HS (27" VA panel, native 8-bit, no FRC) connected
via DVI
OS: Debian 8.x Jessie, also use Ubuntu MATE 16.04
It seems when using the above setup, despite the monitor being 8-bit I
notice on dark grey and gradient images that the pixels are unstable and
are "moving" with vertical banding, a telltale sign of dithering in my
I know there is supposedly a way to disable dithering on the older fglrx
driver. Unfortunately as fglrx doesn't work with the new Xorg ABI which
newer Linux distributions use I am unable to test it.
I cloned the kernel source from this repository and edited some of the
dce_* files under drivers/gpu/drm/amd/amdgpu where it appears there are
case statements that control the dithering done by the GPU (just an
educated case), so said case statements do nothing instead of setting
dithering registers and managed to recompile the kernel. Unfortunately
that didn't seem to disable the temporal dithering so either I've
patched the wrong functions for my GPU or something else. Frankly I
wonder if AMD cards dither by default independent of the running
graphics driver as I think I saw the dithering when I was running Ubuntu
MATE on their grey colored boot screen (Plymouth).
I'll try and a get a microscope and/or hand lens to try and see the LCD
subpixels later.
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -467,28 +467,6 @@ static void dce_v6_0_program_fmt(struct drm_encoder
switch (bpc) {
- case 6:
- /* XXX sort out optimal dither settings */
- tmp |=
- else
- break;
/* not needed */
My next goal is to figure out how to do live kernel debugging with
another physical computer to see what functions are being hit in regards
to dithering and color depth (as I could have edited a function that's
not called in the case of the R9 270X I have).
I'm actually working on a similar project with Macbook Pro's, OSX and
dithering. I have 2x 2015 Macbook Pro's and are working on reverse
engineering the AMD driver KEXT'S to try and disable dithering on OSX as
it almost always happens with an external display. I have live debugging
setup with lldb over a LAN with one computer being the host and another
being the target, seems like that's not trivial to do under Linux.
I know the motherboard inside my desktop has several COM port headers so
I might be able to do kernel debugging of the GPU driver with the serial
port and another computer. Something to look into.
As for why I am doing this. First of all I am a photographer (one of
many hobbies) and like having accurate colors in my workflow, second of
all I used to get bad headaches from certain visual stimuli due to
nervous system issues. To keep a long story short I've largely gotten
that taken care of but I'm working on disabling dithering to ensure it's
not something contributing to eye fatiguing. Third of all, it's been an
interesting challenge for myself.
Many thanks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment