summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch
diff options
context:
space:
mode:
authorKarthik Ramanan <a0393906@ti.com>2017-03-30 13:42:50 +0530
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-04-04 08:49:07 +0000
commite5647d8e3da999c353a48c139c9a968705c5a891 (patch)
tree42cdea20ccabfddf5bb836913a32da04572edc1e /meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch
parent8b721aa4ae997a5e18d97d5125038f1cd4640949 (diff)
dra7xx: gstreamer1.0-plugins-bad: Upgrade to 1.8.2
Apart from upgrading to 1.8.2 as the base, it also contains several TI specific patches that are required to enable functionality for kmssink and waylandsink. A few bug fixes have also been included in this patch set. This recipe is rehosted from meta-arago Change-Id: I2a5b95db1b0e6b2b907f3e82ff738fd8124c0998 Signed-off-by: Karthik Ramanan <a0393906@ti.com>
Diffstat (limited to 'meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch')
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch96
1 files changed, 96 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch
new file mode 100644
index 000000000..308a84959
--- /dev/null
+++ b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch
@@ -0,0 +1,96 @@
+From 68936c7fb864440bb4d2ab737a651888ac7c253a Mon Sep 17 00:00:00 2001
+From: Eric Ruei <e-ruei1@ti.com>
+Date: Fri, 17 Mar 2017 10:42:32 -0400
+Subject: [PATCH 2/3] kmssink: remove DCE dependencies
+
+Replace DCE related API calls to libdrm and omapdrm API calls
+to decouple DCE from kmssink
+
+Signed-off-by: Eric Ruei <e-ruei1@ti.com>
+---
+ configure.ac | 1 -
+ sys/kms/Makefile.am | 2 --
+ sys/kms/gstkmssink.c | 17 +++++++++++++----
+ 3 files changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f93d52d..a6f93a5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2321,7 +2321,6 @@ dnl *** kms ***
+ translit(dnm, m, l) AM_CONDITIONAL(USE_KMS, true)
+ AG_GST_CHECK_FEATURE(KMS, [kmssink], kms, [
+ PKG_CHECK_MODULES([DRM], [libdrm libdrm_omap], HAVE_KMS=yes, HAVE_KMS=no)
+-PKG_CHECK_MODULES(LIBDCE, [libdce >= 1.0.0], HAVE_KMS=yes, HAVE_KMS=no)
+ AC_SUBST(DRM_CFLAGS)
+ AC_SUBST(DRM_LIBS)
+ ])
+diff --git a/sys/kms/Makefile.am b/sys/kms/Makefile.am
+index 6d56073..cc7353e 100644
+--- a/sys/kms/Makefile.am
++++ b/sys/kms/Makefile.am
+@@ -9,7 +9,6 @@ libgstkmssink_la_CFLAGS = \
+ $(GST_PLUGINS_BAD_CFLAGS) \
+ $(GST_PLUGINS_BASE_CFLAGS) \
+ $(GST_BASE_CFLAGS) \
+- $(LIBDCE_CFLAGS) \
+ $(GST_CFLAGS) \
+ $(DRM_CFLAGS)
+
+@@ -17,7 +16,6 @@ libgstkmssink_la_LIBADD = \
+ $(GST_PLUGINS_BASE_LIBS) \
+ $(GST_BASE_LIBS) \
+ $(GST_LIBS) \
+- $(LIBDCE_LIBS) \
+ $(DRM_LIBS) \
+ -lgstvideo-$(GST_API_VERSION) \
+ $(top_builddir)/gst-libs/gst/drm/libgstdrm-$(GST_API_VERSION).la
+diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
+index 17e6407..9795bdf 100644
+--- a/sys/kms/gstkmssink.c
++++ b/sys/kms/gstkmssink.c
+@@ -31,7 +31,6 @@
+ #include "gstkmssink.h"
+ #include "gstkmsbufferpriv.h"
+
+-#include <libdce.h>
+ #include <omap_drm.h>
+ #include <omap_drmif.h>
+ #include <xf86drmMode.h>
+@@ -516,13 +515,18 @@ gst_kms_sink_start (GstBaseSink * bsink)
+
+ sink = GST_KMS_SINK (bsink);
+
+- drm_dev = dce_init ();
++ drm_fd = open("/dev/dri/card0", O_RDWR | O_CLOEXEC);
++ if(drm_fd == NULL)
++ goto drm_failed;
++ else {
++ drm_dev = omap_device_new(drm_fd);
++ }
++
+ if (drm_dev == NULL)
+ goto device_failed;
+ else {
++ sink->fd = drm_fd;
+ sink->dev = drm_dev;
+- sink->fd = dce_get_fd ();
+- drm_fd = dce_get_fd ();
+ }
+
+ sink->resources = drmModeGetResources (sink->fd);
+@@ -539,6 +543,11 @@ fail:
+ gst_kms_sink_reset (sink);
+ return FALSE;
+
++drm_failed:
++ GST_ELEMENT_ERROR (sink, RESOURCE, FAILED,
++ (NULL), ("drmOpen failed"));
++ goto fail;
++
+ device_failed:
+ GST_ELEMENT_ERROR (sink, RESOURCE, FAILED,
+ (NULL), ("omap_device_new failed"));
+--
+1.9.1
+