OrangePi_CM5/drivers/gpu/drm/amd
Leo Li 15d0aeb017 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>
2022-08-21 15:15:24 +02:00
..
acp drm: amd/acp: fix broken menu structure 2020-03-13 11:52:35 -04:00
amdgpu drm/amdgpu: Check BO's requested pinning domains against its preferred_domains 2022-08-21 15:15:24 +02:00
amdkfd drm/amdkfd: Fix GWS queue count 2022-05-09 09:05:05 +02:00
display drm/amdgpu/display: add quirk handling for stutter mode 2022-07-29 17:19:11 +02:00
include drm/amdgpu: add support for IP discovery gc_info table v2 2022-01-05 12:40:32 +01:00
pm drm/amd/pm: fix the compile warning 2022-06-09 10:20:53 +02:00