Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318632
b: refs/heads/master
c: 01a0685
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Vetter committed Jun 25, 2012
1 parent a47ff6a commit 02ce349
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87207ca20eeb519aa0333b754db9cf3c369ea6f7
refs/heads/master: 01a06850fb45ace55ed67d1d9da2df553a041e40
21 changes: 15 additions & 6 deletions trunk/drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,10 +930,12 @@ int i915_reset(struct drm_device *dev)
return 0;
}


static int __devinit
i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct intel_device_info *intel_info =
(struct intel_device_info *) ent->driver_data;

/* Only bind to function 0 of the device. Early generations
* used function 1 as a placeholder for multi-head. This causes
* us confusion instead, especially on the systems where both
Expand All @@ -942,6 +944,18 @@ i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (PCI_FUNC(pdev->devfn))
return -ENODEV;

/* We've managed to ship a kms-enabled ddx that shipped with an XvMC
* implementation for gen3 (and only gen3) that used legacy drm maps
* (gasp!) to share buffers between X and the client. Hence we need to
* keep around the fake agp stuff for gen3, even when kms is enabled. */
if (intel_info->gen != 3) {
driver.driver_features &=
~(DRIVER_USE_AGP | DRIVER_REQUIRE_AGP);
} else if (!intel_agp_enabled) {
DRM_ERROR("drm/i915 can't work without intel_agp module!\n");
return -ENODEV;
}

return drm_get_pci_dev(pdev, ent, &driver);
}

Expand Down Expand Up @@ -1102,11 +1116,6 @@ static struct pci_driver i915_pci_driver = {

static int __init i915_init(void)
{
if (!intel_agp_enabled) {
DRM_ERROR("drm/i915 can't work without intel_agp module!\n");
return -ENODEV;
}

driver.num_ioctls = i915_max_ioctl;

/*
Expand Down

0 comments on commit 02ce349

Please sign in to comment.