Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 Use the original linux f...



details:   https://anonhg.NetBSD.org/src/rev/3c67ac0bad8d
branches:  trunk
changeset: 465869:3c67ac0bad8d
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Dec 05 20:25:54 2019 +0000

description:
Use the original linux function rather than my wrong translation.

...Include the header to have it.

Thanks Riastradh!

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 24d95d8db8fa -r 3c67ac0bad8d sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c     Thu Dec 05 20:03:09 2019 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c     Thu Dec 05 20:25:54 2019 +0000
@@ -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 @@
 {
        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))



Home | Main Index | Thread Index | Old Index