From patchwork Fri Mar 7 16:57:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 3793531 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BF8FA9F4BD for ; Fri, 7 Mar 2014 16:58:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 044C2202F0 for ; Fri, 7 Mar 2014 16:58:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3CBF42028D for ; Fri, 7 Mar 2014 16:58:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA06AFB5B3; Fri, 7 Mar 2014 08:58:14 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from oproxy9-pub.mail.unifiedlayer.com (oproxy9-pub.mail.unifiedlayer.com [69.89.24.6]) by gabe.freedesktop.org (Postfix) with SMTP id 12A6AFB5B4 for ; Fri, 7 Mar 2014 08:58:06 -0800 (PST) Received: (qmail 22723 invoked by uid 0); 7 Mar 2014 16:58:05 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by oproxy9.mail.unifiedlayer.com with SMTP; 7 Mar 2014 16:58:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From; bh=h4+PXBn9+P7F6LkDFSA+lQMF9pF1s0Ra7JYX6IPZhqU=; b=i+/U2DSLuleBaHb/4EbjrXf9RfjXvhKERAQ3rcOFP2r4VjclXCofe/CgyFkUOKrsyy/hPo9d597ijE/3yz3TMEcbs+QC4vI6eeRY1+TlTbh1j1RC8vhi+gnxo4ttApkI; Received: from [67.161.37.189] (port=56315 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (UNKNOWN:CAMELLIA256-SHA:256) (Exim 4.80) (envelope-from ) id 1WLy61-00067W-JW for intel-gfx@lists.freedesktop.org; Fri, 07 Mar 2014 09:58:05 -0700 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Fri, 7 Mar 2014 08:57:52 -0800 Message-Id: <1394211475-2646-5-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1394211475-2646-1-git-send-email-jbarnes@virtuousgeek.org> References: <1394211475-2646-1-git-send-email-jbarnes@virtuousgeek.org> MIME-Version: 1.0 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Subject: [Intel-gfx] [PATCH 5/8] drm/i915: preserve SSC if previously set 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@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some machines may have a broken VBT or no VBT at all, but we still want to use SSC there. So check for it and keep it enabled if we see it already on. Based on an earlier fix from Kristian. Reported-by: Kristian Høgsberg Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 479de3b..d450ab6 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5806,6 +5806,10 @@ static void ironlake_init_pch_refclk(struct drm_device *dev) */ val = I915_READ(PCH_DREF_CONTROL); + /* Preserve SSC if the BIOS set it */ + if (val & DREF_SSC1_ENABLE) + i915.panel_use_ssc = 1; + /* As we must carefully and slowly disable/enable each source in turn, * compute the final state we want first and check if we need to * make any changes at all.