From patchwork Thu May 9 17:08:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 2544791 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 9F94BDF24C for ; Thu, 9 May 2013 17:10:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 79421E646F for ; Thu, 9 May 2013 10:10:25 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ye0-f180.google.com (mail-ye0-f180.google.com [209.85.213.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 07714E5C6B for ; Thu, 9 May 2013 10:10:14 -0700 (PDT) Received: by mail-ye0-f180.google.com with SMTP id q11so718214yen.11 for ; Thu, 09 May 2013 10:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=SN4EMAII0r0J7o3P+Ipic2WJLDfIdyMX90yzeDuPz+s=; b=orFVcscWpxZ+yRJpmvV4VGojWhG9AQJFLTk2oQf9b+Qz3xcADhs2UU8WboZmP3rRIY wXTPUq0wD9CuCqozXWVgoCg0XRftP6h/QuYdS5aCE21N02w0t2idk4ly4yadvuy7mhcP g8L88RGVHvU4udAgw4b1vqZpdQMVqgOIEmbA5AjCUrtCUwOCkzGwm4zwdq1GzWB1oMQN TJqJGY2s3TLJhlgvDZSQCwgfOHVr5KLWcGJ53TbA41/zBPrjEvdKSZkApA1sn92rCI+F SiVqxl0bccnUp1/P/ACy8MmTZzLmBW5BFlK48LWB8E1CvtRrtHjHF1kmiu80E69vW5Oo l7HA== X-Received: by 10.236.85.101 with SMTP id t65mr9437553yhe.71.1368119414465; Thu, 09 May 2013 10:10:14 -0700 (PDT) Received: from localhost.localdomain (200.188.217.18.dedicated.neoviatelecom.com.br. [200.188.217.18]) by mx.google.com with ESMTPSA id f71sm5109926yha.8.2013.05.09.10.09.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 09 May 2013 10:10:14 -0700 (PDT) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Thu, 9 May 2013 14:08:38 -0300 Message-Id: <1368119318-3464-1-git-send-email-rodrigo.vivi@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <20130508095940.GF14974@intel.com> References: <20130508095940.GF14974@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: IVB FBC WaFbcDisableDpfcClockGating X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Display register 42020h bit 9 must be set to 1b for the entire time that Frame Buffer Compression is enabled. v2: RMW to preserve other bits (by Ville) v3: Fix from Ville: sed &/| at RMW v4: Too far on sed. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_pm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 4661f9f..ea3910c 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -242,6 +242,12 @@ static void ironlake_disable_fbc(struct drm_device *dev) dpfc_ctl &= ~DPFC_CTL_EN; I915_WRITE(ILK_DPFC_CONTROL, dpfc_ctl); + if (IS_IVYBRIDGE(dev)) + /* WaFbcDisableDpfcClockGating */ + I915_WRITE(ILK_DSPCLK_GATE_D, + I915_READ(ILK_DSPCLK_GATE_D) & + ~ILK_DPFCUNIT_CLOCK_GATE_DISABLE); + DRM_DEBUG_KMS("disabled FBC\n"); } } @@ -270,6 +276,11 @@ static void gen7_enable_fbc(struct drm_crtc *crtc, unsigned long interval) /* WaFbcAsynchFlipDisableFbcQueue */ I915_WRITE(ILK_DISPLAY_CHICKEN1, ILK_FBCQ_DIS); + /* WaFbcDisableDpfcClockGating */ + I915_WRITE(ILK_DSPCLK_GATE_D, + I915_READ(ILK_DSPCLK_GATE_D) | + ILK_DPFCUNIT_CLOCK_GATE_DISABLE); + I915_WRITE(SNB_DPFC_CTL_SA, SNB_CPU_FENCE_ENABLE | obj->fence_reg); I915_WRITE(DPFC_CPU_FENCE_OFFSET, crtc->y);