diff options
author | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-05-13 09:24:47 +0200 |
---|---|---|
committer | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-05-13 09:26:26 +0200 |
commit | 5be53a0881c5248146c585015bf60bb2958773af (patch) | |
tree | 92fd480ef458c083b17bc58c8cdb04adf966a79c | |
parent | d32ce7f621c0d8e42cdf88ce6f1d15638a3d34b7 (diff) |
i915: execbuf now works without i915_dma_init being called
-rw-r--r-- | shared-core/i915_dma.c | 9 | ||||
-rw-r--r-- | shared-core/i915_init.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 9bec85a1..498620f5 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -197,7 +197,9 @@ static int i915_initialize(struct drm_device * dev, #ifdef I915_HAVE_BUFFER - dev_priv->max_validate_buffers = I915_MAX_VALIDATE_BUFFERS; + if (!drm_core_check_feature(dev, DRIVER_MODESET)) { + dev_priv->max_validate_buffers = I915_MAX_VALIDATE_BUFFERS; + } #endif if (!dev_priv->ring.Size) { @@ -260,8 +262,11 @@ static int i915_initialize(struct drm_device * dev, I915_WRITE(0x02080, dev_priv->dma_status_page); } DRM_DEBUG("Enabled hardware status page\n"); + #ifdef I915_HAVE_BUFFER - mutex_init(&dev_priv->cmdbuf_mutex); + if (!drm_core_check_feature(dev, DRIVER_MODESET)) { + mutex_init(&dev_priv->cmdbuf_mutex); + } #endif if (init->func == I915_INIT_DMA2) { diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c index 22577c7f..c0ca226a 100644 --- a/shared-core/i915_init.c +++ b/shared-core/i915_init.c @@ -155,10 +155,14 @@ int i915_load_modeset_init(struct drm_device *dev) * private backbuffer/depthbuffer usage. */ dev_priv->use_mi_batchbuffer_start = 0; + if (IS_I965G(dev)) /* 965 doesn't support older method */ + dev_priv->use_mi_batchbuffer_start = 1; /* Allow hardware batchbuffers unless told otherwise. */ dev_priv->allow_batchbuffer = 1; + dev_priv->max_validate_buffers = I915_MAX_VALIDATE_BUFFERS; + mutex_init(&dev_priv->cmdbuf_mutex); /* Program Hardware Status Page */ if (!IS_G33(dev)) { |