From dadbfae52c2fc250d325037c0f5c53635f159093 Mon Sep 17 00:00:00 2001 From: oga Date: Thu, 28 Aug 2008 02:26:16 +0000 Subject: [PATCH] Ignore userland provided batchbuffer start parameter, we can determine it ourselves. From drm git. --- sys/dev/pci/drm/i915_dma.c | 11 +---------- sys/dev/pci/drm/i915_drv.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/dev/pci/drm/i915_dma.c b/sys/dev/pci/drm/i915_dma.c index 7d50c29103a..96e9b422bfb 100644 --- a/sys/dev/pci/drm/i915_dma.c +++ b/sys/dev/pci/drm/i915_dma.c @@ -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; diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h index bc1240a2fcc..dd19e906314 100644 --- a/sys/dev/pci/drm/i915_drv.h +++ b/sys/dev/pci/drm/i915_drv.h @@ -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; -- 2.20.1