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 Stub out some functions.
details: https://anonhg.NetBSD.org/src/rev/3834e88b1ce4
branches: trunk
changeset: 1028594:3834e88b1ce4
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:24:21 2021 +0000
description:
Stub out some functions.
We can probably do without the fast path, and let's see whether
we get to i915_gem_phys_pwrite at all.
Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diffs (82 lines):
diff -r 4c295a8c0ec4 -r 3834e88b1ce4 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Dec 19 11:24:14 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Dec 19 11:24:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem.c,v 1.67 2021/12/19 11:16:24 riastradh Exp $ */
+/* $NetBSD: i915_gem.c,v 1.68 2021/12/19 11:24:21 riastradh Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.67 2021/12/19 11:16:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.68 2021/12/19 11:24:21 riastradh Exp $");
#ifdef __NetBSD__
#if 0 /* XXX uvmhist option? */
@@ -205,6 +205,9 @@
struct drm_i915_gem_pwrite *args,
struct drm_file *file)
{
+#ifdef __NetBSD__
+ panic("TODO");
+#else
void *vaddr = sg_page(obj->mm.pages->sgl) + args->offset;
char __user *user_data = u64_to_user_ptr(args->data_ptr);
@@ -221,6 +224,7 @@
intel_gt_chipset_flush(&to_i915(obj->base.dev)->gt);
i915_gem_object_flush_frontbuffer(obj, ORIGIN_CPU);
+#endif
return 0;
}
@@ -396,18 +400,27 @@
void __iomem *vaddr;
unsigned long unwritten;
+#ifdef __NetBSD__
+ // No fast path for us.
+ unwritten = -EFAULT;
+#else
/* We can use the cpu mem copy function because this is X86. */
vaddr = io_mapping_map_atomic_wc(mapping, base);
unwritten = __copy_to_user_inatomic(user_data,
(void __force *)vaddr + offset,
length);
io_mapping_unmap_atomic(vaddr);
+#endif
if (unwritten) {
vaddr = io_mapping_map_wc(mapping, base, PAGE_SIZE);
unwritten = copy_to_user(user_data,
(void __force *)vaddr + offset,
length);
+#ifdef __NetBSD__
+ io_mapping_unmap(mapping, vaddr);
+#else
io_mapping_unmap(vaddr);
+#endif
}
return unwritten;
}
@@ -571,6 +584,9 @@
loff_t base, int offset,
char __user *user_data, int length)
{
+#ifdef __NetBSD__
+ return length;
+#else
void __iomem *vaddr;
unsigned long unwritten;
@@ -587,6 +603,7 @@
}
return unwritten;
+#endif
}
/**
Home |
Main Index |
Thread Index |
Old Index