[PATCH] drm/amdgpu: make display pinning more flexible (v2)
Luben Tuikov
luben.tuikov at amd.com
Wed Dec 7 17:50:06 UTC 2022
Acked-by: Luben Tuikov <luben.tuikov at amd.com>
Regards,
Luben
On 2022-12-07 11:21, Alex Deucher wrote:
> Only apply the static threshold for Stoney and Carrizo.
> This hardware has certain requirements that don't allow
> mixing of GTT and VRAM. Newer asics do not have these
> requirements so we should be able to be more flexible
> with where buffers end up.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 919bbea2e3ac..2df55cc7e07f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -1506,7 +1506,8 @@ u64 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo *bo)
> uint32_t amdgpu_bo_get_preferred_domain(struct amdgpu_device *adev,
> uint32_t domain)
> {
> - if (domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) {
> + if ((domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) &&
> + ((adev->asic_type == CHIP_CARRIZO) || (adev->asic_type == CHIP_STONEY))) {
> domain = AMDGPU_GEM_DOMAIN_VRAM;
> if (adev->gmc.real_vram_size <= AMDGPU_SG_THRESHOLD)
> domain = AMDGPU_GEM_DOMAIN_GTT;
More information about the amd-gfx
mailing list