Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp712748pxv; Thu, 15 Jul 2021 14:11:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzge12E1oaAb6AQwjfdJLilhO6h8/kqsq8KNUpcFRUV5LhUdKq1cMTcBbVgFCSIKqNJVvIX X-Received: by 2002:a17:906:bc8b:: with SMTP id lv11mr7591185ejb.331.1626383480928; Thu, 15 Jul 2021 14:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383480; cv=none; d=google.com; s=arc-20160816; b=BoZaqPgSU7AtKVXdUjCi58WsiUAZoVAq+27ascfXeKBTEJSnqSNQvQ/zo3x5fT7iX6 GeQHE1qVGBT9pxledYvjDiH6Zr4lSxUA/TXAbd2LJzj9cGkMxePvinboP+4aH0KkvlfO 6wOgOc8btlUB60PyybVG00Iz2e2rflrR3LGkEi+X9O+z2etL8a9XF3624gWOZLoj5SUZ kKWO2/iumANH3yKt1igUbCIxpzRQjyBhhRxs4YTVTN6cFHi15F4XRm68y9bFfXxHvUK6 UvJcXO+l32u6OX8Wx0KO0eDMP8CkVobAW6FME1TwistPhppMK7vpa46lJEiTMmlhbvE3 jT2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KB+SnHx3Yq4uRjd34AaME/oZWhm7mEHduINGz6N4V0g=; b=nhKKsPIVvgczLSpXKfSZ9ZilTTIMPJ3AUw24pnClVrUPTXPNeqi3V9BYyuL2Yh46ew 1LMXpHBMj+wOlnmP+xHK8vU8pQWKfMfA3W3nhwnCMvvhIHgL5nP4mOmgX1ao6hMQK/JL wxphzPFpzkCY9SHgE+336ThwlYC09ImDIk/+i4b5ka0uo0oU4SHsAEpPC3WoNDQwrxNO j0ZKrD7GB8ucroB+EmPA63ZLkWvPPeCYVdSPMumU0weyt5nthDPIFzHA4D5J2hA/NR21 F+F65eH8qp3HyONFFWgtSj2HXHAq9QLEiMtdzfmIz6yHrFkUmaTVugKHk+u0Qs4KMGBG pv6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PK19ikU1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si9928652ejy.297.2021.07.15.14.10.58; Thu, 15 Jul 2021 14:11:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PK19ikU1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241532AbhGOTZn (ORCPT + 99 others); Thu, 15 Jul 2021 15:25:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:46122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243151AbhGOTJ2 (ORCPT ); Thu, 15 Jul 2021 15:09:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E87B7613C4; Thu, 15 Jul 2021 19:05:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375909; bh=yYQX/l86/tT//dk9dZb0R3ZlXb4iOuPLeiwiA8cA/Ds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PK19ikU1+LuxJ0fcZwi7q+6U+88h0XvQzw6uOSqybXZXu6TrHnCnx08C1XexO5iec LVIYPZlJOxABf7NwRGe5LrR2xz2+eIzhnZ1R6a1JgNxby+a8i2C/4Xtx+qTbIEPCCk PmGHW20fEtQIcy7sPcOcqv4ZFVuReaZHtgMXaORk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lijo Lazar , Alex Deucher , Lee Jones , Sasha Levin Subject: [PATCH 5.13 045/266] drm/amdgpu/swsmu/aldebaran: fix check in is_dpm_running Date: Thu, 15 Jul 2021 20:36:40 +0200 Message-Id: <20210715182622.210188629@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher [ Upstream commit dd1d82c04e111b5a864638ede8965db2fe6d8653 ] If smu_cmn_get_enabled_mask() fails, return false to be consistent with other asics. Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: Lee Jones Reviewed-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c index 16ad4683eb69..0d2f61f56f45 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c @@ -1290,10 +1290,13 @@ static int aldebaran_usr_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_ static bool aldebaran_is_dpm_running(struct smu_context *smu) { - int ret = 0; + int ret; uint32_t feature_mask[2]; unsigned long feature_enabled; + ret = smu_cmn_get_enabled_mask(smu, feature_mask, 2); + if (ret) + return false; feature_enabled = (unsigned long)((uint64_t)feature_mask[0] | ((uint64_t)feature_mask[1] << 32)); return !!(feature_enabled & SMC_DPM_FEATURE); -- 2.30.2