mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
drm/i915: Round tile chunks up for constructing partial VMAs
When we split a large object up into chunks for GTT faulting (because we can't fit the whole object into the aperture) we have to align our cuts with the fence registers. Each partial VMA must cover a complete set of tile rows or the offset into each partial VMA is not aligned with the whole image. Currently we enforce a minimum size on each partial VMA, but this minimum size itself was not aligned to the tile row causing distortion. Reported-by: Andreas Reis <[email protected]> Reported-by: Chris Clayton <[email protected]> Reported-by: Norbert Preining <[email protected]> Tested-by: Norbert Preining <[email protected]> Tested-by: Chris Clayton <[email protected]> Fixes:03af84fe7f("drm/i915: Choose partial chunksize based on tile row size") Fixes:a61007a83a("drm/i915: Fix partial GGTT faulting") # enabling patch Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98402 Testcase: igt/gem_mmap_gtt/medium-copy-odd Signed-off-by: Chris Wilson <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Jani Nikula <[email protected]> Cc: <[email protected]> # v4.9-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Joonas Lahtinen <[email protected]> (cherry picked from commit0ef723cbce) Signed-off-by: Jani Nikula <[email protected]>
This commit is contained in:
parent
61e0c54388
commit
c4b8c57044
1 changed files with 1 additions and 1 deletions
|
|
@ -1806,7 +1806,7 @@ int i915_gem_fault(struct vm_area_struct *area, struct vm_fault *vmf)
|
|||
/* Use a partial view if it is bigger than available space */
|
||||
chunk_size = MIN_CHUNK_PAGES;
|
||||
if (i915_gem_object_is_tiled(obj))
|
||||
chunk_size = max(chunk_size, tile_row_pages(obj));
|
||||
chunk_size = roundup(chunk_size, tile_row_pages(obj));
|
||||
|
||||
memset(&view, 0, sizeof(view));
|
||||
view.type = I915_GGTT_VIEW_PARTIAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue