Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp896830pxb; Tue, 1 Feb 2022 12:41:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnXm/zPvm74auS/GdDQdm9QzPITSIbcTYkf72iQkNzhmZdqynQZs562yfTSpmxVOGqL2nq X-Received: by 2002:a17:902:b789:: with SMTP id e9mr28590792pls.50.1643748091796; Tue, 01 Feb 2022 12:41:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748091; cv=none; d=google.com; s=arc-20160816; b=aKQ1z8LVqLtX5fqltILiztv/CEvpl7FnFxT+ymG+VrMcp0MXYwOSygol/oVJcs/ME8 DLRp3Tzdp0ckKJlGOrOTycmzuIE/xlFYU3RQmNcEokgvhJPlB5DlX1KUdJ0PGZ+vZcBw RGPksXfeI2PQK5lBEb8+EDmt31PQauBwEbX7gyuz/COn7/8T0tyGez34y2SpRNGxkRcH /87hQWFnXzAskMLSpKBne/KeW8hKxmcq9ICI9LUIwRZoU/6xZJ8U4nm14fad9RgycEcA Gg3wfsOKJwwbdodYnGDkwNU3H2XqOmAIdaxq31iUhuZNCmM54cOxhQrU2RX/gcLJukjv 5OJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=HYyjVsXPkZ1CboNbgCjLZiYYnDjzfxqHgjLGqeeL70g=; b=dKcSflNKCQqRLtp6avIAsRjps5uINo+/c0XHrGoEa224aBHerd2g2DIKt2jxklOmMM NOGYWS5ejgvH9Ve+cOe2sVipXdq3zLOOqnkb5sBx5f8FzneU3/BshPr1jX0XZ0rU6kgG 1K+7luPCm/8oP6tjGdTp75Jo5mUbKEmtsf6lsaGrBJiGXcLg8VDtMibJqyyF8GOFi9D5 ToultJ+xFzfQfBtfqf/Fke8wiR5RQjZCllsQL/242Fkufuq15ylyeBQdplENjRdGA4W7 CCVtTeMYoEq3dGaBc4J5cPjKaJOYRgTsF+/H6co6DSJtBhtxoi9jGmeEDeyX4zLi9Dbj 8TKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=HXQz65hC; 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=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i71si9662785pge.868.2022.02.01.12.41.20; Tue, 01 Feb 2022 12:41:31 -0800 (PST) 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=@collabora.com header.s=mail header.b=HXQz65hC; 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=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbiAaOTy (ORCPT + 99 others); Mon, 31 Jan 2022 09:19:54 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:33266 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231279AbiAaOTs (ORCPT ); Mon, 31 Jan 2022 09:19:48 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: bbeckett) with ESMTPSA id 72AFF1F43400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1643638782; bh=zLq+h2tZmgDHu03aJieo+9a+SBgp6ZkVG1IliN7+T00=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HXQz65hCvY9bYz8XKigKybbauo1roR4Gpy6vWmZ0gg/JcIkQNIonWTYmzrvchsUh6 vExlgOOLT7qrog05GTZA+nWclIkA8xtNVw5vbad/goid6fNpDQ3KFvfsiwjlKRCUQc 4StIbeVfqOR2bSgmXUZi7Q2CDvI6N0A2zN5Q4ao5vA6gw/Qse/CMEKeVH4uxgDVkBA cGs1RePfA6WC5eJNMsrJVk4D+3LsF+qItYH/msK6Caz9yu4V/nafHBlVarOPhY8+Vg pC1rzQgfRVAJ19eGHWgQic9n08TVmouYfbUhxY/Jf0B6GHDs1UZe4kzCEJLjTHqk6u qWS4MLmDJDZoA== Message-ID: <094b3a2d-0829-c34c-3a3d-e9639095f469@collabora.com> Date: Mon, 31 Jan 2022 14:19:40 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag Content-Language: en-US To: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Matthew Auld References: <20220125193530.3272386-1-bob.beckett@collabora.com> <20220125193530.3272386-2-bob.beckett@collabora.com> <6d0a57e7-daf7-6436-e806-7cc8794c2d50@shipmail.org> <19bf8290-9308-b5c6-eb73-4020fa81aa66@collabora.com> From: Robert Beckett In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/01/2022 09:37, Thomas Hellström (Intel) wrote: > > On 1/26/22 18:11, Robert Beckett wrote: >> >> >> On 26/01/2022 13:49, Thomas Hellström (Intel) wrote: >>> >>> On 1/25/22 20:35, Robert Beckett wrote: >>>> From: Ramalingam C >>>> >>>> Add a new platform flag, needs_compact_pt, to mark the requirement of >>>> compact pt layout support for the ppGTT when using 64K GTT pages. >>>> >>>> With this flag has_64k_pages will only indicate requirement of 64K >>>> GTT page sizes or larger for device local memory access. >>>> >>>> Suggested-by: Matthew Auld >>>> Signed-off-by: Ramalingam C >>>> Signed-off-by: Robert Beckett >>>> --- >>>>   drivers/gpu/drm/i915/i915_drv.h          | 10 +++++++--- >>>>   drivers/gpu/drm/i915/i915_pci.c          |  2 ++ >>>>   drivers/gpu/drm/i915/intel_device_info.h |  1 + >>>>   3 files changed, 10 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/drivers/gpu/drm/i915/i915_drv.h >>>> b/drivers/gpu/drm/i915/i915_drv.h >>>> index 44c1f98144b4..1258b7779705 100644 >>>> --- a/drivers/gpu/drm/i915/i915_drv.h >>>> +++ b/drivers/gpu/drm/i915/i915_drv.h >>>> @@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct drm_i915_private >>>> *i915, >>>>   /* >>>>    * Set this flag, when platform requires 64K GTT page sizes or >>>> larger for >>>> - * device local memory access. Also this flag implies that we >>>> require or >>>> - * at least support the compact PT layout for the ppGTT when using >>>> the 64K >>>> - * GTT pages. >>> >>> Why do we remove these comment lines? >> Because HAS_64K_PAGES now means just 64K page, it no longer means also >> requires compact pt. >> This is to support other products that will have 64K but not have the >> PDE non-sharing restriction in future. >> >> Those lines moved to the next change NEEDS_COMPACT_PT, which is now >> separate. > > Yes, NEEDS_COMPACT_PT indicates that compact is *required* but does > "HAS_64K_PAGES" still mean compact is supported? That information is lost. Not any more. I discussed the ambiguity of the original wording with mauld on irc. We came to the conclusion that HAS_64K_PAGES should mean just that, that the hw has support for 64K pages, and says nothing about compact-pt at all. NEEDS_COMPACT_PT means that the hw has compact-pt support and the driver is required to use it as it is a hw limitation. There will be other devices that can support compact-pt but do not mandate its use. In this case, the current code would not use them, but there is potential for some future opportunistic use of that in the driver if desired (currently expected to include accelerated move/clear). If any opportunistic use is added to the driver, a new flag can be added along with the code that uses it to indicate compact-pt availability that is not mandatory (HAS_COMPACT_PT most likely), but as there is no code requiring it currently it should not be added yet, and the comments left as this patch does. > > /Thomas > >