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/drm Initialize the right mino...
details: https://anonhg.NetBSD.org/src/rev/03805c25f048
branches: riastradh-drm2
changeset: 788615:03805c25f048
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Jan 21 20:56:20 2014 +0000
description:
Initialize the right minor numbers...arghhhh.
diffstat:
sys/external/bsd/drm2/drm/drm_drv.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r 411f90fb925d -r 03805c25f048 sys/external/bsd/drm2/drm/drm_drv.c
--- a/sys/external/bsd/drm2/drm/drm_drv.c Tue Jan 21 20:56:11 2014 +0000
+++ b/sys/external/bsd/drm2/drm/drm_drv.c Tue Jan 21 20:56:20 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.1.2.28 2014/01/21 20:56:00 riastradh Exp $ */
+/* $NetBSD: drm_drv.c,v 1.1.2.29 2014/01/21 20:56:20 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.28 2014/01/21 20:56:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.29 2014/01/21 20:56:20 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -53,6 +53,14 @@
#endif
};
+static int drm_type_minors[] = {
+ [DRM_MINOR_LEGACY] = 0,
+ [DRM_MINOR_CONTROL] = 1,
+#if 0
+ [DRM_MINOR_RENDER] = 2,
+#endif
+};
+
struct drm_softc {
struct drm_device *sc_drm_dev;
struct drm_minor sc_minor[__arraycount(drm_minor_types)];
@@ -297,8 +305,9 @@
dev->dev = self;
if (drm_core_check_feature(dev, DRIVER_MODESET))
- dev->control = &sc->sc_minor[DRM_MINOR_CONTROL];
- dev->primary = &sc->sc_minor[DRM_MINOR_LEGACY];
+ dev->control =
+ &sc->sc_minor[drm_type_minors[DRM_MINOR_CONTROL]];
+ dev->primary = &sc->sc_minor[drm_type_minors[DRM_MINOR_LEGACY]];
error = drm_fill_in_dev(dev, NULL, daa->daa_driver);
if (error) {
Home |
Main Index |
Thread Index |
Old Index