All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Use spatio-temporal dithering on PCH
@ 2010-04-19 19:57 Adam Jackson
  2010-05-05 17:52 ` Carl Worth
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Jackson @ 2010-04-19 19:57 UTC (permalink / raw)
  To: intel-gfx

Spatial dither is better than nothing, but ST is even better.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/i915_reg.h      |    5 ++++-
 drivers/gpu/drm/i915/intel_display.c |   10 ++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 527d30a..0bbbb77 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -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
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 58668c4..36ead0e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -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;
 			}
 		}
-- 
1.7.0.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Use spatio-temporal dithering on PCH
  2010-04-19 19:57 [PATCH] drm/i915: Use spatio-temporal dithering on PCH Adam Jackson
@ 2010-05-05 17:52 ` Carl Worth
  2010-05-05 18:34   ` Adam Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Carl Worth @ 2010-05-05 17:52 UTC (permalink / raw)
  To: Adam Jackson, intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 534 bytes --]

On Mon, 19 Apr 2010 15:57:25 -0400, Adam Jackson <ajax@redhat.com> wrote:
> 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

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Use spatio-temporal dithering on PCH
  2010-05-05 17:52 ` Carl Worth
@ 2010-05-05 18:34   ` Adam Jackson
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Jackson @ 2010-05-05 18:34 UTC (permalink / raw)
  To: Carl Worth; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 1210 bytes --]

On Wed, 2010-05-05 at 10:52 -0700, Carl Worth wrote:

> 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

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-05 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-19 19:57 [PATCH] drm/i915: Use spatio-temporal dithering on PCH Adam Jackson
2010-05-05 17:52 ` Carl Worth
2010-05-05 18:34   ` Adam Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.