Index: r600_exa.c =================================================================== RCS file: /cvsroot/xsrc/external/mit/xf86-video-ati/dist/src/r600_exa.c,v retrieving revision 1.5 diff -p -u -r1.5 r600_exa.c --- r600_exa.c 23 Sep 2012 20:06:02 -0000 1.5 +++ r600_exa.c 29 Jul 2014 02:28:33 -0000 @@ -246,7 +246,8 @@ R600PrepareSolid(PixmapPtr pPix, int alu cb_conf.base = accel_state->dst_obj.offset; cb_conf.bo = accel_state->dst_obj.bo; #ifdef XF86DRM_MODE - cb_conf.surface = accel_state->dst_obj.surface; + if (info->cs) + cb_conf.surface = accel_state->dst_obj.surface; #endif if (accel_state->dst_obj.bpp == 8) { @@ -428,7 +429,8 @@ R600DoPrepareCopy(ScrnInfoPtr pScrn) tex_res.bo = accel_state->src_obj[0].bo; tex_res.mip_bo = accel_state->src_obj[0].bo; #ifdef XF86DRM_MODE - tex_res.surface = accel_state->src_obj[0].surface; + if (info->cs) + tex_res.surface = accel_state->src_obj[0].surface; #endif if (accel_state->src_obj[0].bpp == 8) { tex_res.format = FMT_8; @@ -475,7 +477,8 @@ R600DoPrepareCopy(ScrnInfoPtr pScrn) cb_conf.base = accel_state->dst_obj.offset; cb_conf.bo = accel_state->dst_obj.bo; #ifdef XF86DRM_MODE - cb_conf.surface = accel_state->dst_obj.surface; + if (info->cs) + cb_conf.surface = accel_state->dst_obj.surface; #endif if (accel_state->dst_obj.bpp == 8) { cb_conf.format = COLOR_8; @@ -626,15 +629,10 @@ R600PrepareCopy(PixmapPtr pSrc, Pixmap if (accel_state->same_surface == TRUE) { #if defined(XF86DRM_MODE) - unsigned long size = accel_state->dst_obj.surface->bo_size; - unsigned long align = accel_state->dst_obj.surface->bo_alignment; -#else - unsigned height = pDst->drawable.height; - unsigned long size = height * accel_state->dst_obj.pitch * pDst->drawable.bitsPerPixel/8; -#endif - -#if defined(XF86DRM_MODE) if (info->cs) { + unsigned long size = accel_state->dst_obj.surface->bo_size; + unsigned long align = accel_state->dst_obj.surface->bo_alignment; + if (accel_state->copy_area_bo) { radeon_bo_unref(accel_state->copy_area_bo); accel_state->copy_area_bo = NULL; @@ -656,6 +654,9 @@ R600PrepareCopy(PixmapPtr pSrc, Pixmap } else #endif { + unsigned height = pDst->drawable.height; + unsigned long size = height * accel_state->dst_obj.pitch * pDst->drawable.bitsPerPixel/8; + if (accel_state->copy_area) { exaOffscreenFree(pDst->drawable.pScreen, accel_state->copy_area); accel_state->copy_area = NULL; @@ -978,7 +979,8 @@ static Bool R600TextureSetup(PicturePtr tex_res.bo = accel_state->src_obj[unit].bo; tex_res.mip_bo = accel_state->src_obj[unit].bo; #ifdef XF86DRM_MODE - tex_res.surface = accel_state->src_obj[unit].surface; + if (info->cs) + tex_res.surface = accel_state->src_obj[unit].surface; #endif tex_res.request_size = 1; @@ -1447,7 +1449,8 @@ static Bool R600PrepareComposite(int op, cb_conf.format = dst_format; cb_conf.bo = accel_state->dst_obj.bo; #ifdef XF86DRM_MODE - cb_conf.surface = accel_state->dst_obj.surface; + if (info->cs) + cb_conf.surface = accel_state->dst_obj.surface; #endif switch (pDstPicture->format) { @@ -1899,9 +1902,7 @@ R600UploadToScreenCS(PixmapPtr pDst, int src_obj.domain = RADEON_GEM_DOMAIN_GTT; src_obj.bo = scratch; src_obj.tiling_flags = 0; -#ifdef XF86DRM_MODE src_obj.surface = NULL; -#endif dst_obj.pitch = dst_pitch_hw; dst_obj.width = pDst->drawable.width; @@ -1911,9 +1912,7 @@ R600UploadToScreenCS(PixmapPtr pDst, int dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; dst_obj.bo = radeon_get_pixmap_bo(pDst); dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); -#ifdef XF86DRM_MODE dst_obj.surface = radeon_get_pixmap_surface(pDst); -#endif if (!R600SetAccelState(pScrn, &src_obj, @@ -2040,9 +2039,7 @@ R600DownloadFromScreenCS(PixmapPtr pSrc, src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; src_obj.bo = radeon_get_pixmap_bo(pSrc); src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); -#ifdef XF86DRM_MODE src_obj.surface = radeon_get_pixmap_surface(pSrc); -#endif dst_obj.pitch = scratch_pitch; dst_obj.width = w; @@ -2052,9 +2049,7 @@ R600DownloadFromScreenCS(PixmapPtr pSrc, dst_obj.bpp = bpp; dst_obj.domain = RADEON_GEM_DOMAIN_GTT; dst_obj.tiling_flags = 0; -#ifdef XF86DRM_MODE dst_obj.surface = NULL; -#endif if (!R600SetAccelState(pScrn, &src_obj, Index: r600_textured_videofuncs.c =================================================================== RCS file: /cvsroot/xsrc/external/mit/xf86-video-ati/dist/src/r600_textured_videofuncs.c,v retrieving revision 1.1.1.9 diff -p -u -r1.1.1.9 r600_textured_videofuncs.c --- r600_textured_videofuncs.c 23 Sep 2012 19:49:22 -0000 1.1.1.9 +++ r600_textured_videofuncs.c 29 Jul 2014 02:28:33 -0000 @@ -275,7 +275,8 @@ R600DisplayTexturedVideo(ScrnInfoPtr pSc tex_res.bo = accel_state->src_obj[0].bo; tex_res.mip_bo = accel_state->src_obj[0].bo; #ifdef XF86DRM_MODE - tex_res.surface = NULL; + if (info->cs) + tex_res.surface = NULL; #endif tex_res.format = FMT_8; @@ -412,7 +413,8 @@ R600DisplayTexturedVideo(ScrnInfoPtr pSc cb_conf.base = accel_state->dst_obj.offset; cb_conf.bo = accel_state->dst_obj.bo; #ifdef XF86DRM_MODE - cb_conf.surface = accel_state->dst_obj.surface; + if (info->cs) + cb_conf.surface = accel_state->dst_obj.surface; #endif switch (accel_state->dst_obj.bpp) { Index: r6xx_accel.c =================================================================== RCS file: /cvsroot/xsrc/external/mit/xf86-video-ati/dist/src/r6xx_accel.c,v retrieving revision 1.6 diff -p -u -r1.6 r6xx_accel.c --- r6xx_accel.c 3 Jun 2012 16:42:23 -0000 1.6 +++ r6xx_accel.c 29 Jul 2014 02:28:33 -0000 @@ -228,7 +228,7 @@ r600_set_render_target(ScrnInfoPtr pScrn #if defined(XF86DRM_MODE) - if (cb_conf->surface) { + if (info->cs && cb_conf->surface) { switch (cb_conf->surface->level[0].mode) { case RADEON_SURF_MODE_1D: array_mode = 2; @@ -626,7 +626,7 @@ r600_set_tex_resource(ScrnInfoPtr pScrn, uint32_t array_mode, pitch; #if defined(XF86DRM_MODE) - if (tex_res->surface) { + if (info->cs && tex_res->surface) { switch (tex_res->surface->level[0].mode) { case RADEON_SURF_MODE_1D: array_mode = 2; Index: radeon_exa.c =================================================================== RCS file: /cvsroot/xsrc/external/mit/xf86-video-ati/dist/src/radeon_exa.c,v retrieving revision 1.1.1.10 diff -p -u -r1.1.1.10 radeon_exa.c --- radeon_exa.c 23 Sep 2012 19:49:35 -0000 1.1.1.10 +++ radeon_exa.c 29 Jul 2014 02:28:33 -0000 @@ -498,7 +498,7 @@ void *RADEONEXACreatePixmap2(ScreenPtr p memset(&surface, 0, sizeof(struct radeon_surface)); #ifdef XF86DRM_MODE - if (info->ChipFamily >= CHIP_FAMILY_R600 && info->surf_man) { + if (info->cs && info->ChipFamily >= CHIP_FAMILY_R600 && info->surf_man) { if (width) { surface.npix_x = width; /* need to align height to 8 for old kernel */ Index: radeon_exa_funcs.c =================================================================== RCS file: /cvsroot/xsrc/external/mit/xf86-video-ati/dist/src/radeon_exa_funcs.c,v retrieving revision 1.9 diff -p -u -r1.9 radeon_exa_funcs.c --- radeon_exa_funcs.c 23 Sep 2012 20:06:02 -0000 1.9 +++ radeon_exa_funcs.c 29 Jul 2014 02:28:33 -0000 @@ -814,7 +814,7 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr info->accel_state->exa->DownloadFromScreen = RADEONDownloadFromScreenCP; } # if defined(XF86DRM_MODE) - else { + else if (info->cs) { info->accel_state->exa->UploadToScreen = &RADEONUploadToScreenCS; info->accel_state->exa->DownloadFromScreen = &RADEONDownloadFromScreenCS; } Index: radeon_textured_video.c =================================================================== RCS file: /cvsroot/xsrc/external/mit/xf86-video-ati/dist/src/radeon_textured_video.c,v retrieving revision 1.4 diff -p -u -r1.4 radeon_textured_video.c --- radeon_textured_video.c 23 Sep 2012 20:06:03 -0000 1.4 +++ radeon_textured_video.c 29 Jul 2014 02:28:33 -0000 @@ -251,14 +251,17 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn BoxRec dstBox; int dst_width = width, dst_height = height; int aligned_height; -#ifdef XF86DRM_MODE - int h_align = drmmode_get_height_align(pScrn, 0); -#else - int h_align = 1; -#endif + int h_align; /* make the compiler happy */ s2offset = s3offset = srcPitch2 = 0; +#ifdef XF86DRM_MODE + if (info->cs) + h_align = drmmode_get_height_align(pScrn, 0); + else +#endif + h_align = 1; + /* Clip */ x1 = src_x; x2 = src_x + src_w; @@ -496,7 +499,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn #ifdef XF86DRI if (info->directRenderingEnabled) { #ifdef XF86DRM_MODE - if (IS_EVERGREEN_3D) + if (info->cs && IS_EVERGREEN_3D) EVERGREENDisplayTexturedVideo(pScrn, pPriv); else #endif