]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/radeon: avoid UVD corruption on AGP cards using GPU gart
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Sep 2013 03:23:07 +0000 (23:23 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2013 14:17:57 +0000 (07:17 -0700)
commit 4ca5a6cba53e13b8fd153b0762b4128fab6a3cfb upstream.

If the user has forced the driver to use the internal GPU gart
rather than AGP on an AGP card, force the buffers to vram
as well.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/radeon_cs.c

index 7c110ef5bf6e4fb06d39c7cf79f1be6baea5bfde..41b170d25c083dcef74e44c9b38f176252719097 100644 (file)
@@ -84,7 +84,7 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
                   VRAM, also but everything into VRAM on AGP cards to avoid
                   image corruptions */
                if (p->ring == R600_RING_TYPE_UVD_INDEX &&
-                   (i == 0 || p->rdev->flags & RADEON_IS_AGP)) {
+                   (i == 0 || drm_pci_device_is_agp(p->rdev->ddev))) {
                        /* TODO: is this still needed for NI+ ? */
                        p->relocs[i].lobj.domain =
                                RADEON_GEM_DOMAIN_VRAM;