public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/bo: Don't include the CCS metadata in the dma-buf sg-table
@ 2025-12-09 20:49 Thomas Hellström
  2025-12-09 21:02 ` Matthew Brost
  2025-12-10  9:16 ` Karol Wachowski
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Hellström @ 2025-12-09 20:49 UTC (permalink / raw)
  To: intel-xe
  Cc: Thomas Hellström, Rodrigo Vivi, Matthew Brost,
	Maarten Lankhorst, stable

Some Xe bos are allocated with extra backing-store for the CCS
metadata. It's never been the intention to share the CCS metadata
when exporting such bos as dma-buf. Don't include it in the
dma-buf sg-table.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: <stable@vger.kernel.org> # v6.8+
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/xe/xe_dma_buf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_dma_buf.c b/drivers/gpu/drm/xe/xe_dma_buf.c
index 54e42960daad..7c74a31d4486 100644
--- a/drivers/gpu/drm/xe/xe_dma_buf.c
+++ b/drivers/gpu/drm/xe/xe_dma_buf.c
@@ -124,7 +124,7 @@ static struct sg_table *xe_dma_buf_map(struct dma_buf_attachment *attach,
 	case XE_PL_TT:
 		sgt = drm_prime_pages_to_sg(obj->dev,
 					    bo->ttm.ttm->pages,
-					    bo->ttm.ttm->num_pages);
+					    obj->size >> PAGE_SHIFT);
 		if (IS_ERR(sgt))
 			return sgt;
 
-- 
2.51.1


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

end of thread, other threads:[~2025-12-10  9:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-09 20:49 [PATCH] drm/xe/bo: Don't include the CCS metadata in the dma-buf sg-table Thomas Hellström
2025-12-09 21:02 ` Matthew Brost
2025-12-10  9:16 ` Karol Wachowski

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