Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C20A3C77B7A for ; Fri, 19 May 2023 22:05:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EFD0610E0E2; Fri, 19 May 2023 22:05:10 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D76E10E0E2 for ; Fri, 19 May 2023 22:05:03 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2674260FF8; Fri, 19 May 2023 22:05:02 +0000 (UTC) Received: from rdvivi-mobl4 (unknown [192.55.55.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPSA id 0BC48C433D2; Fri, 19 May 2023 22:04:59 +0000 (UTC) Date: Fri, 19 May 2023 18:04:58 -0400 From: Rodrigo Vivi To: Anshuman Gupta Message-ID: References: <20230519162555.409853-1-anshuman.gupta@intel.com> <20230519162555.409853-3-anshuman.gupta@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230519162555.409853-3-anshuman.gupta@intel.com> Subject: Re: [Intel-xe] [PATCH 2/4] drm/xe/pm: Refactor xe_pm_runtime_init X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-xe@lists.freedesktop.org, rodrigo.vivi@intel.com Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Fri, May 19, 2023 at 09:55:53PM +0530, Anshuman Gupta wrote: > Wrap xe_pm_runtime_init inside xe_pm_init. it makes sense Reviewed-by: Rodrigo Vivi > > Cc: Rodrigo Vivi > Signed-off-by: Anshuman Gupta > --- > drivers/gpu/drm/xe/xe_pci.c | 1 - > drivers/gpu/drm/xe/xe_pm.c | 3 ++- > drivers/gpu/drm/xe/xe_pm.h | 1 - > 3 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c > index 96826b4d5fc3..137026ddee42 100644 > --- a/drivers/gpu/drm/xe/xe_pci.c > +++ b/drivers/gpu/drm/xe/xe_pci.c > @@ -684,7 +684,6 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > return err; > } > > - xe_pm_runtime_init(xe); > xe_pm_init(xe); > > return 0; > diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c > index 534768ac4410..c250a36b99ad 100644 > --- a/drivers/gpu/drm/xe/xe_pm.c > +++ b/drivers/gpu/drm/xe/xe_pm.c > @@ -132,7 +132,7 @@ static bool xe_pm_pci_d3cold_capable(struct pci_dev *pdev) > return true; > } > > -void xe_pm_runtime_init(struct xe_device *xe) > +static void xe_pm_runtime_init(struct xe_device *xe) > { > struct device *dev = xe->drm.dev; > > @@ -148,6 +148,7 @@ void xe_pm_init(struct xe_device *xe) > { > struct pci_dev *pdev = to_pci_dev(xe->drm.dev); > > + xe_pm_runtime_init(xe); > xe->d3cold_capable = xe_pm_pci_d3cold_capable(pdev); > } > > diff --git a/drivers/gpu/drm/xe/xe_pm.h b/drivers/gpu/drm/xe/xe_pm.h > index 38764537a566..e0c4f92e27c5 100644 > --- a/drivers/gpu/drm/xe/xe_pm.h > +++ b/drivers/gpu/drm/xe/xe_pm.h > @@ -13,7 +13,6 @@ struct xe_device; > int xe_pm_suspend(struct xe_device *xe); > int xe_pm_resume(struct xe_device *xe); > > -void xe_pm_runtime_init(struct xe_device *xe); > void xe_pm_init(struct xe_device *xe); > void xe_pm_runtime_fini(struct xe_device *xe); > int xe_pm_runtime_suspend(struct xe_device *xe); > -- > 2.38.0 >