From: Philipp Stanner <phasta@kernel.org>
To: "Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
"Philipp Stanner" <phasta@kernel.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Sunil Khatri" <sunil.khatri@amd.com>,
"Vitaly Prosyak" <vitaly.prosyak@amd.com>,
"Prike Liang" <Prike.Liang@amd.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
"David Rosca" <david.rosca@amd.com>,
"Timur Kristóf" <timur.kristof@gmail.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Maíra Canal" <mcanal@igalia.com>,
"Raspberry Pi Kernel Maintenance" <kernel-list@raspberrypi.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Thomas Zimmermann" <tzimmermann@suse.de>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, amd-gfx@lists.freedesktop.org,
etnaviv@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
imagination@lists.freedesktop.org, lima@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
nouveau@lists.freedesktop.org, virtualization@lists.linux.dev,
spice-devel@lists.freedesktop.org,
intel-xe@lists.freedesktop.org, linux-tegra@vger.kernel.org,
linux-iio@vger.kernel.org, linux-usb@vger.kernel.org,
rust-for-linux@vger.kernel.or
Subject: [PATCH v2 2/3] dma-buf: Port users of dma_fence_init64()
Date: Wed, 18 Nov 2026 14:45:22 +0100 [thread overview]
Message-ID: <20261118134522.1646892-4-phasta@kernel.org> (raw)
In-Reply-To: <20261118134522.1646892-2-phasta@kernel.org>
dma_fence_init() now natively allows for selecting 64-bit seqno support.
Port all users of dma_fence_init64() to this unified method.
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
---
drivers/dma-buf/dma-fence-chain.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 7 ++++---
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 5 +++--
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c | 5 +++--
4 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c
index a588f55ea4d3..7d1495235577 100644
--- a/drivers/dma-buf/dma-fence-chain.c
+++ b/drivers/dma-buf/dma-fence-chain.c
@@ -261,8 +261,8 @@ void dma_fence_chain_init(struct dma_fence_chain *chain,
seqno = max(prev->seqno, seqno);
}
- dma_fence_init64(&chain->base, &dma_fence_chain_ops, NULL,
- context, seqno);
+ dma_fence_init(&chain->base, &dma_fence_chain_ops, NULL,
+ context, seqno, BIT(DMA_FENCE_FLAG_SEQNO64_BIT));
/*
* dma_fence_chain_enable_signaling() is invoked while holding
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
index f8652fd0525d..2924f34da316 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
@@ -133,9 +133,10 @@ int amdgpu_evf_mgr_rearm(struct amdgpu_eviction_fence_mgr *evf_mgr,
ev_fence->evf_mgr = evf_mgr;
get_task_comm(ev_fence->timeline_name, current);
spin_lock_init(&ev_fence->lock);
- dma_fence_init64(&ev_fence->base, &amdgpu_eviction_fence_ops,
- &ev_fence->lock, evf_mgr->ev_fence_ctx,
- atomic_inc_return(&evf_mgr->ev_fence_seq));
+ dma_fence_init(&ev_fence->base, &amdgpu_eviction_fence_ops,
+ &ev_fence->lock, evf_mgr->ev_fence_ctx,
+ atomic_inc_return(&evf_mgr->ev_fence_seq),
+ BIT(DMA_FENCE_FLAG_SEQNO64_BIT));
/* Remember it for newly added BOs */
dma_fence_put(evf_mgr->ev_fence);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
index b7cebe392108..ac66b831daf7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
@@ -274,8 +274,9 @@ static void amdgpu_userq_fence_init(struct amdgpu_usermode_queue *userq,
bool signaled = false;
spin_lock_init(&fence->lock);
- dma_fence_init64(&fence->base, &amdgpu_userq_fence_ops, &fence->lock,
- fence_drv->context, seq);
+ dma_fence_init(&fence->base, &amdgpu_userq_fence_ops, &fence->lock,
+ fence_drv->context, seq,
+ BIT(DMA_FENCE_FLAG_SEQNO64_BIT));
/* Make sure the fence is visible to the hang detect worker */
dma_fence_put(userq->last_fence);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c
index b0002c898386..f8cc258dcdef 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_tlb_fence.c
@@ -100,8 +100,9 @@ void amdgpu_vm_tlb_fence_create(struct amdgpu_device *adev, struct amdgpu_vm *vm
INIT_WORK(&f->work, amdgpu_tlb_fence_work);
spin_lock_init(&f->lock);
- dma_fence_init64(&f->base, &amdgpu_tlb_fence_ops, &f->lock,
- vm->tlb_fence_context, atomic64_read(&vm->tlb_seq));
+ dma_fence_init(&f->base, &amdgpu_tlb_fence_ops, &f->lock,
+ vm->tlb_fence_context, atomic64_read(&vm->tlb_seq),
+ BIT(DMA_FENCE_FLAG_SEQNO64_BIT));
/* TODO: We probably need a separate wq here */
dma_fence_get(&f->base);
--
2.56.0
next prev parent reply other threads:[~2026-11-18 13:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 13:45 [PATCH v2 0/3] dma-buf: dma-fence: Remove dma_fence_init64() Philipp Stanner
2026-11-18 13:45 ` [PATCH v2 1/3] dma-buf: dma-fence: Add flags parameter to dma_fence_init() Philipp Stanner
2026-11-18 13:45 ` Philipp Stanner [this message]
2026-11-18 13:45 ` [PATCH v2 3/3] dma-buf: dma-fence: Remove dma_fence_init64() Philipp Stanner
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=20261118134522.1646892-4-phasta@kernel.org \
--to=phasta@kernel.org \
--cc=Prike.Liang@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=david.rosca@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=imagination@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kernel-list@raspberrypi.com \
--cc=lima@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mcanal@igalia.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=rust-for-linux@vger.kernel.or \
--cc=simona@ffwll.ch \
--cc=spice-devel@lists.freedesktop.org \
--cc=sumit.semwal@linaro.org \
--cc=sunil.khatri@amd.com \
--cc=thomas.hellstrom@linux.intel.com \
--cc=timur.kristof@gmail.com \
--cc=tvrtko.ursulin@igalia.com \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux.dev \
--cc=vitaly.prosyak@amd.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