On Tue, 2026-07-14 at 09:53 +0200, Philipp Stanner wrote:
On Mon, 2026-07-13 at 10:58 +0200, Jiri Slaby wrote:
Hi,
On 20. 01. 26, 11:54, Christian König wrote:
Some driver use fence->ops to test if a fence was initialized or not. The problem is that this utilizes internal behavior of the dma_fence implementation.
So better abstract that into a function.
v2: use a flag instead of testing fence->ops, rename the function, move to the beginning of the patch set.
...
--- a/drivers/gpu/drm/qxl/qxl_release.c +++ b/drivers/gpu/drm/qxl/qxl_release.c @@ -146,7 +146,7 @@ qxl_release_free(struct qxl_device *qdev, idr_remove(&qdev->release_idr, release->id); spin_unlock(&qdev->release_idr_lock);
- if (release->base.ops) {
- if (dma_fence_was_initialized(&release->base)) {
Could you verify the cause with sth like
if (release->base.ops && dma_fence_was_initialized(…)) {
Forget about that, probably would not work or cause other issues because the NULL-setting on signal().
I'd then probably try to verify it with a separate boolean in struct release. Though I also don't get why the fence-initialized check does not do the trick.
P.