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 Factor out intelfb_is_vga_console to d...
details: https://anonhg.NetBSD.org/src/rev/d32ecf9ae142
branches: trunk
changeset: 336551:d32ecf9ae142
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Mar 05 17:56:39 2015 +0000
description:
Factor out intelfb_is_vga_console to drmfb_pci.
diffstat:
sys/external/bsd/drm2/i915drm/intelfb.c | 34 ++------------------------
sys/external/bsd/drm2/include/drm/drmfb_pci.h | 3 +-
sys/external/bsd/drm2/pci/drmfb_pci.c | 31 +++++++++++++++++++++++-
3 files changed, 34 insertions(+), 34 deletions(-)
diffs (146 lines):
diff -r a3ec286fb2ee -r d32ecf9ae142 sys/external/bsd/drm2/i915drm/intelfb.c
--- a/sys/external/bsd/drm2/i915drm/intelfb.c Thu Mar 05 17:50:41 2015 +0000
+++ b/sys/external/bsd/drm2/i915drm/intelfb.c Thu Mar 05 17:56:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intelfb.c,v 1.11 2015/03/05 17:50:41 riastradh Exp $ */
+/* $NetBSD: intelfb.c,v 1.12 2015/03/05 17:56:39 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,28 +30,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.11 2015/03/05 17:50:41 riastradh Exp $");
-
-#ifdef _KERNEL_OPT
-#include "vga.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.12 2015/03/05 17:56:39 riastradh Exp $");
#include <sys/types.h>
#include <sys/bus.h>
#include <sys/device.h>
-#if NVGA > 0
-/*
- * XXX All we really need is vga_is_console from vgavar.h, but the
- * header files are missing their own dependencies, so we need to
- * explicitly drag in the other crap.
- */
-#include <dev/ic/mc6845reg.h>
-#include <dev/ic/pcdisplayvar.h>
-#include <dev/ic/vgareg.h>
-#include <dev/ic/vgavar.h>
-#endif
-
#include <drm/drmP.h>
#include <drm/drmfb.h>
#include <drm/drmfb_pci.h>
@@ -66,7 +50,6 @@
static void intelfb_attach_task(struct i915drmkms_task *);
-static bool intel_is_vga_console(struct drm_device *);
static bool intelfb_shutdown(device_t, int);
static paddr_t intelfb_drmfb_mmapfb(struct drmfb_softc *, off_t, int);
@@ -86,7 +69,7 @@
.dp_mmapfb = intelfb_drmfb_mmapfb,
.dp_mmap = drmfb_pci_mmap,
.dp_ioctl = drmfb_pci_ioctl,
- .dp_is_vga_console = intel_is_vga_console,
+ .dp_is_vga_console = drmfb_pci_is_vga_console,
.dp_disable_vga = i915_disable_vga,
};
@@ -205,17 +188,6 @@
}
static bool
-intel_is_vga_console(struct drm_device *dev)
-{
-
-#if NVGA > 0
- return vga_is_console(dev->pdev->pd_pa.pa_iot, -1);
-#else
- return false;
-#endif
-}
-
-static bool
intelfb_shutdown(device_t self, int flags)
{
struct intelfb_softc *const sc = device_private(self);
diff -r a3ec286fb2ee -r d32ecf9ae142 sys/external/bsd/drm2/include/drm/drmfb_pci.h
--- a/sys/external/bsd/drm2/include/drm/drmfb_pci.h Thu Mar 05 17:50:41 2015 +0000
+++ b/sys/external/bsd/drm2/include/drm/drmfb_pci.h Thu Mar 05 17:56:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drmfb_pci.h,v 1.1 2015/03/05 17:50:41 riastradh Exp $ */
+/* $NetBSD: drmfb_pci.h,v 1.2 2015/03/05 17:56:39 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -40,5 +40,6 @@
paddr_t drmfb_pci_mmap(struct drmfb_softc *, off_t, int);
int drmfb_pci_ioctl(struct drmfb_softc *, unsigned long, void *, int,
struct lwp *);
+bool drmfb_pci_is_vga_console(struct drm_device *);
#endif /* _DRM_DRMFB_PCI_H_ */
diff -r a3ec286fb2ee -r d32ecf9ae142 sys/external/bsd/drm2/pci/drmfb_pci.c
--- a/sys/external/bsd/drm2/pci/drmfb_pci.c Thu Mar 05 17:50:41 2015 +0000
+++ b/sys/external/bsd/drm2/pci/drmfb_pci.c Thu Mar 05 17:56:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drmfb_pci.c,v 1.1 2015/03/05 17:50:41 riastradh Exp $ */
+/* $NetBSD: drmfb_pci.c,v 1.2 2015/03/05 17:56:39 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -34,7 +34,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drmfb_pci.c,v 1.1 2015/03/05 17:50:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drmfb_pci.c,v 1.2 2015/03/05 17:56:39 riastradh Exp $");
+
+#ifdef _KERNEL_OPT
+#include "vga.h"
+#endif
#include <sys/types.h>
#include <sys/device.h>
@@ -46,6 +50,18 @@
#include <dev/pci/pcivar.h>
#include <dev/pci/wsdisplay_pci.h>
+#if NVGA > 0
+/*
+ * XXX All we really need is vga_is_console from vgavar.h, but the
+ * header files are missing their own dependencies, so we need to
+ * explicitly drag in the other crap.
+ */
+#include <dev/ic/mc6845reg.h>
+#include <dev/ic/pcdisplayvar.h>
+#include <dev/ic/vgareg.h>
+#include <dev/ic/vgavar.h>
+#endif
+
#include <drm/drmP.h>
#include <drm/drm_fb_helper.h>
@@ -132,3 +148,14 @@
return EPASSTHROUGH;
}
}
+
+bool
+drmfb_pci_is_vga_console(struct drm_device *dev)
+{
+
+#if NVGA > 0
+ return vga_is_console(dev->pdev->pd_pa.pa_iot, -1);
+#else
+ return false;
+#endif
+}
Home |
Main Index |
Thread Index |
Old Index