From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhenyu Wang Subject: [PATCH 2/7 resend] drm/i915: Configure dither for eDP Date: Sat, 12 Jun 2010 14:32:22 +0800 Message-ID: <1276324347-15668-3-git-send-email-zhenyuw@linux.intel.com> References: <1276324347-15668-1-git-send-email-zhenyuw@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 31B109E910 for ; Fri, 11 Jun 2010 23:32:35 -0700 (PDT) In-Reply-To: <1276324347-15668-1-git-send-email-zhenyuw@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: eric@anholt.net Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Zhao Yakui 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 Tested-by: Jan-Hendrik Zab Signed-off-by: Zhenyu Wang --- 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