'-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',
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);
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
}
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;
}
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);
}
}
- 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");
#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);
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__ */
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);
}