mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
freedreno/afuc: Extract full gpu-id
Some of the a6xx gens will require some control reg initialization, and go into an infinite loop if they don't see the values they expect, so we'll need to extract the compute gpu-id. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944>
This commit is contained in:
parent
c2f8c98d56
commit
9a4ca194e8
2 changed files with 16 additions and 8 deletions
|
|
@ -55,4 +55,4 @@ $cffdump --script $base/decode/scripts/parse-submits.lua $traces/shadow.rd.gz |
|
|||
$crashdec -sf $traces/crash.devcore | filter $output/crash.log
|
||||
|
||||
$asm -g 6 $traces/afuc_test.asm $output/afuc_test.fw
|
||||
$disasm -g 6 $reference/afuc_test.fw | filter $output/afuc_test.asm
|
||||
$disasm -g 630 $reference/afuc_test.fw | filter $output/afuc_test.asm
|
||||
|
|
|
|||
|
|
@ -813,6 +813,7 @@ main(int argc, char **argv)
|
|||
uint32_t *buf;
|
||||
char *file;
|
||||
bool colors = false;
|
||||
uint32_t gpu_id = 0;
|
||||
size_t sz;
|
||||
int c, ret;
|
||||
|
||||
|
|
@ -820,7 +821,7 @@ main(int argc, char **argv)
|
|||
while ((c = getopt(argc, argv, "g:vce")) != -1) {
|
||||
switch (c) {
|
||||
case 'g':
|
||||
gpuver = atoi(optarg);
|
||||
gpu_id = atoi(optarg);
|
||||
break;
|
||||
case 'v':
|
||||
verbose = true;
|
||||
|
|
@ -845,14 +846,21 @@ main(int argc, char **argv)
|
|||
file = argv[optind];
|
||||
|
||||
/* if gpu version not specified, infer from filename: */
|
||||
if (!gpuver) {
|
||||
if (strstr(file, "a5")) {
|
||||
gpuver = 5;
|
||||
} else if (strstr(file, "a6")) {
|
||||
gpuver = 6;
|
||||
}
|
||||
if (!gpu_id) {
|
||||
char *str = strstr(file, "a5");
|
||||
if (!str)
|
||||
str = strstr(file, "a6");
|
||||
if (str)
|
||||
gpu_id = atoi(str + 1);
|
||||
}
|
||||
|
||||
if (gpu_id < 500) {
|
||||
printf("invalid gpu_id: %d\n", gpu_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
gpuver = gpu_id / 100;
|
||||
|
||||
/* a6xx is *mostly* a superset of a5xx, but some opcodes shuffle
|
||||
* around, and behavior of special regs is a bit different. Right
|
||||
* now we only bother to support the a6xx variant.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue