Deleted Added
sdiff udiff text old ( 242467 ) new ( 247835 )
full compact
1/*-
2 * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
3 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation

--- 15 unchanged lines hidden (view full) ---

24 *
25 * Authors:
26 * Rickard E. (Rik) Faith <faith@valinux.com>
27 * Gareth Hughes <gareth@valinux.com>
28 *
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/drm2/drm_drv.c 242467 2012-11-02 05:26:33Z glebius $");
33
34/** @file drm_drv.c
35 * The catch-all file for DRM device support, including module setup/teardown,
36 * open/close, and ioctl dispatch.
37 */
38
39#include <sys/limits.h>
40#include <sys/sysent.h>

--- 12 unchanged lines hidden (view full) ---

53
54unsigned int drm_vblank_offdelay = 5000; /* Default to 5000 msecs. */
55unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */
56
57static int drm_load(struct drm_device *dev);
58static void drm_unload(struct drm_device *dev);
59static drm_pci_id_list_t *drm_find_description(int vendor, int device,
60 drm_pci_id_list_t *idlist);
61
62static int
63drm_modevent(module_t mod, int type, void *data)
64{
65
66 switch (type) {
67 case MOD_LOAD:
68 TUNABLE_INT_FETCH("drm.debug", &drm_debug_flag);

--- 113 unchanged lines hidden (view full) ---

182
183static struct cdevsw drm_cdevsw = {
184 .d_version = D_VERSION,
185 .d_open = drm_open,
186 .d_read = drm_read,
187 .d_ioctl = drm_ioctl,
188 .d_poll = drm_poll,
189 .d_mmap = drm_mmap,
190 .d_mmap_single = drm_gem_mmap_single,
191 .d_name = "drm",
192 .d_flags = D_TRACKCLOSE
193};
194
195static int drm_msi = 1; /* Enable by default. */
196TUNABLE_INT("hw.drm.msi", &drm_msi);
197SYSCTL_NODE(_hw, OID_AUTO, drm, CTLFLAG_RW, NULL, "DRM device");
198SYSCTL_INT(_hw_drm, OID_AUTO, msi, CTLFLAG_RDTUN, &drm_msi, 1,

--- 751 unchanged lines hidden (view full) ---

950 oid = SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(top), OID_AUTO,
951 "modesetting", CTLFLAG_RD, &dev->modesetting, 0, NULL);
952 if (oid == NULL)
953 return (ENOMEM);
954
955 return (0);
956}
957
958#if DRM_LINUX
959
960#include <sys/sysproto.h>
961
962MODULE_DEPEND(DRIVER_NAME, linux, 1, 1, 1);
963
964#define LINUX_IOCTL_DRM_MIN 0x6400
965#define LINUX_IOCTL_DRM_MAX 0x64ff

--- 40 unchanged lines hidden ---