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 fix __OS_HAS_AGP=0 build



details:   https://anonhg.NetBSD.org/src/rev/38b833262112
branches:  trunk
changeset: 341070:38b833262112
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Oct 17 16:17:22 2015 +0000

description:
fix __OS_HAS_AGP=0 build

diffstat:

 sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h |   4 ++++
 sys/external/bsd/drm2/drm/drm_drv.c                     |  10 ++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diffs (70 lines):

diff -r 80b2771aecbd -r 38b833262112 sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h   Sat Oct 17 15:57:32 2015 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h   Sat Oct 17 16:17:22 2015 +0000
@@ -53,6 +53,8 @@
                       struct drm_file *file_priv);
 #else /* __OS_HAS_AGP */
 
+#if !defined(__NetBSD__)
+
 static inline void drm_free_agp(struct agp_memory * handle, int pages)
 {
 }
@@ -67,6 +69,8 @@
        return -ENODEV;
 }
 
+#endif
+
 static inline struct agp_memory *drm_agp_bind_pages(struct drm_device *dev,
                                              struct page **pages,
                                              unsigned long num_pages,
diff -r 80b2771aecbd -r 38b833262112 sys/external/bsd/drm2/drm/drm_drv.c
--- a/sys/external/bsd/drm2/drm/drm_drv.c       Sat Oct 17 15:57:32 2015 +0000
+++ b/sys/external/bsd/drm2/drm/drm_drv.c       Sat Oct 17 16:17:22 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_drv.c,v 1.15 2015/03/08 23:37:56 riastradh Exp $   */
+/*     $NetBSD: drm_drv.c,v 1.16 2015/10/17 16:19:38 jmcneill 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.15 2015/03/08 23:37:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.16 2015/10/17 16:19:38 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -87,6 +87,7 @@
                .cmd_drv = 0,                                           \
        }
 
+#if __OS_HAS_AGP
 /* XXX Kludge for AGP.  */
 static drm_ioctl_t     drm_agp_acquire_hook_ioctl;
 static drm_ioctl_t     drm_agp_release_hook_ioctl;
@@ -105,6 +106,7 @@
 #define        drm_agp_free_ioctl      drm_agp_free_hook_ioctl
 #define        drm_agp_bind_ioctl      drm_agp_bind_hook_ioctl
 #define        drm_agp_unbind_ioctl    drm_agp_unbind_hook_ioctl
+#endif
 
 /* Table copied verbatim from dist/drm/drm_drv.c.  */
 static const struct drm_ioctl_desc drm_ioctls[] = {
@@ -805,6 +807,8 @@
        (*hooks->agph_clear)(dev);
 }
 
+#if __OS_HAS_AGP
+
 #define        DEFINE_AGP_HOOK_IOCTL(NAME, HOOK)                                     \
 static int                                                                   \
 NAME(struct drm_device *dev, void *data, struct drm_file *file)                      \
@@ -825,3 +829,5 @@
 DEFINE_AGP_HOOK_IOCTL(drm_agp_free_hook_ioctl, agph_free_ioctl)
 DEFINE_AGP_HOOK_IOCTL(drm_agp_bind_hook_ioctl, agph_bind_ioctl)
 DEFINE_AGP_HOOK_IOCTL(drm_agp_unbind_hook_ioctl, agph_unbind_ioctl)
+
+#endif



Home | Main Index | Thread Index | Old Index