From patchwork Fri Nov 22 21:43:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11258503 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0241D6C1 for ; Fri, 22 Nov 2019 21:45:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8AD052071B for ; Fri, 22 Nov 2019 21:45:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="SGqYasiy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VTdEkhzC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AD052071B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 90125184E; Fri, 22 Nov 2019 22:45:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 90125184E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1574459153; bh=HdMx4evWri2Hy0Hvc3hcRX67HH+8rksH7Txl7wOCdsg=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SGqYasiyLPNiMtxQrsKMAT/MaCLhwmv7jCbmsNy526RsVcuGxJDtKn9gyomOlZ1v6 eReqeb187IhRzZby7gpHuwCgOYeQNO73OKfOMhcYZ87JiPkoZAXfT2lyaSNKMlDfKe YnqwFROvsFqiTw/V9O1n3yiD8ESPa1sbNrdFBDAg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 45399F800EE; Fri, 22 Nov 2019 22:44:13 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1CD0BF80157; Fri, 22 Nov 2019 22:44:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-yw1-xc44.google.com (mail-yw1-xc44.google.com [IPv6:2607:f8b0:4864:20::c44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 28264F800EE for ; Fri, 22 Nov 2019 22:44:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 28264F800EE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VTdEkhzC" Received: by mail-yw1-xc44.google.com with SMTP id j137so2926786ywa.12 for ; Fri, 22 Nov 2019 13:44:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UZRboScAMdXkhDOCeriWrHfA0G0p+X1/BFqys+kyJlU=; b=VTdEkhzC4UQ9S6hIdWvx8S31C6Mm0YAY4in/nMHUvmlXxVtvmPL0v/HcSrwsiUDn0S ge77QrX/9A5EgHx5w1HtyXhlOUsF6Bp8JHh54s9nAJiDdXSo4Q2p/tJx8CGAIn9lUNXl hhLXPtjmHmqYaZQ65LKVYV408a+0BZQYHFFB3Wj8AvGBgYrlL9xP77BBkMdR2Yk2+4+Z A4W+iwJXR8qUqCboRTYp9ZuPBWvEdiMR0nmyWdfhzLW1XFDgPEcQTnam17rG90PmqAS0 3M/bOXT8MHH8Ni7KESIPOXbtMpBstPnoDElMSJNH8NHgEcP9WdujgxwfTWJ3vG+9Ei+8 cekw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UZRboScAMdXkhDOCeriWrHfA0G0p+X1/BFqys+kyJlU=; b=CReZgbR70+1L1W9H4y5Bud/mw/5Y712UXZw1wYF2+T+9xO6vBTYXmz+P0ke5CjmBHj RwCuyWmjQSfzfzLuM+WhYwVvlHTv1eE7iZyEjAcSTKv1cG8ZODtiKjhx/T8uc2k1NSKL QU6bb48z+uAhMmyt/IQDizoNuaFhC943jSjnivjd5yMJFTXy2Weo1jRM4LegEPnBVn5q jBN5HQT415P6BT6SnZijTcnTqb978luoUzevcMgUAfoDE1Bo0Y5F4uH+1cUoohR0PB/a 4FfZykxk1ZO5ix2BZh5jzExwv1bHSWrssNu+wsNsLR6yBUgpgUAs3BwLPttwCt1zc4lp LsVA== X-Gm-Message-State: APjAAAX5DsPtgmPhFr0pyoFnTlJSDepQVoqI3aDQav1uwTYAvQ2cWCUY KuJcN5/Qaec9VIKNCuwyVys= X-Google-Smtp-Source: APXvYqzpCxqjhUm4FionawKDzm3lfMqwKucoMhLNTgXWLQtua41zahCcLox4aqQJwyxS19+SJ5OMXA== X-Received: by 2002:a81:a985:: with SMTP id g127mr3202791ywh.470.1574459042397; Fri, 22 Nov 2019 13:44:02 -0800 (PST) Received: from tr4.amd.com (atlvpn.amd.com. [165.204.84.11]) by smtp.gmail.com with ESMTPSA id t15sm2111522ywh.70.2019.11.22.13.44.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 13:44:01 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org, tiwai@suse.de Date: Fri, 22 Nov 2019 16:43:50 -0500 Message-Id: <20191122214353.582899-2-alexander.deucher@amd.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191122214353.582899-1-alexander.deucher@amd.com> References: <20191122214353.582899-1-alexander.deucher@amd.com> MIME-Version: 1.0 Cc: Alex Deucher , Evan Quan Subject: [alsa-devel] [PATCH 1/4] ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Only enable the vga_switcheroo logic on systems with the ATPX ACPI method. This logic is not needed for asics that are not part of a PX (PowerXpress)/HG (Hybrid Graphics) platform. Reviewed-by: Takashi Iwai Acked-by: Evan Quan Signed-off-by: Alex Deucher --- sound/pci/hda/hda_intel.c | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 240f4ca76391..3ebc7b2a897f 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -35,6 +35,7 @@ #include #include #include +#include #ifdef CONFIG_X86 /* for snoop control */ @@ -1393,6 +1394,34 @@ static int azx_dev_free(struct snd_device *device) } #ifdef SUPPORT_VGA_SWITCHEROO +#ifdef CONFIG_ACPI +/* ATPX is in the integrated GPU's namespace */ +static bool atpx_present(void) +{ + struct pci_dev *pdev = NULL; + acpi_handle dhandle, atpx_handle; + acpi_status status; + + while ((pdev = pci_get_class(PCI_BASE_CLASS_DISPLAY << 16, pdev)) != NULL) { + dhandle = ACPI_HANDLE(&pdev->dev); + if (dhandle) { + status = acpi_get_handle(dhandle, "ATPX", &atpx_handle); + if (!ACPI_FAILURE(status)) { + pci_dev_put(pdev); + return true; + } + } + pci_dev_put(pdev); + } + return false; +} +#else +static bool atpx_present(void) +{ + return false; +} +#endif + /* * Check of disabled HDMI controller by vga_switcheroo */ @@ -1404,6 +1433,22 @@ static struct pci_dev *get_bound_vga(struct pci_dev *pci) switch (pci->vendor) { case PCI_VENDOR_ID_ATI: case PCI_VENDOR_ID_AMD: + if (pci->devfn == 1) { + p = pci_get_domain_bus_and_slot(pci_domain_nr(pci->bus), + pci->bus->number, 0); + if (p) { + /* ATPX is in the integrated GPU's ACPI namespace + * rather than the dGPU's namespace. However, + * the dGPU is the one who is involved in + * vgaswitcheroo. + */ + if (((p->class >> 16) == PCI_BASE_CLASS_DISPLAY) && + atpx_present()) + return p; + pci_dev_put(p); + } + } + break; case PCI_VENDOR_ID_NVIDIA: if (pci->devfn == 1) { p = pci_get_domain_bus_and_slot(pci_domain_nr(pci->bus), From patchwork Fri Nov 22 21:43:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11258513 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F1E5930 for ; Fri, 22 Nov 2019 21:46:43 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7D0820721 for ; Fri, 22 Nov 2019 21:46:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="j9ykEbzP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CdPvpN2T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7D0820721 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D741217EB; Fri, 22 Nov 2019 22:45:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D741217EB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1574459201; bh=3PL07A7YSkE2N/H8XsN9ci2iHfi0Fi8oVOTeokfelOg=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=j9ykEbzPmtC0YjrFxajMuOkbxCzib1wC6Y9+yqZc4jDjTp3Wk1lVAHFDMgnrtPFmN pZaZu/dUD1l6KVMi5I+714wnshLlO54gPCILEK1z1WuAcOZ6xCpaHjHlLolXpZK9Ky 8qCU38sm5Kc6qq23pzEUKrCtfxQ4n+MUz1gHdqOw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7FD7AF8015E; Fri, 22 Nov 2019 22:44:14 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 18018F8013F; Fri, 22 Nov 2019 22:44:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-yw1-xc42.google.com (mail-yw1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 58192F8013F for ; Fri, 22 Nov 2019 22:44:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 58192F8013F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CdPvpN2T" Received: by mail-yw1-xc42.google.com with SMTP id m196so2948127ywd.5 for ; Fri, 22 Nov 2019 13:44:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bFYsp63lkmiNIGxUbzfEOILdAxDIS+R8OA5WHO2VkgA=; b=CdPvpN2TtkuzThokr8FkOIPM9sIktdP1vsg3eeUzjlHmbBORU+5zaRXh9Ls9tmM49g wD7bGtt4nVql4X30sc+4Y78TE44IHbpfqEFZBupdJxTIcSpU1sZJmToSIbV/Carc6G7w j7s2aAwPFVx9PpWM7WLMuwC/4FTP13zU2vFzvqwHLSqJWSlo4wx28OXWbVU2887dL4Hj bNvescc7S/R+3mlCnlVd05D/8nTN8bUEdklVeAqgZH1pcciu3LEdP9LtQcSU0iKfZ7vH t6kRipGDqnmzriLPvlu8nQHvceayKwmFZEiCMakD58oO2Gc/Aprc7BxgXix04emiKfKZ Aexw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bFYsp63lkmiNIGxUbzfEOILdAxDIS+R8OA5WHO2VkgA=; b=ox42la4eA+ME3oQB2wzRy9SnYTmlXQ+40Gv2TMaP+oYfc8YkrmrDjFATPS+ekp+Zo6 TS/JiMEjq3pyTnPdLAsFvNtvh0XB4yGi/vaZSHohQJvbT7t2SMY7F/FklUxa/lshmQFs R2fyO2Hr0d87ZCSXNCtaM5w4sdWY3Rhru1LcYtcWPTKWflEG95NaiP5smcdg85hRmCS5 P0uCFi4EAltWFmdrFRJWfG4Z1u2Y/CJhHd6JuFdlep+i8yyGDDy6nH2dD03WsV5d5XYs y2YS9OFv9jgQ9cyYoFeak8QJys2YrTcNyjx+ZibxACWRGJ7Rx6kFhlWzQQuBF7oj+jVQ MDxQ== X-Gm-Message-State: APjAAAUaKRkK0xeMYE/7dm4datnaVoBK1dZh9RMQggZ8r/4ttMI9BAWT k09oslPy+JSqRpcz5ckKgutgJ/84 X-Google-Smtp-Source: APXvYqxQVI62Nh6WMju1/criCuPOgdm/c8IZD1mh9ib8Xftf731oiPDe/s7oraOJTKJoRlqzSND8oQ== X-Received: by 2002:a81:a153:: with SMTP id y80mr11030740ywg.268.1574459043408; Fri, 22 Nov 2019 13:44:03 -0800 (PST) Received: from tr4.amd.com (atlvpn.amd.com. [165.204.84.11]) by smtp.gmail.com with ESMTPSA id t15sm2111522ywh.70.2019.11.22.13.44.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 13:44:02 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org, tiwai@suse.de Date: Fri, 22 Nov 2019 16:43:51 -0500 Message-Id: <20191122214353.582899-3-alexander.deucher@amd.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191122214353.582899-1-alexander.deucher@amd.com> References: <20191122214353.582899-1-alexander.deucher@amd.com> MIME-Version: 1.0 Cc: Alex Deucher Subject: [alsa-devel] [PATCH 2/4] ALSA: hda/hdmi - Add new pci ids for AMD GPU display audio X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" These are needed so we can enable runtime pm in a subsequent patch. Reviewed-by: Takashi Iwai Signed-off-by: Alex Deucher --- sound/pci/hda/hda_intel.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 3ebc7b2a897f..79ca97d6c811 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2606,6 +2606,20 @@ static const struct pci_device_id azx_ids[] = { .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, { PCI_DEVICE(0x1002, 0xaaf0), .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + { PCI_DEVICE(0x1002, 0xaaf8), + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + { PCI_DEVICE(0x1002, 0xab00), + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + { PCI_DEVICE(0x1002, 0xab08), + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + { PCI_DEVICE(0x1002, 0xab10), + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + { PCI_DEVICE(0x1002, 0xab18), + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + { PCI_DEVICE(0x1002, 0xab20), + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + { PCI_DEVICE(0x1002, 0xab38), + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, /* VIA VT8251/VT8237A */ { PCI_DEVICE(0x1106, 0x3288), .driver_data = AZX_DRIVER_VIA }, /* VIA GFX VT7122/VX900 */ From patchwork Fri Nov 22 21:43:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11258515 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 034156C1 for ; Fri, 22 Nov 2019 21:47:32 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B6C82071C for ; Fri, 22 Nov 2019 21:47:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="E17vCHfz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KIYg3/6X" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B6C82071C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BCA161840; Fri, 22 Nov 2019 22:46:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BCA161840 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1574459249; bh=bwmMpYtDdooRXCZKMcyunPVcbLr1WxI6WHDs3zUCrUQ=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=E17vCHfzHZtBXTatLPXTAzCLDz1/O99w/vbF7eFdBXcWDGuNgVzDde5DGIpBIfXn3 CIX68PXbhrT5iNCmjajfxhrfoqfOM9Mx5t3yZV92mZa5YG3XZYOtxUxg5cLyyX0YYr s/pD14noWJjW3YVeXTJiYoN9wNa2vUrLUJTIx2ps= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0CCA1F80171; Fri, 22 Nov 2019 22:44:16 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B1879F8015B; Fri, 22 Nov 2019 22:44:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,SURBL_BLOCKED, UPPERCASE_50_75,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-yw1-xc42.google.com (mail-yw1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2915EF80140 for ; Fri, 22 Nov 2019 22:44:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2915EF80140 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KIYg3/6X" Received: by mail-yw1-xc42.google.com with SMTP id d80so2940512ywa.6 for ; Fri, 22 Nov 2019 13:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tLz/VLKnB1IPKE8d1KUr8XukeZ9FBVXcYJIk8ITPAWE=; b=KIYg3/6XBSZO6t0fUpCrLv+5G5KYy6rBZRfkrr1JSxhQ6Q77nqrjTVNeE0w7F5e7in 0asTE5h+w9Gh7tT70onmdLImPap5p4ZyRnQBlw+AdpEhKz3qMtqYUHNm+6KgRnoCU+L0 ndJKykhlrmntmzeuTyZKmvt9D3RaFHu3s7HtgE8zYHa4YR/Ih9ZVGniUGvhJ7oEruanW Akr5SUolImHipw72p0tbhUMbuC3thbvOJWe71/lxYllvoYpJZBzGtefJSiVMeSp3xR+Y TBMA3lAcmAn3kcWO2oX2A9vKgh2BEChFarZB5g4XTvf/O/LWrMvhkf994Npo/2vMRC0N tgYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tLz/VLKnB1IPKE8d1KUr8XukeZ9FBVXcYJIk8ITPAWE=; b=hy5CP52QPJm+Dyto4e3EZkkPTSKYzayJojgEEFINnKe8ZHZx6qjR0wOKht5W/pYy4O MMEYYGVAilo16wStBc+j0glsKvM4BlvB75E/mLlDYdFoU99i4O8fshb/+y/I5pwMDemx fuw1MPBqjkW7LSR8cq9ywg4nj9D5B45brHjh+tYPtvJz1QPc6Rb8fCCzG7WsDl9B8sSm jR1MOEiDHrjJr/EjxzxPf88Nhoj4xy4oBn7QDG4uIFqBNFWn1wUlh+NR5owfobROOrtn ac7EQGEOB685+Oh3QoGs3Ls39uwH7axiQF0lmjhtnecpEkJnIhKn/BNstiHRl5MX06TV rTkQ== X-Gm-Message-State: APjAAAUNM+bJMjHmCVDHKg+NeN77K3Ueic3PncRkDgC0qZwkfZSlTHfA qPvf176QGnYT3YYMfzwoLrsIC03h X-Google-Smtp-Source: APXvYqyatKNHh/9+R3obw+MqEsRSJJgO8YWqCuf9fc+9XCQTIbCvwPw4FtbEG/nqVLSLi27hUGk2mw== X-Received: by 2002:a0d:cc47:: with SMTP id o68mr10984795ywd.50.1574459044454; Fri, 22 Nov 2019 13:44:04 -0800 (PST) Received: from tr4.amd.com (atlvpn.amd.com. [165.204.84.11]) by smtp.gmail.com with ESMTPSA id t15sm2111522ywh.70.2019.11.22.13.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 13:44:04 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org, tiwai@suse.de Date: Fri, 22 Nov 2019 16:43:52 -0500 Message-Id: <20191122214353.582899-4-alexander.deucher@amd.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191122214353.582899-1-alexander.deucher@amd.com> References: <20191122214353.582899-1-alexander.deucher@amd.com> MIME-Version: 1.0 Cc: Alex Deucher , Evan Quan Subject: [alsa-devel] [PATCH 3/4] ALSA: hda/hdmi - enable runtime pm for newer AMD display audio X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" We are able to power down the GPU and audio via the GPU driver so flag these asics as supporting runtime pm. Reviewed-by: Takashi Iwai Acked-by: Evan Quan Signed-off-by: Alex Deucher --- sound/pci/hda/hda_intel.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 79ca97d6c811..111b9a869162 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2599,27 +2599,38 @@ static const struct pci_device_id azx_ids[] = { { PCI_DEVICE(0x1002, 0xaac8), .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, { PCI_DEVICE(0x1002, 0xaad8), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, - { PCI_DEVICE(0x1002, 0xaae8), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, { PCI_DEVICE(0x1002, 0xaae0), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, + { PCI_DEVICE(0x1002, 0xaae8), + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, { PCI_DEVICE(0x1002, 0xaaf0), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, { PCI_DEVICE(0x1002, 0xaaf8), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, { PCI_DEVICE(0x1002, 0xab00), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, { PCI_DEVICE(0x1002, 0xab08), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, { PCI_DEVICE(0x1002, 0xab10), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, { PCI_DEVICE(0x1002, 0xab18), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, { PCI_DEVICE(0x1002, 0xab20), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, { PCI_DEVICE(0x1002, 0xab38), - .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, + .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | + AZX_DCAPS_PM_RUNTIME }, /* VIA VT8251/VT8237A */ { PCI_DEVICE(0x1106, 0x3288), .driver_data = AZX_DRIVER_VIA }, /* VIA GFX VT7122/VX900 */ From patchwork Fri Nov 22 21:43:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 11258517 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6063B6C1 for ; Fri, 22 Nov 2019 21:47:59 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5E652071C for ; Fri, 22 Nov 2019 21:47:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="UXCtVqdy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="agg5pZrS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5E652071C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1EA241864; Fri, 22 Nov 2019 22:47:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1EA241864 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1574459277; bh=XtELjYunLUOptI0BvHLDBC9JeRD1xUVmUH2TI/4rEOY=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=UXCtVqdyqyrWF64bvhiXLs6ttLiBM9ScyzAZoPgcD/NCDPFrgNtHrGVNMdbE7SW3x SAALDJRwJ3Erqgh1HKzGuHPd489q2CZwiWtpd/ognumdEx110LosxDPtjWbSlE6obD jQ7/wU5mD8pRZMG+0Mh5+Q9EqvgMJXk4IHYdA8AY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 627A2F801EC; Fri, 22 Nov 2019 22:44:17 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 70C78F8015A; Fri, 22 Nov 2019 22:44:12 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,SURBL_BLOCKED, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-yw1-xc44.google.com (mail-yw1-xc44.google.com [IPv6:2607:f8b0:4864:20::c44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AB21BF8014A for ; Fri, 22 Nov 2019 22:44:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AB21BF8014A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="agg5pZrS" Received: by mail-yw1-xc44.google.com with SMTP id m196so2948166ywd.5 for ; Fri, 22 Nov 2019 13:44:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QYENIjArnsOjhA9ffVrRGheHs4eqvuQRpAYUpV5zbb8=; b=agg5pZrSlcJgWUKMUO9YgPvy3DMz7lk+8H61AuEseYg69n9R427w3WJdUiT5ihflAZ aEHhZ3Kk/DzjXnEIHubHfFgchBRaYLESD8u4MAWvvR1D1IhxAJcyD6J3IVlyq7T6OG/Y HL0z7c+zAk8JgpYUyL02wfA0ndAuZ6SeXs6jGIA7hAfhMtbljpElVtip+EjefdZIWtWk AyCckcCDAH1w0cb9sz5zqvpGLz5VRtaEHhqGC7gKmQU12xDc9Uhdy90q19PyDTfDAjMz 0/B3YnQSia7BRP3TKKVrzC0cpFf+VQvHUBIU9bUKHmHaWrPly4yijwQ34qU62WO1yG/y G5GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QYENIjArnsOjhA9ffVrRGheHs4eqvuQRpAYUpV5zbb8=; b=ecMxMXcZnJiswsPkaX9DzNU4aNjkRnW8bNL4fmkA88JHE9rEGjezLwmSLAkjweY8Z6 CLhVFxqa3t6minRhhkWDv0vsYAQzOBsSL7CyYVoKWM1PafKjvk6uo8e14H2WemSSA5X9 wMtAcxeXaA7ujDHCsOU37Mx5UbSiPsNS1rkK4OZ/sI1D16IR8xtS3YYnL0YCq4ZMeEzn nvaSXjucIQB0IXX61yTCiNjOxoUzOPZ3P3SGpSi2fTCKmBO0opZmu7MyNg/Vgqc4Rnk5 IYXulqqIvupjhI7dOQHzCAiM+9NLVCzAAijo2B28IGljZH4eNz4oLVvBW9oIRlKAT647 79dQ== X-Gm-Message-State: APjAAAXp7gUVCTowuvS8dx3VVn5lKEmCumWnhMhcJLJCF+Zacofqg90g AezYNI/YKK8q9jW+Rmb27vU= X-Google-Smtp-Source: APXvYqwA3Yic3yjGiXJeV9UndcS0Q4L8RqTFvnw5cbDHTe+9NPKTOJCzm1LenWZATmekFOjxvrwydQ== X-Received: by 2002:a81:f005:: with SMTP id p5mr11474085ywm.147.1574459045432; Fri, 22 Nov 2019 13:44:05 -0800 (PST) Received: from tr4.amd.com (atlvpn.amd.com. [165.204.84.11]) by smtp.gmail.com with ESMTPSA id t15sm2111522ywh.70.2019.11.22.13.44.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 13:44:04 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org, tiwai@suse.de Date: Fri, 22 Nov 2019 16:43:53 -0500 Message-Id: <20191122214353.582899-5-alexander.deucher@amd.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191122214353.582899-1-alexander.deucher@amd.com> References: <20191122214353.582899-1-alexander.deucher@amd.com> MIME-Version: 1.0 Cc: Alex Deucher , Evan Quan Subject: [alsa-devel] [PATCH 4/4] ALSA: hda/hdmi - enable automatic runtime pm for AMD HDMI codecs by default X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" So that we can power down the GPU and audio to save power. Reviewed-by: Takashi Iwai Acked-by: Evan Quan Signed-off-by: Alex Deucher --- sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 795cbda32cbb..8785fcc850b9 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -3961,6 +3961,7 @@ static int atihdmi_init(struct hda_codec *codec) ATI_VERB_SET_MULTICHANNEL_MODE, ATI_MULTICHANNEL_MODE_SINGLE); } + codec->auto_runtime_pm = 1; return 0; }