summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-11-13 06:44:46 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-11-13 06:44:46 +0000
commit1e5f3a9ceac69d507d56906aaeba43bbdbbb13f1 (patch)
treef7368ab4d9bff188fd9fd674ab971ca53cae1877 /sys/dev/pci/drm
parentfd69b713358e2dda231d176798b579cd0d4aacd9 (diff)
drm/i915/cmdparser: Fix jump whitelist clearing
From Ben Hutchings fee619bb813648ea90bf024171acfaaec2f031fc in linux 4.19.y/4.19.84 ea0b163b13ffc52818c079adb00d55e227a6da6f in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/i915/i915_cmd_parser.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/i915/i915_cmd_parser.c b/sys/dev/pci/drm/i915/i915_cmd_parser.c
index 5e53af19c13..9435a014f82 100644
--- a/sys/dev/pci/drm/i915/i915_cmd_parser.c
+++ b/sys/dev/pci/drm/i915/i915_cmd_parser.c
@@ -1374,7 +1374,7 @@ static void init_whitelist(struct i915_gem_context *ctx, u32 batch_len)
return;
if (batch_cmds <= ctx->jump_whitelist_cmds) {
- memset(ctx->jump_whitelist, 0, exact_size * sizeof(u32));
+ bitmap_zero(ctx->jump_whitelist, batch_cmds);
return;
}
@@ -1394,8 +1394,7 @@ again:
}
DRM_DEBUG("CMD: Failed to extend whitelist. BB_START may be disallowed\n");
- memset(ctx->jump_whitelist, 0,
- BITS_TO_LONGS(ctx->jump_whitelist_cmds) * sizeof(u32));
+ bitmap_zero(ctx->jump_whitelist, ctx->jump_whitelist_cmds);
return;
}