Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6999647pxv; Fri, 30 Jul 2021 07:42:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztn0ME2HPzeCj5b+eU3u4VN78oK1PgleoUXUYI62lg7ddK9YbKdd74kq+flTxPrSVm1EYH X-Received: by 2002:a17:906:f112:: with SMTP id gv18mr2875968ejb.439.1627656136821; Fri, 30 Jul 2021 07:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627656136; cv=none; d=google.com; s=arc-20160816; b=KMA3lEV+YIgiXOywEShXcepctz6C6hsCV65ApAUOFUXbHgtS5obVyTb4bhOEXlaIKu 7QwShkENdjybUlU762AI9qqpH/kycx5IDux2Ku2wvY+X6jz7TJIgGiUXMwqiju6Iao2t 3ykzP3LaRoowS+SqTrflw6xUbpZiRaVp+PdlvBEJxrCAAlsgYcObgL0shLt/lc+attUv Te93EWINzapQY5Eh1ZuSdBvI1Aj5csfoW3clHQpEVv4cngXATcHmB8v3i924vaeWBVPJ imY/Fu2ANZsN/jKy8uYq1CMPal9ulyd0bZ+mmNHslHTDL7ad2TC370TwewUEWK20YRf6 +mfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SI25ow92uZg+BEB0RQ5f76l9YsfOVkkwHkMuJVkTQbo=; b=yzjfLzBvFTEjpCcu9mgdeCFE7uqnAg1gu8KWb/odLoVF4gxG+42NtFMSPkPq/oxYD0 9b4WCVb8oeKZH2yFXXvu6Ea5T8xH2Gxrj3dp14X2MBKt8R3Yg1401q0uKoaDuSns8lY6 zcUc6ZYbxEuHWciS+/lFfTToPMAkFNL1QrDOEyohT4FEYvM6oq+yrZ/FgBS8SJlcqmAZ +ARuMvEo+kX/UujAc9SVW7aSHAWWGyreRg8dSuOXNFGF+kvGVqZyAoD5VJWOPbDb65XT oGRDCrrmBv7zZUuvayWr4D/TEtgL3P1v9K1kD8Qf90i3woJ4XKD4aUEyA46K8owQtDhJ wexw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nm4KNOhA; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z18si1765163ejx.339.2021.07.30.07.41.53; Fri, 30 Jul 2021 07:42:16 -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=@gmail.com header.s=20161025 header.b=nm4KNOhA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239176AbhG3OiM (ORCPT + 99 others); Fri, 30 Jul 2021 10:38:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231255AbhG3OiL (ORCPT ); Fri, 30 Jul 2021 10:38:11 -0400 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC076C06175F; Fri, 30 Jul 2021 07:38:06 -0700 (PDT) Received: by mail-ot1-x332.google.com with SMTP id z6-20020a9d24860000b02904d14e47202cso970168ota.4; Fri, 30 Jul 2021 07:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=SI25ow92uZg+BEB0RQ5f76l9YsfOVkkwHkMuJVkTQbo=; b=nm4KNOhAX8VAnpPT8J2+3gPGVJx389TFMyTRjhX1GK0PKsMo+5ydL2u2hu+ZwdrVCU xLw6Pgq65ioerSCoN4qgMojjtq8JkGM4T3oDoGbGfOq1SbLJcG4nGPNTbW7Q1odLbhXb po8ou6GMAi79k3Uwr+Ctk2LyJmDG96fLK8Gi83aE+tacL7aGE3B/G3GFqlYGFKng8z0U btC8zhVBbKQ7UyocO06TiOKIAnFtK0dKIvQtJFWZy1jpy2RgrUIFMOrDp+JBDS3x2Fjx 52oTEIqnEoR3JYvhn9Lw8vH4nYjG9EU73G9BYSOlNuM7F116E8UWnOrlPYEjPk8bEK2q okiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SI25ow92uZg+BEB0RQ5f76l9YsfOVkkwHkMuJVkTQbo=; b=Db/R2rBaH7gZ5Om/ZkLeyhc5I2ZuQOC4C42Vehp1rnE0Cl1kJz997O/Ubgq0kcirlq RENlWG46m7/U6Zfg1O8vYB6MNzCdlojzuTa5Ah5oI5DCME6FWn0N3WDwzmtJgOV+odJ4 Chr/E2AQOAyCJptkYASo0/bOejAdNb/st7qw9V0fw+iYv1rtCxwNGBPf63SrI0d6P3p3 n9ycMBBpwIU1jrCCuoF7iJ22c7b/teCQylSBKbdpPIcSOoid1t3LhScQyXN6ja09RoHL Wy636YVBO1Z7lygmsuC0zlmeovFU902wQA/D8NybQ2X1TFCK5E8wJq8a24BSVMh9Hf1t s6AQ== X-Gm-Message-State: AOAM530qKQ+rk4IQF/24rGkvjdq9fedKFbmKezy+rKg/wPW1Z0zGIE7K Rv4p/oTU3bJfbd0/14FMXofAwwArSHzYmeTkexY= X-Received: by 2002:a05:6830:1c2f:: with SMTP id f15mr2283318ote.23.1627655886012; Fri, 30 Jul 2021 07:38:06 -0700 (PDT) MIME-Version: 1.0 References: <20210730030347.13996-1-rdunlap@infradead.org> In-Reply-To: <20210730030347.13996-1-rdunlap@infradead.org> From: Alex Deucher Date: Fri, 30 Jul 2021 10:37:54 -0400 Message-ID: Subject: Re: [PATCH -next] drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled To: Randy Dunlap Cc: LKML , "Pan, Xinhui" , Maling list - DRI developers , Linux-Next Mailing List , amd-gfx list , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Thu, Jul 29, 2021 at 11:03 PM Randy Dunlap wrote= : > > 'pm_suspend_target_state' is only available when CONFIG_PM_SLEEP > is set/enabled. OTOH, when both SUSPEND and HIBERNATION are not set, > PM_SLEEP is not set, so this variable cannot be used. > > ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function =E2=80=98amdgpu_= acpi_is_s0ix_active=E2=80=99: > ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1046:11: error: =E2=80=98pm_s= uspend_target_state=E2=80=99 undeclared (first use in this function); did y= ou mean =E2=80=98__KSYM_pm_suspend_target_state=E2=80=99? > return pm_suspend_target_state =3D=3D PM_SUSPEND_TO_IDLE; > ^~~~~~~~~~~~~~~~~~~~~~~ > __KSYM_pm_suspend_target_state > > Also use shorter IS_ENABLED(CONFIG_foo) notation for checking the > 2 config symbols. > > Fixes: 91b03fc6b50c ("drm/amdgpu: Check pmops for desired suspend state") > Signed-off-by: Randy Dunlap > Cc: Alex Deucher > Cc: Christian K=C3=B6nig > Cc: "Pan, Xinhui" > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Cc: linux-next@vger.kernel.org > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- linext-20210729.orig/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c > +++ linext-20210729/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c > @@ -1040,7 +1040,7 @@ void amdgpu_acpi_detect(void) > */ > bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) > { > -#if defined(CONFIG_AMD_PMC) || defined(CONFIG_AMD_PMC_MODULE) > +#if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_PM_SLEEP) > if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) { > if (adev->flags & AMD_IS_APU) > return pm_suspend_target_state =3D=3D PM_SUSPEND_= TO_IDLE;