Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1243625pxb; Tue, 1 Feb 2022 23:44:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxO4aymUMzh8BntLMmcci49kjvCeWx/AnkzMf1xlqh1XEsu+IM37igtFEOa/V+PTpbYrq4p X-Received: by 2002:a17:907:2d8d:: with SMTP id gt13mr24717588ejc.583.1643787884112; Tue, 01 Feb 2022 23:44:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643787884; cv=none; d=google.com; s=arc-20160816; b=WDvVnKQ+92ouacxz4bFkeCZK7h+paehai/fGlfAH5tbt25I/4ly9uTYlMVssknhm4g 4b6XscRTyw0tlhMU4wtx654uHGTUbgerKWQ3AzAIKp2/JdYYJLhYcW0jMgF9aF2Gshwb txUMYrjBMeQzS242Df1Dmg+KaP1m0HS+YDRlbd60SejSQqSXT8DjkvzDD/IqKjoKKkVk J+m1qs06yZLgNP2/gdISm4FTMbHcoSNSF/8ssPleBAa9UINvUhtz7YTCiLuc+s8mN7T4 j9EKNO1CByjAcBdkn31BqN+OQo8NF/cOWwcoa4RMUDRCtbwVCvXuQVQTKGRBuNkPDJOS JnqQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qEyQ2n9UDR//eUAGVxkXLeuDpD9wBbCSMVv+y7Oo/x8=; b=G8nRUX8vNyJoZxEUxebGXKSPjiA2jRBQ5Kxb9j132JMMicM0FvLpTtSNfuPQk3k4pO uMcZ0mWBQNf7Rl7ap58etr7dzpb4GdfFrmJGnhbxTCAwgNQ+L1U7Bt/qT5vDRztwLoqf GPODR7j5tf370rH5EiTALrd1lR0Ln3RQ/NLxp3JylnpzZQVKEXRIvoF86Dx5bM52WxbB lyZAFUGZvLIUJeKz2tSFBzc8Ie/03t1d3PNXhgcml0f6IAXod7B5xihYpHlphv0YGrvR octmVv/bu/HmY14PLxUz9C3xSZhUXfKcOKlGTUPDVhZGLGT43nj9vGfvpucdH9yTD4wy HKLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Yg6gQ7FR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di6si11084602ejc.546.2022.02.01.23.44.16; Tue, 01 Feb 2022 23:44:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Yg6gQ7FR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235875AbiBASYm (ORCPT + 99 others); Tue, 1 Feb 2022 13:24:42 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:47930 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235783AbiBASYl (ORCPT ); Tue, 1 Feb 2022 13:24:41 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: bbeckett) with ESMTPSA id EB0AB1F42EBA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1643739880; bh=wakhSFcVMZevZPcycdryY+hpEED54NWm/zeUvW6H0hU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yg6gQ7FRyxRGZmcy4Md1ayTNrznAdxBSClNHjdWfPNwAaFnK0sD+DFVWQesjXgHqy OKwuoTw6kQHeCVy+qmFzowNJFFgixoYlJkhF0gjjj7Efy9cXxyaaiCB7S3gutXrswh 5W8cQY/iNM/PB/8o2cWRllUHYbLJv5nXiUb2ibb8Q2PxmFhmNUg8fpI714R+TBKt8H xfEIHPevbWR9D6F/wsjuPAdYNB5Od0VJ4UORX9y2K9r3BlSePL3v/t08+KrKoXDAbh 8VjEcYsg5luyOMUvbF1yuj0yVH66x6H9vKG+3WC64jM9O7H8qJod7JVIRFH1eAwAnC ZY6ebwlnBAfKg== From: Robert Beckett To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Cc: Ramalingam C , Matthew Auld , Robert Beckett , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 1/5] drm/i915: add needs_compact_pt flag Date: Tue, 1 Feb 2022 18:24:17 +0000 Message-Id: <20220201182422.1548863-2-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220201182422.1548863-1-bob.beckett@collabora.com> References: <20220201182422.1548863-1-bob.beckett@collabora.com> 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 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. v6: * minor doc formatting Suggested-by: Matthew Auld Signed-off-by: Ramalingam C Signed-off-by: Robert Beckett Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/i915_drv.h | 11 ++++++++--- drivers/gpu/drm/i915/i915_pci.c | 2 ++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 00e7594b59c9..4afdfa5fd3b3 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1512,12 +1512,17 @@ 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. + * device local memory access. */ #define HAS_64K_PAGES(dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages) +/* + * Set this flag when platform doesn't allow both 64k pages and 4k pages in + * the same PT. this flag means we need to support compact PT layout for the + * ppGTT when using the 64K GTT pages. + */ +#define NEEDS_COMPACT_PT(dev_priv) (INTEL_INFO(dev_priv)->needs_compact_pt) + #define HAS_IPC(dev_priv) (INTEL_INFO(dev_priv)->display.has_ipc) #define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i)) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 2df2db0a5d70..ce6ae6a3cbdf 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -1028,6 +1028,7 @@ static const struct intel_device_info xehpsdv_info = { PLATFORM(INTEL_XEHPSDV), .display = { }, .has_64k_pages = 1, + .needs_compact_pt = 1, .platform_engine_mask = BIT(RCS0) | BIT(BCS0) | BIT(VECS0) | BIT(VECS1) | BIT(VECS2) | BIT(VECS3) | @@ -1046,6 +1047,7 @@ static const struct intel_device_info dg2_info = { PLATFORM(INTEL_DG2), .has_guc_deprivilege = 1, .has_64k_pages = 1, + .needs_compact_pt = 1, .platform_engine_mask = BIT(RCS0) | BIT(BCS0) | BIT(VECS0) | BIT(VECS1) | diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h index abf1e103c558..d8da40d01dca 100644 --- a/drivers/gpu/drm/i915/intel_device_info.h +++ b/drivers/gpu/drm/i915/intel_device_info.h @@ -130,6 +130,7 @@ enum intel_ppgtt_type { /* Keep has_* in alphabetical order */ \ func(has_64bit_reloc); \ func(has_64k_pages); \ + func(needs_compact_pt); \ func(gpu_reset_clobbers_display); \ func(has_reset_engine); \ func(has_global_mocs); \ -- 2.25.1