mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-24 15:50:37 +02:00
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 <alyssa@rosenzweig.io> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
This commit is contained in:
parent
43db0632e7
commit
138865e676
8 changed files with 8 additions and 39 deletions
1
src/gallium/drivers/panfrost/.gitignore
vendored
1
src/gallium/drivers/panfrost/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
nondrm
|
||||
|
|
@ -62,16 +62,6 @@ compile_args_panfrost = [
|
|||
'-Wno-pointer-arith'
|
||||
]
|
||||
|
||||
overlay = join_paths(meson.source_root(), meson.current_source_dir(), 'nondrm/pan_nondrm.c')
|
||||
nondrm_overlay_check = run_command('ls', overlay)
|
||||
has_nondrm_overlay = nondrm_overlay_check.returncode() == 0
|
||||
|
||||
if has_nondrm_overlay
|
||||
files_panfrost += files('nondrm/pan_nondrm.c')
|
||||
inc_panfrost += include_directories('nondrm/include')
|
||||
compile_args_panfrost += '-DPAN_NONDRM_OVERLAY'
|
||||
endif
|
||||
|
||||
midgard_nir_algebraic_c = custom_target(
|
||||
'midgard_nir_algebraic.c',
|
||||
input : 'midgard/midgard_nir_algebraic.py',
|
||||
|
|
|
|||
|
|
@ -298,7 +298,6 @@ panfrost_drm_force_flush_fragment(struct panfrost_context *ctx,
|
|||
struct pipe_context *gallium = (struct pipe_context *) ctx;
|
||||
struct panfrost_screen *screen = pan_screen(gallium->screen);
|
||||
struct panfrost_drm *drm = (struct panfrost_drm *)screen->driver;
|
||||
int ret;
|
||||
|
||||
if (!screen->last_fragment_flushed) {
|
||||
drmSyncobjWait(drm->fd, &ctx->out_sync, 1, INT64_MAX, 0, NULL);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct pipe_screen;
|
|||
struct renderonly;
|
||||
|
||||
struct pipe_screen *
|
||||
panfrost_create_screen(int fd, struct renderonly *ro, bool is_drm);
|
||||
panfrost_create_screen(int fd, struct renderonly *ro);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ DEBUG_GET_ONCE_FLAGS_OPTION(pan_debug, "PAN_MESA_DEBUG", debug_options, 0)
|
|||
int pan_debug = 0;
|
||||
|
||||
struct panfrost_driver *panfrost_create_drm_driver(int fd);
|
||||
struct panfrost_driver *panfrost_create_nondrm_driver(int fd);
|
||||
|
||||
const char *pan_counters_base = NULL;
|
||||
|
||||
|
|
@ -549,7 +548,7 @@ panfrost_screen_get_compiler_options(struct pipe_screen *pscreen,
|
|||
}
|
||||
|
||||
struct pipe_screen *
|
||||
panfrost_create_screen(int fd, struct renderonly *ro, bool is_drm)
|
||||
panfrost_create_screen(int fd, struct renderonly *ro)
|
||||
{
|
||||
struct panfrost_screen *screen = CALLOC_STRUCT(panfrost_screen);
|
||||
|
||||
|
|
@ -567,16 +566,7 @@ panfrost_create_screen(int fd, struct renderonly *ro, bool is_drm)
|
|||
}
|
||||
}
|
||||
|
||||
if (is_drm) {
|
||||
screen->driver = panfrost_create_drm_driver(fd);
|
||||
} else {
|
||||
#ifdef PAN_NONDRM_OVERLAY
|
||||
screen->driver = panfrost_create_nondrm_driver(fd);
|
||||
#else
|
||||
fprintf(stderr, "Legacy (non-DRM) operation requires out-of-tree overlay\n");
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
screen->driver = panfrost_create_drm_driver(fd);
|
||||
|
||||
/* Dump memory and/or performance counters iff asked for in the environment */
|
||||
const char *pantrace_base = getenv("PANTRACE_BASE");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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__ */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue