From patchwork Thu Jun 8 11:50:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Peres X-Patchwork-Id: 9774453 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 6DE3A60350 for ; Thu, 8 Jun 2017 11:50:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DBEF284F6 for ; Thu, 8 Jun 2017 11:50:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5242F2851F; Thu, 8 Jun 2017 11:50:38 +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 D5BBA284F6 for ; Thu, 8 Jun 2017 11:50:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DDF96E396; Thu, 8 Jun 2017 11:50:35 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B0646E396 for ; Thu, 8 Jun 2017 11:50:34 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jun 2017 04:50:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,314,1493708400"; d="scan'208";a="978302915" Received: from linux.intel.com ([10.54.29.200]) by orsmga003.jf.intel.com with ESMTP; 08 Jun 2017 04:50:33 -0700 Received: from mperes_DESK.fi.intel.com (mperes_desk.fi.intel.com [10.237.72.154]) by linux.intel.com (Postfix) with ESMTP id 598515803A4; Thu, 8 Jun 2017 04:50:32 -0700 (PDT) From: Martin Peres To: intel-gfx@lists.freedesktop.org Date: Thu, 8 Jun 2017 14:50:29 +0300 Message-Id: <20170608115029.25710-1-martin.peres@linux.intel.com> X-Mailer: git-send-email 2.13.1 Subject: [Intel-gfx] [PATCH] NOTFORUPSTREAM sound/hda: add debug information in call_hp_automute 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 I would like to send this patch to the core-for-CI branch, in order to verify the theory I exposed in fdo#101246. This patch also hides a potentially serious bug in the sound/hda driver, which may improve our chances of not being affected by bugs there. It may actually also fix some of the incompletes we see. This patch introduces a new keyword (INTEL-GFX-CI-WARN) that IGT can pick up on in order to report a dmesg-warn. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101246 --- sound/pci/hda/hda_generic.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 557ecfcad158..a59f13d2ea45 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -4471,7 +4471,19 @@ EXPORT_SYMBOL_GPL(snd_hda_gen_mic_autoswitch); static void call_hp_automute(struct hda_codec *codec, struct hda_jack_callback *jack) { - struct hda_gen_spec *spec = codec->spec; + struct hda_gen_spec *spec; + + if (!codec) { + printk("INTEL-GFX-CI-WARN: call_hp_automute called with codec == NULL"); + return; + } + + spec = codec->spec; + if (!spec) { + printk("INTEL-GFX-CI-WARN: call_hp_automute called with codec->spec == NULL"); + return; + } + if (spec->hp_automute_hook) spec->hp_automute_hook(codec, jack); else