All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: eric@anholt.net
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/7 resend] drm/i915: Configure dither for eDP
Date: Sat, 12 Jun 2010 14:32:22 +0800	[thread overview]
Message-ID: <1276324347-15668-3-git-send-email-zhenyuw@linux.intel.com> (raw)
In-Reply-To: <1276324347-15668-1-git-send-email-zhenyuw@linux.intel.com>

From: Zhao Yakui <yakui.zhao@intel.com>

The non-8 BPC can be used for the eDP output device that is
connected through DP-A or DP-D on PCH. In such case we should
set the PIPECONF dither correctly.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Jan-Hendrik Zab <jan@jhz.name>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 7ffd51c..c757019 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3627,6 +3627,18 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
 	/* setup pipeconf */
 	pipeconf = I915_READ(pipeconf_reg);
 
+	/* configure the dither for eDP */
+	if (HAS_PCH_SPLIT(dev) &&
+	    (is_edp || (is_dp && intel_pch_has_edp(crtc)))) {
+		pipeconf &= ~PIPE_DITHER_TYPE_MASK;
+		if ((pipeconf & PIPE_BPC_MASK) != PIPE_8BPC) {
+			pipeconf |= PIPE_ENABLE_DITHER;
+			pipeconf |= PIPE_DITHER_TYPE_ST01;
+		} else {
+			pipeconf &= ~PIPE_ENABLE_DITHER;
+		}
+	}
+
 	/* Set up the display plane register */
 	dspcntr = DISPPLANE_GAMMA_ENABLE;
 
-- 
1.7.0.4

  parent reply	other threads:[~2010-06-12  6:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-12  6:32 patches on my 'for-anholt' branch Zhenyu Wang
2010-06-12  6:32 ` [PATCH 1/7 resend] drm/i915: Add the support of eDP on DP-D for Ibex/CPT Zhenyu Wang
2010-06-12  8:28   ` Chris Wilson
2010-06-13  1:06     ` ykzhao
2010-06-14  8:21       ` Florian Mickler
2010-06-14 14:28     ` Adam Jackson
2010-06-16 14:19       ` Zhenyu Wang
2010-06-17  1:11       ` ykzhao
2010-06-15  1:19   ` Eric Anholt
2010-06-16 14:26     ` Zhenyu Wang
2010-06-12  6:32 ` Zhenyu Wang [this message]
2010-06-15  1:21   ` [PATCH 2/7 resend] drm/i915: Configure dither for eDP Eric Anholt
2010-07-06  7:12   ` Eric Anholt
2010-06-12  6:32 ` [PATCH 3/7] drm/i915: Fix watermark calculation in self-refresh mode Zhenyu Wang
2010-06-12  6:32 ` [PATCH 4/7] drm/i915: Fix fifo size for self-refresh watermark on 965G Zhenyu Wang
2010-06-12  6:32 ` [PATCH 5/7] drm/i915: Apply self-refresh watermark calculation for cursor plane Zhenyu Wang
2010-06-12  6:32 ` [PATCH 6/7] drm/i915: Calculate cursor watermark under non-SR state for Ironlake Zhenyu Wang
2010-06-12  6:32 ` [PATCH 7/7] drm/i915: Add frame buffer compression support on Ironlake mobile Zhenyu Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1276324347-15668-3-git-send-email-zhenyuw@linux.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=eric@anholt.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.