Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/dist/drm/i915 Replace ALIGN b...
details: https://anonhg.NetBSD.org/src/rev/ddf07316fff1
branches: riastradh-drm2
changeset: 788372:ddf07316fff1
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:28:59 2013 +0000
description:
Replace ALIGN by round_up in i915_gem.c.
ALIGN means something else in NetBSD.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diffs (39 lines):
diff -r 065aeb75e541 -r ddf07316fff1 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Wed Jul 24 03:28:42 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Wed Jul 24 03:28:59 2013 +0000
@@ -241,7 +241,11 @@
struct drm_mode_create_dumb *args)
{
/* have to work out size/pitch and return them */
+#ifdef __NetBSD__ /* ALIGN already means something. */
+ args->pitch = round_up(args->width * ((args->bpp + 7) / 8), 64);
+#else
args->pitch = ALIGN(args->width * ((args->bpp + 7) / 8), 64);
+#endif
args->size = args->pitch * args->height;
return i915_gem_create(file, dev,
args->size, &args->handle);
@@ -283,7 +287,11 @@
int ret, cpu_offset = 0;
while (length > 0) {
+#ifdef __NetBSD__
+ int cacheline_end = round_up(gpu_offset + 1, 64);
+#else
int cacheline_end = ALIGN(gpu_offset + 1, 64);
+#endif
int this_length = min(cacheline_end - gpu_offset, length);
int swizzled_gpu_offset = gpu_offset ^ 64;
@@ -309,7 +317,11 @@
int ret, cpu_offset = 0;
while (length > 0) {
+#ifdef __NetBSD__
+ int cacheline_end = round_up(gpu_offset + 1, 64);
+#else
int cacheline_end = ALIGN(gpu_offset + 1, 64);
+#endif
int this_length = min(cacheline_end - gpu_offset, length);
int swizzled_gpu_offset = gpu_offset ^ 64;
Home |
Main Index |
Thread Index |
Old Index