Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5497609pxb; Wed, 26 Jan 2022 13:26:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAgubrN0DXRRE1zSJKSzX3dvtJK7wX4/Ize5d/JIcthRJ8V+EavP10nfxVqj3clPXI4etj X-Received: by 2002:a17:907:6e91:: with SMTP id sh17mr526271ejc.532.1643232408790; Wed, 26 Jan 2022 13:26:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643232408; cv=none; d=google.com; s=arc-20160816; b=zKomjT2Ckpg8HUapT+iIu+Q6GrXh76SfyRbA8e2/6nGVyojJDnYQmckqcyVGSBs37F AH6xi+tUGMTzjPDD+UfT2cXghGZAyDQTsJhl4LXWTykNnJUDY/s4nwagKIIwhFaz+WNK OfYW1x8wGzA3NAYfgl9nYZiykdj/fxqaZFLfDHhB945Ve67U/Y6mJDmMsDCFhs6c8HwP 3rKvwBXqkjqETvFgOC1Jsq+Cxr4wedzZPi3/Q5Tz6gwmRp2fenh28NPyYrPr+4+k0kRl 7HPAB1UNNNYSRMSjZhjtZpbOM7nr92BMHME3P954fj3axxbYh+7YHds+6ZY/fc0p66Ly BYiw== 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=cWGhZ8aH0JVddkkU010RIX58+A2jc/AZR4oa45UJBLU=; b=Dh6RQh0zIGSAuSHVAgjLdd8J1+WYWBv1VBPTgAjTuQi4p6/aabgwfMe/oy8nOq2Mux Vw0qX2t0Gbq9Hu79LGR6Je0kv4a/m9k/Sz1yc9ygh0wY7RAHvKGsiOK/GJVWrkbR+MFl ToSnwUSv0R+p4eQZP/UjwPhqBg1ErpGzKYlU9j0hNfPUTeQI2S3cnUa7rXbobPvk2Km4 HPak0wG5Idi51jaUsGsZ3godRUJ3vTGo8C1pw8ZXIBfS8hcVXZjjRcIsBCLXsCDmkqmB lchVVBRZC6GL2JSGlQKO1uGGixwENeOvxyhVTCAcnvhbWEUwYAZv/RUfe/sSShvWmIcb /CKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=AZsNI8QV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd8si247034ejc.43.2022.01.26.13.26.24; Wed, 26 Jan 2022 13:26:48 -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=fail (test mode) header.i=@shipmail.org header.s=mail header.b=AZsNI8QV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235259AbiAZNzq (ORCPT + 99 others); Wed, 26 Jan 2022 08:55:46 -0500 Received: from pio-pvt-msa2.bahnhof.se ([79.136.2.41]:57454 "EHLO pio-pvt-msa2.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235073AbiAZNzp (ORCPT ); Wed, 26 Jan 2022 08:55:45 -0500 X-Greylist: delayed 362 seconds by postgrey-1.27 at vger.kernel.org; Wed, 26 Jan 2022 08:55:45 EST Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTP id 6CE733F9BA; Wed, 26 Jan 2022 14:49:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Flag: NO X-Spam-Score: -2.1 X-Spam-Level: X-Spam-Status: No, score=-2.1 tagged_above=-999 required=6.31 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Authentication-Results: pio-pvt-msa2.bahnhof.se (amavisd-new); dkim=pass (1024-bit key) header.d=shipmail.org Received: from pio-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xgQk0su1ptZ1; Wed, 26 Jan 2022 14:49:40 +0100 (CET) Received: by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 86CE53F743; Wed, 26 Jan 2022 14:49:36 +0100 (CET) Received: from [192.168.0.209] (unknown [192.55.55.54]) by mail1.shipmail.org (Postfix) with ESMTPSA id 20EF83626AA; Wed, 26 Jan 2022 14:49:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1643204975; bh=U0ae81JStUzv2mZfy6EFlonFGBJryB1hXGKCUVJCOBg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AZsNI8QVytHYz1kdPeNT7/oqZRZ0HxvQO2D9fLQarz2yybxXXIQSKi+WzGrJaAPxy yxtheH590Ux0scAltsb9k2SGvpflevo8h6qGhH26yJtrkIWuklL/brYPzedJlGRlzY e7w5OUMUp1ZA9ZOQLoCfRMbssoXsdIyGgeiAHgWc= Message-ID: <6d0a57e7-daf7-6436-e806-7cc8794c2d50@shipmail.org> Date: Wed, 26 Jan 2022 14:49:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag Content-Language: en-US To: Robert Beckett , 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> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= In-Reply-To: <20220125193530.3272386-2-bob.beckett@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > + * 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 First line of multi-line comments should be empty. > + * 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 4081fd50ba9d..799b56569ef5 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) | > @@ -1045,6 +1046,7 @@ static const struct intel_device_info dg2_info = { > .media.rel = 55, > PLATFORM(INTEL_DG2), > .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 3699b1c539ea..c8aaf646430c 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); \