summaryrefslogtreecommitdiff
path: root/src/evergreen_textured_videofuncs.c
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <raof@ubuntu.com>2013-09-23 12:25:29 -0700
committerAlex Deucher <alexander.deucher@amd.com>2013-10-01 15:26:29 -0400
commitf1dc677e79cd7a88d7379a934ebc7d87a3b18805 (patch)
tree63bacb465cbc76a698042b22a5be1047208f125a /src/evergreen_textured_videofuncs.c
parent67fb82a3f0759b171fea21b475a70fa825693570 (diff)
EXA/evergreen: Paranoia around linear tiling. (v2)
The last two bytes of tiling_mode contain the actual tiling mode; the rest are extra tiling configuration bits. These configuration bits are not necessarily zero for a linear buffer, so mask them out before checking for linearity v2: Also fix up evergreen_textured_videofuncs.c agd5f: remove trailing whitespace Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/evergreen_textured_videofuncs.c')
-rw-r--r--src/evergreen_textured_videofuncs.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/evergreen_textured_videofuncs.c b/src/evergreen_textured_videofuncs.c
index be00ecfa..20805ff4 100644
--- a/src/evergreen_textured_videofuncs.c
+++ b/src/evergreen_textured_videofuncs.c
@@ -246,7 +246,8 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_res.last_level = 0;
tex_res.perf_modulation = 0;
tex_res.interlaced = 0;
- if (accel_state->src_obj[0].tiling_flags == 0)
+ if ((accel_state->src_obj[0].tiling_flags & RADEON_TILING_MASK) ==
+ RADEON_TILING_LINEAR)
tex_res.array_mode = 1;
evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain);
@@ -279,7 +280,8 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_res.base = pPriv->planev_offset;
tex_res.mip_base = pPriv->planev_offset;
tex_res.size = tex_res.pitch * (pPriv->h >> 1);
- if (accel_state->src_obj[0].tiling_flags == 0)
+ if ((accel_state->src_obj[0].tiling_flags & RADEON_TILING_MASK) ==
+ RADEON_TILING_LINEAR)
tex_res.array_mode = 1;
evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain);
@@ -302,7 +304,8 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_res.base = pPriv->planeu_offset;
tex_res.mip_base = pPriv->planeu_offset;
tex_res.size = tex_res.pitch * (pPriv->h >> 1);
- if (accel_state->src_obj[0].tiling_flags == 0)
+ if ((accel_state->src_obj[0].tiling_flags & RADEON_TILING_MASK) ==
+ RADEON_TILING_LINEAR)
tex_res.array_mode = 1;
evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain);
@@ -342,7 +345,8 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_res.last_level = 0;
tex_res.perf_modulation = 0;
tex_res.interlaced = 0;
- if (accel_state->src_obj[0].tiling_flags == 0)
+ if ((accel_state->src_obj[0].tiling_flags & RADEON_TILING_MASK) ==
+ RADEON_TILING_LINEAR)
tex_res.array_mode = 1;
evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain);
@@ -397,7 +401,8 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
cb_conf.blend_clamp = 1;
cb_conf.pmask = 0xf;
cb_conf.rop = 3;
- if (accel_state->dst_obj.tiling_flags == 0) {
+ if ((accel_state->dst_obj.tiling_flags & RADEON_TILING_MASK) ==
+ RADEON_TILING_LINEAR) {
cb_conf.array_mode = 1;
cb_conf.non_disp_tiling = 1;
}