From: Andrzej Hajda <andrzej.hajda@intel.com>
To: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Jonathan Cavitt <jonathan.cavitt@intel.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Matthew Auld <matthew.auld@intel.com>
Subject: [Intel-gfx] [PATCH v8 2/2] drm/i915: Use correct huge page manager for MTL
Date: Wed, 26 Apr 2023 23:28:49 +0200 [thread overview]
Message-ID: <20230425-hugepage-migrate-v8-2-7868d54eaa27@intel.com> (raw)
In-Reply-To: <20230425-hugepage-migrate-v8-0-7868d54eaa27@intel.com>
From: Jonathan Cavitt <jonathan.cavitt@intel.com>
MTL currently uses gen8_ppgtt_insert_huge when managing huge pages.
This is because MTL reports as not supporting 64K pages, or more
accurately, the system that reports whether a platform has 64K pages
reports false for MTL. This is only half correct, as the 64K page support
reporting system only cares about 64K page support for LMEM, which MTL
doesn't have.
MTL should be using xehpsdv_ppgtt_insert_huge. However, simply changing
over to using that manager doesn't resolve the issue because MTL is
expecting the virtual address space for the page table to be flushed after
initialization, so we must also add a flush statement there.
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
index 4daaa6f5566888..9c571185395f49 100644
--- a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
+++ b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
@@ -570,6 +570,7 @@ xehpsdv_ppgtt_insert_huge(struct i915_address_space *vm,
}
} while (rem >= page_size && index < max);
+ drm_clflush_virt_range(vaddr, PAGE_SIZE);
vma_res->page_sizes_gtt |= page_size;
} while (iter->sg && sg_dma_len(iter->sg));
}
@@ -707,7 +708,7 @@ static void gen8_ppgtt_insert(struct i915_address_space *vm,
struct sgt_dma iter = sgt_dma(vma_res);
if (vma_res->bi.page_sizes.sg > I915_GTT_PAGE_SIZE) {
- if (HAS_64K_PAGES(vm->i915))
+ if (GRAPHICS_VER_FULL(vm->i915) >= IP_VER(12, 50))
xehpsdv_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
else
gen8_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
--
2.34.1
next prev parent reply other threads:[~2023-04-26 21:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 21:28 [Intel-gfx] [PATCH v8 0/2] drm/i915: Hugepage manager and test for MTL Andrzej Hajda
2023-04-26 21:28 ` [Intel-gfx] [PATCH v8 1/2] drm/i915: Migrate platform-dependent mock hugepage selftests to live Andrzej Hajda
2023-04-28 8:46 ` Andi Shyti
2023-04-26 21:28 ` Andrzej Hajda [this message]
2023-04-28 9:07 ` [Intel-gfx] [PATCH v8 2/2] drm/i915: Use correct huge page manager for MTL Andi Shyti
2023-04-26 22:29 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Hugepage manager and test for MTL (rev2) Patchwork
2023-04-27 7:19 ` Andrzej Hajda
2023-04-27 19:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Hugepage manager and test for MTL (rev3) Patchwork
2023-04-28 2:16 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-04-28 11:35 ` [Intel-gfx] [PATCH v8 0/2] drm/i915: Hugepage manager and test for MTL Andrzej Hajda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230425-hugepage-migrate-v8-2-7868d54eaa27@intel.com \
--to=andrzej.hajda@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.auld@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox