summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_screen.c
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-07-31 15:00:46 +0200
committerTomeu Vizoso <[email protected]>2019-08-08 07:42:52 +0200
commit19afd41e6546fb6ca852b62fc5a63359f3b70693 (patch)
tree469c37194dcefc9c1a021da20b4ebe83cb569f8b /src/gallium/drivers/panfrost/pan_screen.c
parent9398932c2d4cd1dfd337337a82ca8dc9bae35487 (diff)
panfrost: Mark BOs as NOEXEC
Unless a BO has the EXECUTABLE flag, mark it as NOEXEC. v2: - Rework version detection (Alyssa). Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_screen.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index b2fac88e956..5f527d0d3b3 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -37,7 +37,6 @@
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
#include "draw/draw_context.h"
-#include <xf86drm.h>
#include <fcntl.h>
@@ -537,6 +536,7 @@ panfrost_destroy_screen(struct pipe_screen *pscreen)
{
struct panfrost_screen *screen = pan_screen(pscreen);
panfrost_bo_cache_evict_all(screen);
+ drmFreeVersion(screen->kernel_version);
ralloc_free(screen);
}
@@ -617,6 +617,7 @@ panfrost_create_screen(int fd, struct renderonly *ro)
screen->gpu_id = panfrost_drm_query_gpu_version(screen);
screen->require_sfbd = screen->gpu_id < 0x0750; /* T760 is the first to support MFBD */
+ screen->kernel_version = drmGetVersion(fd);
/* Check if we're loading against a supported GPU model. */