Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Use ttm_uncached for BO with NEEDS_UC flag
@ 2024-06-06 19:56 Michal Wajdeczko
  2024-06-06 20:03 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Michal Wajdeczko @ 2024-06-06 19:56 UTC (permalink / raw)
  To: intel-xe; +Cc: Michal Wajdeczko, Thomas Hellström, Matt Roper

We should honor requested uncached mode also at the TTM layer.
Otherwise, we risk losing updates to the memory based interrupts
source or status vectors, as those require uncached memory.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/xe/xe_bo.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 2bae01ce4e5b..2573cc118f29 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -378,6 +378,9 @@ static struct ttm_tt *xe_ttm_tt_create(struct ttm_buffer_object *ttm_bo,
 	    (xe->info.graphics_verx100 >= 1270 && bo->flags & XE_BO_FLAG_PAGETABLE))
 		caching = ttm_write_combined;
 
+	if (bo->flags & XE_BO_FLAG_NEEDS_UC)
+		caching = ttm_uncached;
+
 	err = ttm_tt_init(&tt->ttm, &bo->ttm, page_flags, caching, extra_pages);
 	if (err) {
 		kfree(tt);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-06-19 11:40 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06 19:56 [PATCH] drm/xe: Use ttm_uncached for BO with NEEDS_UC flag Michal Wajdeczko
2024-06-06 20:03 ` ✓ CI.Patch_applied: success for " Patchwork
2024-06-06 20:04 ` ✓ CI.checkpatch: " Patchwork
2024-06-06 20:06 ` ✓ CI.KUnit: " Patchwork
2024-06-06 20:20 ` ✓ CI.Build: " Patchwork
2024-06-06 20:22 ` ✓ CI.Hooks: " Patchwork
2024-06-06 20:24 ` ✓ CI.checksparse: " Patchwork
2024-06-06 21:08 ` ✓ CI.BAT: " Patchwork
2024-06-07  6:28 ` ✗ CI.FULL: failure " Patchwork
2024-06-07 10:11   ` Michal Wajdeczko
2024-06-11 12:47 ` [PATCH] " Thomas Hellström
2024-06-12 18:03   ` Michal Wajdeczko
2024-06-17 20:28     ` Matt Roper
2024-06-18 12:38       ` Thomas Hellström
2024-06-18 16:43         ` Matt Roper
2024-06-18 18:29           ` Thomas Hellström
2024-06-18 18:54             ` Matt Roper
2024-06-19  9:44               ` Matthew Auld
2024-06-19 11:40                 ` Thomas Hellström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox