diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index d5311e5f8d6..b417ea25258 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -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)) {