summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-05 08:20:24 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-05 16:04:47 +0000
commit1f8b653acbe12b5ef5e4338822cd45ca06d7a89e (patch)
treef35636f28b1ea1810d2941250055ed72dc04fb21 /src/gallium/drivers
parent64b73b770b71c15b5628545fed132f81a51bd555 (diff)
panfrost: Add app blacklist
In preparation for an initial 19.2 release, add a blacklist for apps known to be buggy under Panfrost to protect users. Panfrost is NOT a conformant implementation at this time. Distros: please do not revert this patch. If blacklisted apps are run using Panfrost, dragons will bite you. Thanks :) Signed-off-by: Alyssa Rosenzweig <[email protected]> Acked-by: Tomeu Vizoso <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index 5b51faa7f56..b2fac88e956 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -33,6 +33,7 @@
#include "util/u_video.h"
#include "util/u_screen.h"
#include "util/os_time.h"
+#include "util/u_process.h"
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
#include "draw/draw_context.h"
@@ -583,10 +584,23 @@ panfrost_screen_get_compiler_options(struct pipe_screen *pscreen,
struct pipe_screen *
panfrost_create_screen(int fd, struct renderonly *ro)
{
- struct panfrost_screen *screen = rzalloc(NULL, struct panfrost_screen);
-
pan_debug = debug_get_option_pan_debug();
+ /* Blacklist apps known to be buggy under Panfrost */
+ const char *proc = util_get_process_name();
+ const char *blacklist[] = {
+ "chromium",
+ "chrome",
+ };
+
+ for (unsigned i = 0; i < ARRAY_SIZE(blacklist); ++i) {
+ if ((strcmp(blacklist[i], proc) == 0))
+ return NULL;
+ }
+
+ /* Create the screen */
+ struct panfrost_screen *screen = rzalloc(NULL, struct panfrost_screen);
+
if (!screen)
return NULL;