Skip to contentSkip to conversation

vc4: Add the DRM header file.

PATCH In review Eric Anholt 4 participants 12 messages Jan 25, 2016 – Jan 28, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 vc4: Add the DRM header file.

I'll build some libdrm C code soon, but for lets libdrm users use vc4 ioctls. Produced from headers_install of 1df59b8497f47495e873c23abd6d3d290c730505 (drm-next) in the kernel.

---
 Makefile.sources      |   1 +
 include/drm/vc4_drm.h | 279 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 280 insertions(+)
 create mode 100644 include/drm/vc4_drm.h
Makefile.sources +1 -0
index a77f48d..1a1f0fe 100644
@@ -32,6 +32,7 @@ LIBDRM_INCLUDE_H_FILES := \
 	include/drm/savage_drm.h \
 	include/drm/sis_drm.h \
 	include/drm/tegra_drm.h \
+	include/drm/vc4_drm.h \
 	include/drm/via_drm.h
 
 LIBDRM_INCLUDE_VMWGFX_H_FILES := \
include/drm/vc4_drm.h new file +279 -0

279 lines not on this page · raw message

Signature · 6 lines
2.6.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/3 util: Add support for vc4.

This lets allows using modetest for overlay plane testing.

---
 tests/util/kms.c | 1 +
 1 file changed, 1 insertion(+)
tests/util/kms.c +1 -0
index 57b0191..4038c36 100644
@@ -139,6 +139,7 @@ static const char * const modules[] = {
 	"imx-drm",
 	"rockchip",
 	"atmel-hlcdc",
+	"vc4",
 };
 
 int util_open(const char *device, const char *module)
Signature · 6 lines
2.6.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

PATCH 3/3 vc4: Add headers and .pc files for VC4 userspace development.

In reply to Eric Anholt

The headers were originally written in Mesa, imported to the kernel, and improved upon in vc4-gpu-tools. These come from the v-g-t copies and will replace the Mesa and v-g-t copies, and hopefully be used from new tests in igt, as well.

---
 Makefile.am           |   6 +
 configure.ac          |  19 +++
 vc4/Makefile.am       |  34 +++++
 vc4/Makefile.sources  |   3 +
 vc4/libdrm_vc4.pc.in  |  11 ++
 vc4/vc4_packet.h      | 397 ++++++++++++++++++++++++++++++++++++++++++++++++++
 vc4/vc4_qpu_defines.h | 274 ++++++++++++++++++++++++++++++++++
 7 files changed, 744 insertions(+)
 create mode 100644 vc4/Makefile.am
 create mode 100644 vc4/Makefile.sources
 create mode 100644 vc4/libdrm_vc4.pc.in
 create mode 100644 vc4/vc4_packet.h
 create mode 100644 vc4/vc4_qpu_defines.h
Makefile.am +6 -0
index ca41508..feecba7 100644
@@ -29,6 +29,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
 	--enable-radeon \
 	--enable-amdgpu \
 	--enable-nouveau \
+	--enable-vc4 \
 	--enable-vmwgfx \
 	--enable-omap-experimental-api \
 	--enable-exynos-experimental-api \
@@ -79,6 +80,10 @@ if HAVE_TEGRA
 TEGRA_SUBDIR = tegra
 endif
 
+if HAVE_VC4
+VC4_SUBDIR = vc4
+endif
+
 if BUILD_MANPAGES
 if HAVE_MANPAGES_STYLESHEET
 MAN_SUBDIR = man
@@ -96,6 +101,7 @@ SUBDIRS = \
 	$(EXYNOS_SUBDIR) \
 	$(FREEDRENO_SUBDIR) \
 	$(TEGRA_SUBDIR) \
+	$(VC4_SUBDIR) \
 	tests \
 	$(MAN_SUBDIR)
 
configure.ac +19 -0
index a09be61..4dc5394 100644
@@ -126,6 +126,11 @@ AC_ARG_ENABLE(tegra-experimental-api,
 	      [Enable support for Tegra's experimental API (default: disabled)]),
 	      [TEGRA=$enableval], [TEGRA=no])
 
+AC_ARG_ENABLE(vc4,
+	      AS_HELP_STRING([--disable-vc4],
+	      [Enable support for vc4's API (default: auto, enabled on arm)]),
+	      [VC4=$enableval], [VC4=auto])
+
 AC_ARG_ENABLE(install-test-programs,
 		  AS_HELP_STRING([--enable-install-test-programs],
 		  [Install test programs (default: no)]),
@@ -290,6 +295,12 @@ else
 			*)		FREEDRENO=no ;;
 		esac
 	fi
+	if test "x$VC4" = xauto; then
+		case $host_cpu in
+			arm*|aarch64)	VC4=yes ;;
+			*)		VC4=no ;;
+		esac
+	fi
 fi
 
 if test "x$INTEL" != "xno"; then
@@ -396,6 +407,11 @@ if test "x$TEGRA" = xyes; then
 	AC_DEFINE(HAVE_TEGRA, 1, [Have Tegra support])
 fi
 
+AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes])
+if test "x$VC4" = xyes; then
+	AC_DEFINE(HAVE_VC4, 1, [Have VC4 support])
+fi
+
 AM_CONDITIONAL(HAVE_INSTALL_TESTS, [test "x$INSTALL_TESTS" = xyes])
 if test "x$INSTALL_TESTS" = xyes; then
 	AC_DEFINE(HAVE_INSTALL_TESTS, 1, [Install test programs])
@@ -505,6 +521,8 @@ AC_CONFIG_FILES([
 	freedreno/libdrm_freedreno.pc
 	tegra/Makefile
 	tegra/libdrm_tegra.pc
+	vc4/Makefile
+	vc4/libdrm_vc4.pc
 	tests/Makefile
 	tests/modeprint/Makefile
 	tests/modetest/Makefile
@@ -535,4 +553,5 @@ echo "  OMAP API       $OMAP"
 echo "  EXYNOS API     $EXYNOS"
 echo "  Freedreno API  $FREEDRENO (kgsl: $FREEDRENO_KGSL)"
 echo "  Tegra API      $TEGRA"
+echo "  VC4 API        $VC4"
 echo ""
vc4/Makefile.am new file +34 -0
new file mode 100644
index 0000000..7e486b4
@@ -0,0 +1,34 @@
+# Copyright © 2016 Broadcom
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+include Makefile.sources
+
+AM_CFLAGS = \
+	$(WARN_CFLAGS) \
+	-I$(top_srcdir) \
+	$(PTHREADSTUBS_CFLAGS) \
+	$(VALGRIND_CFLAGS) \
+	-I$(top_srcdir)/include/drm
+
+libdrm_vc4includedir = ${includedir}/libdrm
+libdrm_vc4include_HEADERS = $(LIBDRM_VC4_H_FILES)
+
+pkgconfig_DATA = libdrm_vc4.pc
vc4/Makefile.sources new file +3 -0
new file mode 100644
index 0000000..8bf97ff
@@ -0,0 +1,3 @@
+LIBDRM_VC4_H_FILES := \
+	vc4_packet.h \
+	vc4_qpu_defines.h
vc4/libdrm_vc4.pc.in new file +11 -0
new file mode 100644
index 0000000..86e23ef
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libdrm_vc4
+Description: Userspace interface to vc4 kernel DRM services
+Version: @PACKAGE_VERSION@
+Requires: libdrm
+Libs: -L${libdir} -ldrm_intel
+Cflags: -I${includedir} -I${includedir}/libdrm
vc4/vc4_packet.h new file +397 -0

397 lines not on this page · raw message

vc4/vc4_qpu_defines.h new file +274 -0

274 lines not on this page · raw message

Signature · 6 lines
2.6.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

Re: [PATCH 3/3] vc4: Add headers and .pc files for VC4 userspace development.

Quoted 10 lines · Eric Anholt

The headers were originally written in Mesa, imported to the kernel, and improved upon in vc4-gpu-tools. These come from the v-g-t copies and will replace the Mesa and v-g-t copies, and hopefully be used from new tests in igt, as well.

---

vc4/libdrm_vc4.pc.in line 10

Quoted 10 lines
vc4/libdrm_vc4.pc.in new file +10 -0
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libdrm_vc4
+Description: Userspace interface to vc4 kernel DRM services
+Version: @PACKAGE_VERSION@
+Requires: libdrm
+Libs: -L${libdir} -ldrm_intel

This probably wants to be -ldrm_vc4? Or nothing if there's no such lib yet?

vc4/libdrm_vc4.pc.in line 11

Quoted 1 line
vc4/libdrm_vc4.pc.in new file +1 -0
+Cflags: -I${includedir} -I${includedir}/libdrm

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Re: [PATCH 3/3] vc4: Add headers and .pc files for VC4 userspace development.

Quoted 15 lines · Ilia Mirkin
Quoted 14 lines · Eric Anholt

The headers were originally written in Mesa, imported to the kernel, and improved upon in vc4-gpu-tools. These come from the v-g-t copies and will replace the Mesa and v-g-t copies, and hopefully be used from new tests in igt, as well.

---

vc4/libdrm_vc4.pc.in new file +4 -0
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
Quoted 8 lines

vc4/libdrm_vc4.pc.in line 10

Quoted 6 lines
vc4/libdrm_vc4.pc.in new file +6 -0
+
+Name: libdrm_vc4
+Description: Userspace interface to vc4 kernel DRM services
+Version: @PACKAGE_VERSION@
+Requires: libdrm
+Libs: -L${libdir} -ldrm_intel

This probably wants to be -ldrm_vc4? Or nothing if there's no such lib yet?

Fixed to be -ldrm until we start building a libdrm_vc4.so.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

Re: [PATCH 3/3] vc4: Add headers and .pc files for VC4 userspace development.

Hi,

Quoted 25 lines · Eric Anholt
Quoted 15 lines · Ilia Mirkin
Quoted 14 lines · Eric Anholt

The headers were originally written in Mesa, imported to the kernel, and improved upon in vc4-gpu-tools. These come from the v-g-t copies and will replace the Mesa and v-g-t copies, and hopefully be used from new tests in igt, as well.

---

vc4/libdrm_vc4.pc.in new file +4 -0
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
Quoted 8 lines

vc4/libdrm_vc4.pc.in line 10

Quoted 6 lines
vc4/libdrm_vc4.pc.in new file +6 -0
+
+Name: libdrm_vc4
+Description: Userspace interface to vc4 kernel DRM services
+Version: @PACKAGE_VERSION@
+Requires: libdrm
+Libs: -L${libdir} -ldrm_intel

This probably wants to be -ldrm_vc4? Or nothing if there's no such lib yet?

Quoted 1 line

Fixed to be -ldrm until we start building a libdrm_vc4.so.

The Requires will take care of that, so you can just bin the entire 'Libs:' field until you need one:

[line breaks inserted for clarity]
strictly:~/tmp/pc% cat foo.pc bar.pc && PKG_CONFIG_PATH=. pkg-config --libs foo
Name: foo
Version: 1
Description: Nothing, but includes bar
Requires: bar

Name: bar
Description: An actual thing
Version: 1
Libs: -L/bar -lbar

-L/bar -lbar

Cheers,
Daniel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

Re: [PATCH 3/3] vc4: Add headers and .pc files for VC4 userspace development.

Quoted 28 lines · Daniel Stone

Hi,

Quoted 25 lines · Eric Anholt
Quoted 23 lines · Ilia Mirkin
Quoted 10 lines · Eric Anholt

The headers were originally written in Mesa, imported to the kernel, and improved upon in vc4-gpu-tools. These come from the v-g-t copies and will replace the Mesa and v-g-t copies, and hopefully be used from new tests in igt, as well.

---

vc4/libdrm_vc4.pc.in line 10

Quoted 10 lines
vc4/libdrm_vc4.pc.in new file +10 -0
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libdrm_vc4
+Description: Userspace interface to vc4 kernel DRM services
+Version: @PACKAGE_VERSION@
+Requires: libdrm
+Libs: -L${libdir} -ldrm_intel

This probably wants to be -ldrm_vc4? Or nothing if there's no such lib yet?

Quoted 5 lines
Quoted 1 line

Fixed to be -ldrm until we start building a libdrm_vc4.so.

The Requires will take care of that, so you can just bin the entire 'Libs:' field until you need one:

In theory this will be sufficient, but Eric wasn't buying it [1] :'-(. He's main consern (if I understood him correctly) is to stay consistent with the existing libdrm_* providers, regardless if things look a bit quirky.

-Emil

[1] http://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&show_html=true&highlight_names=&date=2016-01-26
@13:22 onwards
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

Re: [PATCH 3/3] vc4: Add headers and .pc files for VC4 userspace development.

Hi,

Quoted 8 lines · Emil Velikov
Quoted 3 lines · Daniel Stone

The Requires will take care of that, so you can just bin the entire 'Libs:' field until you need one:

In theory this will be sufficient, but Eric wasn't buying it [1] :'-(. He's main consern (if I understood him correctly) is to stay consistent with the existing libdrm_* providers, regardless if things look a bit quirky.

I suspect he was missing that 'Requires' also pulls in the relevant flags from those libraries, so PKG_CHECK_MODULES(DRM_VC4, [libdrm-vc4]) is equivalent to PKG_CHECK_MODULES(DRM_VC4, [libdrm libdrm-vc4]), if libdrm-vc4.pc has 'Requires: libdrm'.

Cheers,
Daniel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

Re: [PATCH 3/3] vc4: Add headers and .pc files for VC4 userspace development.

Quoted 12 lines · Daniel Stone

Hi,

Quoted 8 lines · Emil Velikov
Quoted 3 lines · Daniel Stone

The Requires will take care of that, so you can just bin the entire 'Libs:' field until you need one:

In theory this will be sufficient, but Eric wasn't buying it [1] :'-(. He's main consern (if I understood him correctly) is to stay consistent with the existing libdrm_* providers, regardless if things look a bit quirky.

Quoted 4 lines

I suspect he was missing that 'Requires' also pulls in the relevant flags from those libraries, so PKG_CHECK_MODULES(DRM_VC4, [libdrm-vc4]) is equivalent to PKG_CHECK_MODULES(DRM_VC4, [libdrm libdrm-vc4]), if libdrm-vc4.pc has 'Requires: libdrm'.

What I heard Emil arguing to me was that a pkg-config request for --libs From libdrm_vc4 shouldn't link against libdrm. I'm fine with dropping Libs and Cflags, as long as we still link libdrm like normal. This all seems like pointless bikeshedding, though.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw

Re: [PATCH 3/3] vc4: Add headers and .pc files for VC4 userspace development.

Quoted 19 lines · Eric Anholt
Quoted 12 lines · Daniel Stone

Hi,

Quoted 8 lines · Emil Velikov
Quoted 3 lines · Daniel Stone

The Requires will take care of that, so you can just bin the entire 'Libs:' field until you need one:

In theory this will be sufficient, but Eric wasn't buying it [1] :'-(. He's main consern (if I understood him correctly) is to stay consistent with the existing libdrm_* providers, regardless if things look a bit quirky.

Quoted 4 lines

I suspect he was missing that 'Requires' also pulls in the relevant flags from those libraries, so PKG_CHECK_MODULES(DRM_VC4, [libdrm-vc4]) is equivalent to PKG_CHECK_MODULES(DRM_VC4, [libdrm libdrm-vc4]), if libdrm-vc4.pc has 'Requires: libdrm'.

Quoted 4 lines

What I heard Emil arguing to me was that a pkg-config request for --libs From libdrm_vc4 shouldn't link against libdrm. I'm fine with dropping Libs and Cflags, as long as we still link libdrm like normal. This all seems like pointless bikeshedding, though.

I was arguing about using best practises - do not overlink (or transient deps as known by cmake folks). It's unfortunate that you dismiss it, and effectively the work of dozens on the topic, as bike-shedding :-(

Then again, if your mind it set - so be it. I never meant to offend/alienate you.

Sorry if I came out too harsh.
Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw

PATCH v3 3/3 vc4: Add headers and .pc files for VC4 userspace development.

In reply to Daniel Stone

The headers were originally written in Mesa, imported to the kernel, and improved upon in vc4-gpu-tools. These come from the v-g-t copies and will replace the Mesa and v-g-t copies, and hopefully be used from new tests in igt, as well.

v2: Fix linking against libdrm_intel instead of libdrm.
v3: Drop Libs and Cflags since they'll be inherited from libdrm.

---
 Makefile.am           |   6 +
 configure.ac          |  19 +++
 vc4/Makefile.am       |  34 +++++
 vc4/Makefile.sources  |   3 +
 vc4/libdrm_vc4.pc.in  |  11 ++
 vc4/vc4_packet.h      | 397 ++++++++++++++++++++++++++++++++++++++++++++++++++
 vc4/vc4_qpu_defines.h | 274 ++++++++++++++++++++++++++++++++++
 7 files changed, 744 insertions(+)
 create mode 100644 vc4/Makefile.am
 create mode 100644 vc4/Makefile.sources
 create mode 100644 vc4/libdrm_vc4.pc.in
 create mode 100644 vc4/vc4_packet.h
 create mode 100644 vc4/vc4_qpu_defines.h
Makefile.am +6 -0
index ca41508..feecba7 100644
@@ -29,6 +29,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
 	--enable-radeon \
 	--enable-amdgpu \
 	--enable-nouveau \
+	--enable-vc4 \
 	--enable-vmwgfx \
 	--enable-omap-experimental-api \
 	--enable-exynos-experimental-api \
@@ -79,6 +80,10 @@ if HAVE_TEGRA
 TEGRA_SUBDIR = tegra
 endif
 
+if HAVE_VC4
+VC4_SUBDIR = vc4
+endif
+
 if BUILD_MANPAGES
 if HAVE_MANPAGES_STYLESHEET
 MAN_SUBDIR = man
@@ -96,6 +101,7 @@ SUBDIRS = \
 	$(EXYNOS_SUBDIR) \
 	$(FREEDRENO_SUBDIR) \
 	$(TEGRA_SUBDIR) \
+	$(VC4_SUBDIR) \
 	tests \
 	$(MAN_SUBDIR)
 
configure.ac +19 -0
index a09be61..4dc5394 100644
@@ -126,6 +126,11 @@ AC_ARG_ENABLE(tegra-experimental-api,
 	      [Enable support for Tegra's experimental API (default: disabled)]),
 	      [TEGRA=$enableval], [TEGRA=no])
 
+AC_ARG_ENABLE(vc4,
+	      AS_HELP_STRING([--disable-vc4],
+	      [Enable support for vc4's API (default: auto, enabled on arm)]),
+	      [VC4=$enableval], [VC4=auto])
+
 AC_ARG_ENABLE(install-test-programs,
 		  AS_HELP_STRING([--enable-install-test-programs],
 		  [Install test programs (default: no)]),
@@ -290,6 +295,12 @@ else
 			*)		FREEDRENO=no ;;
 		esac
 	fi
+	if test "x$VC4" = xauto; then
+		case $host_cpu in
+			arm*|aarch64)	VC4=yes ;;
+			*)		VC4=no ;;
+		esac
+	fi
 fi
 
 if test "x$INTEL" != "xno"; then
@@ -396,6 +407,11 @@ if test "x$TEGRA" = xyes; then
 	AC_DEFINE(HAVE_TEGRA, 1, [Have Tegra support])
 fi
 
+AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes])
+if test "x$VC4" = xyes; then
+	AC_DEFINE(HAVE_VC4, 1, [Have VC4 support])
+fi
+
 AM_CONDITIONAL(HAVE_INSTALL_TESTS, [test "x$INSTALL_TESTS" = xyes])
 if test "x$INSTALL_TESTS" = xyes; then
 	AC_DEFINE(HAVE_INSTALL_TESTS, 1, [Install test programs])
@@ -505,6 +521,8 @@ AC_CONFIG_FILES([
 	freedreno/libdrm_freedreno.pc
 	tegra/Makefile
 	tegra/libdrm_tegra.pc
+	vc4/Makefile
+	vc4/libdrm_vc4.pc
 	tests/Makefile
 	tests/modeprint/Makefile
 	tests/modetest/Makefile
@@ -535,4 +553,5 @@ echo "  OMAP API       $OMAP"
 echo "  EXYNOS API     $EXYNOS"
 echo "  Freedreno API  $FREEDRENO (kgsl: $FREEDRENO_KGSL)"
 echo "  Tegra API      $TEGRA"
+echo "  VC4 API        $VC4"
 echo ""
vc4/Makefile.am new file +34 -0
new file mode 100644
index 0000000..7e486b4
@@ -0,0 +1,34 @@
+# Copyright © 2016 Broadcom
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+include Makefile.sources
+
+AM_CFLAGS = \
+	$(WARN_CFLAGS) \
+	-I$(top_srcdir) \
+	$(PTHREADSTUBS_CFLAGS) \
+	$(VALGRIND_CFLAGS) \
+	-I$(top_srcdir)/include/drm
+
+libdrm_vc4includedir = ${includedir}/libdrm
+libdrm_vc4include_HEADERS = $(LIBDRM_VC4_H_FILES)
+
+pkgconfig_DATA = libdrm_vc4.pc
vc4/Makefile.sources new file +3 -0
new file mode 100644
index 0000000..8bf97ff
@@ -0,0 +1,3 @@
+LIBDRM_VC4_H_FILES := \
+	vc4_packet.h \
+	vc4_qpu_defines.h
vc4/libdrm_vc4.pc.in new file +11 -0
new file mode 100644
index 0000000..2fb74f6
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libdrm_vc4
+Description: Userspace interface to vc4 kernel DRM services
+Version: @PACKAGE_VERSION@
+Requires: libdrm
+Libs: -L${libdir} -ldrm
+Cflags: -I${includedir} -I${includedir}/libdrm
vc4/vc4_packet.h new file +397 -0

397 lines not on this page · raw message

vc4/vc4_qpu_defines.h new file +274 -0

274 lines not on this page · raw message

Signature · 6 lines
2.6.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#11 lore raw

PATCH 1/1 vc4: Add headers and .pc files for VC4 userspace development.

In reply to Daniel Stone

The headers were originally written in Mesa, imported to the kernel, and improved upon in vc4-gpu-tools. These come from the v-g-t copies and will replace the Mesa and v-g-t copies, and hopefully be used from new tests in igt, as well.

v2: Fix linking against libdrm_intel instead of libdrm.
v3: Drop Libs and Cflags since they'll be inherited from libdrm.

---

Resend with git commit --amend actually done.

 Makefile.am           |   6 +
 configure.ac          |  19 +++
 vc4/Makefile.am       |  34 +++++
 vc4/Makefile.sources  |   3 +
 vc4/libdrm_vc4.pc.in  |   9 ++
 vc4/vc4_packet.h      | 397 ++++++++++++++++++++++++++++++++++++++++++++++++++
 vc4/vc4_qpu_defines.h | 274 ++++++++++++++++++++++++++++++++++
 7 files changed, 742 insertions(+)
 create mode 100644 vc4/Makefile.am
 create mode 100644 vc4/Makefile.sources
 create mode 100644 vc4/libdrm_vc4.pc.in
 create mode 100644 vc4/vc4_packet.h
 create mode 100644 vc4/vc4_qpu_defines.h
Makefile.am +6 -0
index ca41508..feecba7 100644
@@ -29,6 +29,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
 	--enable-radeon \
 	--enable-amdgpu \
 	--enable-nouveau \
+	--enable-vc4 \
 	--enable-vmwgfx \
 	--enable-omap-experimental-api \
 	--enable-exynos-experimental-api \
@@ -79,6 +80,10 @@ if HAVE_TEGRA
 TEGRA_SUBDIR = tegra
 endif
 
+if HAVE_VC4
+VC4_SUBDIR = vc4
+endif
+
 if BUILD_MANPAGES
 if HAVE_MANPAGES_STYLESHEET
 MAN_SUBDIR = man
@@ -96,6 +101,7 @@ SUBDIRS = \
 	$(EXYNOS_SUBDIR) \
 	$(FREEDRENO_SUBDIR) \
 	$(TEGRA_SUBDIR) \
+	$(VC4_SUBDIR) \
 	tests \
 	$(MAN_SUBDIR)
 
configure.ac +19 -0
index a09be61..4dc5394 100644
@@ -126,6 +126,11 @@ AC_ARG_ENABLE(tegra-experimental-api,
 	      [Enable support for Tegra's experimental API (default: disabled)]),
 	      [TEGRA=$enableval], [TEGRA=no])
 
+AC_ARG_ENABLE(vc4,
+	      AS_HELP_STRING([--disable-vc4],
+	      [Enable support for vc4's API (default: auto, enabled on arm)]),
+	      [VC4=$enableval], [VC4=auto])
+
 AC_ARG_ENABLE(install-test-programs,
 		  AS_HELP_STRING([--enable-install-test-programs],
 		  [Install test programs (default: no)]),
@@ -290,6 +295,12 @@ else
 			*)		FREEDRENO=no ;;
 		esac
 	fi
+	if test "x$VC4" = xauto; then
+		case $host_cpu in
+			arm*|aarch64)	VC4=yes ;;
+			*)		VC4=no ;;
+		esac
+	fi
 fi
 
 if test "x$INTEL" != "xno"; then
@@ -396,6 +407,11 @@ if test "x$TEGRA" = xyes; then
 	AC_DEFINE(HAVE_TEGRA, 1, [Have Tegra support])
 fi
 
+AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes])
+if test "x$VC4" = xyes; then
+	AC_DEFINE(HAVE_VC4, 1, [Have VC4 support])
+fi
+
 AM_CONDITIONAL(HAVE_INSTALL_TESTS, [test "x$INSTALL_TESTS" = xyes])
 if test "x$INSTALL_TESTS" = xyes; then
 	AC_DEFINE(HAVE_INSTALL_TESTS, 1, [Install test programs])
@@ -505,6 +521,8 @@ AC_CONFIG_FILES([
 	freedreno/libdrm_freedreno.pc
 	tegra/Makefile
 	tegra/libdrm_tegra.pc
+	vc4/Makefile
+	vc4/libdrm_vc4.pc
 	tests/Makefile
 	tests/modeprint/Makefile
 	tests/modetest/Makefile
@@ -535,4 +553,5 @@ echo "  OMAP API       $OMAP"
 echo "  EXYNOS API     $EXYNOS"
 echo "  Freedreno API  $FREEDRENO (kgsl: $FREEDRENO_KGSL)"
 echo "  Tegra API      $TEGRA"
+echo "  VC4 API        $VC4"
 echo ""
vc4/Makefile.am new file +34 -0
new file mode 100644
index 0000000..7e486b4
@@ -0,0 +1,34 @@
+# Copyright © 2016 Broadcom
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+include Makefile.sources
+
+AM_CFLAGS = \
+	$(WARN_CFLAGS) \
+	-I$(top_srcdir) \
+	$(PTHREADSTUBS_CFLAGS) \
+	$(VALGRIND_CFLAGS) \
+	-I$(top_srcdir)/include/drm
+
+libdrm_vc4includedir = ${includedir}/libdrm
+libdrm_vc4include_HEADERS = $(LIBDRM_VC4_H_FILES)
+
+pkgconfig_DATA = libdrm_vc4.pc
vc4/Makefile.sources new file +3 -0
new file mode 100644
index 0000000..8bf97ff
@@ -0,0 +1,3 @@
+LIBDRM_VC4_H_FILES := \
+	vc4_packet.h \
+	vc4_qpu_defines.h
vc4/libdrm_vc4.pc.in new file +9 -0
new file mode 100644
index 0000000..241c73e
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libdrm_vc4
+Description: Userspace interface to vc4 kernel DRM services
+Version: @PACKAGE_VERSION@
+Requires: libdrm
vc4/vc4_packet.h new file +397 -0

397 lines not on this page · raw message

vc4/vc4_qpu_defines.h new file +274 -0

274 lines not on this page · raw message

Signature · 6 lines
2.6.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel