Skip to content

Commit

Permalink
more printfs
Browse files Browse the repository at this point in the history
  • Loading branch information
SolDev69 committed Nov 24, 2023
1 parent d59e11c commit 8439b20
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions src/gallium/drivers/freedreno/freedreno_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,23 +1281,17 @@ fd_screen_create(int fd,
printf("piping dev id\n");
screen->dev_id = fd_pipe_dev_id(screen->pipe);
printf("dev id pipe done\n");
if (kgsl_pipe_get_param(screen->pipe, FD_GPU_ID, &val)) {
printf("could not get gpu-id\n");
//goto fail;
}
screen->gpu_id = val;

if (kgsl_pipe_get_param(screen->pipe, FD_CHIP_ID, &val)) {
printf("could not get chip-id\n");
/* older kernels may not have this property: */
unsigned core = screen->gpu_id / 100;
unsigned major = (screen->gpu_id % 100) / 10;
unsigned minor = screen->gpu_id % 10;
unsigned patch = 0; /* assume the worst */
val = (patch & 0xff) | ((minor & 0xff) << 8) | ((major & 0xff) << 16) |
((core & 0xff) << 24);
}
printf("setting gpu id");
screen->gpu_id = kgsl_pipe->dev_id.gpu_id;
printf("setting chip idd");
unsigned core = screen->gpu_id / 100;
unsigned major = (screen->gpu_id % 100) / 10;
unsigned minor = screen->gpu_id % 10;
unsigned patch = 0; /* assume the worst */
val = (patch & 0xff) | ((minor & 0xff) << 8) | ((major & 0xff) << 16) |
((core & 0xff) << 24);
screen->chip_id = val;
printf("Get chip gen");
screen->gen = fd_dev_gen(screen->dev_id);

if (kgsl_pipe_get_param(screen->pipe, FD_NR_PRIORITIES, &val)) {
Expand Down

0 comments on commit 8439b20

Please sign in to comment.