Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3157923pxk; Mon, 7 Sep 2020 05:04:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAwo82IIrKrmJv9vo6k+6MN9qVWklvNXgjWz166VVH5SRRQqJfztVvJzKOiURNgy4F4JJW X-Received: by 2002:a17:906:5611:: with SMTP id f17mr21665955ejq.427.1599480299424; Mon, 07 Sep 2020 05:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599480299; cv=none; d=google.com; s=arc-20160816; b=e/nVi5xj6dvNh9VSkA6hYqmrWvRGyzYdnl+PFPUZ4yrjlPuL/i8Gr0oUts/of28llQ huoCQkZU715lW0aFdgkVnDmb5i4zMI64sXgdZ7+wObnlMjh60ptLb9sUV5oDkidYGagy wLOZJbYyvXO9esG9B0pPLmhXpDMUITqmtBXRHTLWflXjhnCkKgJgFGkztT/X4aKZNIdn yAtuKBs+mLQ6L+8lxA0krrkH9HDmfX7Z8XE8ToRzIvBqZKjJVG0kVq5CnFWdw2bcbVAF 3FttWNl4T2B57G9KIZU/fJmYOC2TFjXlvtbBL1q0Xcgl5ycyBL+cs2pKvsRGVKsM6KVv j6Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=gaE+fm3J4pdVox5oORgrZbkvB5r0kOpSVblkqtuG9Co=; b=egBfMV/Ym9Llz24e5p5hn256SS8KG9NC6yGI2qGp5HmEH1W6lW6/Cc9cwLfUwfBy5j Bi7qsoTmOvW5XGGtFHPvWWn1P90FYS26nLlFRNk6/CkIZIZhG1xHVBmUbTzP7BwRYyLw 4Xx1YFdDOmWcI58K/Y+OD59ZB5WWbLfYUe9YFVPmVETia5f402GMVd9GNT7TSRs3Jq2e 9RtSQqbyM7jF0POpf3bSqgmG1DIUuDtDL/qPfh+S+UttTTBJAIZRjKkVsJJ1nYuElLia PDm7d16fuxUYNYlFv38TIXmggnDkngFgEul35PkjvUfEi8Sv2kbHf2ccttgSdJJqU5sT 8WEw== ARC-Authentication-Results: i=1; mx.google.com; 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 t14si9586359ejb.435.2020.09.07.05.04.35; Mon, 07 Sep 2020 05:04:59 -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; 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 S1728666AbgIGMEB (ORCPT + 99 others); Mon, 7 Sep 2020 08:04:01 -0400 Received: from kernel.crashing.org ([76.164.61.194]:59480 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729184AbgIGL7b (ORCPT ); Mon, 7 Sep 2020 07:59:31 -0400 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 087Bwjb2023420 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 7 Sep 2020 06:58:49 -0500 Message-ID: <6161b96a30e51ff77a387a71eee6a46400530155.camel@kernel.crashing.org> Subject: Re: [PATCH v1 0/2] video: fbdev: radeonfb: PCI PM framework upgrade and fix-ups. From: Benjamin Herrenschmidt To: Daniel Vetter , Vaibhav Gupta Cc: Bjorn Helgaas , Bjorn Helgaas , Bjorn Helgaas , Vaibhav Gupta , Bartlomiej Zolnierkiewicz , Thierry Reding , Thierry Reding , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Shuah Khan , linux-kernel-mentees@lists.linuxfoundation.org Date: Mon, 07 Sep 2020 21:58:44 +1000 In-Reply-To: <20200907075559.GN2352366@phenom.ffwll.local> References: <20200806072256.585705-1-vaibhavgupta40@gmail.com> <20200907075559.GN2352366@phenom.ffwll.local> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-09-07 at 09:55 +0200, Daniel Vetter wrote: > On Thu, Aug 06, 2020 at 12:52:54PM +0530, Vaibhav Gupta wrote: > > Linux Kernel Mentee: Remove Legacy Power Management. > > > > The original goal of the patch series is to upgrade the power > > management > > framework of radeonfb fbdev driver. This has been done by upgrading > > .suspend() > > and .resume() callbacks. > > > > The upgrade makes sure that the involvement of PCI Core does not > > change the > > order of operations executed in a driver. Thus, does not change its > > behavior. > > > > During this process, it was found that "#if defined(CONFIG_PM)" at > > line 1434 is > > redundant. This was introduced in the commit > > 42ddb453a0cd ("radeon: Conditionally compile PM code"). > > I do wonder whether it wouldn't be better to just outright delete > these, > we have the drm radeon driver for pretty much all the same hardware > ... The only thing is, afaik, the DRM drivers never got the D2/D3 code that I wrote for radeonfb to get old powerbooks to suspend/resume. Cheers, Ben. > -Daniel > > > > > ------------ > > > > Before 42ddb453a0cd: > > $ git show 65122f7e80b5:drivers/video/aty/radeon_pm.c | grep -n > > "#ifdef\|#if\|#else\|#endif\|#elif\|#ifndef" > > > > Based on output in terminal: > > > > 547:#ifdef CONFIG_PM > > |-- 959:#ifdef CONFIG_PPC_PMAC > > |-- 972:#endif > > |-- 1291:#ifdef CONFIG_PPC_OF > > |-- 1301:#endif /* CONFIG_PPC_OF */ > > |-- 1943:#ifdef CONFIG_PPC_OF > > |-- 2206:#if 0 /* Not ready yet */ > > |-- 2508:#endif /* 0 */ > > |-- 2510:#endif /* CONFIG_PPC_OF */ > > |-- 2648:#ifdef CONFIG_PPC_PMAC > > |-- 2654:#endif /* CONFIG_PPC_PMAC */ > > |-- 2768:#ifdef CONFIG_PPC_PMAC > > |-- 2774:#endif /* CONFIG_PPC_PMAC */ > > |-- 2791:#ifdef CONFIG_PPC_OF__disabled > > |-- 2801:#endif /* CONFIG_PPC_OF */ > > 2803:#endif /* CONFIG_PM */ > > > > ------------ > > > > After 42ddb453a0cd: > > $ git show 42ddb453a0cd:drivers/video/aty/radeon_pm.c | grep -n > > "#ifdef\|#if\|#else\|#endif\|#elif\|#ifndef" > > > > Based on output in terminal: > > > > 547:#ifdef CONFIG_PM > > |-- 959:#ifdef CONFIG_PPC_PMAC > > |-- 972:#endif > > |-- 1291:#ifdef CONFIG_PPC_OF > > |-- 1301:#endif /* CONFIG_PPC_OF */ > > |-- 1430:#if defined(CONFIG_PM) > > |-- 1431:#if defined(CONFIG_X86) || > > defined(CONFIG_PPC_PMAC) > > |-- 1944:#endif > > |-- 1946:#ifdef CONFIG_PPC_OF > > |-- 1947:#ifdef CONFIG_PPC_PMAC > > |-- 2208:#endif > > |-- 2209:#endif > > |-- 2211:#if 0 /* Not ready yet */ > > |-- 2513:#endif /* 0 */ > > |-- 2515:#endif /* CONFIG_PPC_OF */ > > |-- 2653:#ifdef CONFIG_PPC_PMAC > > |-- 2659:#endif /* CONFIG_PPC_PMAC */ > > |-- 2773:#ifdef CONFIG_PPC_PMAC > > |-- 2779:#endif /* CONFIG_PPC_PMAC */ > > |-- 2796:#ifdef CONFIG_PPC_OF__disabled > > |-- 2806:#endif /* CONFIG_PPC_OF */ > > 2808:#endif /* CONFIG_PM */ > > > > ------------ > > > > This also affected the CONFIG_PPC_OF container (line 1943 at commit > > 65122f7e80b5) > > > > The patch-series fixes it along with PM upgrade. > > > > All patches are compile-tested only. > > > > Test tools: > > - Compiler: gcc (GCC) 10.1.0 > > - allmodconfig build: make -j$(nproc) W=1 all > > > > Vaibhav Gupta (2): > > video: fbdev: aty: radeon_pm: remove redundant CONFIG_PM > > container > > fbdev: radeonfb:use generic power management > > > > drivers/video/fbdev/aty/radeon_base.c | 10 ++++--- > > drivers/video/fbdev/aty/radeon_pm.c | 38 ++++++++++++++++++++--- > > ---- > > drivers/video/fbdev/aty/radeonfb.h | 3 +-- > > 3 files changed, 35 insertions(+), 16 deletions(-) > > > > -- > > 2.27.0 > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > >