From mboxrd@z Thu Jan 1 00:00:00 1970 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 68285C433F5 for ; Fri, 10 Dec 2021 02:11:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9908C10E1C3; Fri, 10 Dec 2021 02:11:22 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFD1E10E1C3; Fri, 10 Dec 2021 02:11:21 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10193"; a="235764765" X-IronPort-AV: E=Sophos;i="5.88,194,1635231600"; d="scan'208";a="235764765" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2021 18:11:07 -0800 X-IronPort-AV: E=Sophos;i="5.88,194,1635231600"; d="scan'208";a="516570392" Received: from steffens-ivm1.ger.corp.intel.com (HELO intel.com) ([10.252.53.116]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2021 18:11:04 -0800 Date: Fri, 10 Dec 2021 04:11:01 +0200 From: Andi Shyti To: Matt Roper Subject: Re: [PATCH v6 10/11] drm/i915: Use to_gt() helper for GGTT accesses Message-ID: References: <20211209132512.47241-1-andi.shyti@linux.intel.com> <20211209132512.47241-11-andi.shyti@linux.intel.com> <20211210001858.GX2219399@mdroper-desk1.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211210001858.GX2219399@mdroper-desk1.amr.corp.intel.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?Q?Micha=C5=82?= Winiarski , Andi Shyti , Intel GFX , Lucas De Marchi , DRI Devel , Chris Wilson , Andi Shyti Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Matt, > > GGTT is currently available both through i915->ggtt and gt->ggtt, and we > > eventually want to get rid of the i915->ggtt one. > > Use to_gt() for all i915->ggtt accesses to help with the future > > refactoring. > > I think we can also convert the two references in i915_drm_suspend() and > i915_drm_resume(), right? With those converted, I think the only > remaining use of i915->ggtt will be the call to intel_gt_init_hw_early() > during startup that assigns the gt->ggtt pointer. Maybe we should just > make that function assign a drmm_kzalloc() and drop the i915->ggtt > completely? I think calling directly drmm_kzalloc() and get rid of i915->ggtt is a good idea. Thanks, Andi From mboxrd@z Thu Jan 1 00:00:00 1970 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 0F7C0C433EF for ; Fri, 10 Dec 2021 02:11:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A701010E1EE; Fri, 10 Dec 2021 02:11:23 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFD1E10E1C3; Fri, 10 Dec 2021 02:11:21 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10193"; a="235764765" X-IronPort-AV: E=Sophos;i="5.88,194,1635231600"; d="scan'208";a="235764765" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2021 18:11:07 -0800 X-IronPort-AV: E=Sophos;i="5.88,194,1635231600"; d="scan'208";a="516570392" Received: from steffens-ivm1.ger.corp.intel.com (HELO intel.com) ([10.252.53.116]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2021 18:11:04 -0800 Date: Fri, 10 Dec 2021 04:11:01 +0200 From: Andi Shyti To: Matt Roper Message-ID: References: <20211209132512.47241-1-andi.shyti@linux.intel.com> <20211209132512.47241-11-andi.shyti@linux.intel.com> <20211210001858.GX2219399@mdroper-desk1.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211210001858.GX2219399@mdroper-desk1.amr.corp.intel.com> Subject: Re: [Intel-gfx] [PATCH v6 10/11] drm/i915: Use to_gt() helper for GGTT accesses X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?Q?Micha=C5=82?= Winiarski , Intel GFX , Lucas De Marchi , DRI Devel , Chris Wilson Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi Matt, > > GGTT is currently available both through i915->ggtt and gt->ggtt, and we > > eventually want to get rid of the i915->ggtt one. > > Use to_gt() for all i915->ggtt accesses to help with the future > > refactoring. > > I think we can also convert the two references in i915_drm_suspend() and > i915_drm_resume(), right? With those converted, I think the only > remaining use of i915->ggtt will be the call to intel_gt_init_hw_early() > during startup that assigns the gt->ggtt pointer. Maybe we should just > make that function assign a drmm_kzalloc() and drop the i915->ggtt > completely? I think calling directly drmm_kzalloc() and get rid of i915->ggtt is a good idea. Thanks, Andi