1/* i915_drv.c -- Intel i915 driver -*- linux-c -*- 2 * Created: Wed Feb 14 17:10:04 2001 by gareth@valinux.com 3 */ 4/*- 5 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 6 * All Rights Reserved. 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a --- 16 unchanged lines hidden (view full) --- 25 * OTHER DEALINGS IN THE SOFTWARE. 26 * 27 * Authors: 28 * Gareth Hughes <gareth@valinux.com> 29 * 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/dev/drm2/i915/i915_drv.c 259016 2013-12-05 22:38:53Z ray $"); |
34 35#include <dev/drm2/drmP.h> 36#include <dev/drm2/drm.h> 37#include <dev/drm2/drm_mm.h> 38#include <dev/drm2/i915/i915_drm.h> 39#include <dev/drm2/i915/i915_drv.h> 40#include <dev/drm2/drm_pciids.h> 41#include <dev/drm2/i915/intel_drv.h> 42 |
43#include "fb_if.h" 44 |
45/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ 46static drm_pci_id_list_t i915_pciidlist[] = { 47 i915_PCI_IDS 48}; 49 50static const struct intel_device_info intel_i830_info = { 51 .gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, 52 .has_overlay = 1, .overlay_needs_physical = 1, --- 324 unchanged lines hidden (view full) --- 377 378 dev = device_get_softc(kdev); 379 if (i915_modeset == 1) 380 i915_driver_info.driver_features |= DRIVER_MODESET; 381 dev->driver = &i915_driver_info; 382 return (drm_attach(kdev, i915_pciidlist)); 383} 384 |
385static struct fb_info * 386i915_fb_helper_getinfo(device_t kdev) 387{ 388 struct intel_fbdev *ifbdev; 389 drm_i915_private_t *dev_priv; 390 struct drm_device *dev; 391 struct fb_info *info; 392 393 dev = device_get_softc(kdev); 394 dev_priv = dev->dev_private; 395 ifbdev = dev_priv->fbdev; 396 if (ifbdev == NULL) 397 return (NULL); 398 399 info = ifbdev->helper.fbdev; 400 401 return (info); 402} 403 |
404const struct intel_device_info * 405i915_get_device_id(int device) 406{ 407 const struct intel_gfx_device_id *did; 408 409 for (did = &pciidlist[0]; did->device != 0; did++) { 410 if (did->device != device) 411 continue; --- 4 unchanged lines hidden (view full) --- 416 417static device_method_t i915_methods[] = { 418 /* Device interface */ 419 DEVMETHOD(device_probe, i915_probe), 420 DEVMETHOD(device_attach, i915_attach), 421 DEVMETHOD(device_suspend, i915_suspend), 422 DEVMETHOD(device_resume, i915_resume), 423 DEVMETHOD(device_detach, drm_detach), |
424 425 /* Framebuffer service methods */ 426 DEVMETHOD(fb_getinfo, i915_fb_helper_getinfo), 427 |
428 DEVMETHOD_END 429}; 430 431static driver_t i915_driver = { 432 "drmn", 433 i915_methods, 434 sizeof(struct drm_device) 435}; --- 411 unchanged lines hidden --- |