diff --git a/src/panfrost/tools/panfrost_texfeatures.c b/src/panfrost/tools/panfrost_texfeatures.c index f64a962aec0..b5696816fdc 100644 --- a/src/panfrost/tools/panfrost_texfeatures.c +++ b/src/panfrost/tools/panfrost_texfeatures.c @@ -4,8 +4,16 @@ * SPDX-License-Identifier: MIT */ +#include +#include #include -#include +#include +#include +#include +#include + +#include +#include /* * Mapping of texture feature bits to compressed formats on Mali-G57, other @@ -61,11 +69,13 @@ main(void) exit(1); } - void *ctx = ralloc_context(NULL); - struct panfrost_device dev = {0}; - panfrost_open_device(ctx, fd, &dev); + struct pan_kmod_dev *dev = + pan_kmod_dev_create(fd, PAN_KMOD_DEV_FLAG_OWNS_FD, NULL); + struct pan_kmod_dev_props props; - uint32_t supported = dev.compressed_formats; + pan_kmod_dev_query_props(dev, &props); + + uint32_t supported = panfrost_query_compressed_formats(&props); bool all_ok = true; printf("System-on-chip compressed texture support:" @@ -93,6 +103,5 @@ main(void) "Unsupported formats will be emulated at a performance and memory cost.\n"); } - panfrost_close_device(&dev); - ralloc_free(ctx); + pan_kmod_dev_destroy(dev); }