panfrost: Include glue for out-of-tree legacy code
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 5 Feb 2019 05:13:50 +0000 (05:13 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 7 Feb 2019 01:58:32 +0000 (01:58 +0000)
commitd43ec104b7487d3a8930c0d1cd2a2732967f6275
tree00b41468893a7938358c9c0574d2ae93909c413e
parent7da251fc721360fc28b984507959ebfa0c88c8b2
panfrost: Include glue for out-of-tree legacy code

In addition to the DRM interface in active development, for legacy
kernels Panfrost has a small, optional, out-of-tree glue repository. For
various reasons, this legacy code should not be included in Mesa proper,
but this commit allows it to coexist peacefully with upstream Panfrost.
If the nondrm repo is cloned/symlinked to the directory
`src/gallium/drivers/panfrost/nondrm`, legacy functionality will be
built. Otherwise, the driver will build normally, though a runtime error
message will be printed if a legacy kernel is detected.

This workaround is icky, but it allows a nearly-upstream Panfrost to
work on real hardware, today. Ideally, this patch will be reverted when
the Panfrost kernel module is mature and we drop legacy support.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/.gitignore [new file with mode: 0644]
src/gallium/drivers/panfrost/meson.build
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_screen.c
src/gallium/drivers/panfrost/pan_screen.h