mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-24 09:00:13 +01:00
[intel-gem] Compute npages instead of nbytes in flush_pwrite
i915_gem_flush_pwrite optimizes short writes to the buffer by clflushing only the modified pages, but it was miscomputing the number of pages.
This commit is contained in:
parent
c69b81df62
commit
6d1d11704a
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue