Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166027
b: refs/heads/master
c: 1c5d22f
h: refs/heads/master
i:
  166025: 9a26524
  166023: cf46e66
v: v3
  • Loading branch information
Chris Wilson committed Sep 23, 2009
1 parent 692e757 commit 5a1b48c
Show file tree
Hide file tree
Showing 7 changed files with 448 additions and 17 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: 74dff282237ea8c0a5df1afd8526eac4b6cee063
refs/heads/master: 1c5d22f76dc721f3acb7a3dadc657a221e487fb7
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/i915/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o i915_mem.o \
i915_gem.o \
i915_gem_debug.o \
i915_gem_tiling.o \
i915_trace_points.o \
intel_display.o \
intel_crt.o \
intel_lvds.o \
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "intel_drv.h"
#include "i915_drm.h"
#include "i915_drv.h"
#include "i915_trace.h"

/* Really want an OS-independent resettable timer. Would like to have
* this loop run for (eg) 3 sec, but have the timer reset every time
Expand All @@ -49,14 +50,18 @@ int i915_wait_ring(struct drm_device * dev, int n, const char *caller)
u32 last_head = I915_READ(PRB0_HEAD) & HEAD_ADDR;
int i;

trace_i915_ring_wait_begin (dev);

for (i = 0; i < 100000; i++) {
ring->head = I915_READ(PRB0_HEAD) & HEAD_ADDR;
acthd = I915_READ(acthd_reg);
ring->space = ring->head - (ring->tail + 8);
if (ring->space < 0)
ring->space += ring->Size;
if (ring->space >= n)
if (ring->space >= n) {
trace_i915_ring_wait_end (dev);
return 0;
}

if (dev->primary->master) {
struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv;
Expand All @@ -76,6 +81,7 @@ int i915_wait_ring(struct drm_device * dev, int n, const char *caller)

}

trace_i915_ring_wait_end (dev);
return -EBUSY;
}

Expand Down
Loading

0 comments on commit 5a1b48c

Please sign in to comment.