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 Hack up ACPI me...
details: https://anonhg.NetBSD.org/src/rev/c2b0ce7210f3
branches: riastradh-drm2
changeset: 788367:c2b0ce7210f3
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:27:35 2013 +0000
description:
Hack up ACPI memory-mapped I/O for intel_opregion.c.
This is absolutely the wrong thing, but
. it will probably work for now,
. it is much more expedient than rewriting all this code with NetBSD
bus space access or drm maps, and
. the problem remains marked so that it is easily greppable.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_drv.h | 10 +++++++++
sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c | 21 ++++++++++++++++++++
2 files changed, 31 insertions(+), 0 deletions(-)
diffs (58 lines):
diff -r 60aad3d7ea92 -r c2b0ce7210f3 sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h Wed Jul 24 03:27:18 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h Wed Jul 24 03:27:35 2013 +0000
@@ -145,6 +145,11 @@
struct opregion_asle;
struct drm_i915_private;
+#ifdef __NetBSD__ /* XXX acpi iomem */
+# define __acpi_iomem
+# define __iomem __acpi_iomem
+#endif
+
struct intel_opregion {
struct opregion_header __iomem *header;
struct opregion_acpi __iomem *acpi;
@@ -155,6 +160,11 @@
};
#define OPREGION_SIZE (8*1024)
+#ifdef __NetBSD__ /* XXX acpi iomem */
+# undef __acpi_iomem
+# undef __iomem
+#endif
+
struct intel_overlay;
struct intel_overlay_error_state;
diff -r 60aad3d7ea92 -r c2b0ce7210f3 sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c Wed Jul 24 03:27:18 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c Wed Jul 24 03:27:35 2013 +0000
@@ -52,6 +52,27 @@
#define MBOX_SWSCI (1<<1)
#define MBOX_ASLE (1<<2)
+#ifdef __NetBSD__ /* XXX acpi iomem */
+# define __iomem __acpi_iomem
+
+static inline uint32_t
+ioread32(const uint32_t __acpi_iomem *ptr)
+{
+ const uint32_t value = *ptr;
+
+ __insn_barrier();
+ return value;
+}
+
+static inline void
+iowrite32(uint32_t value, uint32_t __acpi_iomem *ptr)
+{
+
+ __insn_barrier();
+ *ptr = value;
+}
+#endif
+
struct opregion_header {
u8 signature[16];
u32 size;
Home |
Main Index |
Thread Index |
Old Index