Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: fix typo in amdgpu_vce_validate_bo

Otherwise buffer placement is very restrictive and might fail.

Fixes: "drm/amdgpu: fix VCE buffer placement restrictions v2"

Signed-off-by: Christian König <christian.koenig@amd.com>
Reported-by: Deng, Emily <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org

authored by

Christian König and committed by
Alex Deucher
4c63abb2 d958939a

+2 -2
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
··· 585 585 586 586 for (i = 0; i < bo->placement.num_placement; ++i) { 587 587 bo->placements[i].fpfn = max(bo->placements[i].fpfn, fpfn); 588 - bo->placements[i].lpfn = bo->placements[i].fpfn ? 589 - min(bo->placements[i].fpfn, lpfn) : lpfn; 588 + bo->placements[i].lpfn = bo->placements[i].lpfn ? 589 + min(bo->placements[i].lpfn, lpfn) : lpfn; 590 590 } 591 591 return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); 592 592 }