Skip to content

Conversation

@kbommu
Copy link

@kbommu kbommu commented Dec 18, 2025

Fix double copying of pinned kernel BOs on suspend and copy pinned
external BOs in the correct pass.
Pre-allocate system memory for pinned external BOs in the PM notifier.
Allow pinning of P2P dma-bufs in VRAM with proper TTM cgroup accounting.

Signed-off-by: Bommu Krishnaiah krishnaiah.bommu@intel.com

@sys-i915-oscijenkins
Copy link

CI Bug Log - changes from xkb-6.14-189-92fbf0b89afa05508181d2ca1503e4ea096c5382_BAT -> xkb-pr-6.14-235-403-f578951d7f4920e8ab139159bee8363aee9faed8_BAT

Summary

SUCCESS

No regressions found.

Participating hosts (5 -> 5)

No changes in participating hosts

Known issues

Here are the changes found in xkb-pr-6.14-235-403-f578951d7f4920e8ab139159bee8363aee9faed8_BAT that come from known issues:

IGT changes

Issues hit

Build changes

  • IGT: igt-xkb-82-4e12718e2 -> igt-xkb-83-c5b9c035a
  • Linux: xkb-6.14-189-92fbf0b89afa05508181d2ca1503e4ea096c5382 -> xkb-pr-6.14-235-403-f578951d7f4920e8ab139159bee8363aee9faed8

igt-xkb-82-4e12718e2: 4e12718e2
igt-xkb-83-c5b9c035a: c5b9c035a
xkb-6.14-189-92fbf0b89afa05508181d2ca1503e4ea096c5382: 92fbf0b
xkb-pr-6.14-235-403-f578951d7f4920e8ab139159bee8363aee9faed8: f578951

Copy link

@ayazahma ayazahma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these are in sriov ?
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= thomas.hellstrom@linux.intel.com
Date: Thu, 18 Sep 2025 11:22:06 +0200
Subject: drm/xe: Pre-allocate system memory for pinned external bos in
the pm notfier
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

does patches was taken from linux-next or downloaded from link

Copy link

@ayazahma ayazahma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we have three commits

@kbommu
Copy link
Author

kbommu commented Dec 22, 2025

why these are in sriov ?
I have dependence changes in sriov section ("backport/patches/features/sriov/0001-drm-xe-evict-user-memory-in-PM-notifier.patch"), because of this I have taken into sriov section.

can you please suggest how I can forward

  1. I can move https://lore.kernel.org/all/20250416150913.434369-5-matthew.auld@intel.com/ changes from sriov chnages to base and apply this changes in base
  2. current patch(apply changes in base)

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= thomas.hellstrom@linux.intel.com Date: Thu, 18 Sep 2025 11:22:06 +0200 Subject: drm/xe: Pre-allocate system memory for pinned external bos in the pm notfier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit

does patches was taken from linux-next or downloaded from link

this changes I have taken from https://gitlab.freedesktop.org/drm/tip.git

@kbommu
Copy link
Author

kbommu commented Dec 22, 2025

Tested-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20251217093441.5073-1-thomas.hellstrom@linux.intel.com
(cherry picked from commit 425fe550fb513b567bd6d01f397d274092a9c274 linux-next)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recheck placement, do we have multiple sign-off of same person?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit it self has twice
from tip:-
commit fe3ccd24138fd391ae8e32289d492c85f67770fc
Author: Thomas Hellström thomas.hellstrom@linux.intel.com
Date: Wed Dec 17 10:34:41 2025 +0100

drm/xe: Drop preempt-fences when destroying imported dma-bufs.

When imported dma-bufs are destroyed, TTM is not fully
individualizing the dma-resv, but it *is* copying the fences that
need to be waited for before declaring idle. So in the case where
the bo->resv != bo->_resv we can still drop the preempt-fences, but
make sure we do that on bo->_resv which contains the fence-pointer
copy.

In the case where the copying fails, bo->_resv will typically not
contain any fences pointers at all, so there will be nothing to
drop. In that case, TTM would have ensured all fences that would
have been copied are signaled, including any remaining preempt
fences.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Fixes: fa0af721bd1f ("drm/ttm: test private resv obj on release/destroy")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <stable@vger.kernel.org> # v6.16+
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Tested-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20251217093441.5073-1-thomas.hellstrom@linux.intel.com
(cherry picked from commit 425fe550fb513b567bd6d01f397d274092a9c274)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>

@@ -0,0 +1,50 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check this line, why UTF?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from drm tip itself it is commits same, it is not my local change
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= thomas.hellstrom@linux.intel.com
Date: Thu, 18 Sep 2025 11:22:07 +0200

@kbommu kbommu requested a review from ayazahma December 30, 2025 07:30
kbommu added 3 commits January 6, 2026 11:19
Fix double copying of pinned kernel BOs on suspend and copy pinned
external BOs in the correct pass.
Pre-allocate system memory for pinned external BOs in the PM notifier.
Allow pinning of P2P dma-bufs in VRAM with proper TTM cgroup accounting.

Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Test fences in the private dma_resv object instead of checking a pointer
that may reference a shared dma_resv.

This only affects imported BOs with an SG table, since their dma_resv
pointer is not replaced on release.

Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
When destroying imported dma-bufs, drop preempt fences from the private
dma-resv object rather than a potentially shared one.

TTM copies the fences needed for idle detection into the private resv,
so preempt fences must be removed from bo->_resv. If the copy fails,
no fences are present to drop and TTM guarantees they are already
signaled.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Fixes: fa0af721bd1f ("drm/ttm: test private resv obj on release/destroy")

Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
@sys-i915-oscijenkins
Copy link

CI Bug Log - changes from xkb-6.14-194-28f7f5c98f75e2463f0696b1c3141c580ca1c312_BAT -> xkb-pr-6.14-235-416-2f1bdd2233305df854222dddb13000c3fb1aed6c_BAT

Summary

SUCCESS

No regressions found.

Participating hosts (5 -> 5)

No changes in participating hosts

Known issues

Here are the changes found in xkb-pr-6.14-235-416-2f1bdd2233305df854222dddb13000c3fb1aed6c_BAT that come from known issues:

IGT changes

Issues hit

Possible fixes

Warnings

Build changes

  • IGT: igt-xkb-83-c5b9c035a -> igt-xkb-86-165f8a8a8
  • Linux: xkb-6.14-194-28f7f5c98f75e2463f0696b1c3141c580ca1c312 -> xkb-pr-6.14-235-416-2f1bdd2233305df854222dddb13000c3fb1aed6c

igt-xkb-83-c5b9c035a: c5b9c035a
igt-xkb-86-165f8a8a8: 165f8a8a8
xkb-6.14-194-28f7f5c98f75e2463f0696b1c3141c580ca1c312: 28f7f5c
xkb-pr-6.14-235-416-2f1bdd2233305df854222dddb13000c3fb1aed6c: 2f1bdd2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants