summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/avivod.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-09-18 14:16:38 +1000
committerDave Airlie <airlied@redhat.com>2009-09-18 16:13:11 +1000
commit698443d9ec1a33eff65b27b9514e06998bf57eb3 (patch)
treec7fed660677470060168d8ab91b67bd6eeae5c4d /drivers/gpu/drm/radeon/avivod.h
parent5e6dde7ec2e72f49ff749204efc03a59478d7d34 (diff)
downloadop-kernel-dev-698443d9ec1a33eff65b27b9514e06998bf57eb3.zip
op-kernel-dev-698443d9ec1a33eff65b27b9514e06998bf57eb3.tar.gz
drm/radeon/kms: disable VGA rendering engine before taking over VRAM
Before we use any of VRAM, we need to disable the VGA rendering engine, this render text mode into a graphical framebuffer for scanout, however it does this on vblank, and can end up overwriting the GART table and r600 shader objects. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/avivod.h')
-rw-r--r--drivers/gpu/drm/radeon/avivod.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/avivod.h b/drivers/gpu/drm/radeon/avivod.h
index d4e6e6e..e2b92c4 100644
--- a/drivers/gpu/drm/radeon/avivod.h
+++ b/drivers/gpu/drm/radeon/avivod.h
@@ -57,4 +57,13 @@
#define VGA_RENDER_CONTROL 0x0300
#define VGA_VSTATUS_CNTL_MASK 0x00030000
+/* AVIVO disable VGA rendering */
+static inline void radeon_avivo_vga_render_disable(struct radeon_device *rdev)
+{
+ u32 vga_render;
+ vga_render = RREG32(VGA_RENDER_CONTROL);
+ vga_render &= ~VGA_VSTATUS_CNTL_MASK;
+ WREG32(VGA_RENDER_CONTROL, vga_render);
+}
+
#endif
OpenPOWER on IntegriCloud