]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/radeon: programm the VCE fw BAR as well
authorChristian König <christian.koenig@amd.com>
Mon, 23 Mar 2015 10:33:00 +0000 (11:33 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 27 Mar 2015 14:17:44 +0000 (10:17 -0400)
Otherwise the VCE firmware needs to be in the first 256MB of VRAM.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/cikd.h
drivers/gpu/drm/radeon/vce_v2_0.c

index c648e1996dabac449dfb838e018cad85b2d3bb61..243a36c93b8f96c0f268ef9bfcae1721043c7240 100644 (file)
 #define VCE_UENC_REG_CLOCK_GATING      0x207c0
 #define VCE_SYS_INT_EN                 0x21300
 #      define VCE_SYS_INT_TRAP_INTERRUPT_EN    (1 << 3)
+#define VCE_LMI_VCPU_CACHE_40BIT_BAR   0x2145c
 #define VCE_LMI_CTRL2                  0x21474
 #define VCE_LMI_CTRL                   0x21498
 #define VCE_LMI_VM_CTRL                        0x214a0
index 1ac7bb825a1b3bfecea601d76f8e33c2b8d581ff..fbbe78fbd087ae7c147a43b925f0ac0401c86466 100644 (file)
@@ -156,6 +156,9 @@ int vce_v2_0_resume(struct radeon_device *rdev)
        WREG32(VCE_LMI_SWAP_CNTL1, 0);
        WREG32(VCE_LMI_VM_CTRL, 0);
 
+       WREG32(VCE_LMI_VCPU_CACHE_40BIT_BAR, addr >> 8);
+
+       addr &= 0xff;
        size = RADEON_GPU_PAGE_ALIGN(rdev->vce_fw->size);
        WREG32(VCE_VCPU_CACHE_OFFSET0, addr & 0x7fffffff);
        WREG32(VCE_VCPU_CACHE_SIZE0, size);