summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/i915_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c
index c53a39ec..b5c87747 100644
--- a/linux-core/i915_gem.c
+++ b/linux-core/i915_gem.c
@@ -1523,7 +1523,7 @@ i915_gem_flush_pwrite(struct drm_gem_object *obj,
if ((size < obj->size >> 1) && obj_priv->page_list != NULL) {
unsigned long first_page = offset / PAGE_SIZE;
- unsigned long beyond_page = roundup(offset + size, PAGE_SIZE);
+ unsigned long beyond_page = roundup(offset + size, PAGE_SIZE) / PAGE_SIZE;
drm_ttm_cache_flush(obj_priv->page_list + first_page,
beyond_page - first_page);