fix __OS_HAS_AGP=0 build
This commit is contained in:
parent
252c030555
commit
f12750737e
|
@ -53,6 +53,8 @@ int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
|
|||
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 @@ static inline int drm_unbind_agp(struct agp_memory * handle)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static inline struct agp_memory *drm_agp_bind_pages(struct drm_device *dev,
|
||||
struct page **pages,
|
||||
unsigned long num_pages,
|
||||
|
|
|
@ -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 @@ static drm_ioctl_t drm_version;
|
|||
.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 @@ static drm_ioctl_t drm_agp_unbind_hook_ioctl;
|
|||
#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 @@ drm_agp_clear_hook(struct drm_device *dev)
|
|||
(*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_alloc_hook_ioctl, agph_alloc_ioctl)
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue