Module Name: src
Committed By: riastradh
Date: Sun Dec 19 12:09:58 UTC 2021
Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_vma.c
Log Message:
i915: No view in i915_vma_compare for normal views.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/dist/drm/i915/i915_vma.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_vma.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_vma.c:1.9 src/sys/external/bsd/drm2/dist/drm/i915/i915_vma.c:1.10
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_vma.c:1.9 Sun Dec 19 12:00:31 2021
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_vma.c Sun Dec 19 12:09:58 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_vma.c,v 1.9 2021/12/19 12:00:31 riastradh Exp $ */
+/* $NetBSD: i915_vma.c,v 1.10 2021/12/19 12:09:58 riastradh Exp $ */
/*
* Copyright © 2016 Intel Corporation
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_vma.c,v 1.9 2021/12/19 12:00:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_vma.c,v 1.10 2021/12/19 12:09:58 riastradh Exp $");
#include <linux/sched/mm.h>
#include <drm/drm_gem.h>
@@ -118,7 +118,8 @@ compare_vma(void *cookie, const void *va
{
const struct i915_vma *a = va;
const struct i915_vma *b = vb;
- long cmp = i915_vma_compare(__UNCONST(a), b->vm, &b->ggtt_view);
+ long cmp = i915_vma_compare(__UNCONST(a), b->vm,
+ b->ggtt_view.type == I915_GGTT_VIEW_NORMAL ? NULL : &b->ggtt_view);
return (cmp < 0 ? -1 : cmp > 0 ? +1 : 0);
}