Skip to contentSkip to conversation

Add renderonly gpu support

RFC In review Christian Gmeiner 1 participant 4 messages Oct 9, 2015 – Oct 11, 2015 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

cover Add renderonly gpu support

This patch set introduces a more generic renderonly driver library based on "[RFC] tegra: Initial support" [0] from Thierry Reding.

I am re-using almost all of the existing code and extended it with a struct renderonly_ops, which defines the wanted behavior for the target hardware.

There are two different usage patterns, which are supported.
1) Set a required tiling on the scanout buffer (tegra)
2) Use an intermediate buffer and blit to dumb buffer (imx)

The setup of struct renderonly_ops happens in winsys. So it is possible to support different configurations for different versions of an IP core, which are using the same KMS driver.

I really hope to get some feedback as the bare metal EGL use case is important as not everyone runs a compositor, which understands rendernodes.

This patch set was successfully tested on tegra and imx-drm (etnaviv based) and runs kmscube.

The patch set is available directly via git:
https://github.com/austriancoder/mesa.git branch renderonly-rfc-1

[0] http://lists.freedesktop.org/archives/mesa-dev/2014-November/071521.html

Christian Gmeiner (2):
gallium: add renderonly driver
gallium: add tegra support

 configure.ac                                       |  20 +-
 src/gallium/Makefile.am                            |   6 +
 .../auxiliary/target-helpers/inline_drm_helper.h   |  29 +
 src/gallium/drivers/renderonly/Makefile.am         |  11 +
 src/gallium/drivers/renderonly/Makefile.sources    |   4 +
 .../drivers/renderonly/renderonly_context.c        | 721 +++++++++++++++++++++
 .../drivers/renderonly/renderonly_context.h        |  80 +++
 .../drivers/renderonly/renderonly_resource.c       | 296 +++++++++
 .../drivers/renderonly/renderonly_resource.h       | 101 +++
 src/gallium/drivers/renderonly/renderonly_screen.c | 178 +++++
 src/gallium/drivers/renderonly/renderonly_screen.h |  55 ++
 src/gallium/drivers/tegra/Automake.inc             |  10 +
 src/gallium/drivers/tegra/Makefile.am              |   9 +
 src/gallium/targets/dri/Makefile.am                |   2 +
 src/gallium/winsys/tegra/drm/Android.mk            |  34 +
 src/gallium/winsys/tegra/drm/Makefile.am           |  33 +
 src/gallium/winsys/tegra/drm/Makefile.sources      |   3 +
 src/gallium/winsys/tegra/drm/tegra_drm_public.h    |  31 +
 src/gallium/winsys/tegra/drm/tegra_drm_winsys.c    |  51 ++
 19 files changed, 1673 insertions(+), 1 deletion(-)
 create mode 100644 src/gallium/drivers/renderonly/Makefile.am
 create mode 100644 src/gallium/drivers/renderonly/Makefile.sources
 create mode 100644 src/gallium/drivers/renderonly/renderonly_context.c
 create mode 100644 src/gallium/drivers/renderonly/renderonly_context.h
 create mode 100644 src/gallium/drivers/renderonly/renderonly_resource.c
 create mode 100644 src/gallium/drivers/renderonly/renderonly_resource.h
 create mode 100644 src/gallium/drivers/renderonly/renderonly_screen.c
 create mode 100644 src/gallium/drivers/renderonly/renderonly_screen.h
 create mode 100644 src/gallium/drivers/tegra/Automake.inc
 create mode 100644 src/gallium/drivers/tegra/Makefile.am
 create mode 100644 src/gallium/winsys/tegra/drm/Android.mk
 create mode 100644 src/gallium/winsys/tegra/drm/Makefile.am
 create mode 100644 src/gallium/winsys/tegra/drm/Makefile.sources
 create mode 100644 src/gallium/winsys/tegra/drm/tegra_drm_public.h
 create mode 100644 src/gallium/winsys/tegra/drm/tegra_drm_winsys.c
Signature · 6 lines
2.4.3

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

RFC 1/2 gallium: add renderonly driver

This commit adds a generic renderonly driver library, which fullfille the requirements for tegra and etnaviv. As a result it is possible to run unmodified egl software directly (without any compositor) on supported devices.

In every use case we import a dumb buffer from scanout gpu into the renderonly gpu.

If the scanout hardware does support the used tiling format from the renderonly gpu, a driver can define a function which is used to 'setup' the needed tiling on that imported buffer. This functions gets called during rendertarget resource creation.

If the scanout hardware does not support the used tiling format we need to create an extra rendertarget resource for the renderonly gpu. During XXX we blit the renderonly rendertarget onto the imported dumb buffer.

We assume that the renderonly driver provides a blit function that is capable of resolving the tilied into untiled one.

---
 configure.ac                                       |   1 +
 src/gallium/drivers/renderonly/Makefile.am         |  11 +
 src/gallium/drivers/renderonly/Makefile.sources    |   4 +
 .../drivers/renderonly/renderonly_context.c        | 721 +++++++++++++++++++++
 .../drivers/renderonly/renderonly_context.h        |  80 +++
 .../drivers/renderonly/renderonly_resource.c       | 296 +++++++++
 .../drivers/renderonly/renderonly_resource.h       | 101 +++
 src/gallium/drivers/renderonly/renderonly_screen.c | 178 +++++
 src/gallium/drivers/renderonly/renderonly_screen.h |  55 ++
 9 files changed, 1447 insertions(+)
 create mode 100644 src/gallium/drivers/renderonly/Makefile.am
 create mode 100644 src/gallium/drivers/renderonly/Makefile.sources
 create mode 100644 src/gallium/drivers/renderonly/renderonly_context.c
 create mode 100644 src/gallium/drivers/renderonly/renderonly_context.h
 create mode 100644 src/gallium/drivers/renderonly/renderonly_resource.c
 create mode 100644 src/gallium/drivers/renderonly/renderonly_resource.h
 create mode 100644 src/gallium/drivers/renderonly/renderonly_screen.c
 create mode 100644 src/gallium/drivers/renderonly/renderonly_screen.h
configure.ac +1 -0
index 217281f..ea485b1 100644
@@ -2361,6 +2361,7 @@ AC_CONFIG_FILES([Makefile
 		src/gallium/drivers/radeon/Makefile
 		src/gallium/drivers/radeonsi/Makefile
 		src/gallium/drivers/rbug/Makefile
+		src/gallium/drivers/renderonly/Makefile
 		src/gallium/drivers/softpipe/Makefile
 		src/gallium/drivers/svga/Makefile
 		src/gallium/drivers/trace/Makefile
src/gallium/drivers/renderonly/Makefile.am new file +11 -0
new file mode 100644
index 0000000..ff9041b
@@ -0,0 +1,11 @@
+include Makefile.sources
+include $(top_srcdir)/src/gallium/Automake.inc
+
+AM_CPPFLAGS = \
+	$(LIBDRM_CFLAGS) \
+	$(GALLIUM_CFLAGS)
+
+noinst_LTLIBRARIES = librenderonly.la
+
+librenderonly_la_SOURCES = \
+	$(C_SOURCES)
src/gallium/drivers/renderonly/Makefile.sources new file +4 -0
new file mode 100644
index 0000000..6262a70
@@ -0,0 +1,4 @@
+C_SOURCES := \
+	renderonly_context.c \
+	renderonly_resource.c \
+	renderonly_screen.c
src/gallium/drivers/renderonly/renderonly_context.c new file +721 -0

721 lines not on this page · raw message

src/gallium/drivers/renderonly/renderonly_context.h new file +80 -0

80 lines not on this page · raw message

src/gallium/drivers/renderonly/renderonly_resource.c new file +296 -0

296 lines not on this page · raw message

src/gallium/drivers/renderonly/renderonly_resource.h new file +101 -0

101 lines not on this page · raw message

src/gallium/drivers/renderonly/renderonly_screen.c new file +178 -0

178 lines not on this page · raw message

src/gallium/drivers/renderonly/renderonly_screen.h new file +55 -0

55 lines not on this page · raw message

Signature · 6 lines
2.4.3

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

RFC 2/2 gallium: add tegra support

In reply to Christian Gmeiner

This commit adds tegra support, which uses the renderonly driver library.

---
 configure.ac                                       | 19 +++++++-
 src/gallium/Makefile.am                            |  6 +++
 .../auxiliary/target-helpers/inline_drm_helper.h   | 29 ++++++++++++
 src/gallium/drivers/tegra/Automake.inc             | 10 +++++
 src/gallium/drivers/tegra/Makefile.am              |  9 ++++
 src/gallium/targets/dri/Makefile.am                |  2 +
 src/gallium/winsys/tegra/drm/Android.mk            | 34 +++++++++++++++
 src/gallium/winsys/tegra/drm/Makefile.am           | 33 ++++++++++++++
 src/gallium/winsys/tegra/drm/Makefile.sources      |  3 ++
 src/gallium/winsys/tegra/drm/tegra_drm_public.h    | 31 +++++++++++++
 src/gallium/winsys/tegra/drm/tegra_drm_winsys.c    | 51 ++++++++++++++++++++++
 11 files changed, 226 insertions(+), 1 deletion(-)
 create mode 100644 src/gallium/drivers/tegra/Automake.inc
 create mode 100644 src/gallium/drivers/tegra/Makefile.am
 create mode 100644 src/gallium/winsys/tegra/drm/Android.mk
 create mode 100644 src/gallium/winsys/tegra/drm/Makefile.am
 create mode 100644 src/gallium/winsys/tegra/drm/Makefile.sources
 create mode 100644 src/gallium/winsys/tegra/drm/tegra_drm_public.h
 create mode 100644 src/gallium/winsys/tegra/drm/tegra_drm_winsys.c
configure.ac +18 -1
index ea485b1..9fb8244 100644
@@ -75,6 +75,7 @@ LIBDRM_INTEL_REQUIRED=2.4.61
 LIBDRM_NVVIEUX_REQUIRED=2.4.33
 LIBDRM_NOUVEAU_REQUIRED=2.4.62
 LIBDRM_FREEDRENO_REQUIRED=2.4.65
+LIBDRM_TEGRA_REQUIRED=2.4.58
 DRI2PROTO_REQUIRED=2.6
 DRI3PROTO_REQUIRED=1.0
 PRESENTPROTO_REQUIRED=1.0
@@ -864,7 +865,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,vc4"
+        "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,tegra,vc4"
         @<:@default=r300,r600,svga,swrast@:>@])],
     [with_gallium_drivers="$withval"],
     [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
@@ -2166,6 +2167,12 @@ if test -n "$with_gallium_drivers"; then
                 HAVE_GALLIUM_LLVMPIPE=yes
             fi
             ;;
+        xtegra)
+            HAVE_GALLIUM_TEGRA=yes
+            PKG_CHECK_MODULES([TEGRA], [libdrm_tegra >= $LIBDRM_TEGRA_REQUIRED])
+            gallium_require_drm "tegra"
+            gallium_require_drm_loader
+            ;;
         xvc4)
             HAVE_GALLIUM_VC4=yes
             gallium_require_drm "vc4"
@@ -2181,6 +2188,13 @@ if test -n "$with_gallium_drivers"; then
     done
 fi
 
+dnl We need to validate some needed dependencies for renderonly drivers.
+
+if test "x$HAVE_GALLIUM_NOUVEAU" != xyes -a "x$HAVE_GALLIUM_TEGRA" == xyes  ; then
+    AC_ERROR([Building with tegra requires that nouveau])
+fi
+
+
 dnl Set LLVM_LIBS - This is done after the driver configuration so
 dnl that drivers can add additional components to LLVM_COMPONENTS.
 dnl Previously, gallium drivers were updating LLVM_LIBS directly
@@ -2245,6 +2259,7 @@ 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(HAVE_GALLIUM_TEGRA, test "x$HAVE_GALLIUM_TEGRA" = xyes)
 
 AM_CONDITIONAL(HAVE_GALLIUM_STATIC_TARGETS, test "x$enable_shared_pipe_drivers" = xno)
 
@@ -2364,6 +2379,7 @@ AC_CONFIG_FILES([Makefile
 		src/gallium/drivers/renderonly/Makefile
 		src/gallium/drivers/softpipe/Makefile
 		src/gallium/drivers/svga/Makefile
+		src/gallium/drivers/tegra/Makefile
 		src/gallium/drivers/trace/Makefile
 		src/gallium/drivers/vc4/Makefile
 		src/gallium/state_trackers/clover/Makefile
@@ -2406,6 +2422,7 @@ AC_CONFIG_FILES([Makefile
 		src/gallium/winsys/sw/wrapper/Makefile
 		src/gallium/winsys/sw/xlib/Makefile
 		src/gallium/winsys/vc4/drm/Makefile
+		src/gallium/winsys/tegra/drm/Makefile
 		src/gbm/Makefile
 		src/gbm/main/gbm.pc
 		src/glsl/Makefile
src/gallium/Makefile.am +6 -0
index a7c3606..7278300 100644
@@ -82,6 +82,12 @@ if HAVE_GALLIUM_VC4
 SUBDIRS += drivers/vc4 winsys/vc4/drm
 endif
 
+## tegra
+if HAVE_GALLIUM_TEGRA
+SUBDIRS += drivers/tegra winsys/tegra/drm
+SUBDIRS += drivers/renderonly
+endif
+
 ## the sw winsys'
 SUBDIRS += winsys/sw/null
 
src/gallium/auxiliary/target-helpers/inline_drm_helper.h +29 -0
index 08271a7..92fe66b 100644
@@ -59,6 +59,10 @@
 #include "vc4/drm/vc4_drm_public.h"
 #endif
 
+#if GALLIUM_TEGRA
+#include "tegra/drm/tegra_drm_public.h"
+#endif
+
 static char* driver_name = NULL;
 
 /* XXX: We need to teardown the winsys if *screen_create() fails. */
@@ -338,6 +342,26 @@ pipe_vc4_create_screen(int fd)
 }
 #endif
 
+#if defined(GALLIUM_TEGRA)
+#if defined(DRI_TARGET)
+const __DRIextension **__driDriverGetExtensions_tegra(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_tegra(void)
+{
+   globalDriverAPI = &galliumdrm_driver_api;
+   return galliumdrm_driver_extensions;
+}
+#endif
+
+static struct pipe_screen *pipe_tegra_create_screen(int fd)
+{
+   struct pipe_screen *screen;
+
+   screen = tegra_drm_screen_create(fd);
+   return screen ? debug_screen_wrap(screen) : NULL;
+}
+#endif
+
 inline struct pipe_screen *
 dd_create_screen(int fd)
 {
@@ -395,6 +419,11 @@ dd_create_screen(int fd)
    else
 #endif
 #endif
+#if defined(GALLIUM_TEGRA)
+   if (strcmp(driver_name, "tegra") == 0)
+      return pipe_tegra_create_screen(fd);
+   else
+#endif
       return NULL;
 }
 
src/gallium/drivers/tegra/Automake.inc new file +10 -0
new file mode 100644
index 0000000..3471445
@@ -0,0 +1,10 @@
+if HAVE_GALLIUM_TEGRA
+
+TARGET_DRIVERS += tegra
+TARGET_CPPFLAGS += -DGALLIUM_TEGRA
+TARGET_LIB_DEPS += \
+	$(top_builddir)/src/gallium/drivers/renderonly/librenderonly.la \
+	$(top_builddir)/src/gallium/winsys/tegra/drm/libtegradrm.la \
+	$(LIBDRM_LIBS)
+
+endif
src/gallium/drivers/tegra/Makefile.am new file +9 -0
new file mode 100644
index 0000000..30f4689
@@ -0,0 +1,9 @@
+include $(top_srcdir)/src/gallium/Automake.inc
+
+AM_CPPFLAGS = \
+	$(GALLIUM_CFLAGS) \
+	$(TEGRA_CFLAGS)
+
+noinst_LTLIBRARIES = libtegra.la
+
+libtegra_la_SOURCES =
src/gallium/targets/dri/Makefile.am +2 -0
index 7f945d1..5beca6c 100644
@@ -83,6 +83,8 @@ include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
 
 include $(top_srcdir)/src/gallium/drivers/vc4/Automake.inc
 
+include $(top_srcdir)/src/gallium/drivers/tegra/Automake.inc
+
 include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc
 include $(top_srcdir)/src/gallium/drivers/llvmpipe/Automake.inc
 
src/gallium/winsys/tegra/drm/Android.mk new file +34 -0
new file mode 100644
index 0000000..65add16
@@ -0,0 +1,34 @@
+# Copyright (C) 2014 Emil Velikov <[email protected]>
+#
+# 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 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.
+
+LOCAL_PATH := $(call my-dir)
+
+# get C_SOURCES
+include $(LOCAL_PATH)/Makefile.sources
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(C_SOURCES)
+
+LOCAL_SHARED_LIBRARIES := libdrm libdrm_tegra
+LOCAL_MODULE := libmesa_winsys_tegra
+
+include $(GALLIUM_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
src/gallium/winsys/tegra/drm/Makefile.am new file +33 -0
new file mode 100644
index 0000000..39068fe
@@ -0,0 +1,33 @@
+# Copyright © 2012 Intel Corporation
+#
+# 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
+include $(top_srcdir)/src/gallium/Automake.inc
+
+AM_CFLAGS = \
+	-I$(top_srcdir)/src/gallium/drivers \
+	$(GALLIUM_WINSYS_CFLAGS) \
+	$(TEGRA_CFLAGS)
+
+noinst_LTLIBRARIES = libtegradrm.la
+
+libtegradrm_la_SOURCES = $(C_SOURCES)
src/gallium/winsys/tegra/drm/Makefile.sources new file +3 -0
new file mode 100644
index 0000000..29a0edc
@@ -0,0 +1,3 @@
+C_SOURCES := \
+	tegra_drm_public.h \
+	tegra_drm_winsys.c
src/gallium/winsys/tegra/drm/tegra_drm_public.h new file +31 -0
new file mode 100644
index 0000000..b689b72
@@ -0,0 +1,31 @@
+/*
+ * Copyright © 2014 NVIDIA Corporation
+ *
+ * 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.
+ */
+
+#ifndef __TEGRA_DRM_PUBLIC_H__
+#define __TEGRA_DRM_PUBLIC_H__
+
+struct pipe_screen;
+
+struct pipe_screen *tegra_drm_screen_create(int fd);
+
+#endif /* __TEGRA_DRM_PUBLIC_H__ */
\ No newline at end of file
src/gallium/winsys/tegra/drm/tegra_drm_winsys.c new file +51 -0

51 lines not on this page · raw message

Signature · 6 lines
2.4.3

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

Ignore this series - it hit accidentally the wrong mailing list.

--
Christian Gmeiner
Am 09.10.2015 6:58 nachm. schrieb "Christian Gmeiner" < [email protected]>:

Quoted 69 lines

This patch set introduces a more generic renderonly driver library based on "[RFC] tegra: Initial support" [0] from Thierry Reding.

I am re-using almost all of the existing code and extended it with a struct renderonly_ops, which defines the wanted behavior for the target hardware.

There are two different usage patterns, which are supported.
1) Set a required tiling on the scanout buffer (tegra)
2) Use an intermediate buffer and blit to dumb buffer (imx)

The setup of struct renderonly_ops happens in winsys. So it is possible to support different configurations for different versions of an IP core, which are using the same KMS driver.

I really hope to get some feedback as the bare metal EGL use case is important
as not everyone runs a compositor, which understands rendernodes.

This patch set was successfully tested on tegra and imx-drm (etnaviv based) and runs kmscube.

The patch set is available directly via git:
https://github.com/austriancoder/mesa.git branch renderonly-rfc-1

[0]
http://lists.freedesktop.org/archives/mesa-dev/2014-November/071521.html

Christian Gmeiner (2):
gallium: add renderonly driver
gallium: add tegra support

 configure.ac                                       |  20 +-
 src/gallium/Makefile.am                            |   6 +
 .../auxiliary/target-helpers/inline_drm_helper.h   |  29 +
 src/gallium/drivers/renderonly/Makefile.am         |  11 +
 src/gallium/drivers/renderonly/Makefile.sources    |   4 +
 .../drivers/renderonly/renderonly_context.c        | 721
+++++++++++++++++++++
 .../drivers/renderonly/renderonly_context.h        |  80 +++
 .../drivers/renderonly/renderonly_resource.c       | 296 +++++++++
 .../drivers/renderonly/renderonly_resource.h       | 101 +++
 src/gallium/drivers/renderonly/renderonly_screen.c | 178 +++++
 src/gallium/drivers/renderonly/renderonly_screen.h |  55 ++
 src/gallium/drivers/tegra/Automake.inc             |  10 +
 src/gallium/drivers/tegra/Makefile.am              |   9 +
 src/gallium/targets/dri/Makefile.am                |   2 +
 src/gallium/winsys/tegra/drm/Android.mk            |  34 +
 src/gallium/winsys/tegra/drm/Makefile.am           |  33 +
 src/gallium/winsys/tegra/drm/Makefile.sources      |   3 +
 src/gallium/winsys/tegra/drm/tegra_drm_public.h    |  31 +
 src/gallium/winsys/tegra/drm/tegra_drm_winsys.c    |  51 ++
 19 files changed, 1673 insertions(+), 1 deletion(-)
 create mode 100644 src/gallium/drivers/renderonly/Makefile.am
 create mode 100644 src/gallium/drivers/renderonly/Makefile.sources
 create mode 100644 src/gallium/drivers/renderonly/renderonly_context.c
 create mode 100644 src/gallium/drivers/renderonly/renderonly_context.h
 create mode 100644 src/gallium/drivers/renderonly/renderonly_resource.c
 create mode 100644 src/gallium/drivers/renderonly/renderonly_resource.h
 create mode 100644 src/gallium/drivers/renderonly/renderonly_screen.c
 create mode 100644 src/gallium/drivers/renderonly/renderonly_screen.h
 create mode 100644 src/gallium/drivers/tegra/Automake.inc
 create mode 100644 src/gallium/drivers/tegra/Makefile.am
 create mode 100644 src/gallium/winsys/tegra/drm/Android.mk
 create mode 100644 src/gallium/winsys/tegra/drm/Makefile.am
 create mode 100644 src/gallium/winsys/tegra/drm/Makefile.sources
 create mode 100644 src/gallium/winsys/tegra/drm/tegra_drm_public.h
 create mode 100644 src/gallium/winsys/tegra/drm/tegra_drm_winsys.c
Quoted 4 lines

--
2.4.3

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