summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-03-31 19:06:05 +0000
committerAlyssa Rosenzweig <[email protected]>2019-04-03 15:21:30 +0000
commit138865e676866c352a9ed7b4f021ee895b035ca0 (patch)
tree0ac277c36e5c24f136741fa72f9f54b5010c1e17 /src/gallium/winsys
parent43db0632e7dea4339bbfc05caf9f5165ee8329a2 (diff)
panfrost: Remove support for legacy kernels
Previously, there was minimal support for interoperating with legacy kernels (reusing kernel modules originally designed for proprietary legacy userspaces, rather than for upstream-friendly free software stacks). Now that the Panfrost kernel is stabilising, this commit drops the legacy code path. Panfrost users need to use a modern, mainline kernel supporting the Panfrost kernel driver from this commit forward. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/kmsro/drm/kmsro_drm_winsys.c11
-rw-r--r--src/gallium/winsys/panfrost/drm/panfrost_drm_public.h2
-rw-r--r--src/gallium/winsys/panfrost/drm/panfrost_drm_winsys.c6
3 files changed, 5 insertions, 14 deletions
diff --git a/src/gallium/winsys/kmsro/drm/kmsro_drm_winsys.c b/src/gallium/winsys/kmsro/drm/kmsro_drm_winsys.c
index 7752474f8aa..59f2c28a2eb 100644
--- a/src/gallium/winsys/kmsro/drm/kmsro_drm_winsys.c
+++ b/src/gallium/winsys/kmsro/drm/kmsro_drm_winsys.c
@@ -86,18 +86,9 @@ struct pipe_screen *kmsro_drm_screen_create(int fd)
#if defined(GALLIUM_PANFROST)
ro.gpu_fd = drmOpenWithType("panfrost", NULL, DRM_NODE_RENDER);
- bool is_drm = true;
- if (ro.gpu_fd < 0) {
- /* For compatibility with legacy kernels, fallback on the non-DRM
- * interface */
-
- ro.gpu_fd = open("/dev/mali0", O_RDWR | O_CLOEXEC);
- is_drm = false;
- }
-
if (ro.gpu_fd >= 0) {
ro.create_for_resource = renderonly_create_kms_dumb_buffer_for_resource,
- screen = panfrost_drm_screen_create_renderonly(&ro, is_drm);
+ screen = panfrost_drm_screen_create_renderonly(&ro);
if (!screen)
close(ro.gpu_fd);
diff --git a/src/gallium/winsys/panfrost/drm/panfrost_drm_public.h b/src/gallium/winsys/panfrost/drm/panfrost_drm_public.h
index 4709c429b96..8568ffd8de5 100644
--- a/src/gallium/winsys/panfrost/drm/panfrost_drm_public.h
+++ b/src/gallium/winsys/panfrost/drm/panfrost_drm_public.h
@@ -31,6 +31,6 @@ struct pipe_screen;
struct renderonly;
struct pipe_screen *panfrost_drm_screen_create(int drmFD);
-struct pipe_screen *panfrost_drm_screen_create_renderonly(struct renderonly *ro, bool is_drm);
+struct pipe_screen *panfrost_drm_screen_create_renderonly(struct renderonly *ro);
#endif /* __PAN_DRM_PUBLIC_H__ */
diff --git a/src/gallium/winsys/panfrost/drm/panfrost_drm_winsys.c b/src/gallium/winsys/panfrost/drm/panfrost_drm_winsys.c
index 7d08743e23c..1852e1c662a 100644
--- a/src/gallium/winsys/panfrost/drm/panfrost_drm_winsys.c
+++ b/src/gallium/winsys/panfrost/drm/panfrost_drm_winsys.c
@@ -32,11 +32,11 @@
struct pipe_screen *
panfrost_drm_screen_create(int fd)
{
- return panfrost_create_screen(fcntl(fd, F_DUPFD_CLOEXEC, 3), NULL, true);
+ return panfrost_create_screen(fcntl(fd, F_DUPFD_CLOEXEC, 3), NULL);
}
struct pipe_screen *
-panfrost_drm_screen_create_renderonly(struct renderonly *ro, bool is_drm)
+panfrost_drm_screen_create_renderonly(struct renderonly *ro)
{
- return panfrost_create_screen(fcntl(ro->gpu_fd, F_DUPFD_CLOEXEC, 3), ro, is_drm);
+ return panfrost_create_screen(fcntl(ro->gpu_fd, F_DUPFD_CLOEXEC, 3), ro);
}