From patchwork Sat Apr 1 02:38:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Quanxian" X-Patchwork-Id: 9657457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 309D960351 for ; Sat, 1 Apr 2017 02:39:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20E4428643 for ; Sat, 1 Apr 2017 02:39:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15C73286A2; Sat, 1 Apr 2017 02:39:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E1E8928643 for ; Sat, 1 Apr 2017 02:39:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 465866EAE1; Sat, 1 Apr 2017 02:39:04 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id B22756EB02 for ; Sat, 1 Apr 2017 02:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491014342; x=1522550342; h=from:to:cc:subject:date:message-id; bh=juRiO/gBnHtxIIGdtDTHMkv536qjmlXiC3zRrQq0PZc=; b=GMduK49Ehoq2SBmxv+uY3FmSD5BxG6vbnGrfu/8L6fubJpIxg/tJry6M nGZXjNJz4lCfEbPqjYInAVAIL7reiA==; Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Mar 2017 19:39:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,255,1486454400"; d="scan'208";a="950426612" Received: from quanxian-devel.bj.intel.com ([10.238.158.90]) by orsmga003.jf.intel.com with ESMTP; 31 Mar 2017 19:39:01 -0700 From: Quanxian Wang To: intel-gfx@lists.freedesktop.org Date: Sat, 1 Apr 2017 10:38:01 +0800 Message-Id: <1491014281-18853-1-git-send-email-quanxian.wang@intel.com> X-Mailer: git-send-email 2.5.0 Subject: [Intel-gfx] [PATCH] drm/i915/audio: not to set N/M value manually for KBL. 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-Virus-Scanned: ClamAV using ClamSMTP It doesn't work on KBL. Just using automatic N/M. According to the bspec, when set N/M, should disable and enable transcoder which attaching DP audio. but there is no such code to do that. without this implementation except KBL platforms, seems work well. Signed-off-by: Quanxian Wang Tested-By: Wang Zhijun Tested-By: Cui Yueping --- drivers/gpu/drm/i915/intel_audio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 52c207e..0542031 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -300,7 +300,7 @@ hsw_dp_audio_config_update(struct intel_crtc *intel_crtc, enum port port, tmp &= ~AUD_CONFIG_N_PROG_ENABLE; tmp |= AUD_CONFIG_N_VALUE_INDEX; - if (nm) { + if (!IS_KABYLAKE(dev_priv) && nm) { tmp &= ~AUD_CONFIG_N_MASK; tmp |= AUD_CONFIG_N(nm->n); tmp |= AUD_CONFIG_N_PROG_ENABLE; @@ -308,6 +308,9 @@ hsw_dp_audio_config_update(struct intel_crtc *intel_crtc, enum port port, I915_WRITE(HSW_AUD_CFG(pipe), tmp); + if (IS_KABYLAKE(dev_priv)) + return; + tmp = I915_READ(HSW_AUD_M_CTS_ENABLE(pipe)); tmp &= ~AUD_CONFIG_M_MASK; tmp &= ~AUD_M_CTS_M_VALUE_INDEX;