Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217945
b: refs/heads/master
c: dd2575f
h: refs/heads/master
i:
  217943: 02a8047
v: v3
  • Loading branch information
Chris Wilson committed Sep 8, 2010
1 parent 796fc9e commit 021fa46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 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: 8c80b59b370b4d942f595bdb4a6d23494f77a810
refs/heads/master: dd2575ffbd71d0922eb31b94adc0923f9808c915
14 changes: 3 additions & 11 deletions trunk/drivers/gpu/drm/i915/i915_gem_tiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,16 +399,14 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
* bit 17 of its physical address and therefore being interpreted differently
* by the GPU.
*/
static int
static void
i915_gem_swizzle_page(struct page *page)
{
char temp[64];
char *vaddr;
int i;
char temp[64];

vaddr = kmap(page);
if (vaddr == NULL)
return -ENOMEM;

for (i = 0; i < PAGE_SIZE; i += 128) {
memcpy(temp, &vaddr[i], 64);
Expand All @@ -417,8 +415,6 @@ i915_gem_swizzle_page(struct page *page)
}

kunmap(page);

return 0;
}

void
Expand All @@ -440,11 +436,7 @@ i915_gem_object_do_bit_17_swizzle(struct drm_gem_object *obj)
char new_bit_17 = page_to_phys(obj_priv->pages[i]) >> 17;
if ((new_bit_17 & 0x1) !=
(test_bit(i, obj_priv->bit_17) != 0)) {
int ret = i915_gem_swizzle_page(obj_priv->pages[i]);
if (ret != 0) {
DRM_ERROR("Failed to swizzle page\n");
return;
}
i915_gem_swizzle_page(obj_priv->pages[i]);
set_page_dirty(obj_priv->pages[i]);
}
}
Expand Down

0 comments on commit 021fa46

Please sign in to comment.