Add an extra 512 pages (2 MiB) to the GART before GTT. This space is going to be used for the VCE VCPU BO.
Split this into a separate patch to make it easier to bisect, in case there are any errors in the future. v2: - Reduce extra space from 16 MiB to only 2 MiB - Keep total GART size at 1024 MiB Signed-off-by: Timur Kristóf <[email protected]> --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c index 499dfd78092d..683bfe7f2770 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c @@ -214,6 +214,9 @@ static void gmc_v6_0_vram_gtt_location(struct amdgpu_device *adev, amdgpu_gmc_set_agp_default(adev, mc); amdgpu_gmc_vram_location(adev, mc, base); amdgpu_gmc_gart_location(adev, mc, AMDGPU_GART_PLACEMENT_LOW); + + /* Add space for VCE's VCPU BO so that VCE1 can access it. */ + mc->num_gart_pages_before_gtt += AMDGPU_GTT_MAX_TRANSFER_SIZE; } static void gmc_v6_0_mc_program(struct amdgpu_device *adev) -- 2.51.0
