Ignore userland provided batchbuffer start parameter, we can determine
authoroga <oga@openbsd.org>
Thu, 28 Aug 2008 02:26:16 +0000 (02:26 +0000)
committeroga <oga@openbsd.org>
Thu, 28 Aug 2008 02:26:16 +0000 (02:26 +0000)
it ourselves.

From drm git.

sys/dev/pci/drm/i915_dma.c
sys/dev/pci/drm/i915_drv.h

index 7d50c29..96e9b42 100644 (file)
@@ -163,13 +163,6 @@ static int i915_initialize(struct drm_device * dev,
        if (dev_priv->sarea_priv)
                dev_priv->sarea_priv->pf_current_page = 0;
 
-       /* We are using separate values as placeholders for mechanisms for
-        * 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;
@@ -523,7 +516,7 @@ int i915_dispatch_batchbuffer(struct drm_device * dev,
                                return ret;
                }
 
-               if (dev_priv->use_mi_batchbuffer_start) {
+               if (!IS_I830(dev) && !IS_845G(dev)) {
                        BEGIN_LP_RING(2);
                        if (IS_I965G(dev)) {
                                OUT_RING(MI_BATCH_BUFFER_START | (2 << 6) | MI_BATCH_NON_SECURE_I965);
@@ -802,8 +795,6 @@ static int i915_setparam(struct drm_device *dev, void *data,
 
        switch (param->param) {
        case I915_SETPARAM_USE_MI_BATCHBUFFER_START:
-               if (!IS_I965G(dev))
-                       dev_priv->use_mi_batchbuffer_start = param->value;
                break;
        case I915_SETPARAM_TEX_LRU_LOG_GRANULARITY:
                dev_priv->tex_lru_log_granularity = param->value;
index bc1240a..dd19e90 100644 (file)
@@ -122,7 +122,6 @@ typedef struct drm_i915_private {
        drm_local_map_t hws_map;
 
        unsigned int cpp;
-       int use_mi_batchbuffer_start;
 
        wait_queue_head_t irq_queue;
        atomic_t irq_received;