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 bus_space.
details: https://anonhg.NetBSD.org/src/rev/7e9328ea7cc1
branches: trunk
changeset: 365916:7e9328ea7cc1
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 07:16:10 2018 +0000
description:
Use bus_space.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_vgpu.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (45 lines):
diff -r 9c19d4ada4f6 -r 7e9328ea7cc1 sys/external/bsd/drm2/dist/drm/i915/i915_vgpu.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_vgpu.c Mon Aug 27 07:16:00 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_vgpu.c Mon Aug 27 07:16:10 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_vgpu.c,v 1.2 2018/08/27 04:58:24 riastradh Exp $ */
+/* $NetBSD: i915_vgpu.c,v 1.3 2018/08/27 07:16:10 riastradh Exp $ */
/*
* Copyright(c) 2011-2015 Intel Corporation. All rights reserved.
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_vgpu.c,v 1.2 2018/08/27 04:58:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_vgpu.c,v 1.3 2018/08/27 07:16:10 riastradh Exp $");
#include "intel_drv.h"
#include "i915_vgpu.h"
@@ -74,13 +74,26 @@
if (!IS_HASWELL(dev))
return;
+#ifdef __NetBSD__
+ magic = bus_space_read_8(dev_priv->regs_bst, dev_priv->regs_bsh,
+ vgtif_reg(magic));
+#else
magic = readq(dev_priv->regs + vgtif_reg(magic));
+#endif
if (magic != VGT_MAGIC)
return;
+#ifdef __NetBSD__
+ version = INTEL_VGT_IF_VERSION_ENCODE(
+ bus_space_read_2(dev_priv->regs_bst, dev_priv->regs_bsh,
+ vgtif_reg(version_major)),
+ bus_space_read_2(dev_priv->regs_bst, dev_priv->regs_bsh,
+ vgtif_reg(version_minor)));
+#else
version = INTEL_VGT_IF_VERSION_ENCODE(
readw(dev_priv->regs + vgtif_reg(version_major)),
readw(dev_priv->regs + vgtif_reg(version_minor)));
+#endif
if (version != INTEL_VGT_IF_VERSION) {
DRM_INFO("VGT interface version mismatch!\n");
return;
Home |
Main Index |
Thread Index |
Old Index