summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-09-07 00:43:06 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-09-07 00:43:06 +0000
commita535da551921ca4dcac325219a294a4a1b1d8a2f (patch)
tree49d216c8c097a9e7c6e3598eb4d8bb3e0abb97cd /sys/dev
parent3aed0e2ec12f227eb62234f47ddd5f308d77bead (diff)
drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
From Xiong Zhang c7615333645de572cae573da0a92dd3fc8e099e0 in linux 4.19.y/4.19.70 0a3dfbb5cd9033752639ef33e319c2f2863c713a in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/i915/i915_vgpu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/i915_vgpu.c b/sys/dev/pci/drm/i915/i915_vgpu.c
index 869cf4a3b6d..a6cb3e034dd 100644
--- a/sys/dev/pci/drm/i915/i915_vgpu.c
+++ b/sys/dev/pci/drm/i915/i915_vgpu.c
@@ -100,6 +100,9 @@ static struct _balloon_info_ bl_info;
static void vgt_deballoon_space(struct i915_ggtt *ggtt,
struct drm_mm_node *node)
{
+ if (!drm_mm_node_allocated(node))
+ return;
+
DRM_DEBUG_DRIVER("deballoon space: range [0x%llx - 0x%llx] %llu KiB.\n",
node->start,
node->start + node->size,