From patchwork Mon Feb 1 13:57:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: durgadoss.r@intel.com X-Patchwork-Id: 8179521 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 24A779F4DD for ; Mon, 1 Feb 2016 13:24:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64C9B203C2 for ; Mon, 1 Feb 2016 13:24:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2AEDA20452 for ; Mon, 1 Feb 2016 13:24:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96FAD6E3C2; Mon, 1 Feb 2016 05:24:07 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C80B6E3C2 for ; Mon, 1 Feb 2016 05:24:06 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 01 Feb 2016 05:24:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,380,1449561600"; d="scan'208";a="645145607" Received: from dr3-desktop.iind.intel.com ([10.223.26.125]) by FMSMGA003.fm.intel.com with ESMTP; 01 Feb 2016 05:24:04 -0800 From: Durgadoss R To: intel-gfx@lists.freedesktop.org Date: Mon, 1 Feb 2016 19:27:52 +0530 Message-Id: <1454335073-20405-4-git-send-email-durgadoss.r@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454335073-20405-1-git-send-email-durgadoss.r@intel.com> References: <1454335073-20405-1-git-send-email-durgadoss.r@intel.com> Cc: ander.conselvan.de.oliveira@intel.com Subject: [Intel-gfx] [PATCHv2 3/4] drm/i915/dp: Use legacy get_crtc_encoder in non-atomic paths 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.7 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 This patch makes intel_crtc_get_new_crtc_encoder use get_crtc_encoder when called from non-atomic paths. This helps when intel_get_shared_dpll is called from non-atomic context. Signed-off-by: Durgadoss R --- drivers/gpu/drm/i915/intel_ddi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 1f9a368..3fb9a03 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -707,6 +707,9 @@ intel_ddi_get_crtc_new_encoder(struct intel_crtc_state *crtc_state) int i; state = crtc_state->base.state; + /* Use get_crtc_encoder() for non-atomic paths */ + if (!state) + return intel_ddi_get_crtc_encoder(crtc_state->base.crtc); for_each_connector_in_state(state, connector, connector_state, i) { if (connector_state->crtc != crtc_state->base.crtc)