summaryrefslogtreecommitdiff
path: root/intel
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-12-20 15:17:24 -0800
committerEric Anholt <eric@anholt.net>2012-01-27 13:21:19 -0800
commit62b410344c010d84ed75cc42e1aeaa6d23e8c396 (patch)
tree14a2ccb8dd90e8551f7d44d929c7ba6a0892e521 /intel
parentde49fd41e26185da20a9de227e82ff71571f1a0a (diff)
intel: Use the context to simplify BR00 decode.
The count (actually index) was always 0, because BR00 is dword 0.
Diffstat (limited to 'intel')
-rw-r--r--intel/intel_decode.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index be49b841..5a4246d6 100644
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
@@ -270,15 +270,15 @@ decode_mi(struct drm_intel_decode *ctx)
}
static void
-decode_2d_br00(uint32_t *data, uint32_t count, uint32_t hw_offset,
- const char *cmd)
+decode_2d_br00(struct drm_intel_decode *ctx, const char *cmd)
{
- instr_out(data, hw_offset, 0,
+ instr_out(ctx->data, ctx->hw_offset, 0,
"%s (rgb %sabled, alpha %sabled, src tile %d, dst tile %d)\n",
cmd,
- (data[count] & (1 << 20)) ? "en" : "dis",
- (data[count] & (1 << 21)) ? "en" : "dis",
- (data[count] >> 15) & 1, (data[count] >> 11) & 1);
+ (ctx->data[0] & (1 << 20)) ? "en" : "dis",
+ (ctx->data[0] & (1 << 21)) ? "en" : "dis",
+ (ctx->data[0] >> 15) & 1,
+ (ctx->data[0] >> 11) & 1);
}
static void decode_2d_br01(uint32_t *data, uint32_t count, uint32_t hw_offset)
@@ -371,7 +371,7 @@ decode_2d(struct drm_intel_decode *ctx)
data[2] & 0xffff, data[2] >> 16);
return len;
case 0x01:
- decode_2d_br00(data, 0, hw_offset, "XY_SETUP_BLT");
+ decode_2d_br00(ctx, "XY_SETUP_BLT");
len = (data[0] & 0x000000ff) + 2;
if (len != 8)
@@ -391,7 +391,7 @@ decode_2d(struct drm_intel_decode *ctx)
instr_out(data, hw_offset, 7, "color pattern offset\n");
return len;
case 0x03:
- decode_2d_br00(data, 0, hw_offset, "XY_SETUP_CLIP_BLT");
+ decode_2d_br00(ctx, "XY_SETUP_CLIP_BLT");
len = (data[0] & 0x000000ff) + 2;
if (len != 3)
@@ -405,8 +405,7 @@ decode_2d(struct drm_intel_decode *ctx)
data[2] & 0xffff, data[3] >> 16);
return len;
case 0x11:
- decode_2d_br00(data, 0, hw_offset,
- "XY_SETUP_MONO_PATTERN_SL_BLT");
+ decode_2d_br00(ctx, "XY_SETUP_MONO_PATTERN_SL_BLT");
len = (data[0] & 0x000000ff) + 2;
if (len != 9)
@@ -428,7 +427,7 @@ decode_2d(struct drm_intel_decode *ctx)
instr_out(data, hw_offset, 8, "mono pattern dw1\n");
return len;
case 0x50:
- decode_2d_br00(data, 0, hw_offset, "XY_COLOR_BLT");
+ decode_2d_br00(ctx, "XY_COLOR_BLT");
len = (data[0] & 0x000000ff) + 2;
if (len != 6)
@@ -445,7 +444,7 @@ decode_2d(struct drm_intel_decode *ctx)
instr_out(data, hw_offset, 5, "color\n");
return len;
case 0x53:
- decode_2d_br00(data, 0, hw_offset, "XY_SRC_COPY_BLT");
+ decode_2d_br00(ctx, "XY_SRC_COPY_BLT");
len = (data[0] & 0x000000ff) + 2;
if (len != 8)