summaryrefslogtreecommitdiff
path: root/driver/xf86-video-ati/src/radeon_exa.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-08-08 16:25:23 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-08-08 16:25:23 +0000
commit273ae29f2fbc4edf91e7a18786495744df278d03 (patch)
tree568a4e57d711ca8019563b864dbfc16dea020f61 /driver/xf86-video-ati/src/radeon_exa.c
parent64fb685e60e68b87cfb1f72f9a9786a85cfebb80 (diff)
Update to xf86-video-ati 6.14.6. Tested by mpi@, brad, eric@, ajacoutot@.
Diffstat (limited to 'driver/xf86-video-ati/src/radeon_exa.c')
-rw-r--r--driver/xf86-video-ati/src/radeon_exa.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/driver/xf86-video-ati/src/radeon_exa.c b/driver/xf86-video-ati/src/radeon_exa.c
index 99a58069e..e6d9eafac 100644
--- a/driver/xf86-video-ati/src/radeon_exa.c
+++ b/driver/xf86-video-ati/src/radeon_exa.c
@@ -48,7 +48,7 @@
/***********************************************************************/
-#define RINFO_FROM_SCREEN(pScr) ScrnInfoPtr pScrn = xf86Screens[pScr->myNum]; \
+#define RINFO_FROM_SCREEN(pScr) ScrnInfoPtr pScrn = xf86ScreenToScrn(pScr); \
RADEONInfoPtr info = RADEONPTR(pScrn)
static struct {
@@ -301,7 +301,7 @@ static void RADEONFinishAccess_BE(PixmapPtr pPix, int index)
Bool RADEONPrepareAccess_CS(PixmapPtr pPix, int index)
{
ScreenPtr pScreen = pPix->drawable.pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_exa_pixmap_priv *driver_priv;
uint32_t possible_domains = ~0U;
@@ -384,7 +384,7 @@ void RADEONFinishAccess_CS(PixmapPtr pPix, int index)
void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_exa_pixmap_priv *new_priv;
@@ -450,7 +450,7 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height,
int depth, int usage_hint, int bitsPerPixel,
int *new_pitch)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_exa_pixmap_priv *new_priv;
int pitch, base_align;
@@ -511,6 +511,13 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height,
surface.last_level = 0;
surface.bpe = cpp;
surface.nsamples = 1;
+ if (height < 64) {
+ /* disable 2d tiling for small surface to work around
+ * the fact that ddx align height to 8 pixel for old
+ * obscure reason i can't remember
+ */
+ tiling &= ~RADEON_TILING_MACRO;
+ }
surface.flags = RADEON_SURF_SCANOUT;
surface.flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE);
surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR, MODE);
@@ -706,7 +713,7 @@ Bool RADEONEXAPixmapIsOffscreen(PixmapPtr pPix)
*/
Bool RADEONSetupMemEXA (ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
int cpp = info->CurrentLayout.pixel_bytes;