OSDN Git Service

Revert "Revert "amdgpu: Set USWC for SCANOUT images.""
authorBas Nieuwenhuizen <basni@chromium.org>
Thu, 4 Jun 2020 21:11:27 +0000 (23:11 +0200)
committerCommit Bot <commit-bot@chromium.org>
Thu, 25 Jun 2020 18:41:30 +0000 (18:41 +0000)
commit4daf12cff00c07b1e7ece5cc9d66a8fb9b115255
treef8bdfb48d3018feb9700a712eb0de4925e93ae42
parent4a3f98cc34b8bfde694c6e1509989637973aff6b
Revert "Revert "amdgpu: Set USWC for SCANOUT images.""

This reverts commit 91d36976aa84abde87f0f56d235d57042ca3ea81.i

The previous changes should fix the mapping performance with USWC
memory.

original change:
    amdgpu: Set USWC for SCANOUT images.

    This is necessary for scanout from GTT. Without it, the kernel will
    migrate it to the carveout. For large resolutions this would not be
    feasible due to small carveout sizes and hence it is important that
    we alloc scanout from GTT.

    The original patch was on top of
    4eebcea "amdgpu: make AMDGPU_GEM_CREATE_CPU_GTT_USWC flag default"
    which set USWC unconditionally, but has since been reverted. The
    main failure reason is being addressed in mesa-amd. This patch also
    still disables USWC if we can and the image will be read often on
    the CPU, to avoid staging textures during memory mapping.

TEST=Run android.hardware.camera2.cts.RecordingTest#testVideoPreviewSurfaceSharing on Grunt.
BUG=b:152378755

Change-Id: Ice0041de6676c057a2659986b962c2d54833e928
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2246025
Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Bas Nieuwenhuizen <basni@chromium.org>
amdgpu.c