From patchwork Wed Mar 23 17:42:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 8652721 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F01609FBEE for ; Wed, 23 Mar 2016 17:44:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 38EE1203E5 for ; Wed, 23 Mar 2016 17:44:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6C86A203F1 for ; Wed, 23 Mar 2016 17:44:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 89F126E8F4; Wed, 23 Mar 2016 17:44:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 148CB6E8E4 for ; Wed, 23 Mar 2016 17:43:52 +0000 (UTC) Received: by mail-qk0-x230.google.com with SMTP id o6so9880363qkc.2 for ; Wed, 23 Mar 2016 10:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/bbE+lWSmyirWsFhVAnRXpPelrhotPMWOdq42GAca6Q=; b=fhdn9NiXty1WZYcGH+aooRIOW8Dnb+L7d5g7yU/xPXPbs3GK5w6MMBamLRmQf2uttE QubIT+GPufNFQJO0ajS7gzJS/PD1QB6ycUs0sZ8H+BIxi20yvhNSuLGWf5TqIn6qm6rJ ptyyHNnWuJIIhkik6MVQKSt6dXfvwxnN9WqU85QcfXxi6RZ0C5b2p16h+iTzvmjJu8XT 2tLR0G9pZfl6hqccEGM3tIKVBmlxiC0sNlRTDwFJbdQMX5N87mJ6x8w8OBn1y5pwujea 2ga6gEmVv0qtIY2GOqE27d2zKjx3sg7xN1RfLU4rw9jsitwzZtpqBFG9ARqWLMHtnVGT axpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/bbE+lWSmyirWsFhVAnRXpPelrhotPMWOdq42GAca6Q=; b=c9VTTg3MreFcqltt0rLb6Bwy9yig43MCqYj3mRM4LtHPwczxypsiAYP9nwcy1M0zlf vF9QJwg10pGoz6xqhLn5kDz8wPaegksCQoXDrnmIYAq2JRbCIRsW1H+nuQfDqSDwkCNc xZd4gyZ6nj75V9b7EYhUqWVWMOjsnjP/uQUEGSs6LqyI0WDzTT3HxtWKsVF5e/sTYmY2 YDuVpbSXv+83R4EbnbOBQp1hAxcsP6ZlshlR9rtgP3sKgkgF3E8AXQJws1LFdUaFK7Lj H+xOQs70KlKo8aKepDrkTyJCfh/cG/o1ex3T/x6tV9i4CiDuBhEPiRTHFZeixe/dPIpd wVZQ== X-Gm-Message-State: AD7BkJIq7WKLovqkkn+WOjbdZlsbmgbG1dWwi097gKrcdU15K8mAs11sANOZ1yQ7nBGaqg== X-Received: by 10.55.24.87 with SMTP id j84mr5244252qkh.92.1458755030382; Wed, 23 Mar 2016 10:43:50 -0700 (PDT) Received: from cm.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by smtp.gmail.com with ESMTPSA id v190sm1486878qka.46.2016.03.23.10.43.49 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2016 10:43:49 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH 36/52] drm/amd/powerplay: add default clockgating handling Date: Wed, 23 Mar 2016 13:42:52 -0400 Message-Id: <1458754988-16222-37-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1458754988-16222-1-git-send-email-alexander.deucher@amd.com> References: <1458754988-16222-1-git-send-email-alexander.deucher@amd.com> Cc: Flora Cui X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Flora Cui This is to workaround regression introduced in 46c34bcb6a15dd85329a39a5e72c62108626acdc. It should be reverted with a final fix. Signed-off-by: Flora Cui Reviewed-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 94b7809..32a6a6f 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -188,10 +188,12 @@ static int pp_set_clockgating_state(void *handle, hwmgr = ((struct pp_instance *)handle)->hwmgr; - if (hwmgr == NULL || hwmgr->hwmgr_func == NULL || - hwmgr->hwmgr_func->update_clock_gatings == NULL) + if (hwmgr == NULL || hwmgr->hwmgr_func == NULL) return -EINVAL; + if (hwmgr->hwmgr_func->update_clock_gatings == NULL) + return 0; + if (state == AMD_CG_STATE_UNGATE) pp_state = 0; else