diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-11 14:34:33 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-12-18 05:17:53 +0400 |
commit | 24986ee06929a8de3a5b4722ccadf0b85c175264 (patch) | |
tree | 96baab74b307b9566db0f493dc63de0b031ad6c2 /drivers/gpu/drm/i915/i915_dma.c | |
parent | 5ec467a80301fccb21eaf4bcc04cd0f4536a30d6 (diff) | |
download | linux-24986ee06929a8de3a5b4722ccadf0b85c175264.tar.xz |
drm: kill DRIVER_REQUIRE_AGP
Only the two intel drivers need this and they can easily check for
working agp support in their driver ->load callbacks.
This is the only reason why agp initialization could fail, so allows
us to rip out a bit of error handling code in the next patch.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 89e4cf1bb073..7eefc17ab69c 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1476,6 +1476,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) return -ENODEV; } + /* UMS needs agp support. */ + if (!drm_core_check_feature(dev, DRIVER_MODESET) && !dev->agp) + return -EINVAL; + dev_priv = kzalloc(sizeof(*dev_priv), GFP_KERNEL); if (dev_priv == NULL) return -ENOMEM; |