From patchwork Tue Jun 1 08:35:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 103414 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o518Zvlu009088 for ; Tue, 1 Jun 2010 08:36:33 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C562C9E9AF for ; Tue, 1 Jun 2010 01:35:57 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fmsmga101.fm.intel.com (mga05.intel.com [192.55.52.89]) by gabe.freedesktop.org (Postfix) with ESMTP id F2E269E889 for ; Tue, 1 Jun 2010 01:35:49 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 01 Jun 2010 01:32:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.53,339,1272870000"; d="scan'208";a="572207817" Received: from ubuntu-hp.sh.intel.com (HELO localhost.localdomain) ([10.239.36.149]) by fmsmga002.fm.intel.com with ESMTP; 01 Jun 2010 01:34:40 -0700 From: Zhenyu Wang To: eric@anholt.net Date: Tue, 1 Jun 2010 16:35:45 +0800 Message-Id: <1275381345-18900-1-git-send-email-zhenyuw@linux.intel.com> X-Mailer: git-send-email 1.7.0.4 Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] drm/i915: Configure dither for eDP X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 01 Jun 2010 08:36:33 +0000 (UTC) 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;