mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 01:46:14 +00:00
Decode gen2/gen3 fences in the error_state
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
afe492549d
commit
cf5db1161a
@ -209,11 +209,52 @@ print_pgtbl_err(unsigned int reg, unsigned int devid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
print_i915_fence(unsigned int devid, uint64_t fence)
|
||||||
|
{
|
||||||
|
unsigned tile_width;
|
||||||
|
if ((fence & 12) && !IS_915(devid))
|
||||||
|
tile_width = 128;
|
||||||
|
else
|
||||||
|
tile_width = 512;
|
||||||
|
|
||||||
|
printf(" %svalid, %c-tiled, pitch: %i, start: 0x%08x, size: %i\n",
|
||||||
|
fence & 1 ? "" : "in",
|
||||||
|
fence & 12 ? 'y' : 'x',
|
||||||
|
(1<<((fence>>4)&0xf))*tile_width,
|
||||||
|
(uint32_t)fence & 0x7f80000,
|
||||||
|
1<<(20 + ((fence>>8)&0xf)));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
print_i830_fence(unsigned int devid, uint64_t fence)
|
||||||
|
{
|
||||||
|
printf(" %svalid, %c-tiled, pitch: %i, start: 0x%08x, size: %i\n",
|
||||||
|
fence & 1 ? "" : "in",
|
||||||
|
fence & 12 ? 'y' : 'x',
|
||||||
|
(1<<((fence>>4)&0xf))*128,
|
||||||
|
(uint32_t)fence & 0x7f80000,
|
||||||
|
1<<(19 + ((fence>>8)&0xf)));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
print_fence(unsigned int devid, uint64_t fence)
|
||||||
|
{
|
||||||
|
if (IS_965(devid)) {
|
||||||
|
return;
|
||||||
|
} else if (IS_GEN3(devid)) {
|
||||||
|
return print_i915_fence(devid, fence);
|
||||||
|
} else {
|
||||||
|
return print_i830_fence(devid, fence);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
read_data_file (FILE *file)
|
read_data_file (FILE *file)
|
||||||
{
|
{
|
||||||
int devid = PCI_CHIP_I855_GM;
|
int devid = PCI_CHIP_I855_GM;
|
||||||
uint32_t *data = NULL;
|
uint32_t *data = NULL;
|
||||||
|
long long unsigned fence;
|
||||||
int data_size = 0, count = 0, line_number = 0, matched;
|
int data_size = 0, count = 0, line_number = 0, matched;
|
||||||
char *line = NULL;
|
char *line = NULL;
|
||||||
size_t line_size;
|
size_t line_size;
|
||||||
@ -291,6 +332,10 @@ read_data_file (FILE *file)
|
|||||||
if (matched == 1)
|
if (matched == 1)
|
||||||
print_instdone (devid, -1, reg);
|
print_instdone (devid, -1, reg);
|
||||||
|
|
||||||
|
matched = sscanf (line, " fence[%i] = %8Lx\n", ®, &fence);
|
||||||
|
if (matched == 2)
|
||||||
|
print_fence (devid, fence);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user