[Mesa-dev] [PATCH 03/18] winsys/amdgpu: add a new winsys for the new kernel driver
From: Marek Olšák --- configure.ac | 5 + src/gallium/Makefile.am | 1 + src/gallium/drivers/r300/Automake.inc | 6 +- src/gallium/drivers/r600/Automake.inc | 6 +- src/gallium/drivers/radeonsi/Automake.inc | 6 +- src/gallium/targets/pipe-loader/Makefile.am | 12 +- src/gallium/winsys/radeon/amdgpu/Android.mk | 40 ++ src/gallium/winsys/radeon/amdgpu/Makefile.am | 12 + src/gallium/winsys/radeon/amdgpu/Makefile.sources | 8 + src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c | 643 ++ src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h | 75 +++ src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c | 578 +++ src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h | 149 + src/gallium/winsys/radeon/amdgpu/amdgpu_public.h | 14 + src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c | 491 + src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h | 80 +++ src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 8 + src/gallium/winsys/radeon/radeon_winsys.h | 4 + 18 files changed, 2129 insertions(+), 9 deletions(-) create mode 100644 src/gallium/winsys/radeon/amdgpu/Android.mk create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.am create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.sources create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_public.h create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h diff --git a/configure.ac b/configure.ac index 095e23e..f22975f 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,7 @@ AC_SUBST([OSMESA_VERSION]) dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.38 LIBDRM_RADEON_REQUIRED=2.4.56 +LIBDRM_AMDGPU_REQUIRED=2.4.60 LIBDRM_INTEL_REQUIRED=2.4.60 LIBDRM_NVVIEUX_REQUIRED=2.4.33 LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41" @@ -2091,6 +2092,7 @@ if test -n "$with_gallium_drivers"; then xr300) HAVE_GALLIUM_R300=yes PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) gallium_require_drm "Gallium R300" gallium_require_drm_loader gallium_require_llvm "Gallium R300" @@ -2098,6 +2100,7 @@ if test -n "$with_gallium_drivers"; then xr600) HAVE_GALLIUM_R600=yes PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) gallium_require_drm "Gallium R600" gallium_require_drm_loader if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then @@ -2114,6 +2117,7 @@ if test -n "$with_gallium_drivers"; then xradeonsi) HAVE_GALLIUM_RADEONSI=yes PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) gallium_require_drm "radeonsi" gallium_require_drm_loader radeon_llvm_check "radeonsi" @@ -2384,6 +2388,7 @@ AC_CONFIG_FILES([Makefile src/gallium/winsys/intel/drm/Makefile src/gallium/winsys/nouveau/drm/Makefile src/gallium/winsys/radeon/drm/Makefile + src/gallium/winsys/radeon/amdgpu/Makefile src/gallium/winsys/svga/drm/Makefile src/gallium/winsys/sw/dri/Makefile src/gallium/winsys/sw/kms-dri/Makefile diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am index ede6e21..fa526d4 100644 --- a/src/gallium/Makefile.am +++ b/src/gallium/Makefile.am @@ -63,6 +63,7 @@ endif ## the radeon winsys - linked in by r300, r600 and radeonsi if NEED_RADEON_DRM_WINSYS SUBDIRS += winsys/radeon/drm +SUBDIRS += winsys/radeon/amdgpu endif ## swrast/softpipe diff --git a/src/gallium/drivers/r300/Automake.inc b/src/gallium/drivers/r300/Automake.inc index 9334973..cfcd61c 100644 --- a/src/gallium/drivers/r300/Automake.inc +++ b/src/gallium/drivers/r300/Automake.inc @@ -5,9 +5,11 @@ TARGET_CPPFLAGS += -DGALLIUM_R300 TARGET_LIB_DEPS += \ $(top_builddir)/src/gallium/drivers/r300/libr300.la \ $(RADEON_LIBS) \ - $(INTEL_LIBS) + $(LIBDRM_LIBS) \ + $(AMDGPU_LIBS) TARGET_RADEON_WINSYS = \ - $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la + $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \ + $(top_builddir)/src
Re: [Mesa-dev] [PATCH 03/18] winsys/amdgpu: add a new winsys for the new kernel driver
Hi Marek, Must admit that the current "split"/location of the new winsys looks a bit strange. I'm thinking that if one places the new winsys alongside the radeon one (i.e. winsys/amdgpu/drm) things should still work and thus we'll result in shorter and cleaner patch. See below for more details. On 20/04/15 22:23, Marek Olšák wrote: > From: Marek Olšák > > --- > configure.ac | 5 + > src/gallium/Makefile.am | 1 + > src/gallium/drivers/r300/Automake.inc | 6 +- > src/gallium/drivers/r600/Automake.inc | 6 +- > src/gallium/drivers/radeonsi/Automake.inc | 6 +- > src/gallium/targets/pipe-loader/Makefile.am | 12 +- > src/gallium/winsys/radeon/amdgpu/Android.mk | 40 ++ > src/gallium/winsys/radeon/amdgpu/Makefile.am | 12 + > src/gallium/winsys/radeon/amdgpu/Makefile.sources | 8 + > src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c | 643 > ++ > src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h | 75 +++ > src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c | 578 +++ > src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h | 149 + > src/gallium/winsys/radeon/amdgpu/amdgpu_public.h | 14 + > src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c | 491 + > src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h | 80 +++ > src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 8 + > src/gallium/winsys/radeon/radeon_winsys.h | 4 + > 18 files changed, 2129 insertions(+), 9 deletions(-) > create mode 100644 src/gallium/winsys/radeon/amdgpu/Android.mk > create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.am > create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.sources > create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c > create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h > create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c > create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h > create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_public.h > create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c > create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h > > diff --git a/configure.ac b/configure.ac > index 095e23e..f22975f 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -68,6 +68,7 @@ AC_SUBST([OSMESA_VERSION]) > dnl Versions for external dependencies > LIBDRM_REQUIRED=2.4.38 > LIBDRM_RADEON_REQUIRED=2.4.56 > +LIBDRM_AMDGPU_REQUIRED=2.4.60 I guess this will need to be changed once the libdrm patches land ? > LIBDRM_INTEL_REQUIRED=2.4.60 > LIBDRM_NVVIEUX_REQUIRED=2.4.33 > LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41" > @@ -2091,6 +2092,7 @@ if test -n "$with_gallium_drivers"; then > xr300) > HAVE_GALLIUM_R300=yes > PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= > $LIBDRM_RADEON_REQUIRED]) > +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= > $LIBDRM_AMDGPU_REQUIRED]) > gallium_require_drm "Gallium R300" > gallium_require_drm_loader > gallium_require_llvm "Gallium R300" > @@ -2098,6 +2100,7 @@ if test -n "$with_gallium_drivers"; then > xr600) > HAVE_GALLIUM_R600=yes > PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= > $LIBDRM_RADEON_REQUIRED]) > +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= > $LIBDRM_AMDGPU_REQUIRED]) We can drop the above two hunks. > gallium_require_drm "Gallium R600" > gallium_require_drm_loader > if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; > then > @@ -2114,6 +2117,7 @@ if test -n "$with_gallium_drivers"; then > xradeonsi) > HAVE_GALLIUM_RADEONSI=yes > PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= > $LIBDRM_RADEON_REQUIRED]) > +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= > $LIBDRM_AMDGPU_REQUIRED]) > gallium_require_drm "radeonsi" > gallium_require_drm_loader > radeon_llvm_check "radeonsi" > @@ -2384,6 +2388,7 @@ AC_CONFIG_FILES([Makefile > src/gallium/winsys/intel/drm/Makefile > src/gallium/winsys/nouveau/drm/Makefile > src/gallium/winsys/radeon/drm/Makefile > + src/gallium/winsys/radeon/amdgpu/Makefile > src/gallium/winsys/svga/drm/Makefile > src/gallium/winsys/sw/dri/Makefile > src/gallium/winsys/sw/kms-dri/Makefile > diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am > index ede6e21..fa526d4 100644 > --- a/src/gallium/Makefile.am > +++ b/src/gallium/Makefile.am > @@ -63,6 +63,7 @@ endif > ## the radeon winsys - linked in by r300, r600 and radeonsi > if NEED_RADEON_DRM_WINSYS > SUBDIRS += winsys/radeon/drm > +SUBDIRS += winsys/radeon/amdgpu Move it to the if HAVE_GALLIUM_RADEONSI block ? It is the
Re: [Mesa-dev] [PATCH 03/18] winsys/amdgpu: add a new winsys for the new kernel driver
On Tue, Apr 21, 2015 at 5:12 PM, Emil Velikov wrote: > Hi Marek, > > Must admit that the current "split"/location of the new winsys looks a > bit strange. I'm thinking that if one places the new winsys alongside > the radeon one (i.e. winsys/amdgpu/drm) things should still work and > thus we'll result in shorter and cleaner patch. See below for more details. I've moved it now and I'm in the middle of a rebase right now. > > > On 20/04/15 22:23, Marek Olšák wrote: >> From: Marek Olšák >> >> --- >> configure.ac | 5 + >> src/gallium/Makefile.am | 1 + >> src/gallium/drivers/r300/Automake.inc | 6 +- >> src/gallium/drivers/r600/Automake.inc | 6 +- >> src/gallium/drivers/radeonsi/Automake.inc | 6 +- >> src/gallium/targets/pipe-loader/Makefile.am | 12 +- >> src/gallium/winsys/radeon/amdgpu/Android.mk | 40 ++ >> src/gallium/winsys/radeon/amdgpu/Makefile.am | 12 + >> src/gallium/winsys/radeon/amdgpu/Makefile.sources | 8 + >> src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c | 643 >> ++ >> src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h | 75 +++ >> src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c | 578 +++ >> src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h | 149 + >> src/gallium/winsys/radeon/amdgpu/amdgpu_public.h | 14 + >> src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c | 491 + >> src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h | 80 +++ >> src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 8 + >> src/gallium/winsys/radeon/radeon_winsys.h | 4 + >> 18 files changed, 2129 insertions(+), 9 deletions(-) >> create mode 100644 src/gallium/winsys/radeon/amdgpu/Android.mk >> create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.am >> create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.sources >> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c >> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h >> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c >> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h >> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_public.h >> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c >> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h >> >> diff --git a/configure.ac b/configure.ac >> index 095e23e..f22975f 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -68,6 +68,7 @@ AC_SUBST([OSMESA_VERSION]) >> dnl Versions for external dependencies >> LIBDRM_REQUIRED=2.4.38 >> LIBDRM_RADEON_REQUIRED=2.4.56 >> +LIBDRM_AMDGPU_REQUIRED=2.4.60 > I guess this will need to be changed once the libdrm patches land ? Yes. > >> LIBDRM_INTEL_REQUIRED=2.4.60 >> LIBDRM_NVVIEUX_REQUIRED=2.4.33 >> LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41" >> @@ -2091,6 +2092,7 @@ if test -n "$with_gallium_drivers"; then >> xr300) >> HAVE_GALLIUM_R300=yes >> PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= >> $LIBDRM_RADEON_REQUIRED]) >> +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= >> $LIBDRM_AMDGPU_REQUIRED]) >> gallium_require_drm "Gallium R300" >> gallium_require_drm_loader >> gallium_require_llvm "Gallium R300" >> @@ -2098,6 +2100,7 @@ if test -n "$with_gallium_drivers"; then >> xr600) >> HAVE_GALLIUM_R600=yes >> PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= >> $LIBDRM_RADEON_REQUIRED]) >> +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= >> $LIBDRM_AMDGPU_REQUIRED]) > We can drop the above two hunks. > >> gallium_require_drm "Gallium R600" >> gallium_require_drm_loader >> if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = >> xyes; then >> @@ -2114,6 +2117,7 @@ if test -n "$with_gallium_drivers"; then >> xradeonsi) >> HAVE_GALLIUM_RADEONSI=yes >> PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= >> $LIBDRM_RADEON_REQUIRED]) >> +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= >> $LIBDRM_AMDGPU_REQUIRED]) >> gallium_require_drm "radeonsi" >> gallium_require_drm_loader >> radeon_llvm_check "radeonsi" >> @@ -2384,6 +2388,7 @@ AC_CONFIG_FILES([Makefile >> src/gallium/winsys/intel/drm/Makefile >> src/gallium/winsys/nouveau/drm/Makefile >> src/gallium/winsys/radeon/drm/Makefile >> + src/gallium/winsys/radeon/amdgpu/Makefile >> src/gallium/winsys/svga/drm/Makefile >> src/gallium/winsys/sw/dri/Makefile >> src/gallium/winsys/sw/kms-dri/Makefile >> diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am >> index ede6e21..fa526d4 100644 >> --- a/src/gallium/Makefile.am >> +++ b/src/gallium/Makefile.am >> @@ -6
Re: [Mesa-dev] [PATCH 03/18] winsys/amdgpu: add a new winsys for the new kernel driver
On 28 April 2015 at 01:02, Marek Olšák wrote: > On Tue, Apr 21, 2015 at 5:12 PM, Emil Velikov > wrote: >> Hi Marek, >> >> Must admit that the current "split"/location of the new winsys looks a >> bit strange. I'm thinking that if one places the new winsys alongside >> the radeon one (i.e. winsys/amdgpu/drm) things should still work and >> thus we'll result in shorter and cleaner patch. See below for more details. > > I've moved it now and I'm in the middle of a rebase right now. > >> >> >> On 20/04/15 22:23, Marek Olšák wrote: >>> From: Marek Olšák >>> >>> --- >>> configure.ac | 5 + >>> src/gallium/Makefile.am | 1 + >>> src/gallium/drivers/r300/Automake.inc | 6 +- >>> src/gallium/drivers/r600/Automake.inc | 6 +- >>> src/gallium/drivers/radeonsi/Automake.inc | 6 +- >>> src/gallium/targets/pipe-loader/Makefile.am | 12 +- >>> src/gallium/winsys/radeon/amdgpu/Android.mk | 40 ++ >>> src/gallium/winsys/radeon/amdgpu/Makefile.am | 12 + >>> src/gallium/winsys/radeon/amdgpu/Makefile.sources | 8 + >>> src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c | 643 >>> ++ >>> src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h | 75 +++ >>> src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c | 578 +++ >>> src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h | 149 + >>> src/gallium/winsys/radeon/amdgpu/amdgpu_public.h | 14 + >>> src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c | 491 + >>> src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h | 80 +++ >>> src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 8 + >>> src/gallium/winsys/radeon/radeon_winsys.h | 4 + >>> 18 files changed, 2129 insertions(+), 9 deletions(-) >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/Android.mk >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.am >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.sources >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_public.h >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c >>> create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h >>> >>> diff --git a/configure.ac b/configure.ac >>> index 095e23e..f22975f 100644 >>> --- a/configure.ac >>> +++ b/configure.ac >>> @@ -68,6 +68,7 @@ AC_SUBST([OSMESA_VERSION]) >>> dnl Versions for external dependencies >>> LIBDRM_REQUIRED=2.4.38 >>> LIBDRM_RADEON_REQUIRED=2.4.56 >>> +LIBDRM_AMDGPU_REQUIRED=2.4.60 >> I guess this will need to be changed once the libdrm patches land ? > > Yes. > >> >>> LIBDRM_INTEL_REQUIRED=2.4.60 >>> LIBDRM_NVVIEUX_REQUIRED=2.4.33 >>> LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41" >>> @@ -2091,6 +2092,7 @@ if test -n "$with_gallium_drivers"; then >>> xr300) >>> HAVE_GALLIUM_R300=yes >>> PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= >>> $LIBDRM_RADEON_REQUIRED]) >>> +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= >>> $LIBDRM_AMDGPU_REQUIRED]) >>> gallium_require_drm "Gallium R300" >>> gallium_require_drm_loader >>> gallium_require_llvm "Gallium R300" >>> @@ -2098,6 +2100,7 @@ if test -n "$with_gallium_drivers"; then >>> xr600) >>> HAVE_GALLIUM_R600=yes >>> PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= >>> $LIBDRM_RADEON_REQUIRED]) >>> +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= >>> $LIBDRM_AMDGPU_REQUIRED]) >> We can drop the above two hunks. >> >>> gallium_require_drm "Gallium R600" >>> gallium_require_drm_loader >>> if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = >>> xyes; then >>> @@ -2114,6 +2117,7 @@ if test -n "$with_gallium_drivers"; then >>> xradeonsi) >>> HAVE_GALLIUM_RADEONSI=yes >>> PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= >>> $LIBDRM_RADEON_REQUIRED]) >>> +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= >>> $LIBDRM_AMDGPU_REQUIRED]) >>> gallium_require_drm "radeonsi" >>> gallium_require_drm_loader >>> radeon_llvm_check "radeonsi" >>> @@ -2384,6 +2388,7 @@ AC_CONFIG_FILES([Makefile >>> src/gallium/winsys/intel/drm/Makefile >>> src/gallium/winsys/nouveau/drm/Makefile >>> src/gallium/winsys/radeon/drm/Makefile >>> + src/gallium/winsys/radeon/amdgpu/Makefile >>> src/gallium/winsys/svga/drm/Makefile >>> src/gallium/winsys/sw/dri/Makefile >>> src/gallium/winsys/sw/kms-dri/Makefile >>> diff --git
Re: [Mesa-dev] [PATCH 03/18] winsys/amdgpu: add a new winsys for the new kernel driver
Hi Emil, I think I have fixed everything that you suggested. You can review the branch here: http://cgit.freedesktop.org/~mareko/mesa/log/?h=amdgpu Thanks, Marek On Tue, Apr 28, 2015 at 11:01 AM, Emil Velikov wrote: > On 28 April 2015 at 01:02, Marek Olšák wrote: >> On Tue, Apr 21, 2015 at 5:12 PM, Emil Velikov >> wrote: >>> Hi Marek, >>> >>> Must admit that the current "split"/location of the new winsys looks a >>> bit strange. I'm thinking that if one places the new winsys alongside >>> the radeon one (i.e. winsys/amdgpu/drm) things should still work and >>> thus we'll result in shorter and cleaner patch. See below for more details. >> >> I've moved it now and I'm in the middle of a rebase right now. >> >>> >>> >>> On 20/04/15 22:23, Marek Olšák wrote: From: Marek Olšák --- configure.ac | 5 + src/gallium/Makefile.am | 1 + src/gallium/drivers/r300/Automake.inc | 6 +- src/gallium/drivers/r600/Automake.inc | 6 +- src/gallium/drivers/radeonsi/Automake.inc | 6 +- src/gallium/targets/pipe-loader/Makefile.am | 12 +- src/gallium/winsys/radeon/amdgpu/Android.mk | 40 ++ src/gallium/winsys/radeon/amdgpu/Makefile.am | 12 + src/gallium/winsys/radeon/amdgpu/Makefile.sources | 8 + src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c | 643 ++ src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h | 75 +++ src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c | 578 +++ src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h | 149 + src/gallium/winsys/radeon/amdgpu/amdgpu_public.h | 14 + src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c | 491 + src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h | 80 +++ src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 8 + src/gallium/winsys/radeon/radeon_winsys.h | 4 + 18 files changed, 2129 insertions(+), 9 deletions(-) create mode 100644 src/gallium/winsys/radeon/amdgpu/Android.mk create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.am create mode 100644 src/gallium/winsys/radeon/amdgpu/Makefile.sources create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.c create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_bo.h create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.c create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_cs.h create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_public.h create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.c create mode 100644 src/gallium/winsys/radeon/amdgpu/amdgpu_winsys.h diff --git a/configure.ac b/configure.ac index 095e23e..f22975f 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,7 @@ AC_SUBST([OSMESA_VERSION]) dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.38 LIBDRM_RADEON_REQUIRED=2.4.56 +LIBDRM_AMDGPU_REQUIRED=2.4.60 >>> I guess this will need to be changed once the libdrm patches land ? >> >> Yes. >> >>> LIBDRM_INTEL_REQUIRED=2.4.60 LIBDRM_NVVIEUX_REQUIRED=2.4.33 LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41" @@ -2091,6 +2092,7 @@ if test -n "$with_gallium_drivers"; then xr300) HAVE_GALLIUM_R300=yes PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) gallium_require_drm "Gallium R300" gallium_require_drm_loader gallium_require_llvm "Gallium R300" @@ -2098,6 +2100,7 @@ if test -n "$with_gallium_drivers"; then xr600) HAVE_GALLIUM_R600=yes PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) >>> We can drop the above two hunks. >>> gallium_require_drm "Gallium R600" gallium_require_drm_loader if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then @@ -2114,6 +2117,7 @@ if test -n "$with_gallium_drivers"; then xradeonsi) HAVE_GALLIUM_RADEONSI=yes PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) +PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) gallium_require_drm "radeonsi" gallium_require_drm_loader radeon_llvm_check "radeonsi" @@ -2384,6 +2388,7 @@ AC_CONFIG_FILES([Makefile src/gallium/winsys/intel/drm/Makefile src/
Re: [Mesa-dev] [PATCH 03/18] winsys/amdgpu: add a new winsys for the new kernel driver
On 28/04/15 14:28, Marek Olšák wrote: > Hi Emil, > > I think I have fixed everything that you suggested. You can review the > branch here: > > http://cgit.freedesktop.org/~mareko/mesa/log/?h=amdgpu > Looks great. You've even added the new symbol (which I forgot to mention) so that vdpau-gl interop works. Thanks again for going with my suggestions :-) Cheers, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev