[v2] st: require compatible driver in autotools

Submitted by Alyssa Ross on April 19, 2019, 6:53 p.m.

Details

Message ID 20190419185327.25994-1-hi@alyssa.is
State New
Headers show
Series "st: require compatible driver in autotools" ( rev: 2 ) in Mesa

Not browsing as part of any series.

Commit Message

Alyssa Ross April 19, 2019, 6:53 p.m.
The meson build system already has these checks. I've just copied them
to autotools.

Without this, state trackers could be enabled when building with the
following set of options, which resulted in a compile error due to VL
being built without DRM.

     --enable-autotools
     --with-platforms=x11
     --with-dri-drivers=
     --with-gallium-drivers=swrast
     --disable-glx
     --disable-dri3
     --disable-gbm

The compile error was:

    vl/vl_winsys_dri.c:36:10: fatal error: xf86drm.h: No such file or directory
     #include <xf86drm.h>
              ^~~~~~~~~~~
    compilation terminated.

Cc: mesa-stable@lists.freedesktop.org
---
This version of the patch adds the check to OMX tizonia, which I had
previously missed.

 configure.ac | 341 +++++++++++++++++++++++++++------------------------
 1 file changed, 183 insertions(+), 158 deletions(-)

--
2.19.2

Patch hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index 1ef68fe68e6..ee8658ffc8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2341,6 +2341,164 @@  if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then
     fi
 fi

+dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block
+if test -n "$with_gallium_drivers"; then
+    gallium_drivers=`IFS=', '; echo $with_gallium_drivers`
+    for driver in $gallium_drivers; do
+        case "x$driver" in
+        xsvga)
+            HAVE_GALLIUM_SVGA=yes
+            require_libdrm "svga"
+            ;;
+        xi915)
+            HAVE_GALLIUM_I915=yes
+            PKG_CHECK_MODULES([I915], [libdrm >= $LIBDRM_INTEL_REQUIRED libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
+            require_libdrm "Gallium i915"
+            ;;
+        xr300)
+            HAVE_GALLIUM_R300=yes
+            PKG_CHECK_MODULES([RADEON], [libdrm >= $LIBDRM_RADEON_REQUIRED libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
+            require_libdrm "r300"
+            r300_require_llvm "r300"
+            ;;
+        xr600)
+            HAVE_GALLIUM_R600=yes
+            PKG_CHECK_MODULES([RADEON], [libdrm >= $LIBDRM_RADEON_REQUIRED libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
+            require_libdrm "r600"
+            if test "x$enable_llvm" = xyes; then
+                radeon_llvm_check $LLVM_REQUIRED_R600 "r600"
+
+                llvm_add_component "asmparser" "r600"
+                llvm_add_component "bitreader" "r600"
+            fi
+            ;;
+        xradeonsi)
+            HAVE_GALLIUM_RADEONSI=yes
+            PKG_CHECK_MODULES([RADEON], [libdrm >= $LIBDRM_RADEON_REQUIRED libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
+            PKG_CHECK_MODULES([AMDGPU], [libdrm >= $LIBDRM_AMDGPU_REQUIRED libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
+            require_libdrm "radeonsi"
+            radeon_llvm_check $LLVM_REQUIRED_RADEONSI "radeonsi"
+            if test "x$enable_egl" = xyes; then
+                require_basic_egl "radeonsi"
+            fi
+            ;;
+        xnouveau)
+            HAVE_GALLIUM_NOUVEAU=yes
+            PKG_CHECK_MODULES([NOUVEAU], [libdrm >= $LIBDRM_NOUVEAU_REQUIRED libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
+            require_libdrm "nouveau"
+            ;;
+        xfreedreno)
+            HAVE_GALLIUM_FREEDRENO=yes
+            require_libdrm "freedreno"
+            ;;
+        xetnaviv)
+            HAVE_GALLIUM_ETNAVIV=yes
+            PKG_CHECK_MODULES([ETNAVIV], [libdrm >= $LIBDRM_ETNAVIV_REQUIRED libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED])
+            require_libdrm "etnaviv"
+            ;;
+        xtegra)
+            HAVE_GALLIUM_TEGRA=yes
+            require_libdrm "tegra"
+            ;;
+        xswrast)
+            HAVE_GALLIUM_SOFTPIPE=yes
+            if test "x$enable_llvm" = xyes; then
+                HAVE_GALLIUM_LLVMPIPE=yes
+            fi
+            ;;
+        xswr)
+            llvm_require_version $LLVM_REQUIRED_SWR "swr"
+
+            if test "x$HAVE_CXX11" != "xyes"; then
+                AC_MSG_ERROR([swr requires c++11 support])
+            fi
+
+            swr_require_cxx_feature_flags "AVX" "defined(__AVX__)" \
+                ",-target-cpu=sandybridge,-mavx,-march=core-avx,-tp=sandybridge" \
+                SWR_AVX_CXXFLAGS
+            AC_SUBST([SWR_AVX_CXXFLAGS])
+
+            swr_archs=`IFS=', '; echo $with_swr_archs`
+            for arch in $swr_archs; do
+                case "x$arch" in
+                xavx)
+                    HAVE_SWR_AVX=yes
+                    ;;
+                xavx2)
+                    swr_require_cxx_feature_flags "AVX2" "defined(__AVX2__)" \
+                        ",-target-cpu=haswell,-mavx2 -mfma -mbmi2 -mf16c,-march=core-avx2,-tp=haswell" \
+                        SWR_AVX2_CXXFLAGS
+                    AC_SUBST([SWR_AVX2_CXXFLAGS])
+                    HAVE_SWR_AVX2=yes
+                    ;;
+                xknl)
+                    swr_require_cxx_feature_flags "KNL" "defined(__AVX512F__) && defined(__AVX512ER__)" \
+                        ",-target-cpu=mic-knl,-march=knl,-xMIC-AVX512" \
+                        SWR_KNL_CXXFLAGS
+                    AC_SUBST([SWR_KNL_CXXFLAGS])
+                    HAVE_SWR_KNL=yes
+                    ;;
+                xskx)
+                    swr_require_cxx_feature_flags "SKX" "defined(__AVX512F__) && defined(__AVX512BW__)" \
+                        ",-target-cpu=x86-skylake,-march=skylake-avx512,-xCORE-AVX512" \
+                        SWR_SKX_CXXFLAGS
+                    AC_SUBST([SWR_SKX_CXXFLAGS])
+                    HAVE_SWR_SKX=yes
+                    ;;
+                *)
+                    AC_MSG_ERROR([unknown SWR build architecture '$arch'])
+                    ;;
+                esac
+            done
+
+            if test "x$HAVE_SWR_AVX" != xyes -a \
+                    "x$HAVE_SWR_AVX2" != xyes -a \
+                    "x$HAVE_SWR_KNL" != xyes -a \
+                    "x$HAVE_SWR_SKX" != xyes; then
+               AC_MSG_ERROR([swr enabled but no swr architectures selected])
+            fi
+
+            # test if more than one swr arch configured
+            if test `echo $swr_archs | wc -w` -eq 1; then
+                HAVE_SWR_BUILTIN=yes
+            fi
+
+            HAVE_GALLIUM_SWR=yes
+            ;;
+        xvc4)
+            HAVE_GALLIUM_VC4=yes
+            PKG_CHECK_MODULES([VC4], [libdrm >= $LIBDRM_VC4_REQUIRED])
+
+            PKG_CHECK_MODULES([SIMPENROSE], [simpenrose],
+                              [USE_VC4_SIMULATOR=yes;
+                               DEFINES="$DEFINES -DUSE_VC4_SIMULATOR"],
+                              [USE_VC4_SIMULATOR=no])
+            ;;
+        xv3d)
+            HAVE_GALLIUM_V3D=yes
+
+            PKG_CHECK_MODULES([V3D_SIMULATOR], [v3dv3],
+                              [USE_V3D_SIMULATOR=yes;
+                               DEFINES="$DEFINES -DUSE_V3D_SIMULATOR"],
+                              [USE_V3D_SIMULATOR=no])
+            ;;
+        xkmsro)
+            HAVE_GALLIUM_KMSRO=yes
+            ;;
+        xvirgl)
+            HAVE_GALLIUM_VIRGL=yes
+            require_libdrm "virgl"
+            if test "x$enable_egl" = xyes; then
+                require_basic_egl "virgl"
+            fi
+            ;;
+        *)
+            AC_MSG_ERROR([Unknown Gallium driver: $driver])
+            ;;
+        esac
+    done
+fi
+
 if test "x$enable_dri" = xyes -o \
         "x$enable_xvmc" = xyes -o \
         "x$enable_vdpau" = xyes -o \
@@ -2367,6 +2525,10 @@  if test "x$enable_xvmc" = xyes; then
     if test "x$have_xvmc_platform" != xyes; then
         AC_MSG_ERROR([XVMC requires the x11 platforms])
     fi
+    if test "x$HAVE_GALLIUM_R600" != xyes -a \
+            "x$HAVE_GALLIUM_NOUVEAU" != "xyes"; then
+        AC_MSG_ERROR([XVMC state tracker requires at least one of the r600 or nouveau gallium drivers])
+    fi
     PKG_CHECK_MODULES([XVMC], [xvmc >= $XVMC_REQUIRED])
     gallium_st="$gallium_st xvmc"
 fi
@@ -2376,6 +2538,12 @@  if test "x$enable_vdpau" = xyes; then
     if test "x$have_vdpau_platform" != xyes; then
         AC_MSG_ERROR([VDPAU requires the x11 platforms])
     fi
+    if test "x$HAVE_GALLIUM_R300" != xyes -a \
+            "x$HAVE_GALLIUM_R600" != xyes -a \
+            "x$HAVE_GALLIUM_RADEONSI" != xyes -a \
+            "x$HAVE_GALLIUM_NOUVEAU" != "xyes"; then
+        AC_MSG_ERROR([VDPAU state tracker requires at least one of the r300, r600, radeonsi or nouveau gallium drivers])
+    fi
     PKG_CHECK_MODULES([VDPAU], [vdpau >= $VDPAU_REQUIRED])
     gallium_st="$gallium_st vdpau"
     DEFINES="$DEFINES -DHAVE_ST_VDPAU"
@@ -2386,6 +2554,11 @@  if test "x$enable_omx_bellagio" = xyes; then
     if test "x$have_omx_platform" != xyes; then
         AC_MSG_ERROR([OMX requires at least one of the x11 or drm platforms])
     fi
+    if test "x$HAVE_GALLIUM_R600" != xyes -a \
+            "x$HAVE_GALLIUM_RADEONSI" != xyes -a \
+            "x$HAVE_GALLIUM_NOUVEAU" != "xyes"; then
+        AC_MSG_ERROR([OMX state tracker requires at least one of the r600, radeonsi or nouveau gallium drivers])
+    fi
     PKG_CHECK_MODULES([OMX_BELLAGIO], [libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED])
     gallium_st="$gallium_st omx_bellagio"
     AC_DEFINE([ENABLE_ST_OMX_BELLAGIO], 1, [Use Bellagio for OMX IL])
@@ -2398,6 +2571,11 @@  if test "x$enable_omx_tizonia" = xyes; then
     if test "x$have_omx_platform" != xyes; then
         AC_MSG_ERROR([OMX requires at least one of the x11 or drm platforms])
     fi
+    if test "x$HAVE_GALLIUM_R600" != xyes -a \
+            "x$HAVE_GALLIUM_RADEONSI" != xyes -a \
+            "x$HAVE_GALLIUM_NOUVEAU" != "xyes"; then
+        AC_MSG_ERROR([OMX state tracker requires at least one of the r600, radeonsi or nouveau gallium drivers])
+    fi
     PKG_CHECK_MODULES([OMX_TIZONIA],
                       [libtizonia >= $LIBOMXIL_TIZONIA_REQUIRED
                        tizilheaders >= $LIBOMXIL_TIZONIA_REQUIRED
@@ -2413,6 +2591,11 @@  if test "x$enable_va" = xyes; then
     if test "x$have_va_platform" != xyes; then
         AC_MSG_ERROR([VA requires at least one of the x11 drm or wayland platforms])
     fi
+    if test "x$HAVE_GALLIUM_R600" != xyes -a \
+            "x$HAVE_GALLIUM_RADEONSI" != xyes -a \
+            "x$HAVE_GALLIUM_NOUVEAU" != "xyes"; then
+        AC_MSG_ERROR([VA state tracker requires at least one of the r600, radeonsi or nouveau gallium drivers])
+    fi
     PKG_CHECK_MODULES([VA], [libva >= $LIBVA_REQUIRED])
     gallium_st="$gallium_st va"
 fi
@@ -2686,164 +2869,6 @@  swr_require_cxx_feature_flags() {
     return 1
 }

-dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block
-if test -n "$with_gallium_drivers"; then
-    gallium_drivers=`IFS=', '; echo $with_gallium_drivers`
-    for driver in $gallium_drivers; do
-        case "x$driver" in
-        xsvga)
-            HAVE_GALLIUM_SVGA=yes
-            require_libdrm "svga"
-            ;;
-        xi915)
-            HAVE_GALLIUM_I915=yes
-            PKG_CHECK_MODULES([I915], [libdrm >= $LIBDRM_INTEL_REQUIRED libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
-            require_libdrm "Gallium i915"
-            ;;
-        xr300)
-            HAVE_GALLIUM_R300=yes
-            PKG_CHECK_MODULES([RADEON], [libdrm >= $LIBDRM_RADEON_REQUIRED libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
-            require_libdrm "r300"
-            r300_require_llvm "r300"
-            ;;
-        xr600)
-            HAVE_GALLIUM_R600=yes
-            PKG_CHECK_MODULES([RADEON], [libdrm >= $LIBDRM_RADEON_REQUIRED libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
-            require_libdrm "r600"
-            if test "x$enable_llvm" = xyes; then
-                radeon_llvm_check $LLVM_REQUIRED_R600 "r600"
-
-                llvm_add_component "asmparser" "r600"
-                llvm_add_component "bitreader" "r600"
-            fi
-            ;;
-        xradeonsi)
-            HAVE_GALLIUM_RADEONSI=yes
-            PKG_CHECK_MODULES([RADEON], [libdrm >= $LIBDRM_RADEON_REQUIRED libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
-            PKG_CHECK_MODULES([AMDGPU], [libdrm >= $LIBDRM_AMDGPU_REQUIRED libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
-            require_libdrm "radeonsi"
-            radeon_llvm_check $LLVM_REQUIRED_RADEONSI "radeonsi"
-            if test "x$enable_egl" = xyes; then
-                require_basic_egl "radeonsi"
-            fi
-            ;;
-        xnouveau)
-            HAVE_GALLIUM_NOUVEAU=yes
-            PKG_CHECK_MODULES([NOUVEAU], [libdrm >= $LIBDRM_NOUVEAU_REQUIRED libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
-            require_libdrm "nouveau"
-            ;;
-        xfreedreno)
-            HAVE_GALLIUM_FREEDRENO=yes
-            require_libdrm "freedreno"
-            ;;
-        xetnaviv)
-            HAVE_GALLIUM_ETNAVIV=yes
-            PKG_CHECK_MODULES([ETNAVIV], [libdrm >= $LIBDRM_ETNAVIV_REQUIRED libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED])
-            require_libdrm "etnaviv"
-            ;;
-        xtegra)
-            HAVE_GALLIUM_TEGRA=yes
-            require_libdrm "tegra"
-            ;;
-        xswrast)
-            HAVE_GALLIUM_SOFTPIPE=yes
-            if test "x$enable_llvm" = xyes; then
-                HAVE_GALLIUM_LLVMPIPE=yes
-            fi
-            ;;
-        xswr)
-            llvm_require_version $LLVM_REQUIRED_SWR "swr"
-
-            if test "x$HAVE_CXX11" != "xyes"; then
-                AC_MSG_ERROR([swr requires c++11 support])
-            fi
-
-            swr_require_cxx_feature_flags "AVX" "defined(__AVX__)" \
-                ",-target-cpu=sandybridge,-mavx,-march=core-avx,-tp=sandybridge" \
-                SWR_AVX_CXXFLAGS
-            AC_SUBST([SWR_AVX_CXXFLAGS])
-
-            swr_archs=`IFS=', '; echo $with_swr_archs`
-            for arch in $swr_archs; do
-                case "x$arch" in
-                xavx)
-                    HAVE_SWR_AVX=yes
-                    ;;
-                xavx2)
-                    swr_require_cxx_feature_flags "AVX2" "defined(__AVX2__)" \
-                        ",-target-cpu=haswell,-mavx2 -mfma -mbmi2 -mf16c,-march=core-avx2,-tp=haswell" \
-                        SWR_AVX2_CXXFLAGS
-                    AC_SUBST([SWR_AVX2_CXXFLAGS])
-                    HAVE_SWR_AVX2=yes
-                    ;;
-                xknl)
-                    swr_require_cxx_feature_flags "KNL" "defined(__AVX512F__) && defined(__AVX512ER__)" \
-                        ",-target-cpu=mic-knl,-march=knl,-xMIC-AVX512" \
-                        SWR_KNL_CXXFLAGS
-                    AC_SUBST([SWR_KNL_CXXFLAGS])
-                    HAVE_SWR_KNL=yes
-                    ;;
-                xskx)
-                    swr_require_cxx_feature_flags "SKX" "defined(__AVX512F__) && defined(__AVX512BW__)" \
-                        ",-target-cpu=x86-skylake,-march=skylake-avx512,-xCORE-AVX512" \
-                        SWR_SKX_CXXFLAGS
-                    AC_SUBST([SWR_SKX_CXXFLAGS])
-                    HAVE_SWR_SKX=yes
-                    ;;
-                *)
-                    AC_MSG_ERROR([unknown SWR build architecture '$arch'])
-                    ;;
-                esac
-            done
-
-            if test "x$HAVE_SWR_AVX" != xyes -a \
-                    "x$HAVE_SWR_AVX2" != xyes -a \
-                    "x$HAVE_SWR_KNL" != xyes -a \
-                    "x$HAVE_SWR_SKX" != xyes; then
-               AC_MSG_ERROR([swr enabled but no swr architectures selected])
-            fi
-
-            # test if more than one swr arch configured
-            if test `echo $swr_archs | wc -w` -eq 1; then
-                HAVE_SWR_BUILTIN=yes
-            fi
-
-            HAVE_GALLIUM_SWR=yes
-            ;;
-        xvc4)
-            HAVE_GALLIUM_VC4=yes
-            PKG_CHECK_MODULES([VC4], [libdrm >= $LIBDRM_VC4_REQUIRED])
-
-            PKG_CHECK_MODULES([SIMPENROSE], [simpenrose],
-                              [USE_VC4_SIMULATOR=yes;
-                               DEFINES="$DEFINES -DUSE_VC4_SIMULATOR"],
-                              [USE_VC4_SIMULATOR=no])
-            ;;
-        xv3d)
-            HAVE_GALLIUM_V3D=yes
-
-            PKG_CHECK_MODULES([V3D_SIMULATOR], [v3dv3],
-                              [USE_V3D_SIMULATOR=yes;
-                               DEFINES="$DEFINES -DUSE_V3D_SIMULATOR"],
-                              [USE_V3D_SIMULATOR=no])
-            ;;
-        xkmsro)
-            HAVE_GALLIUM_KMSRO=yes
-            ;;
-        xvirgl)
-            HAVE_GALLIUM_VIRGL=yes
-            require_libdrm "virgl"
-            if test "x$enable_egl" = xyes; then
-                require_basic_egl "virgl"
-            fi
-            ;;
-        *)
-            AC_MSG_ERROR([Unknown Gallium driver: $driver])
-            ;;
-        esac
-    done
-fi
-
 # XXX: Keep in sync with LLVM_REQUIRED_SWR
 AM_CONDITIONAL(SWR_INVALID_LLVM_VERSION, test "x$LLVM_VERSION" != x7.0.0 -a \
                                               "x$LLVM_VERSION" != x7.0.1)

Comments


On Fri, 19 Apr 2019 at 19:53, Alyssa Ross <hi@alyssa.is> wrote:
>
> The meson build system already has these checks. I've just copied them
> to autotools.
>
> Without this, state trackers could be enabled when building with the
> following set of options, which resulted in a compile error due to VL
> being built without DRM.
>
>      --enable-autotools
>      --with-platforms=x11
>      --with-dri-drivers=
>      --with-gallium-drivers=swrast
>      --disable-glx
>      --disable-dri3
>      --disable-gbm
>
> The compile error was:
>
>     vl/vl_winsys_dri.c:36:10: fatal error: xf86drm.h: No such file or directory
>      #include <xf86drm.h>
>               ^~~~~~~~~~~
>     compilation terminated.
>
I was in favour of the the explicit driver/st tracking yet it was
nuked with commit 28e84c93bb33dfc8ac5219480b274c84dbd58762
To address the above use-case, we don't need to reinstate the tracking
- it causes a lot of churn.

Off the top of my head - none of the VL code should be build when we
have only a swrast driver.
Can you try and kill that bug, or shall I?

-Emil

On Tue, 23 Apr 2019 at 23:10, Alyssa Ross <hi@alyssa.is> wrote:
>
> > Off the top of my head - none of the VL code should be build when we
> > have only a swrast driver.
> > Can you try and kill that bug, or shall I?
>
> Isn't that what this patch does?
>
> If there's only swrast, this patch prevents enabling any of the state
> trackers, so need_gallium_vl won't be set, and VL won't be built.

How about instead of tracking each driver and combination do somethings like:

if no_gallium_drivers or gallium_drivers=swrast; then
 all_vl_state_trackers=off

-Emil
On Wed, 24 Apr 2019 at 13:09, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>
> On Tue, 23 Apr 2019 at 23:10, Alyssa Ross <hi@alyssa.is> wrote:
> >
> > > Off the top of my head - none of the VL code should be build when we
> > > have only a swrast driver.
> > > Can you try and kill that bug, or shall I?
> >
> > Isn't that what this patch does?
> >
> > If there's only swrast, this patch prevents enabling any of the state
> > trackers, so need_gallium_vl won't be set, and VL won't be built.
>
> How about instead of tracking each driver and combination do somethings like:
>
> if no_gallium_drivers or gallium_drivers=swrast; then
>  all_vl_state_trackers=off
>
Having a closer look such code exists already at [1]

if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then
    if test "x$enable_xvmc" = xauto -a "x$have_xvmc_platform" = xyes; then
        PKG_CHECK_EXISTS([xvmc >= $XVMC_REQUIRED], [enable_xvmc=yes],
[enable_xvmc=no])
    fi
...
fi

Thus auto-detection will disable xvmc and other VL state-trackers,
when no gallium drivers or swrast only is set.
Thus the NEED_GALLIUM_VL_WINSYS shortly afterwords is set to
no/disabled, and vl_winsys_dri.c et al is not build.

A random old checkout commit 7be26976b8e8bc34fa7d55550014197ed2af488f
seems happy with the following:

mkdir aa; cd aa;
../autogen.sh      --enable-autotools \
     --with-platforms=x11 \
     --with-dri-drivers= \
     --with-gallium-drivers=swrast \
     --disable-glx \
     --disable-dri3 \
     --disable-gbm

Am I missing something?
-Emil

[1] https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=19.0&id=d41acb4c9e46306e3e9cebe9c23de77c6f26ff93#n2322