Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1590961pxb; Tue, 8 Feb 2022 23:22:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFP3lahyfheCjvd9bIVTq/YPPvVMVwhQuwl+8oqkkwUn7F749kJO8UKOK+xKwy9Iyej9qv X-Received: by 2002:a17:90b:4a0a:: with SMTP id kk10mr1090370pjb.208.1644391326785; Tue, 08 Feb 2022 23:22:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644391326; cv=none; d=google.com; s=arc-20160816; b=sVGlANmTLvR35ia6vSUkX5M1lmSvOWfoB1lWJbBQw0y8M/p9qSCjxusalzbqByDddR jj4NoWtkXZ2GoAY0zJr2ikYagqwiEkTwmI+ol2wMqU4M4SdX0+VfIKZX9AJgouqT5p60 XmMRC8RE+7AJ9Ez6zAucxGXsSxDq5FjGt0v9H1CkT8xtjoZVeLrxOoAahOh0PBMUBBog PtiXPHycIOOM9gLkY4eQAy/TxKZseNNlyE7klaMIyT2ORRSKNGL8eTGbJjlG3giWxeZl GqaGfZCqTYVj75gcjjSixp2N3gfD5NGWDUJI2smFcP32LBd95wbsMwMgFZCdBiu8Bqiq wcDA== 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=w15WeYpJeycmk/0cs9Q8hb7DnLwqHt/yT1C4Zea9nd5as6s+dj3Yvv387027QWwUfi MVYfzMfaEtfCtU9ix7GEe3Oycue0dr9vkMW74PepC7ckV6wTg4TW4bfGS9ROLnti5edg 60xNym3Ob5KDmagFGi3HTM1rL2DcNtLwOkwWddsKxmvwitwikcpplYTPZ6O/9huLYWzB cBik7f546dOe+suriEiy1wxC/cXmRy/XCCAK0QqtS9V8XLtBz8p7M8+EbTRFz0ryhm+U ZwyEURWFQYjZ6BSmcDke29YfdcNmeETtHlM7S9DTvabfeqRh0hJXqd5JZtPgwfMRTl7h /uzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=eSOcjbck; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a6si11568430pfv.342.2022.02.08.23.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 23:22:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=eSOcjbck; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B4F53E06A60A; Tue, 8 Feb 2022 22:35:28 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388085AbiBHWcR (ORCPT + 99 others); Tue, 8 Feb 2022 17:32:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386440AbiBHUee (ORCPT ); Tue, 8 Feb 2022 15:34:34 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89FE2C0612C0 for ; Tue, 8 Feb 2022 12:34:33 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: bbeckett) with ESMTPSA id BAA4B1F450A7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644352470; bh=wakhSFcVMZevZPcycdryY+hpEED54NWm/zeUvW6H0hU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eSOcjbckKYxUTCfS9q/Ko+ezw2Q4el1TXEyYaTKOwEDcUvNE0ZRARFfjYKh8g3cWt 9AhfgwPEgBNM0zXi7ddIk+TfsXVMPOMXSVIRrfvMw96ePAyVJNvRpYtBJr0lR+rFOR rWRsk+EI7ca/MRN7TttCtiS1Ecot6MmUNHtMlRE6+AxueQE5Jk5YlFxni/4zJdjNWV 6dT0zD0O831WNFd3LCbI04XuiT2CBtNZZaa1ClE1jsQRQqCYx62qiCdgvQh7YRFW4t FEPJP9Nq/FHc63jBIjFFc04986crC55yMeNqitXe4w/cztMlOGORnYjFONgXZejkM4 qMjhcrMCoMB5A== 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 v8 1/5] drm/i915: add needs_compact_pt flag Date: Tue, 8 Feb 2022 20:34:15 +0000 Message-Id: <20220208203419.1094362-2-bob.beckett@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220208203419.1094362-1-bob.beckett@collabora.com> References: <20220208203419.1094362-1-bob.beckett@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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