Module Name: src Committed By: maya Date: Thu Dec 5 20:25:54 UTC 2019
Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_cmd_parser.c Log Message: Use the original linux function rather than my wrong translation. ...Include the header to have it. Thanks Riastradh! To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 \ src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.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_cmd_parser.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.19 src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.20 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.19 Thu Dec 5 20:03:09 2019 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c Thu Dec 5 20:25:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i915_cmd_parser.c,v 1.19 2019/12/05 20:03:09 maya Exp $ */ +/* $NetBSD: i915_cmd_parser.c,v 1.20 2019/12/05 20:25:54 maya Exp $ */ /* * Copyright © 2013 Intel Corporation @@ -28,10 +28,11 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.19 2019/12/05 20:03:09 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.20 2019/12/05 20:25:54 maya Exp $"); #include "i915_drv.h" #include <linux/bitmap.h> +#include <linux/log2.h> /** * DOC: batch buffer command parser @@ -1259,7 +1260,7 @@ static void init_whitelist(struct intel_ { const u32 batch_cmds = DIV_ROUND_UP(batch_len, sizeof(u32)); const u32 exact_size = BITS_TO_LONGS(batch_cmds); - u32 next_size = BITS_TO_LONGS(powerof2(batch_cmds)); + u32 next_size = BITS_TO_LONGS(roundup_pow_of_two(batch_cmds)); unsigned long *next_whitelist; if (CMDPARSER_USES_GGTT(ctx->i915))