mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
pipe-loader: Load the rocket accel driver
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698>
This commit is contained in:
parent
5b829658f7
commit
5ef68894bb
4 changed files with 42 additions and 5 deletions
|
|
@ -39,6 +39,9 @@ endif
|
|||
if with_gallium_asahi
|
||||
renderonly_drivers_c_args += '-DGALLIUM_ASAHI'
|
||||
endif
|
||||
if with_gallium_rocket
|
||||
renderonly_drivers_c_args += '-DGALLIUM_ROCKET'
|
||||
endif
|
||||
|
||||
libpipe_loader_static = static_library(
|
||||
'pipe_loader_static',
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ static const struct drm_driver_descriptor *driver_descriptors[] = {
|
|||
&panthor_driver_descriptor,
|
||||
&asahi_driver_descriptor,
|
||||
&etnaviv_driver_descriptor,
|
||||
&rocket_driver_descriptor,
|
||||
&tegra_driver_descriptor,
|
||||
&lima_driver_descriptor,
|
||||
&zink_driver_descriptor,
|
||||
|
|
@ -247,9 +248,7 @@ pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev)
|
|||
}
|
||||
|
||||
#define DRM_ACCEL_DEV_NAME_FORMAT "%s/accel%d"
|
||||
#define DRM_ACCEL_MAX_NODES 63
|
||||
#define DRM_ACCEL_MIN_MINOR 0
|
||||
#define DRM_ACCEL_MAX_MINOR (DRM_ACCEL_MIN_MINOR + DRM_ACCEL_MAX_NODES)
|
||||
#define DRM_ACCEL_MAX_MINOR 255
|
||||
#define DRM_ACCEL_DIR_NAME "/dev/accel"
|
||||
|
||||
static int
|
||||
|
|
@ -295,8 +294,7 @@ pipe_loader_accel_probe(struct pipe_loader_device **devs, int ndev)
|
|||
{
|
||||
int i, j, fd;
|
||||
|
||||
for (i = DRM_ACCEL_MIN_MINOR, j = 0;
|
||||
i <= DRM_ACCEL_MAX_MINOR; i++) {
|
||||
for (i = 0, j = 0; i <= DRM_ACCEL_MAX_MINOR; i++) {
|
||||
struct pipe_loader_device *dev;
|
||||
|
||||
fd = open_accel_minor(i);
|
||||
|
|
@ -378,6 +376,9 @@ pipe_loader_get_compatible_render_capable_device_fds(int kms_only_fd, unsigned i
|
|||
"panfrost",
|
||||
"panthor",
|
||||
#endif
|
||||
#if defined GALLIUM_ROCKET
|
||||
"rocket",
|
||||
#endif
|
||||
#if defined GALLIUM_V3D
|
||||
"v3d",
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ const struct drm_driver_descriptor descriptor_name = { \
|
|||
#undef GALLIUM_PANFROST
|
||||
#undef GALLIUM_LIMA
|
||||
#undef GALLIUM_ASAHI
|
||||
#undef GALLIUM_ROCKET
|
||||
#endif
|
||||
|
||||
#ifdef GALLIUM_I915
|
||||
|
|
@ -430,6 +431,36 @@ DRM_DRIVER_DESCRIPTOR(zink, zink_driconf, ARRAY_SIZE(zink_driconf))
|
|||
DRM_DRIVER_DESCRIPTOR_STUB(zink)
|
||||
#endif
|
||||
|
||||
#ifdef GALLIUM_ROCKET
|
||||
#include "rocket/drm/rkt_drm_public.h"
|
||||
|
||||
static struct pipe_screen *
|
||||
pipe_rknpu_create_screen(int fd, const struct pipe_screen_config *config)
|
||||
{
|
||||
struct pipe_screen *screen;
|
||||
|
||||
screen = rkt_drm_screen_create(fd, config);
|
||||
return screen ? debug_screen_wrap(screen) : NULL;
|
||||
}
|
||||
|
||||
DRM_DRIVER_DESCRIPTOR(rknpu, NULL, 0)
|
||||
|
||||
static struct pipe_screen *
|
||||
pipe_rocket_create_screen(int fd, const struct pipe_screen_config *config)
|
||||
{
|
||||
struct pipe_screen *screen;
|
||||
|
||||
screen = rkt_drm_screen_create(fd, config);
|
||||
return screen ? debug_screen_wrap(screen) : NULL;
|
||||
}
|
||||
|
||||
DRM_DRIVER_DESCRIPTOR(rocket, NULL, 0)
|
||||
|
||||
#else
|
||||
DRM_DRIVER_DESCRIPTOR_STUB(rknpu)
|
||||
DRM_DRIVER_DESCRIPTOR_STUB(rocket)
|
||||
#endif
|
||||
|
||||
#ifdef GALLIUM_KMSRO
|
||||
#include "kmsro/drm/kmsro_drm_public.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ extern const struct drm_driver_descriptor panfrost_driver_descriptor;
|
|||
extern const struct drm_driver_descriptor panthor_driver_descriptor;
|
||||
extern const struct drm_driver_descriptor asahi_driver_descriptor;
|
||||
extern const struct drm_driver_descriptor etnaviv_driver_descriptor;
|
||||
extern const struct drm_driver_descriptor rknpu_driver_descriptor;
|
||||
extern const struct drm_driver_descriptor rocket_driver_descriptor;
|
||||
extern const struct drm_driver_descriptor tegra_driver_descriptor;
|
||||
extern const struct drm_driver_descriptor lima_driver_descriptor;
|
||||
extern const struct drm_driver_descriptor zink_driver_descriptor;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue