summaryrefslogtreecommitdiff
path: root/kernel/bpf
diff options
context:
space:
mode:
authorLeo Li <sunpeng.li@amd.com>2022-07-12 12:30:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 11:14:54 +0200
commit51a7796728d1d92653fecaa406d2e779f2cc5f62 (patch)
treee1312b0fcde6843b4654232a6e47f96707b1a773 /kernel/bpf
parent3d51fee2aae1bc44e58c26b9894d4f1a87889218 (diff)
drm/amdgpu: Check BO's requested pinning domains against its preferred_domains
commit f5ba14043621f4afdf3ad5f92ee2d8dbebbe4340 upstream. When pinning a buffer, we should check to see if there are any additional restrictions imposed by bo->preferred_domains. This will prevent the BO from being moved to an invalid domain when pinning. For example, this can happen if the user requests to create a BO in GTT domain for display scanout. amdgpu_dm will allow pinning to either VRAM or GTT domains, since DCN can scanout from either or. However, in amdgpu_bo_pin_restricted(), pinning to VRAM is preferred if there is adequate carveout. This can lead to pinning to VRAM despite the user requesting GTT placement for the BO. v2: Allow the kernel to override the domain, which can happen when exporting a BO to a V4L camera (for example). Signed-off-by: Leo Li <sunpeng.li@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions