From patchwork Tue Feb 2 17:54:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramalingam C X-Patchwork-Id: 8192701 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 659769F3CD for ; Tue, 2 Feb 2016 18:03:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A4452022D for ; Tue, 2 Feb 2016 18:03:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9D4ED202D1 for ; Tue, 2 Feb 2016 18:03:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05D136E307; Tue, 2 Feb 2016 10:03:18 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id E4D386E307 for ; Tue, 2 Feb 2016 10:03:16 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 02 Feb 2016 10:02:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,385,1449561600"; d="scan'208";a="41172310" Received: from ramaling-desktop.iind.intel.com ([10.223.26.95]) by fmsmga004.fm.intel.com with ESMTP; 02 Feb 2016 10:02:03 -0800 From: Ramalingam C To: intel-gfx@lists.freedesktop.org Date: Tue, 2 Feb 2016 23:24:17 +0530 Message-Id: <1454435657-29027-2-git-send-email-ramalingam.c@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1454435657-29027-1-git-send-email-ramalingam.c@intel.com> References: <1454435657-29027-1-git-send-email-ramalingam.c@intel.com> Cc: jani.nikula@intel.com Subject: [Intel-gfx] [PATCH 2/2] drm/i915/dsi: Add audio reference in dsi encoder 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.6 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 From: "Kumar, Mahesh" We are re-using Mipi encoder enabled by GOP driver, but not incrementing reference count for Audio Power domain, so audio was not working. This patch increments the reference count during DSI init and Adds get/put in DSI enable/disable functions as well so audio power domain will be on when mipi is in use. Signed-off-by: Kumar, Mahesh Signed-off-by: Uma Shankar Signed-off-by: Ramalingam C --- drivers/gpu/drm/i915/intel_dsi.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index 91cef35..8b43ef6 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c @@ -461,6 +461,9 @@ static void intel_dsi_enable(struct intel_encoder *encoder) intel_dsi_port_enable(encoder); } + intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO); + intel_audio_codec_enable(encoder); + intel_panel_enable_backlight(intel_dsi->attached_connector); } @@ -531,11 +534,16 @@ static void intel_dsi_enable_nop(struct intel_encoder *encoder) static void intel_dsi_pre_disable(struct intel_encoder *encoder) { + struct drm_device *dev = encoder->base.dev; + struct drm_i915_private *dev_priv = dev->dev_private; struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base); enum port port; DRM_DEBUG_KMS("\n"); + intel_audio_codec_disable(encoder); + intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO); + intel_panel_disable_backlight(intel_dsi->attached_connector); if (is_vid_mode(intel_dsi)) { @@ -1236,6 +1244,11 @@ void intel_dsi_init(struct drm_device *dev) intel_panel_init(&intel_connector->panel, fixed_mode, NULL); intel_panel_setup_backlight(connector, INVALID_PIPE); + /* Enable Audio Power to fix use-count state machine */ + port = (dev_priv->vbt.dsi.port == DVO_PORT_MIPIA) ? PORT_A : PORT_C; + if (I915_READ(BXT_MIPI_PORT_CTRL(port)) & DPI_ENABLE) + intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO); + return; err: