summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@nietzche.virtuousgeek.org>2008-05-13 14:47:17 -0700
committerJesse Barnes <jbarnes@nietzche.virtuousgeek.org>2008-05-13 14:47:17 -0700
commite4f29968f4860008c13635fa0891cb535e672b93 (patch)
tree8a879091e6411498ad6264c5856d8ae370b38015
parentee631e1b8604a176b9118396998ce5bfc6475dae (diff)
parent5be53a0881c5248146c585015bf60bb2958773af (diff)
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
-rw-r--r--shared-core/i915_dma.c9
-rw-r--r--shared-core/i915_init.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index e1417388..205daa60 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 0bbad65e..98908a50 100644
--- a/shared-core/i915_init.c
+++ b/shared-core/i915_init.c
@@ -154,10 +154,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)) {