diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-02-28 11:29:19 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-02-28 11:29:19 -0500 |
commit | 88304fe9c0ce69012d44a77a5368c35236511dac (patch) | |
tree | bf68c721bf6bb09458e3d950ad4dc56fec90da63 /src/drmmode_display.c | |
parent | 99141761e947e2153ed1a3bc485dc5716a22acb1 (diff) |
kms: don't rotate if acceleration is not enabled
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r-- | src/drmmode_display.c | 9 |
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)); |