From patchwork Wed Nov 11 16:41:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ander Conselvan de Oliveira X-Patchwork-Id: 7596731 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2333A9F2F7 for ; Wed, 11 Nov 2015 16:42:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 432D6205EB for ; Wed, 11 Nov 2015 16:42:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 514ED205E6 for ; Wed, 11 Nov 2015 16:42:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AB2D272108; Wed, 11 Nov 2015 08:42:20 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id CEBDA72108 for ; Wed, 11 Nov 2015 08:42:18 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 11 Nov 2015 08:41:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,276,1444719600"; d="scan'208";a="817330425" Received: from linux.intel.com ([10.23.219.25]) by orsmga001.jf.intel.com with ESMTP; 11 Nov 2015 08:41:56 -0800 Received: from localhost (aconselv-mobl3.fi.intel.com [10.237.66.39]) by linux.intel.com (Postfix) with ESMTP id B10266A4005; Wed, 11 Nov 2015 08:40:50 -0800 (PST) From: Ander Conselvan de Oliveira To: intel-gfx@lists.freedesktop.org Date: Wed, 11 Nov 2015 18:41:54 +0200 Message-Id: <1447260114-5642-1-git-send-email-ander.conselvan.de.oliveira@intel.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <87y4e4hb1q.fsf@intel.com> References: <87y4e4hb1q.fsf@intel.com> Cc: Ander Conselvan de Oliveira Subject: [Intel-gfx] [PATCH] drm/i915: Clear DDI pll selection in intel_crtc_compute_config() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Clear the pipe's dpll_hw_state when choosing the PLL for CRT on DDI platforms. Otherwise stale values might cause the state checker to complain. Should fix errors like below: [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.wrpll Cc: Gabriel Feceoru Cc: Daniel Vetter Cc: Jani Nikula Signed-off-by: Ander Conselvan de Oliveira --- *Completely untested* drivers/gpu/drm/i915/intel_crt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index b84aaa0..ad099f3 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -278,6 +278,9 @@ static bool intel_crt_compute_config(struct intel_encoder *encoder, /* FDI must always be 2.7 GHz */ if (HAS_DDI(dev)) { + memset(&pipe_config->dpll_hw_state, 0, + sizeof(pipe_config->dpll_hw_state)); + pipe_config->ddi_pll_sel = PORT_CLK_SEL_SPLL; pipe_config->port_clock = 135000 * 2; }