aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-02-04 11:27:27 -0500
committerDave Airlie <airlied@redhat.com>2010-02-04 20:43:09 -0500
commitc38c7b64a2747a211c3a6e8e5919ee25ccd474e7 (patch)
treef994fb9585b8064db19ceda25a9be127655ceee0 /drivers/gpu
parent17aafccab4352b422aa01fa6ebf82daff693a5b3 (diff)
drm/radeon/kms: move blit initialization after we disabled VGA
VGA might be overwritting VRAM and corrupt our blit shader leading to corruption, it likely won't happen if you load fbcon right after radeon. Thanks to Shawn Starr and Andre Maasikas for tracking down this issue. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/r600.c12
-rw-r--r--drivers/gpu/drm/radeon/rv770.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index b833b4b97162..8c94040cb7f2 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1861,6 +1861,12 @@ int r600_startup(struct radeon_device *rdev)
1861 return r; 1861 return r;
1862 } 1862 }
1863 r600_gpu_init(rdev); 1863 r600_gpu_init(rdev);
1864 r = r600_blit_init(rdev);
1865 if (r) {
1866 r600_blit_fini(rdev);
1867 rdev->asic->copy = NULL;
1868 dev_warn(rdev->dev, "failed blitter (%d) falling back to memcpy\n", r);
1869 }
1864 /* pin copy shader into vram */ 1870 /* pin copy shader into vram */
1865 if (rdev->r600_blit.shader_obj) { 1871 if (rdev->r600_blit.shader_obj) {
1866 r = radeon_bo_reserve(rdev->r600_blit.shader_obj, false); 1872 r = radeon_bo_reserve(rdev->r600_blit.shader_obj, false);
@@ -2045,12 +2051,6 @@ int r600_init(struct radeon_device *rdev)
2045 r = r600_pcie_gart_init(rdev); 2051 r = r600_pcie_gart_init(rdev);
2046 if (r) 2052 if (r)
2047 return r; 2053 return r;
2048 r = r600_blit_init(rdev);
2049 if (r) {
2050 r600_blit_fini(rdev);
2051 rdev->asic->copy = NULL;
2052 dev_warn(rdev->dev, "failed blitter (%d) falling back to memcpy\n", r);
2053 }
2054 2054
2055 rdev->accel_working = true; 2055 rdev->accel_working = true;
2056 r = r600_startup(rdev); 2056 r = r600_startup(rdev);
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 2d465768ac71..06b037eebef5 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -887,6 +887,12 @@ static int rv770_startup(struct radeon_device *rdev)
887 return r; 887 return r;
888 } 888 }
889 rv770_gpu_init(rdev); 889 rv770_gpu_init(rdev);
890 r = r600_blit_init(rdev);
891 if (r) {
892 r600_blit_fini(rdev);
893 rdev->asic->copy = NULL;
894 dev_warn(rdev->dev, "failed blitter (%d) falling back to memcpy\n", r);
895 }
890 /* pin copy shader into vram */ 896 /* pin copy shader into vram */
891 if (rdev->r600_blit.shader_obj) { 897 if (rdev->r600_blit.shader_obj) {
892 r = radeon_bo_reserve(rdev->r600_blit.shader_obj, false); 898 r = radeon_bo_reserve(rdev->r600_blit.shader_obj, false);
@@ -1055,12 +1061,6 @@ int rv770_init(struct radeon_device *rdev)
1055 r = r600_pcie_gart_init(rdev); 1061 r = r600_pcie_gart_init(rdev);
1056 if (r) 1062 if (r)
1057 return r; 1063 return r;
1058 r = r600_blit_init(rdev);
1059 if (r) {
1060 r600_blit_fini(rdev);
1061 rdev->asic->copy = NULL;
1062 dev_warn(rdev->dev, "failed blitter (%d) falling back to memcpy\n", r);
1063 }
1064 1064
1065 rdev->accel_working = true; 1065 rdev->accel_working = true;
1066 r = rv770_startup(rdev); 1066 r = rv770_startup(rdev);