From 5e808f7b0a4023ea28795a9f96c913f09c00b376 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 25 Jan 2022 19:20:58 -0500 Subject: [PATCH] panfrost: Make the GPU allowlist implicit Allowlist a GPU if and only if it has a model definition in-tree. This replaces the explicit allowlist, which is somewhat cumbersome to maintain. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_screen.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 908fb089a7e..7f1bc7f2355 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -853,21 +853,8 @@ panfrost_create_screen(int fd, struct renderonly *ro) if (dev->debug & PAN_DBG_NO_AFBC) dev->has_afbc = false; - /* Check if we're loading against a supported GPU model. */ - - switch (dev->gpu_id) { - case 0x720: /* T720 */ - case 0x750: /* T760 */ - case 0x820: /* T820 */ - case 0x860: /* T860 */ - case 0x6221: /* G72 */ - case 0x7093: /* G31 */ - case 0x7211: /* G76 */ - case 0x7212: /* G52 */ - case 0x7402: /* G52r1 */ - break; - default: - /* Fail to load against untested models */ + /* Bail early on unsupported hardware */ + if (dev->model == NULL) { debug_printf("panfrost: Unsupported model %X", dev->gpu_id); panfrost_destroy_screen(&(screen->base)); return NULL;