diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-02-11 14:03:56 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-02-11 14:03:56 -0500 |
commit | 25fe3ec4c6dfcdf6ba72a032bc9cb2c84d84029a (patch) | |
tree | 54905fa7087cee63a558ed2d84857bbfc37a971b | |
parent | 3d10278ce511f5dabb68ed86ee43eaaf43585983 (diff) |
kms/exa: UTS/DFS base alignment fixes
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r-- | src/evergreen_exa.c | 12 | ||||
-rw-r--r-- | src/r600_exa.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 04903eaf..7e1e4648 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -1357,7 +1357,7 @@ EVERGREENUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, Bool r; int i; struct r600_accel_object src_obj, dst_obj; - uint32_t tiling_flags = 0, pitch = 0, height; + uint32_t tiling_flags = 0, pitch = 0, height, base_align; if (bpp < 8) return FALSE; @@ -1383,9 +1383,9 @@ EVERGREENUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, scratch_pitch = RADEON_ALIGN(w, drmmode_get_pitch_align(pScrn, (bpp / 8), 0)); height = RADEON_ALIGN(h, drmmode_get_height_align(pScrn, 0)); - + base_align = drmmode_get_base_align(pScrn, (bpp / 8), 0); size = scratch_pitch * height * (bpp / 8); - scratch = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_GTT, 0); + scratch = radeon_bo_open(info->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } @@ -1474,7 +1474,7 @@ EVERGREENDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, Bool flush = FALSE; Bool r; struct r600_accel_object src_obj, dst_obj; - uint32_t tiling_flags = 0, pitch = 0, height; + uint32_t tiling_flags = 0, pitch = 0, height, base_align; if (bpp < 8) return FALSE; @@ -1513,9 +1513,9 @@ EVERGREENDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, scratch_pitch = RADEON_ALIGN(w, drmmode_get_pitch_align(pScrn, (bpp / 8), 0)); height = RADEON_ALIGN(h, drmmode_get_height_align(pScrn, 0)); - + base_align = drmmode_get_base_align(pScrn, (bpp / 8), 0); size = scratch_pitch * height * (bpp / 8); - scratch = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_GTT, 0); + scratch = radeon_bo_open(info->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } diff --git a/src/r600_exa.c b/src/r600_exa.c index 661b9d06..06ce83b6 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -1724,7 +1724,7 @@ R600UploadToScreenCS(PixmapPtr pDst, int x, int y, int w, int h, Bool r; int i; struct r600_accel_object src_obj, dst_obj; - uint32_t tiling_flags = 0, pitch = 0, height; + uint32_t tiling_flags = 0, pitch = 0, height, base_align; if (bpp < 8) return FALSE; @@ -1750,9 +1750,9 @@ R600UploadToScreenCS(PixmapPtr pDst, int x, int y, int w, int h, scratch_pitch = RADEON_ALIGN(w, drmmode_get_pitch_align(pScrn, (bpp / 8), 0)); height = RADEON_ALIGN(h, drmmode_get_height_align(pScrn, 0)); - + base_align = drmmode_get_base_align(pScrn, (bpp / 8), 0); size = scratch_pitch * height * (bpp / 8); - scratch = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_GTT, 0); + scratch = radeon_bo_open(info->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } @@ -1841,7 +1841,7 @@ R600DownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w, Bool flush = FALSE; Bool r; struct r600_accel_object src_obj, dst_obj; - uint32_t tiling_flags = 0, pitch = 0, height; + uint32_t tiling_flags = 0, pitch = 0, height, base_align; if (bpp < 8) return FALSE; @@ -1876,9 +1876,9 @@ R600DownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w, scratch_pitch = RADEON_ALIGN(w, drmmode_get_pitch_align(pScrn, (bpp / 8), 0)); height = RADEON_ALIGN(h, drmmode_get_height_align(pScrn, 0)); - + base_align = drmmode_get_base_align(pScrn, (bpp / 8), 0); size = scratch_pitch * height * (bpp / 8); - scratch = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_GTT, 0); + scratch = radeon_bo_open(info->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } |