drm/i915: Use spatio-temporal dithering on PCH
Subsystems (2)
PATCH 1/1 drm/i915: Use spatio-temporal dithering on PCH
Spatial dither is better than nothing, but ST is even better.
--- drivers/gpu/drm/i915/i915_reg.h | 5 ++++- drivers/gpu/drm/i915/intel_display.c | 10 ++++++---- 2 files changed, 10 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +4 -1
@@ -1922,7 +1922,10 @@/* Display & cursor control */ /* dithering flag on Ironlake */ -#define PIPE_ENABLE_DITHER (1 << 4) +#define PIPE_ENABLE_DITHER (1 << 4) +#define PIPE_DITHER_TYPE_MASK (3 << 2) +#define PIPE_DITHER_TYPE_SPATIAL (0 << 2) +#define PIPE_DITHER_TYPE_ST01 (1 << 2)/* Pipe A */ #define PIPEADSL 0x70000#define PIPEACONF 0x70008
drivers/gpu/drm/i915/intel_display.c +6 -4
@@ -3676,14 +3676,16 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,/* set the dithering flag */ if (IS_I965G (dev)) {if (dev_priv->lvds_dither) { -if (HAS_PCH_SPLIT (dev)) +if (HAS_PCH_SPLIT (dev)) { pipeconf |=PIPE_ENABLE_DITHER ; -else + pipeconf |=PIPE_DITHER_TYPE_ST01 ; + }else lvds |=LVDS_ENABLE_DITHER ; }else { -if (HAS_PCH_SPLIT (dev)) +if (HAS_PCH_SPLIT (dev)) { pipeconf &= ~PIPE_ENABLE_DITHER ; -else + pipeconf &= ~PIPE_DITHER_TYPE_MASK ; + }else lvds &= ~LVDS_ENABLE_DITHER ; } }
Signature · 1 line
1.7.0.1
Quoted 1 line · Adam Jackson
Spatial dither is better than nothing, but ST is even better.
Hi Adam,
I'm going through the past couple weeks of traffic on the list looking for patches that haven't gotten picked up yet.
So I'd love to review one like this, but it would be easier if the commit message pointed me to something specific I could look at to see the difference.
So, do you have a little bit more in the way of details to help out someone as clueless as me?
Thanks,
-Carl
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Carl Worth
I'm going through the past couple weeks of traffic on the list looking for patches that haven't gotten picked up yet.
So I'd love to review one like this, but it would be easier if the commit message pointed me to something specific I could look at to see the difference.
So, do you have a little bit more in the way of details to help out someone as clueless as me?
I noticed this with:
http://ajax.fedorapeople.org/YellowFlower.jpg
set as my desktop background in Gnome on a 1280x800 machine (in particular, a Sony Vaio VPCB1 with 6-bit panel and a rather bright black level). Easiest way to test this is by poking at PIPEACONF with intel_reg_write directly:
% sudo intel_reg_write 0x70008 0xc0000040 # no dither % sudo intel_reg_write 0x70008 0xc0000050 # spatial % sudo intel_reg_write 0x70008 0xc0000054 # ST
I notice it especially strongly in the relatively flat dark area in the top left. Closer than about 18" I can see a noticeable checkerboard pattern with plain spatial dithering. ST smooths that out; I can still tell that it's lacking color precision, but it's not offensive.
- ajax
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx