aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
diff options
context:
space:
mode:
authorImre Deak <[email protected]>2016-07-01 13:40:05 +0000
committerDaniel Vetter <[email protected]>2016-07-25 06:14:48 +0000
commit1542f5d90a16375201f24c8a06e7b6637f054218 (patch)
tree96ca7cfaccdd1ccc0219762ede1316fa501bd5f9 /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
parentdrm/i915/gen9: Clean up MOCS table definitions (diff)
downloadkernel-1542f5d90a16375201f24c8a06e7b6637f054218.tar.gz
kernel-1542f5d90a16375201f24c8a06e7b6637f054218.zip
drm/i915/bxt: Fix inadvertent CPU snooping due to incorrect MOCS config
Setting a write-back cache policy in the MOCS entry definition also implies snooping, which has a considerable overhead. This is unexpected for a few reasons: - From user-space's point of view since it didn't want a coherent surface (it didn't set the buffer as such via the set caching IOCTL). - There is a separate MOCS entry field for snooping (which we never set). - This MOCS table is about caching in (e)LLC and there is no (e)LLC on BXT. There is a separate table for L3 cache control. Considering the above the current behavior of snooping looks like an unintentional side-effect of the WB setting. Changing it to be LLC-UC gets rid of the snooping without any ill-effects. For a coherent surface the application would use a separate MOCS entry at index 1 and call the set caching IOCTL to setup the PTE entries for the corresponding buffer to be snooped. In the future we could also add a new MOCS entry for coherent surfaces. This resulted in 70% improvement in synthetic texturing benchmarks. Kudos to Valtteri Rantala, Eero Tamminen and Michael T Frederick and Ville who helped to narrow the source of problem to the kernel and to the snooping behaviour in particular. With a follow-up change to adjust the 3rd entry value igt/gem_mocs_settings is passing after this change. v2: - Rebase on v2 of patch 1/2. v3: - Set the entry as LLC uncached instead of PTE-passthrough. This way we also keep snooping disabled, but we also make the cacheability/ coherency setting indepent of the PTE which is managed by the kernel. (Chris) CC: Rong R Yang <[email protected]> CC: Yakui Zhao <[email protected]> CC: Valtteri Rantala <[email protected]> CC: Eero Tamminen <[email protected]> CC: Michael T Frederick <[email protected]> CC: Ville Syrjälä <[email protected]> CC: Chris Wilson <[email protected]> Signed-off-by: Imre Deak <[email protected]> Acked-by: Zhao Yakui <[email protected]> Tested-by: Rong R Yang <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 6bee14ed1e1136d700e5290c080e1145982ce43e) Signed-off-by: Daniel Vetter <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
0 files changed, 0 insertions, 0 deletions