Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218042
b: refs/heads/master
c: 9375e44
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson committed Sep 21, 2010
1 parent ebc079c commit aad19bd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9220434a8768902cd9cf248709972678b74aa8c1
refs/heads/master: 9375e446e7f43be9a7c21e246cee35ea912532ec
6 changes: 6 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,12 @@ int i965_reset(struct drm_device *dev, u8 flags)
*/
i915_gem_retire_requests(dev);

/* Remove anything from the flushing lists. The GPU cache is likely
* to be lost on reset along with the data, so simply move the
* lost bo to the inactive list.
*/
i915_gem_reset_flushing_list(dev);

/*
* Set the domains we want to reset (GRDOM/bits 2 and 3) as
* well as the reset bit (GR/bit 0). Setting the GR bit
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ int i915_gem_object_get_fence_reg(struct drm_gem_object *obj,
int i915_gem_object_put_fence_reg(struct drm_gem_object *obj,
bool interruptible);
void i915_gem_retire_requests(struct drm_device *dev);
void i915_gem_reset_flushing_list(struct drm_device *dev);
void i915_gem_clflush_object(struct drm_gem_object *obj);
int i915_gem_object_set_domain(struct drm_gem_object *obj,
uint32_t read_domains,
Expand Down
16 changes: 16 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,22 @@ i915_get_gem_seqno(struct drm_device *dev,
return ring->get_gem_seqno(dev, ring);
}

void i915_gem_reset_flushing_list(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;

while (!list_empty(&dev_priv->mm.flushing_list)) {
struct drm_i915_gem_object *obj_priv;

obj_priv = list_first_entry(&dev_priv->mm.flushing_list,
struct drm_i915_gem_object,
list);

obj_priv->base.write_domain = 0;
i915_gem_object_move_to_inactive(&obj_priv->base);
}
}

/**
* This function clears the request list as sequence numbers are passed.
*/
Expand Down

0 comments on commit aad19bd

Please sign in to comment.