From patchwork Fri Nov 10 13:31:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kahola X-Patchwork-Id: 10053161 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 64B726032D for ; Fri, 10 Nov 2017 13:29:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5063C2B00B for ; Fri, 10 Nov 2017 13:29:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 449E52B011; Fri, 10 Nov 2017 13:29:30 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 B79062B00B for ; Fri, 10 Nov 2017 13:29:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ECFFA6EA75; Fri, 10 Nov 2017 13:29:28 +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 8F7116EA75 for ; Fri, 10 Nov 2017 13:29:27 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Nov 2017 05:29:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.44,374,1505804400"; d="scan'208"; a="1242487981" Received: from sorvi.fi.intel.com ([10.237.72.154]) by fmsmga002.fm.intel.com with ESMTP; 10 Nov 2017 05:29:26 -0800 From: Mika Kahola To: intel-gfx@lists.freedesktop.org Date: Fri, 10 Nov 2017 15:31:54 +0200 Message-Id: <1510320714-19904-1-git-send-email-mika.kahola@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [Intel-gfx] [PATCH] drm/i915: Initialize audio only when display is present 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 At least in Coffee Lake it happens that we start initiliazing audio when no display is connected. This was discovered by CI when running IGT test case drv_module_reload --r basic-no-display The issue here is that the 'intel_device_info_runtime_init()' sets num_pipes to 0 but before this happens the audio part has already started to initialize itself. Later on the num_pipes is updated to 0 in intel_device_info_runtime_init() and we hit that when audio part is digging out ELD. This causes a warning in dmesg. To fix this issue, let's register the audio driver only in a case when display is enabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103206 Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index e7e9e06..f3cee1b 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1243,7 +1243,8 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) if (IS_GEN5(dev_priv)) intel_gpu_ips_init(dev_priv); - intel_audio_init(dev_priv); + if (!i915_modparams.disable_display) + intel_audio_init(dev_priv); /* * Some ports require correctly set-up hpd registers for detection to