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 Don't ifdef __NetBSD__ a...
details: https://anonhg.NetBSD.org/src/rev/682d508017d9
branches: trunk
changeset: 1028098:682d508017d9
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 01:50:47 2021 +0000
description:
Don't ifdef __NetBSD__ around ALIGN; just patch to round_up.
Author: Maya Rashish <maya%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/drm/i915/gt/gen6_ppgtt.h | 14 ++------------
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 12 ++----------
2 files changed, 4 insertions(+), 22 deletions(-)
diffs (73 lines):
diff -r e4b678a7d155 -r 682d508017d9 sys/external/bsd/drm2/dist/drm/i915/gt/gen6_ppgtt.h
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/gen6_ppgtt.h Sun Dec 19 01:50:40 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/gen6_ppgtt.h Sun Dec 19 01:50:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gen6_ppgtt.h,v 1.3 2021/12/19 01:35:35 riastradh Exp $ */
+/* $NetBSD: gen6_ppgtt.h,v 1.4 2021/12/19 01:50:47 riastradh Exp $ */
/* SPDX-License-Identifier: MIT */
/*
@@ -59,23 +59,13 @@
* so each of the other parameters should preferably be a simple variable, or
* at most an lvalue with no side-effects!
*/
-#ifdef __NetBSD__ /* XXX ALIGN means something else. */
-#define gen6_for_each_pde(pt, pd, start, length, iter) \
- for (iter = gen6_pde_index(start); \
- length > 0 && iter < I915_PDES && \
- (pt = (pd)->page_table[iter], true); \
- ({ u32 temp = round_up(start+1, 1 << GEN6_PDE_SHIFT); \
- temp = min(temp - start, length); \
- start += temp, length -= temp; }), ++iter)
-#else
#define gen6_for_each_pde(pt, pd, start, length, iter) \
for (iter = gen6_pde_index(start); \
length > 0 && iter < I915_PDES && \
(pt = i915_pt_entry(pd, iter), true); \
- ({ u32 temp = ALIGN(start+1, 1 << GEN6_PDE_SHIFT); \
+ ({ u32 temp = round_up(start+1, 1 << GEN6_PDE_SHIFT); \
temp = min(temp - start, length); \
start += temp, length -= temp; }), ++iter)
-#endif
#define gen6_for_all_pdes(pt, pd, iter) \
for (iter = 0; \
diff -r e4b678a7d155 -r 682d508017d9 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Dec 19 01:50:40 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Dec 19 01:50:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem.c,v 1.64 2021/12/19 01:34:08 riastradh Exp $ */
+/* $NetBSD: i915_gem.c,v 1.65 2021/12/19 01:50:47 riastradh Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.64 2021/12/19 01:34:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.65 2021/12/19 01:50:47 riastradh Exp $");
#ifdef __NetBSD__
#if 0 /* XXX uvmhist option? */
@@ -283,20 +283,12 @@
}
/* have to work out size/pitch and return them */
-#ifdef __NetBSD__ /* ALIGN means something else. */
args->pitch = round_up(args->width * cpp, 64);
-#else
- args->pitch = ALIGN(args->width * cpp, 64);
-#endif
/* align stride to page size so that we can remap */
if (args->pitch > intel_plane_fb_max_stride(to_i915(dev), format,
DRM_FORMAT_MOD_LINEAR))
-#ifdef __NetBSD__ /* ALIGN means something else. */
args->pitch = round_up(args->pitch, 4096);
-#else
- args->pitch = ALIGN(args->pitch, 4096);
-#endif
if (args->pitch < args->width)
return -EINVAL;
Home |
Main Index |
Thread Index |
Old Index