]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/radeon: force the UVD DPB into VRAM as well
authorChristian König <christian.koenig@amd.com>
Tue, 11 Apr 2017 17:20:20 +0000 (19:20 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:32:22 +0000 (17:32 -0400)
Seems to be mandatory for WMV playback.

Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=100510

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

index df6b58c085445f9b57640d52574421f11c371e8a..3ac671f6c8e1f05ff3dda913d915641540d15611 100644 (file)
@@ -117,11 +117,13 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
                priority = (r->flags & RADEON_RELOC_PRIO_MASK) * 2
                           + !!r->write_domain;
 
-               /* the first reloc of an UVD job is the msg and that must be in
-                  VRAM, also but everything into VRAM on AGP cards and older
-                  IGP chips to avoid image corruptions */
+               /* The first reloc of an UVD job is the msg and that must be in
+                * VRAM, the second reloc is the DPB and for WMV that must be in
+                * VRAM as well. Also put everything into VRAM on AGP cards and older
+                * IGP chips to avoid image corruptions
+                */
                if (p->ring == R600_RING_TYPE_UVD_INDEX &&
-                   (i == 0 || pci_find_capability(p->rdev->ddev->pdev,
+                   (i <= 0 || pci_find_capability(p->rdev->ddev->pdev,
                                                   PCI_CAP_ID_AGP) ||
                     p->rdev->family == CHIP_RS780 ||
                     p->rdev->family == CHIP_RS880)) {
index d34d1cf33895766c55a122adad041be62e42c70c..7431eb4a11b7f721fc8e44240c09742b02dc0446 100644 (file)
@@ -621,7 +621,7 @@ static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p,
        }
 
        /* TODO: is this still necessary on NI+ ? */
-       if ((cmd == 0 || cmd == 0x3) &&
+       if ((cmd == 0 || cmd == 1 || cmd == 0x3) &&
            (start >> 28) != (p->rdev->uvd.gpu_addr >> 28)) {
                DRM_ERROR("msg/fb buffer %LX-%LX out of 256MB segment!\n",
                          start, end);