diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-01-29 05:46:07 +0000 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-02-05 01:19:30 +0000 |
commit | 61d3ae6e0bde93c5601278d1a60c44be655a7cb5 (patch) | |
tree | c0c23980f21110a1459db40e18b06edb92d87ded /src/gallium/auxiliary | |
parent | 742d6cdb42e5570a3a74005f18bb89208069d01f (diff) |
panfrost: Initial stub for Panfrost driver
This patch adds an initial stub for the Gallium driver, containing
simple screen functions and the majority of the driver headers but no
actual functionality. It further adds the winsys glue for linking in
this stub driver via kmsro on Rockchip/Amlogic boards.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Acked-by: Rob Clark <[email protected]>
Acked-by: Eric Anholt <[email protected]>
Acked-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c | 5 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper.h | 23 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper_public.h | 3 |
3 files changed, 31 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c index fd901fe64ec..2ddbb2d125b 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c @@ -122,6 +122,11 @@ static const struct drm_driver_descriptor driver_descriptors[] = { .configuration = pipe_default_configuration_query, }, { + .driver_name = "panfrost", + .create_screen = pipe_panfrost_create_screen, + .configuration = pipe_default_configuration_query, + }, + { .driver_name = "etnaviv", .create_screen = pipe_etna_create_screen, .configuration = pipe_default_configuration_query, diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h b/src/gallium/auxiliary/target-helpers/drm_helper.h index 5e43011b266..1a87c4494d4 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper.h @@ -333,6 +333,29 @@ pipe_v3d_create_screen(int fd, const struct pipe_screen_config *config) #endif +#ifdef GALLIUM_PANFROST +#include "panfrost/drm/panfrost_drm_public.h" + +struct pipe_screen * +pipe_panfrost_create_screen(int fd, const struct pipe_screen_config *config) +{ + struct pipe_screen *screen; + + screen = panfrost_drm_screen_create(fd); + return screen ? debug_screen_wrap(screen) : NULL; +} + +#else + +struct pipe_screen * +pipe_panfrost_create_screen(int fd, const struct pipe_screen_config *config) +{ + fprintf(stderr, "panfrost: driver missing\n"); + return NULL; +} + +#endif + #ifdef GALLIUM_ETNAVIV #include "etnaviv/drm/etnaviv_drm_public.h" diff --git a/src/gallium/auxiliary/target-helpers/drm_helper_public.h b/src/gallium/auxiliary/target-helpers/drm_helper_public.h index 750ed09335c..0108a7f0bbb 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper_public.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper_public.h @@ -43,6 +43,9 @@ struct pipe_screen * pipe_vc4_create_screen(int fd, const struct pipe_screen_config *config); struct pipe_screen * +pipe_panfrost_create_screen(int fd, const struct pipe_screen_config *config); + +struct pipe_screen * pipe_kmsro_create_screen(int fd, const struct pipe_screen_config *config); struct pipe_screen * |