From patchwork Thu Jul 4 05:52:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11031089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B35F138B for ; Thu, 4 Jul 2019 07:25:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47113287B4 for ; Thu, 4 Jul 2019 07:25:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3836A28995; Thu, 4 Jul 2019 07:25:56 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,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 E51A1287B4 for ; Thu, 4 Jul 2019 07:25:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E6166E2B8; Thu, 4 Jul 2019 07:25:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1EF356E25A; Thu, 4 Jul 2019 05:52:52 +0000 (UTC) Received: by mail-ed1-x541.google.com with SMTP id r12so4240311edo.5; Wed, 03 Jul 2019 22:52:52 -0700 (PDT) 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=nxMo/C25wB83HiqtqBaJ+h1T1C9R56SSMfKIkNntuQI=; b=Ol+d4mE8lBgMK0a3n9mnsU0d5eI+fd5317rzTMA0cHa4HGg2d9KhaaNfXCxezhxf2f hmYaZYGJmwU0s9lQzsAg99TCgdlG6PvGABfDzJNorUARYApBCMnYSY2nzbINiLWoRdCX LdKTZpfMYc3uu46u+bvwV4NC/A2vvCGkCCQiz31r92oHuUM/guqvJNvWg5XQyE1fBlxT 2OwVhe+TuPy49STc9IuPfOB2VyRQjn+PNIuf12JGANyq1hkbKD1e/KFUVgB8SVbUhwG8 bncI3GR69oDcj5AuN7AGDUHidv4WgdX5SumwBF7GMkbGdzXikRUqy9+RuLGLVeJHEXxD BPyQ== X-Gm-Message-State: APjAAAUJQFjidS4IpsMklitbGzqnnV01V1xqluDHq/qFmA6/eSqpFbbM i7tdRNnQkmMN5q2S38WXuY0= X-Google-Smtp-Source: APXvYqzBi7OSwL7lr/m4iyTwfj6jyXpGc54w1FJdJua28+Xm3PLKgCoq/7MjNenqFHzRM1qatIcOiQ== X-Received: by 2002:a50:f4dd:: with SMTP id v29mr46606079edm.246.1562219570715; Wed, 03 Jul 2019 22:52:50 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f9:2b:2b15::2]) by smtp.gmail.com with ESMTPSA id j30sm1343532edb.8.2019.07.03.22.52.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 22:52:50 -0700 (PDT) From: Nathan Chancellor To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "David (ChunMing) Zhou" , Harry Wentland , Leo Li , Rex Zhu , Evan Quan Subject: [PATCH 3/7] drm/amd/powerplay: Use proper enums in smu_adjust_power_state_dynamic Date: Wed, 3 Jul 2019 22:52:14 -0700 Message-Id: <20190704055217.45860-4-natechancellor@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190704055217.45860-1-natechancellor@gmail.com> References: <20190704055217.45860-1-natechancellor@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 04 Jul 2019 07:25:13 +0000 X-Mailman-Original-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=nxMo/C25wB83HiqtqBaJ+h1T1C9R56SSMfKIkNntuQI=; b=jQATCgtOv2HJtkUCqDOPMinhGgPxktLL4vFCkiFilIKe4DwLFtLJLsuqwxtwTGEgug HV+Q7GToIpxKN9fX8pTqXyfzD9qZy067CiHz5gG25FLmcsKKrjmO4W3eaqyd6rqRaPYH kj4VKB5pYSSi9XEKcvl/4OhTAAwI3MdGgbCRAvft2gYSBqIcFCuYQoLYLaa4acpNp1w0 q4O5vZRPtp9fNJkxfnAoHTBsszmoW+UxmbnE0UjdbKJxrWXgCJjaEKj5lAYy1ZpH+cNK 8VWUEIo+M6B7WrGUGc+YSVYIDNJSlCtWX4a0/5vOqlU/A9UkZb5gLYokQBycB0icAxqO vCyw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, clang-built-linux@googlegroups.com, amd-gfx@lists.freedesktop.org, Nathan Chancellor Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP clang warns: drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:1374:30: warning: implicit conversion from enumeration type 'enum pp_clock_type' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] smu_force_clk_levels(smu, PP_SCLK, 1 << sclk_mask); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:1375:30: warning: implicit conversion from enumeration type 'enum pp_clock_type' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] smu_force_clk_levels(smu, PP_MCLK, 1 << mclk_mask); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ This appears to be a copy and paste fail from when this was a call to vega20_force_clk_levels. Fixes: bc0fcffd36ba ("drm/amd/powerplay: Unify smu handle task function (v2)") Link: https://github.com/ClangBuiltLinux/linux/issues/584 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c index 31152d495f69..e897469f7431 100644 --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c @@ -1371,8 +1371,8 @@ int smu_adjust_power_state_dynamic(struct smu_context *smu, &soc_mask); if (ret) return ret; - smu_force_clk_levels(smu, PP_SCLK, 1 << sclk_mask); - smu_force_clk_levels(smu, PP_MCLK, 1 << mclk_mask); + smu_force_clk_levels(smu, SMU_SCLK, 1 << sclk_mask); + smu_force_clk_levels(smu, SMU_MCLK, 1 << mclk_mask); break; case AMD_DPM_FORCED_LEVEL_MANUAL: