From patchwork Fri Jun 23 16:35:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9806941 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 5096960349 for ; Fri, 23 Jun 2017 16:37:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40A8E28740 for ; Fri, 23 Jun 2017 16:37:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 356CB28792; Fri, 23 Jun 2017 16:37:46 +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=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2600828740 for ; Fri, 23 Jun 2017 16:37:42 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BFE1B267549; Fri, 23 Jun 2017 18:35:35 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 15590267523; Fri, 23 Jun 2017 18:35:27 +0200 (CEST) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by alsa0.perex.cz (Postfix) with ESMTP id 9E41D266AE9 for ; Fri, 23 Jun 2017 18:35:21 +0200 (CEST) Received: by mail-qk0-f195.google.com with SMTP id 16so6867642qkg.2 for ; Fri, 23 Jun 2017 09:35:21 -0700 (PDT) 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; bh=Ctc2vgxoqk5WU7hmpxWMpJjfITLnG/M8em+SjkHuPHk=; b=ONWHzTs522rgtZBCwdKykgu3lXUDQBaVWr4VM4zS+EmtmCXFe/CPm+rvmy4nhmnqTo O1E+qRwR1F/ceDMsHUue+tV4qavGcsHkef5OK9ViBIVVBYhMuoAFs67VQNsU0opkuRxQ gLNR5Z4x94rdtTAUMonPXndLKs4T3EwHMdwXEbR5biyrfIAJZMjD/YMAdihJA2y70KZB 3KNT7NZBcIaKTP605mc4Dxkdeim/+f7ieIRsPy4nbwL8xAFsQPnnmXH9tq6rFUU2n0bb n3XGkDAkPo64zgg1DggEXljKesXAeOU7FVcweQGU8VbxCjrZ7E9SMWCuTg7Ou99Y7R7T 0suA== 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; bh=Ctc2vgxoqk5WU7hmpxWMpJjfITLnG/M8em+SjkHuPHk=; b=U8qwBuqaO/DrT416qnuLy1AtDpnoYX/xKSOkpDNTw1jVHk5P+x3CilY9Cv+gfu2daS 33uIfbDj3jNSz5kuvxr1NbBcRPvwPyy+95vV+7HKMwmFilT+qTIZ1Wt4UJt/z/MksLeR B0NdQWX+r6f8KyarRsOqt2vC5p9kROFzi4Zj3NsmurVzRUtFxN6isd9H8idbgSbG6+3A BuoPPiTnoeiFTRJF6eSjQ1EXkHUSoZ1Vgz8nKClcMSonYp4hi7oAG9aEhwsQOexph/gG IHIUYnG0Ml7Vr/5vM5vDqD2CPeNc0mWvsp5f40WVla6WDcqMP4yH66zCNXYJv6Ki8PIr dxpg== X-Gm-Message-State: AKS2vOwpRmkbg5rvLvbKg6yj9AtncJM2tQCcAWOiVdWgrTF7KafBlNoE PytfU5fTY6tW46HE X-Received: by 10.55.46.2 with SMTP id u2mr10887737qkh.23.1498235721029; Fri, 23 Jun 2017 09:35:21 -0700 (PDT) Received: from cm.localdomain (va-67-76-166-195.sta.embarqhsd.net. [67.76.166.195]) by smtp.gmail.com with ESMTPSA id 5sm3793284qkr.27.2017.06.23.09.35.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jun 2017 09:35:20 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org, airlied@gmail.com, broonie@kernel.org, Vijendar.Mukunda@amd.com, rajeevkumar.linux@gmail.com Date: Fri, 23 Jun 2017 12:35:05 -0400 Message-Id: <1498235706-31111-8-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1498235706-31111-1-git-send-email-alexander.deucher@amd.com> References: <1498235706-31111-1-git-send-email-alexander.deucher@amd.com> Cc: tiwai@suse.de, Alex Deucher , lgirdwood@gmail.com Subject: [alsa-devel] [PATCH 7/8] drm/amd/amdgpu: Disable ACP Power Gating for Stoney platform X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vijendar Mukunda Power Gating is disabled in Stoney platform. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c index 86b68f7..0e512fa 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c @@ -287,19 +287,20 @@ static int acp_hw_init(void *handle) return 0; else if (r) return r; + if (asic_type != CHIP_STONEY) { + adev->acp.acp_genpd = kzalloc(sizeof(struct acp_pm_domain), GFP_KERNEL); + if (adev->acp.acp_genpd == NULL) + return -ENOMEM; - adev->acp.acp_genpd = kzalloc(sizeof(struct acp_pm_domain), GFP_KERNEL); - if (adev->acp.acp_genpd == NULL) - return -ENOMEM; - - adev->acp.acp_genpd->gpd.name = "ACP_AUDIO"; - adev->acp.acp_genpd->gpd.power_off = acp_poweroff; - adev->acp.acp_genpd->gpd.power_on = acp_poweron; + adev->acp.acp_genpd->gpd.name = "ACP_AUDIO"; + adev->acp.acp_genpd->gpd.power_off = acp_poweroff; + adev->acp.acp_genpd->gpd.power_on = acp_poweron; - adev->acp.acp_genpd->cgs_dev = adev->acp.cgs_device; + adev->acp.acp_genpd->cgs_dev = adev->acp.cgs_device; - pm_genpd_init(&adev->acp.acp_genpd->gpd, NULL, false); + pm_genpd_init(&adev->acp.acp_genpd->gpd, NULL, false); + } adev->acp.acp_cell = kzalloc(sizeof(struct mfd_cell) * ACP_DEVS, GFP_KERNEL); @@ -388,12 +389,14 @@ static int acp_hw_init(void *handle) if (r) return r; - for (i = 0; i < ACP_DEVS ; i++) { - dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i); - r = pm_genpd_add_device(&adev->acp.acp_genpd->gpd, dev); - if (r) { - dev_err(dev, "Failed to add dev to genpd\n"); - return r; + if (asic_type != CHIP_STONEY) { + for (i = 0; i < ACP_DEVS ; i++) { + dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i); + r = pm_genpd_add_device(&adev->acp.acp_genpd->gpd, dev); + if (r) { + dev_err(dev, "Failed to add dev to genpd\n"); + return r; + } } }