[Mesa-dev] Merging VC4 driver

Emil Velikov emil.l.velikov at gmail.com
Wed Aug 6 17:21:41 PDT 2014


On 06/08/14 21:33, Eric Anholt wrote:
> I'd like to start merging the VC4 driver.  I've got a lot of things
> working under sim (piglit's at 5212/6726 for a slightly-trimmed
> quick.py), and once I find where I put my serial cable I hope to get the
> kernel fixed up and passing even more than that on HW.
>
> I'm at 80 commits right now, with 3 initial huge commits then actual
> incremental development.  I don't think other people are going to want
> to review all of this (45 files changed, 9277 insertions(+), 5
> deletions(-)), so I'm feeling ready to go ahead on my own.  What I'll
> throw out for (maybe) review, though, is the stuff outside of the
> driver:
>
> diff --git a/configure.ac b/configure.ac
> index a3b3abd..9679c4c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -724,7 +724,7 @@ GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast"
>   AC_ARG_WITH([gallium-drivers],
>       [AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@],
>           [comma delimited Gallium drivers list, e.g.
> -        "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast"
> +        "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4"
>           @<:@default=r300,r600,svga,swrast@:>@])],
>       [with_gallium_drivers="$withval"],
>       [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
> @@ -2003,6 +2003,19 @@ if test -n "$with_gallium_drivers"; then
>                   GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri/kms-swrast"
>               fi
>               ;;
> +        xvc4)
> +            HAVE_GALLIUM_VC4=yes
> +            gallium_require_drm_loader
> +            GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS vc4"
> +            gallium_check_st "vc4/drm" "dri-vc4" "" "" ""
> +            DRICOMMON_NEED_LIBDRM=yes
Please drop the above line.

> +
> +            case "$host_cpu" in
> +                i?86 | x86_64 | amd64)
> +                USE_VC4_SIMULATOR=yes
> +                ;;
> +            esac
> +            ;;
>           *)
>               AC_MSG_ERROR([Unknown Gallium driver: $driver])
>               ;;
> @@ -2064,6 +2077,7 @@ AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes)
>   AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
>   AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
>   AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
> +AM_CONDITIONAL(HAVE_GALLIUM_VC4, test "x$HAVE_GALLIUM_VC4" = xyes)
>
>   AM_CONDITIONAL(NEED_GALLIUM_SOFTPIPE_DRIVER, test "x$HAVE_GALLIUM_SVGA" = xyes -o \
>                                                     "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
> @@ -2129,6 +2143,7 @@ AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
>   AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes)
>   AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
>   AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
> +AM_CONDITIONAL(USE_VC4_SIMULATOR, test x$USE_VC4_SIMULATOR = xyes)
if test "x$USE_VC4_SIMULATOR = xyes -a "x$HAVE_GALLIUM_ILO" = xyes; then
   AC_MSG_ERROR([WRITEME: big scary message... don't enable ilo+vc4 simulator])
fi

Something like the above should avoid some head-scratching when the dri target 
fails to build or the symbols get messed up in the final dri library.

FWIW there is (yet another) automake re-shuffle floating on the ML which will 
wait until you land the driver. I believe I've caused you enough pain on the 
topic as-is :)

Cheers,
Emil

P.S. Feel free to add a line in the release notes :)



More information about the mesa-dev mailing list