diff options
author | Eric Anholt <eric@anholt.net> | 2008-08-07 11:02:19 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-08-07 11:07:12 -0700 |
commit | 91e7b93c12f612e41b04a2d6106ff29b53b22a43 (patch) | |
tree | ed080abe5c81b7f99b89037f67d044603ebb2c73 | |
parent | f9504eff31eb3c9c6c6b33dced9875866ff8307e (diff) |
intel_idle: Instead if #if 0, add an ignore flag for unreliable INSTDONE bits.
This lets us produce a decent total value, and still show the unreliable bits
in case they aren't on your platform.
-rw-r--r-- | src/reg_dumper/idle.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/reg_dumper/idle.c b/src/reg_dumper/idle.c index dbfa58e6..8d60c0ca 100644 --- a/src/reg_dumper/idle.c +++ b/src/reg_dumper/idle.c @@ -39,17 +39,16 @@ struct idle_flags { uint32_t instdone_flag; char *name; + int ignore; unsigned int count; }; struct idle_flags i915_idle_flags[] = { -#if 0 - {IDCT_DONE, "IDCT"}, - {IQ_DONE, "IQ"}, - {PR_DONE, "PR"}, - {VLD_DONE, "VLD"}, - {IP_DONE, "IP"}, -#endif + {IDCT_DONE, "IDCT", 1}, + {IQ_DONE, "IQ", 1}, + {PR_DONE, "PR", 1}, + {VLD_DONE, "VLD", 1}, + {IP_DONE, "IP", 1}, {FBC_DONE, "FBC"}, {BINNER_DONE, "BINNER"}, {SF_DONE, "SF"}, @@ -68,10 +67,8 @@ struct idle_flags i915_idle_flags[] = { {PS_DONE, "PS"}, {CC_DONE, "CC"}, {MAP_FILTER_DONE, "map filter"}, -#if 0 - {MAP_L2_IDLE, "map L2"}, -#endif - + {MAP_L2_IDLE, "map L2", 1}, + {0x80000038, "reserved bits", 1}, {0, "total"}, {0, "other"}, }; @@ -107,7 +104,8 @@ setup_other_flags(I830Ptr pI830, for (i = 0; i < idle_flag_count - 2; i++) { other_idle_flags &= ~idle_flags[i].instdone_flag; - total_idle_flags |= idle_flags[i].instdone_flag; + if (!idle_flags[i].ignore) + total_idle_flags |= idle_flags[i].instdone_flag; } idle_flags[idle_flag_count - 2].instdone_flag = total_idle_flags; idle_flags[idle_flag_count - 1].instdone_flag = other_idle_flags; @@ -197,7 +195,11 @@ int main(int argc, char **argv) } for (j = 0; j < idle_flag_count; j++) { - printf("%25s: %3d\n", idle_flags[j].name, idle_flags[j].count); + if (!idle_flags[j].ignore) + printf("%25s: %3d\n", idle_flags[j].name, idle_flags[j].count); + else + printf("%25s: %3d (unreliable)\n", + idle_flags[j].name, idle_flags[j].count); idle_flags[j].count = 0; } printf("\n"); |