Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63663
b: refs/heads/master
c: 21f1628
h: refs/heads/master
i:
  63661: 76b4a60
  63659: 93ff3e7
  63655: 750c749
  63647: b8b22c6
v: v3
  • Loading branch information
Dave Airlie authored and Linus Torvalds committed Aug 7, 2007
1 parent 07b8ba4 commit da41c38
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4ac2477fad0f2680e84ec12e387ce67682c5c13
refs/heads/master: 21f16289270447673a7263ccc0b22d562fb01ecb
14 changes: 11 additions & 3 deletions trunk/drivers/char/drm/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ static int i915_initialize(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.
*/
Expand Down Expand Up @@ -517,8 +519,13 @@ static int i915_dispatch_batchbuffer(struct drm_device * dev,

if (dev_priv->use_mi_batchbuffer_start) {
BEGIN_LP_RING(2);
OUT_RING(MI_BATCH_BUFFER_START | (2 << 6));
OUT_RING(batch->start | MI_BATCH_NON_SECURE);
if (IS_I965G(dev)) {
OUT_RING(MI_BATCH_BUFFER_START | (2 << 6) | MI_BATCH_NON_SECURE_I965);
OUT_RING(batch->start);
} else {
OUT_RING(MI_BATCH_BUFFER_START | (2 << 6));
OUT_RING(batch->start | MI_BATCH_NON_SECURE);
}
ADVANCE_LP_RING();
} else {
BEGIN_LP_RING(4);
Expand Down Expand Up @@ -735,7 +742,8 @@ static int i915_setparam(DRM_IOCTL_ARGS)

switch (param.param) {
case I915_SETPARAM_USE_MI_BATCHBUFFER_START:
dev_priv->use_mi_batchbuffer_start = param.value;
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;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/drm/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
#define MI_BATCH_BUFFER_START (0x31<<23)
#define MI_BATCH_BUFFER_END (0xA<<23)
#define MI_BATCH_NON_SECURE (1)
#define MI_BATCH_NON_SECURE_I965 (1<<8)

#define MI_WAIT_FOR_EVENT ((0x3<<23))
#define MI_WAIT_FOR_PLANE_A_FLIP (1<<2)
Expand Down

0 comments on commit da41c38

Please sign in to comment.