Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6604735pxv; Thu, 29 Jul 2021 20:07:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2ree0j0noUuANVf4wDvkqrpTil2IB7LewY8pMXaqvr5ktHvrQuuP7hlV+KHcFnEQ9TJTO X-Received: by 2002:a05:6402:c1b:: with SMTP id co27mr347110edb.147.1627614445746; Thu, 29 Jul 2021 20:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627614445; cv=none; d=google.com; s=arc-20160816; b=AcDVQ/Ta7/mtC/a4t3IDYhrmYC37xoDsLpubhPAQW5JlxdVR3F6QunmWquUAEB1Swl cu0owPeCxvZW3JlAoTS5nlydTxK+qCeX2HphCClveJnjKkSBoRa6IEDxexkMIeo4qkso UKgRLH0NWchRueB7NhqLAcZuxjC3MgsAmqcsLH7lyvhgKYr0Tk0U/CEfSZ0HXiM8lMaM 7eQB7vdXoWUSXiYxH2qjEtlJhY7EVWukWc16m1WHHz4OmJhhOp3dETu8I8fMev9GOsJ1 zuoeYBRWP19OV2dg5ou2y007JFJ/vOgI6/iKd+D5M+hiW1rT1kwCxb5cagsgYlJG7oKW oUYw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=UoUNO6SpxNZD8Kp5rDs7cJKyFvYdXqxIuqfJvEub1Mw=; b=IxIXTPTYdMfhQ+4+V/sWIGRwtQfiwujEJ552YQcRNrVSVwY6ORQM6NbGMw3gkFBsM7 5InwvYyjSVpqQ7pJ1Kb5xVSOwUfSh75cOURgZYuWnSbt4QcOSx2ZScQQGN8YNagh2q8h 9+9sJB+RfxDH+iDQNbKuAFe12Jm3/50gTzxiTp50iSrOQgaFt37ybg+NRYNZ8mX2dY9J kKdob0W4FMVEmcViWODH77j69EupJLKAvscrtHwoLTGeGlBMy4ReWJ7zkPLGlL7hnIma KGzTls66OIhJ9MCTXHPNNBLHx+CH6QHNfRuFj4W+7iT7Chc3U8wdjl2+OARrsZV9AJ6s Ht6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ucmvasQy; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qb40si479711ejc.273.2021.07.29.20.07.02; Thu, 29 Jul 2021 20:07:25 -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=@infradead.org header.s=bombadil.20210309 header.b=ucmvasQy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233026AbhG3DD5 (ORCPT + 99 others); Thu, 29 Jul 2021 23:03:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbhG3DDz (ORCPT ); Thu, 29 Jul 2021 23:03:55 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB102C061765; Thu, 29 Jul 2021 20:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=UoUNO6SpxNZD8Kp5rDs7cJKyFvYdXqxIuqfJvEub1Mw=; b=ucmvasQyzJtn31aB4P2X78i/2y WGRcNUGJMLzlw2x+7VuL1yP5J+LpB1ljOzytIidamb08eRhyfn+niwxax2AqAUcd4dKXm6p1/VeRZ 4MmxD9NN8f1wCwmYjvaq+XMPwWJYS5wk7Ha1LIia9iJjncXjq0VqYnz1PpILaJHVZKrfr0ckfA5GT +ccKpF25wV1W6pn+aKw/1PZjJV8YuVzDBPkmMQ31TFY3hWJ0RP3GbKCtpqsaGrssPFUp2dMX5Kk7y U/0J0FFaYn8slPT3+tOa+NXhXdmHD7RFanIAVP7UWcT9TBPZZGCwoTgmyTl7JrCHq7aAQf6Cn42ro oHvha7RA==; Received: from [2601:1c0:6280:3f0::aefb] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9IoO-006n2H-Cd; Fri, 30 Jul 2021 03:03:48 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-next@vger.kernel.org Subject: [PATCH -next] drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled Date: Thu, 29 Jul 2021 20:03:47 -0700 Message-Id: <20210730030347.13996-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 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 '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 ‘amdgpu_acpi_is_s0ix_active’: ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1046:11: error: ‘pm_suspend_target_state’ undeclared (first use in this function); did you mean ‘__KSYM_pm_suspend_target_state’? return pm_suspend_target_state == 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önig 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 == PM_SUSPEND_TO_IDLE;