mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-21 06:46:13 +00:00
intel_reg_dumper: Fix the i915 fence reg decode to not be pure lies.
This commit is contained in:
parent
4279006ff2
commit
7c9d69de57
@ -569,21 +569,23 @@ DEBUGSTRING(i830_debug_dspclk_gate_d)
|
|||||||
|
|
||||||
DEBUGSTRING(i810_debug_915_fence)
|
DEBUGSTRING(i810_debug_915_fence)
|
||||||
{
|
{
|
||||||
char *enable = (val & 1) ? " enabled" : "disabled";
|
|
||||||
char format = (val & 1 << 12) ? 'Y' : 'X';
|
char format = (val & 1 << 12) ? 'Y' : 'X';
|
||||||
int pitch = 1 << (((val & 0x70) >> 4) - 1);
|
int pitch = 128 << ((val & 0x70) >> 4);
|
||||||
unsigned int offset = val & 0x0ff00000;
|
unsigned int offset = val & 0x0ff00000;
|
||||||
int size = (1024 * 1024) << (((val & 0x700) >> 8) - 1);
|
int size = (1024 * 1024) << ((val & 0x700) >> 8);
|
||||||
|
|
||||||
if (IS_965(devid) || (IS_915(devid) && reg >= FENCE_NEW))
|
if (IS_965(devid) || (IS_915(devid) && reg >= FENCE_NEW))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (format == 'X')
|
if (format == 'X')
|
||||||
pitch *= 4;
|
pitch *= 4;
|
||||||
|
if (val & 1) {
|
||||||
asprintf(result, "%s, %c tiled, %4d pitch, 0x%08x - 0x%08x (%dkb)",
|
asprintf(result, "enabled, %c tiled, %4d pitch, 0x%08x - 0x%08x (%dkb)",
|
||||||
enable, format, pitch, offset, offset + size,
|
format, pitch, offset, offset + size,
|
||||||
size / 1024);
|
size / 1024);
|
||||||
|
} else {
|
||||||
|
asprintf(result, "disabled");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUGSTRING(i810_debug_965_fence_start)
|
DEBUGSTRING(i810_debug_965_fence_start)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user