summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-02-28 11:29:19 -0500
committerAlex Deucher <alexdeucher@gmail.com>2011-02-28 11:29:19 -0500
commit88304fe9c0ce69012d44a77a5368c35236511dac (patch)
treebf68c721bf6bb09458e3d950ad4dc56fec90da63
parent99141761e947e2153ed1a3bc485dc5716a22acb1 (diff)
kms: don't rotate if acceleration is not enabled
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r--src/drmmode_display.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index a9723899..7873d572 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -445,6 +445,8 @@ drmmode_show_cursor (xf86CrtcPtr crtc)
static void *
drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
{
+ ScrnInfoPtr pScrn = crtc->scrn;
+ RADEONInfoPtr info = RADEONPTR(pScrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
int size;
@@ -453,6 +455,13 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
unsigned long rotate_pitch;
int base_align;
+ /* rotation requires acceleration */
+ if (info->r600_shadow_fb) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Rotation requires acceleration!\n");
+ return NULL;
+ }
+
rotate_pitch =
RADEON_ALIGN(width, drmmode_get_pitch_align(crtc->scrn, drmmode->cpp, 0)) * drmmode->cpp;
height = RADEON_ALIGN(height, drmmode_get_height_align(crtc->scrn, 0));