drm_drv.c (189099) | drm_drv.c (189128) |
---|---|
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> | 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/drm/drm_drv.c 189099 2009-02-27 06:01:42Z rnoland $"); | 32__FBSDID("$FreeBSD: head/sys/dev/drm/drm_drv.c 189128 2009-02-27 23:50:55Z rnoland $"); |
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 40#include <sys/limits.h> --- 88 unchanged lines hidden (view full) --- 129 .d_read = drm_read, 130 .d_ioctl = drm_ioctl, 131 .d_poll = drm_poll, 132 .d_mmap = drm_mmap, 133 .d_name = "drm", 134 .d_flags = D_TRACKCLOSE 135}; 136 | 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 40#include <sys/limits.h> --- 88 unchanged lines hidden (view full) --- 129 .d_read = drm_read, 130 .d_ioctl = drm_ioctl, 131 .d_poll = drm_poll, 132 .d_mmap = drm_mmap, 133 .d_name = "drm", 134 .d_flags = D_TRACKCLOSE 135}; 136 |
137int drm_msi = 1; /* Enable by default. */ 138TUNABLE_INT("hw.drm.msi", &drm_msi); 139 |
|
137static struct drm_msi_blacklist_entry drm_msi_blacklist[] = { 138 {0x8086, 0x2772}, /* Intel i945G */ \ 139 {0x8086, 0x27A2}, /* Intel i945GM */ \ 140 {0x8086, 0x27AE}, /* Intel i945GME */ \ 141 {0, 0} 142}; 143 144static int drm_msi_is_blacklisted(int vendor, int device) --- 72 unchanged lines hidden (view full) --- 217#endif 218 dev->pci_bus = pci_get_bus(dev->device); 219 dev->pci_slot = pci_get_slot(dev->device); 220 dev->pci_func = pci_get_function(dev->device); 221 222 dev->pci_vendor = pci_get_vendor(dev->device); 223 dev->pci_device = pci_get_device(dev->device); 224 | 140static struct drm_msi_blacklist_entry drm_msi_blacklist[] = { 141 {0x8086, 0x2772}, /* Intel i945G */ \ 142 {0x8086, 0x27A2}, /* Intel i945GM */ \ 143 {0x8086, 0x27AE}, /* Intel i945GME */ \ 144 {0, 0} 145}; 146 147static int drm_msi_is_blacklisted(int vendor, int device) --- 72 unchanged lines hidden (view full) --- 220#endif 221 dev->pci_bus = pci_get_bus(dev->device); 222 dev->pci_slot = pci_get_slot(dev->device); 223 dev->pci_func = pci_get_function(dev->device); 224 225 dev->pci_vendor = pci_get_vendor(dev->device); 226 dev->pci_device = pci_get_device(dev->device); 227 |
225 if (!drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) { | 228 if (drm_msi && 229 !drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) { |
226 msicount = pci_msi_count(dev->device); 227 DRM_DEBUG("MSI count = %d\n", msicount); 228 if (msicount > 1) 229 msicount = 1; 230 231 if (pci_alloc_msi(dev->device, &msicount) == 0) { 232 DRM_INFO("MSI enabled %d message(s)\n", msicount); 233 dev->msi_enabled = 1; --- 599 unchanged lines hidden --- | 230 msicount = pci_msi_count(dev->device); 231 DRM_DEBUG("MSI count = %d\n", msicount); 232 if (msicount > 1) 233 msicount = 1; 234 235 if (pci_alloc_msi(dev->device, &msicount) == 0) { 236 DRM_INFO("MSI enabled %d message(s)\n", msicount); 237 dev->msi_enabled = 1; --- 599 unchanged lines hidden --- |