All of lore.kernel.org
 help / color / mirror / Atom feed
* [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support
  2017-03-16 17:26 Eric Ruei
@ 2017-03-16 17:26 ` Eric Ruei
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Ruei @ 2017-03-16 17:26 UTC (permalink / raw)
  To: meta-ti

Signed-off-by: Eric Ruei <e-ruei1@ti.com>
---
 .../0002-kmssink-add-YUYV-support.patch            | 81 ++++++++++++++++++++++
 .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  2 +
 2 files changed, 83 insertions(+)
 create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch

diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
new file mode 100644
index 0000000..a5791cc
--- /dev/null
+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
@@ -0,0 +1,81 @@
+From af348c890c04ce9626d411055aae0974f410219f Mon Sep 17 00:00:00 2001
+From: Eric Ruei <e-ruei1@ti.com>
+Date: Tue, 14 Mar 2017 17:24:07 -0400
+Subject: [PATCH 2/2] kmssink: add YUYV support
+
+Signed-off-by: Eric Ruei <e-ruei1@ti.com>
+---
+ sys/kms/gstkmsbufferpriv.c | 32 +++++++++++++++++++++++++++-----
+ sys/kms/gstkmssink.c       |  2 +-
+ 2 files changed, 28 insertions(+), 6 deletions(-)
+
+diff --git a/sys/kms/gstkmsbufferpriv.c b/sys/kms/gstkmsbufferpriv.c
+index 172a4c3..57c01f8 100644
+--- a/sys/kms/gstkmsbufferpriv.c
++++ b/sys/kms/gstkmsbufferpriv.c
+@@ -41,22 +41,44 @@
+ static int
+ create_fb (GstKMSBufferPriv * priv, GstKMSSink * sink)
+ {
++
+   /* TODO get format, etc from caps.. and query device for
+    * supported formats, and make this all more flexible to
+    * cope with various formats:
+    */
+-  uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
+-
++  GstVideoFormat format = sink->format;
++  uint32_t fourcc;
+   uint32_t handles[4] = {
+-    omap_bo_handle (priv->bo), omap_bo_handle (priv->bo),
++    omap_bo_handle (priv->bo),
+   };
+   uint32_t pitches[4] = {
+-    GST_ROUND_UP_4 (sink->input_width), GST_ROUND_UP_4 (sink->input_width),
++    GST_ROUND_UP_4 (sink->input_width),
+   };
+   uint32_t offsets[4] = {
+-    0, pitches[0] * sink->input_height
++    0,
+   };
+ 
++  /**
++   * Only two formats are supported:
++   * AM3/4: YUYV
++   * AM5: NV12, YUYV
++   */
++  if(format == GST_VIDEO_FORMAT_YUY2)
++  {
++    /* YUYV */
++    fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V');
++    pitches[0] = GST_ROUND_UP_4 (sink->input_width*2);
++  }
++  else
++  {
++    /* NV12 */
++    fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
++    handles[1] = omap_bo_handle (priv->bo);
++    pitches[1] = GST_ROUND_UP_4 (sink->input_width);
++    offsets[1] = pitches[0] * sink->input_height;
++  }
++
++
+   return drmModeAddFB2 (priv->fd, sink->input_width, sink->input_height,
+       fourcc, handles, pitches, offsets, &priv->fb_id, 0);
+ }
+diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
+index 9795bdf..b36d88f 100644
+--- a/sys/kms/gstkmssink.c
++++ b/sys/kms/gstkmssink.c
+@@ -50,7 +50,7 @@ static GstStaticPadTemplate gst_kms_sink_template_factory =
+ GST_STATIC_PAD_TEMPLATE ("sink",
+     GST_PAD_SINK,
+     GST_PAD_ALWAYS,
+-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("NV12"))
++    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("{NV12,YUY2}"))
+     );
+ 
+ enum
+-- 
+1.9.1
+
diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
index 2c903d4..317b19e 100644
--- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
@@ -21,10 +21,12 @@ DEPENDS_append_ti33x = " \
 
 SRC_URI_append_omap-a15 = " \
     file://0001-kmssink-remove-DCE-dependencies.patch \
+    file://0002-kmssink-add-YUYV-support.patch \
 "
 
 SRC_URI_append_ti43x = " \
     file://0001-kmssink-remove-DCE-dependencies.patch \
+    file://0002-kmssink-add-YUYV-support.patch \
 "
 
 SRC_URI_append_ti33x = " \
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies
@ 2017-03-16 17:29 Eric Ruei
  2017-03-16 17:29 ` [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support Eric Ruei
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Eric Ruei @ 2017-03-16 17:29 UTC (permalink / raw)
  To: meta-arago

- remove DCE dependencies from kmssink
- AM4(ti43x) shares the same branch as of AM5(omap-a15)

Signed-off-by: Eric Ruei <e-ruei1@ti.com>
---
 .../0001-kmssink-remove-DCE-dependencies.patch     | 96 ++++++++++++++++++++++
 .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  8 +-
 2 files changed, 102 insertions(+), 2 deletions(-)
 create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch

diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
new file mode 100644
index 0000000..e050e08
--- /dev/null
+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
@@ -0,0 +1,96 @@
+From 6b04eb39296caec717d310872c1f0acfa85c5ae7 Mon Sep 17 00:00:00 2001
+From: Eric Ruei <e-ruei1@ti.com>
+Date: Wed, 15 Mar 2017 09:08:13 -0400
+Subject: [PATCH 1/2] 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 2e0d1f3..2b1ecaa 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2119,7 +2119,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
+
diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
index b5ccebf..2c903d4 100644
--- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
@@ -8,7 +8,6 @@ PACKAGECONFIG_append_ti43x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland',
 PACKAGECONFIG_append_ti33x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
 
 DEPENDS_append_omap-a15 = " \
-    libdce \
     libdrm \
 "
 
@@ -18,10 +17,14 @@ DEPENDS_append_ti43x = " \
 
 DEPENDS_append_ti33x = " \
     libdrm \
+"
+
+SRC_URI_append_omap-a15 = " \
+    file://0001-kmssink-remove-DCE-dependencies.patch \
 "
 
 SRC_URI_append_ti43x = " \
-    file://0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch \
+    file://0001-kmssink-remove-DCE-dependencies.patch \
 "
 
 SRC_URI_append_ti33x = " \
@@ -38,6 +41,7 @@ SRC_URI = "git://git.ti.com/glsdk/gstreamer1-0-plugins-bad.git;protocol=git;bran
 S = "${WORKDIR}/git"
 
 SRCREV_omap-a15 = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
+SRCREV_ti43x = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
 SRCREV = "d0160ca810be30bf2b2e7681f5047933402efb52"
 
 PR = "r25"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support
  2017-03-16 17:29 [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Eric Ruei
@ 2017-03-16 17:29 ` Eric Ruei
  2017-03-16 18:04   ` Denys Dmytriyenko
  2017-03-16 17:29 ` [krogoth][PATCH 3/3] gstreamer1.0-plugins-bad: waylandsink: add input format I420 support Eric Ruei
  2017-03-16 18:02 ` [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Denys Dmytriyenko
  2 siblings, 1 reply; 12+ messages in thread
From: Eric Ruei @ 2017-03-16 17:29 UTC (permalink / raw)
  To: meta-arago

Signed-off-by: Eric Ruei <e-ruei1@ti.com>
---
 .../0002-kmssink-add-YUYV-support.patch            | 81 ++++++++++++++++++++++
 .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  2 +
 2 files changed, 83 insertions(+)
 create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch

diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
new file mode 100644
index 0000000..a5791cc
--- /dev/null
+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
@@ -0,0 +1,81 @@
+From af348c890c04ce9626d411055aae0974f410219f Mon Sep 17 00:00:00 2001
+From: Eric Ruei <e-ruei1@ti.com>
+Date: Tue, 14 Mar 2017 17:24:07 -0400
+Subject: [PATCH 2/2] kmssink: add YUYV support
+
+Signed-off-by: Eric Ruei <e-ruei1@ti.com>
+---
+ sys/kms/gstkmsbufferpriv.c | 32 +++++++++++++++++++++++++++-----
+ sys/kms/gstkmssink.c       |  2 +-
+ 2 files changed, 28 insertions(+), 6 deletions(-)
+
+diff --git a/sys/kms/gstkmsbufferpriv.c b/sys/kms/gstkmsbufferpriv.c
+index 172a4c3..57c01f8 100644
+--- a/sys/kms/gstkmsbufferpriv.c
++++ b/sys/kms/gstkmsbufferpriv.c
+@@ -41,22 +41,44 @@
+ static int
+ create_fb (GstKMSBufferPriv * priv, GstKMSSink * sink)
+ {
++
+   /* TODO get format, etc from caps.. and query device for
+    * supported formats, and make this all more flexible to
+    * cope with various formats:
+    */
+-  uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
+-
++  GstVideoFormat format = sink->format;
++  uint32_t fourcc;
+   uint32_t handles[4] = {
+-    omap_bo_handle (priv->bo), omap_bo_handle (priv->bo),
++    omap_bo_handle (priv->bo),
+   };
+   uint32_t pitches[4] = {
+-    GST_ROUND_UP_4 (sink->input_width), GST_ROUND_UP_4 (sink->input_width),
++    GST_ROUND_UP_4 (sink->input_width),
+   };
+   uint32_t offsets[4] = {
+-    0, pitches[0] * sink->input_height
++    0,
+   };
+ 
++  /**
++   * Only two formats are supported:
++   * AM3/4: YUYV
++   * AM5: NV12, YUYV
++   */
++  if(format == GST_VIDEO_FORMAT_YUY2)
++  {
++    /* YUYV */
++    fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V');
++    pitches[0] = GST_ROUND_UP_4 (sink->input_width*2);
++  }
++  else
++  {
++    /* NV12 */
++    fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
++    handles[1] = omap_bo_handle (priv->bo);
++    pitches[1] = GST_ROUND_UP_4 (sink->input_width);
++    offsets[1] = pitches[0] * sink->input_height;
++  }
++
++
+   return drmModeAddFB2 (priv->fd, sink->input_width, sink->input_height,
+       fourcc, handles, pitches, offsets, &priv->fb_id, 0);
+ }
+diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
+index 9795bdf..b36d88f 100644
+--- a/sys/kms/gstkmssink.c
++++ b/sys/kms/gstkmssink.c
+@@ -50,7 +50,7 @@ static GstStaticPadTemplate gst_kms_sink_template_factory =
+ GST_STATIC_PAD_TEMPLATE ("sink",
+     GST_PAD_SINK,
+     GST_PAD_ALWAYS,
+-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("NV12"))
++    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("{NV12,YUY2}"))
+     );
+ 
+ enum
+-- 
+1.9.1
+
diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
index 2c903d4..317b19e 100644
--- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
@@ -21,10 +21,12 @@ DEPENDS_append_ti33x = " \
 
 SRC_URI_append_omap-a15 = " \
     file://0001-kmssink-remove-DCE-dependencies.patch \
+    file://0002-kmssink-add-YUYV-support.patch \
 "
 
 SRC_URI_append_ti43x = " \
     file://0001-kmssink-remove-DCE-dependencies.patch \
+    file://0002-kmssink-add-YUYV-support.patch \
 "
 
 SRC_URI_append_ti33x = " \
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [krogoth][PATCH 3/3] gstreamer1.0-plugins-bad: waylandsink: add input format I420 support
  2017-03-16 17:29 [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Eric Ruei
  2017-03-16 17:29 ` [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support Eric Ruei
@ 2017-03-16 17:29 ` Eric Ruei
  2017-03-16 18:02 ` [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Denys Dmytriyenko
  2 siblings, 0 replies; 12+ messages in thread
From: Eric Ruei @ 2017-03-16 17:29 UTC (permalink / raw)
  To: meta-arago

Signed-off-by: Eric Ruei <e-ruei1@ti.com>
---
 ...waylandsink-add-input-format-I420-support.patch | 89 ++++++++++++++++++++++
 .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  2 +
 2 files changed, 91 insertions(+)
 create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch

diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch
new file mode 100644
index 0000000..c4bf4b1
--- /dev/null
+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch
@@ -0,0 +1,89 @@
+From 4d04ea92f196b9e0880917cf029a95c9ebef0ea9 Mon Sep 17 00:00:00 2001
+From: Eric Ruei <e-ruei1@ti.com>
+Date: Wed, 22 Feb 2017 10:49:01 -0500
+Subject: [PATCH] gstwaylandsink: add input format I420 support
+
+The software-based video decoder produces the output in I420 format. To display
+the output without additional ARM MHz consumed in video format conversion,
+the function gst_wl_memory_construct_wl_buffer is enhanced to support I420 format.
+
+Signed-off-by: Eric Ruei <e-ruei1@ti.com>
+---
+ ext/wayland/wldrm.c | 41 ++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 34 insertions(+), 7 deletions(-)
+
+diff --git a/ext/wayland/wldrm.c b/ext/wayland/wldrm.c
+index 8f2c393..cb2b0f2 100644
+--- a/ext/wayland/wldrm.c
++++ b/ext/wayland/wldrm.c
+@@ -5,33 +5,60 @@
+ #include <omap_drmif.h>
+ #include <wayland-client.h>
+ 
++GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
++#define GST_CAT_DEFAULT gstwayland_debug
++
++
+ struct wl_buffer *
+ gst_wl_drm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
+     const GstVideoInfo * info)
+ {
+   gint video_width = GST_VIDEO_INFO_WIDTH (info);
+   gint video_height = GST_VIDEO_INFO_HEIGHT (info);
++  GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
+   int fd = -1;
+   struct omap_bo *bo;
+   struct wl_buffer *buffer;
+-
+-  /* TODO get format, etc from caps.. and query device for
+-   * supported formats, and make this all more flexible to
+-   * cope with various formats:
+-   */
+-  uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
++  uint32_t fourcc;
+   uint32_t name;
+   /* note: wayland and mesa use the terminology:
+    *    stride - rowstride in bytes
+    *    pitch  - rowstride in pixels
+    */
+   uint32_t strides[3] = {
+-    GST_ROUND_UP_4 (video_width), GST_ROUND_UP_4 (video_width), 0,
++    GST_ROUND_UP_4 (video_width), 0, 0,
+   };
+   uint32_t offsets[3] = {
+     0, strides[0] * video_height, 0
+   };
+ 
++  if (format == GST_VIDEO_FORMAT_NV12)
++  {
++    /* NV12 */
++    fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
++    strides[1] = GST_ROUND_UP_4 (video_width);
++  }
++  else if(format == GST_VIDEO_FORMAT_I420)
++  {
++    /* YUV420 */
++    fourcc = GST_MAKE_FOURCC ('Y', 'U', '1', '2');
++    strides[1] = strides[2] = GST_ROUND_UP_4 (video_width/2);
++    offsets[2] = offsets[1] + strides[1] * video_height/2;
++  }
++  else
++  {
++
++    GST_DEBUG ("Unsupported video format: %d", format);
++    /*
++     * There are two xRGB frames with width and height = 1 required in the begining of a video stream.
++     * If we consider them as errot, then it will case libwayland-clent.so crashes
++     * due to invalid error handling.
++     * Consider them as NV12 until we can figure out a better solution
++     */
++    fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
++    strides[1] = GST_ROUND_UP_4 (video_width);
++  }
++
+   fd = gst_fd_memory_get_fd (mem);
+ 
+   if (fd < 0 ) {
+-- 
+1.9.1
+
diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
index 317b19e..bbd1d99 100644
--- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
@@ -22,11 +22,13 @@ DEPENDS_append_ti33x = " \
 SRC_URI_append_omap-a15 = " \
     file://0001-kmssink-remove-DCE-dependencies.patch \
     file://0002-kmssink-add-YUYV-support.patch \
+    file://0001-gstwaylandsink-add-input-format-I420-support.patch \
 "
 
 SRC_URI_append_ti43x = " \
     file://0001-kmssink-remove-DCE-dependencies.patch \
     file://0002-kmssink-add-YUYV-support.patch \
+    file://0001-gstwaylandsink-add-input-format-I420-support.patch \
 "
 
 SRC_URI_append_ti33x = " \
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies
  2017-03-16 17:29 [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Eric Ruei
  2017-03-16 17:29 ` [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support Eric Ruei
  2017-03-16 17:29 ` [krogoth][PATCH 3/3] gstreamer1.0-plugins-bad: waylandsink: add input format I420 support Eric Ruei
@ 2017-03-16 18:02 ` Denys Dmytriyenko
  2017-03-16 18:19   ` Ruei, Eric
  2 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2017-03-16 18:02 UTC (permalink / raw)
  To: Eric Ruei; +Cc: meta-arago

Thanks!
Do you plan to support am3?
Is it applicable to morty? Any patches planned?

Also, see inline below.


On Thu, Mar 16, 2017 at 01:29:35PM -0400, Eric Ruei wrote:
> - remove DCE dependencies from kmssink
> - AM4(ti43x) shares the same branch as of AM5(omap-a15)
> 
> Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> ---
>  .../0001-kmssink-remove-DCE-dependencies.patch     | 96 ++++++++++++++++++++++
>  .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  8 +-
>  2 files changed, 102 insertions(+), 2 deletions(-)
>  create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
> 
> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
> new file mode 100644
> index 0000000..e050e08
> --- /dev/null
> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
> @@ -0,0 +1,96 @@
> +From 6b04eb39296caec717d310872c1f0acfa85c5ae7 Mon Sep 17 00:00:00 2001
> +From: Eric Ruei <e-ruei1@ti.com>
> +Date: Wed, 15 Mar 2017 09:08:13 -0400
> +Subject: [PATCH 1/2] 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 2e0d1f3..2b1ecaa 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2119,7 +2119,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
> +
> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> index b5ccebf..2c903d4 100644
> --- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> @@ -8,7 +8,6 @@ PACKAGECONFIG_append_ti43x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland',
>  PACKAGECONFIG_append_ti33x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
>  
>  DEPENDS_append_omap-a15 = " \
> -    libdce \
>      libdrm \
>  "
>  
> @@ -18,10 +17,14 @@ DEPENDS_append_ti43x = " \
>  
>  DEPENDS_append_ti33x = " \
>      libdrm \
> +"
> +
> +SRC_URI_append_omap-a15 = " \
> +    file://0001-kmssink-remove-DCE-dependencies.patch \
>  "
>  
>  SRC_URI_append_ti43x = " \
> -    file://0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch \

This patch got dropped ^
If it was intentional, should mention that in the commit message.


> +    file://0001-kmssink-remove-DCE-dependencies.patch \
>  "
>  
>  SRC_URI_append_ti33x = " \
> @@ -38,6 +41,7 @@ SRC_URI = "git://git.ti.com/glsdk/gstreamer1-0-plugins-bad.git;protocol=git;bran
>  S = "${WORKDIR}/git"
>  
>  SRCREV_omap-a15 = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
> +SRCREV_ti43x = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
>  SRCREV = "d0160ca810be30bf2b2e7681f5047933402efb52"
>  
>  PR = "r25"
> -- 
> 1.9.1
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support
  2017-03-16 17:29 ` [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support Eric Ruei
@ 2017-03-16 18:04   ` Denys Dmytriyenko
  2017-03-16 18:21     ` Ruei, Eric
  0 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2017-03-16 18:04 UTC (permalink / raw)
  To: Eric Ruei; +Cc: meta-arago

On Thu, Mar 16, 2017 at 01:29:36PM -0400, Eric Ruei wrote:
> Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> ---
>  .../0002-kmssink-add-YUYV-support.patch            | 81 ++++++++++++++++++++++
>  .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  2 +
>  2 files changed, 83 insertions(+)
>  create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
> 
> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
> new file mode 100644
> index 0000000..a5791cc
> --- /dev/null
> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
> @@ -0,0 +1,81 @@
> +From af348c890c04ce9626d411055aae0974f410219f Mon Sep 17 00:00:00 2001
> +From: Eric Ruei <e-ruei1@ti.com>
> +Date: Tue, 14 Mar 2017 17:24:07 -0400
> +Subject: [PATCH 2/2] kmssink: add YUYV support
> +
> +Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> +---
> + sys/kms/gstkmsbufferpriv.c | 32 +++++++++++++++++++++++++++-----
> + sys/kms/gstkmssink.c       |  2 +-
> + 2 files changed, 28 insertions(+), 6 deletions(-)
> +
> +diff --git a/sys/kms/gstkmsbufferpriv.c b/sys/kms/gstkmsbufferpriv.c
> +index 172a4c3..57c01f8 100644
> +--- a/sys/kms/gstkmsbufferpriv.c
> ++++ b/sys/kms/gstkmsbufferpriv.c
> +@@ -41,22 +41,44 @@
> + static int
> + create_fb (GstKMSBufferPriv * priv, GstKMSSink * sink)
> + {
> ++
> +   /* TODO get format, etc from caps.. and query device for
> +    * supported formats, and make this all more flexible to
> +    * cope with various formats:
> +    */
> +-  uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
> +-
> ++  GstVideoFormat format = sink->format;
> ++  uint32_t fourcc;
> +   uint32_t handles[4] = {
> +-    omap_bo_handle (priv->bo), omap_bo_handle (priv->bo),
> ++    omap_bo_handle (priv->bo),
> +   };
> +   uint32_t pitches[4] = {
> +-    GST_ROUND_UP_4 (sink->input_width), GST_ROUND_UP_4 (sink->input_width),
> ++    GST_ROUND_UP_4 (sink->input_width),
> +   };
> +   uint32_t offsets[4] = {
> +-    0, pitches[0] * sink->input_height
> ++    0,
> +   };
> + 
> ++  /**
> ++   * Only two formats are supported:
> ++   * AM3/4: YUYV
> ++   * AM5: NV12, YUYV
> ++   */
> ++  if(format == GST_VIDEO_FORMAT_YUY2)
> ++  {
> ++    /* YUYV */
> ++    fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V');
> ++    pitches[0] = GST_ROUND_UP_4 (sink->input_width*2);
> ++  }
> ++  else
> ++  {
> ++    /* NV12 */
> ++    fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
> ++    handles[1] = omap_bo_handle (priv->bo);
> ++    pitches[1] = GST_ROUND_UP_4 (sink->input_width);
> ++    offsets[1] = pitches[0] * sink->input_height;
> ++  }
> ++
> ++
> +   return drmModeAddFB2 (priv->fd, sink->input_width, sink->input_height,
> +       fourcc, handles, pitches, offsets, &priv->fb_id, 0);
> + }
> +diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
> +index 9795bdf..b36d88f 100644
> +--- a/sys/kms/gstkmssink.c
> ++++ b/sys/kms/gstkmssink.c
> +@@ -50,7 +50,7 @@ static GstStaticPadTemplate gst_kms_sink_template_factory =
> + GST_STATIC_PAD_TEMPLATE ("sink",
> +     GST_PAD_SINK,
> +     GST_PAD_ALWAYS,
> +-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("NV12"))
> ++    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("{NV12,YUY2}"))

YUY2 or YUYV?


> +     );
> + 
> + enum
> +-- 
> +1.9.1
> +
> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> index 2c903d4..317b19e 100644
> --- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> @@ -21,10 +21,12 @@ DEPENDS_append_ti33x = " \
>  
>  SRC_URI_append_omap-a15 = " \
>      file://0001-kmssink-remove-DCE-dependencies.patch \
> +    file://0002-kmssink-add-YUYV-support.patch \
>  "
>  
>  SRC_URI_append_ti43x = " \
>      file://0001-kmssink-remove-DCE-dependencies.patch \
> +    file://0002-kmssink-add-YUYV-support.patch \
>  "
>  
>  SRC_URI_append_ti33x = " \
> -- 
> 1.9.1
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies
  2017-03-16 18:02 ` [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Denys Dmytriyenko
@ 2017-03-16 18:19   ` Ruei, Eric
  2017-03-16 18:46     ` Denys Dmytriyenko
  0 siblings, 1 reply; 12+ messages in thread
From: Ruei, Eric @ 2017-03-16 18:19 UTC (permalink / raw)
  To: Denys Dmytriyenko, Eric Ruei; +Cc: meta-arago

On 3/16/2017 2:02 PM, Denys Dmytriyenko wrote:
> Thanks!
> Do you plan to support am3?

No, the kmssink will not work on AM3 because it requires overlay DRM 
plane. And there is no customer requirement for advanced features for AM3.

> Is it applicable to morty? Any patches planned?
No, it is not applicable to Morty because new version of gstreamer (1.9) 
is for morty.

I do plan to submit those patches for review.

>
> Also, see inline below.
>
>
> On Thu, Mar 16, 2017 at 01:29:35PM -0400, Eric Ruei wrote:
>> - remove DCE dependencies from kmssink
>> - AM4(ti43x) shares the same branch as of AM5(omap-a15)
>>
>> Signed-off-by: Eric Ruei <e-ruei1@ti.com>
>> ---
>>  .../0001-kmssink-remove-DCE-dependencies.patch     | 96 ++++++++++++++++++++++
>>  .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  8 +-
>>  2 files changed, 102 insertions(+), 2 deletions(-)
>>  create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
>>
>> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
>> new file mode 100644
>> index 0000000..e050e08
>> --- /dev/null
>> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
>> @@ -0,0 +1,96 @@
>> +From 6b04eb39296caec717d310872c1f0acfa85c5ae7 Mon Sep 17 00:00:00 2001
>> +From: Eric Ruei <e-ruei1@ti.com>
>> +Date: Wed, 15 Mar 2017 09:08:13 -0400
>> +Subject: [PATCH 1/2] 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 2e0d1f3..2b1ecaa 100644
>> +--- a/configure.ac
>> ++++ b/configure.ac
>> +@@ -2119,7 +2119,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
>> +
>> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
>> index b5ccebf..2c903d4 100644
>> --- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
>> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
>> @@ -8,7 +8,6 @@ PACKAGECONFIG_append_ti43x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland',
>>  PACKAGECONFIG_append_ti33x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
>>
>>  DEPENDS_append_omap-a15 = " \
>> -    libdce \
>>      libdrm \
>>  "
>>
>> @@ -18,10 +17,14 @@ DEPENDS_append_ti43x = " \
>>
>>  DEPENDS_append_ti33x = " \
>>      libdrm \
>> +"
>> +
>> +SRC_URI_append_omap-a15 = " \
>> +    file://0001-kmssink-remove-DCE-dependencies.patch \
>>  "
>>
>>  SRC_URI_append_ti43x = " \
>> -    file://0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch \
>
> This patch got dropped ^
> If it was intentional, should mention that in the commit message.
>
>

Yes, it was intentional, a similar patch was covered by the commit ID 
update. Do you want me to resubmit this patch?


>> +    file://0001-kmssink-remove-DCE-dependencies.patch \
>>  "
>>
>>  SRC_URI_append_ti33x = " \
>> @@ -38,6 +41,7 @@ SRC_URI = "git://git.ti.com/glsdk/gstreamer1-0-plugins-bad.git;protocol=git;bran
>>  S = "${WORKDIR}/git"
>>
>>  SRCREV_omap-a15 = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
>> +SRCREV_ti43x = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
>>  SRCREV = "d0160ca810be30bf2b2e7681f5047933402efb52"
>>
>>  PR = "r25"
>> --
>> 1.9.1
>>
>> _______________________________________________
>> meta-arago mailing list
>> meta-arago@arago-project.org
>> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support
  2017-03-16 18:04   ` Denys Dmytriyenko
@ 2017-03-16 18:21     ` Ruei, Eric
  0 siblings, 0 replies; 12+ messages in thread
From: Ruei, Eric @ 2017-03-16 18:21 UTC (permalink / raw)
  To: Denys Dmytriyenko, Eric Ruei; +Cc: meta-arago

On 3/16/2017 2:04 PM, Denys Dmytriyenko wrote:
> On Thu, Mar 16, 2017 at 01:29:36PM -0400, Eric Ruei wrote:
>> Signed-off-by: Eric Ruei <e-ruei1@ti.com>
>> ---
>>  .../0002-kmssink-add-YUYV-support.patch            | 81 ++++++++++++++++++++++
>>  .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  2 +
>>  2 files changed, 83 insertions(+)
>>  create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
>>
>> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
>> new file mode 100644
>> index 0000000..a5791cc
>> --- /dev/null
>> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
>> @@ -0,0 +1,81 @@
>> +From af348c890c04ce9626d411055aae0974f410219f Mon Sep 17 00:00:00 2001
>> +From: Eric Ruei <e-ruei1@ti.com>
>> +Date: Tue, 14 Mar 2017 17:24:07 -0400
>> +Subject: [PATCH 2/2] kmssink: add YUYV support
>> +
>> +Signed-off-by: Eric Ruei <e-ruei1@ti.com>
>> +---
>> + sys/kms/gstkmsbufferpriv.c | 32 +++++++++++++++++++++++++++-----
>> + sys/kms/gstkmssink.c       |  2 +-
>> + 2 files changed, 28 insertions(+), 6 deletions(-)
>> +
>> +diff --git a/sys/kms/gstkmsbufferpriv.c b/sys/kms/gstkmsbufferpriv.c
>> +index 172a4c3..57c01f8 100644
>> +--- a/sys/kms/gstkmsbufferpriv.c
>> ++++ b/sys/kms/gstkmsbufferpriv.c
>> +@@ -41,22 +41,44 @@
>> + static int
>> + create_fb (GstKMSBufferPriv * priv, GstKMSSink * sink)
>> + {
>> ++
>> +   /* TODO get format, etc from caps.. and query device for
>> +    * supported formats, and make this all more flexible to
>> +    * cope with various formats:
>> +    */
>> +-  uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
>> +-
>> ++  GstVideoFormat format = sink->format;
>> ++  uint32_t fourcc;
>> +   uint32_t handles[4] = {
>> +-    omap_bo_handle (priv->bo), omap_bo_handle (priv->bo),
>> ++    omap_bo_handle (priv->bo),
>> +   };
>> +   uint32_t pitches[4] = {
>> +-    GST_ROUND_UP_4 (sink->input_width), GST_ROUND_UP_4 (sink->input_width),
>> ++    GST_ROUND_UP_4 (sink->input_width),
>> +   };
>> +   uint32_t offsets[4] = {
>> +-    0, pitches[0] * sink->input_height
>> ++    0,
>> +   };
>> +
>> ++  /**
>> ++   * Only two formats are supported:
>> ++   * AM3/4: YUYV
>> ++   * AM5: NV12, YUYV
>> ++   */
>> ++  if(format == GST_VIDEO_FORMAT_YUY2)
>> ++  {
>> ++    /* YUYV */
>> ++    fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V');
>> ++    pitches[0] = GST_ROUND_UP_4 (sink->input_width*2);
>> ++  }
>> ++  else
>> ++  {
>> ++    /* NV12 */
>> ++    fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
>> ++    handles[1] = omap_bo_handle (priv->bo);
>> ++    pitches[1] = GST_ROUND_UP_4 (sink->input_width);
>> ++    offsets[1] = pitches[0] * sink->input_height;
>> ++  }
>> ++
>> ++
>> +   return drmModeAddFB2 (priv->fd, sink->input_width, sink->input_height,
>> +       fourcc, handles, pitches, offsets, &priv->fb_id, 0);
>> + }
>> +diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
>> +index 9795bdf..b36d88f 100644
>> +--- a/sys/kms/gstkmssink.c
>> ++++ b/sys/kms/gstkmssink.c
>> +@@ -50,7 +50,7 @@ static GstStaticPadTemplate gst_kms_sink_template_factory =
>> + GST_STATIC_PAD_TEMPLATE ("sink",
>> +     GST_PAD_SINK,
>> +     GST_PAD_ALWAYS,
>> +-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("NV12"))
>> ++    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("{NV12,YUY2}"))
>
> YUY2 or YUYV?
>
YUY2 is the same as YUYV
YUV2 is used by Gstreamer.


>> +     );
>> +
>> + enum
>> +--
>> +1.9.1
>> +
>> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
>> index 2c903d4..317b19e 100644
>> --- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
>> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
>> @@ -21,10 +21,12 @@ DEPENDS_append_ti33x = " \
>>
>>  SRC_URI_append_omap-a15 = " \
>>      file://0001-kmssink-remove-DCE-dependencies.patch \
>> +    file://0002-kmssink-add-YUYV-support.patch \
>>  "
>>
>>  SRC_URI_append_ti43x = " \
>>      file://0001-kmssink-remove-DCE-dependencies.patch \
>> +    file://0002-kmssink-add-YUYV-support.patch \
>>  "
>>
>>  SRC_URI_append_ti33x = " \
>> --
>> 1.9.1
>>
>> _______________________________________________
>> meta-arago mailing list
>> meta-arago@arago-project.org
>> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies
  2017-03-16 18:19   ` Ruei, Eric
@ 2017-03-16 18:46     ` Denys Dmytriyenko
  2017-03-16 19:09       ` Ruei, Eric
  0 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2017-03-16 18:46 UTC (permalink / raw)
  To: Ruei, Eric; +Cc: meta-arago

On Thu, Mar 16, 2017 at 02:19:07PM -0400, Ruei, Eric wrote:
> On 3/16/2017 2:02 PM, Denys Dmytriyenko wrote:
> >Thanks!
> >Do you plan to support am3?
> 
> No, the kmssink will not work on AM3 because it requires overlay DRM
> plane. And there is no customer requirement for advanced features
> for AM3.
> 
> >Is it applicable to morty? Any patches planned?
> No, it is not applicable to Morty because new version of gstreamer
> (1.9) is for morty.
> 
> I do plan to submit those patches for review.

morty has 1.8.3 - I meant the change in general, not specific to 1.6.3...


> >Also, see inline below.
> >
> >
> >On Thu, Mar 16, 2017 at 01:29:35PM -0400, Eric Ruei wrote:
> >>- remove DCE dependencies from kmssink
> >>- AM4(ti43x) shares the same branch as of AM5(omap-a15)
> >>
> >>Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> >>---
> >> .../0001-kmssink-remove-DCE-dependencies.patch     | 96 ++++++++++++++++++++++
> >> .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  8 +-
> >> 2 files changed, 102 insertions(+), 2 deletions(-)
> >> create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
> >>
> >>diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
> >>new file mode 100644
> >>index 0000000..e050e08
> >>--- /dev/null
> >>+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-kmssink-remove-DCE-dependencies.patch
> >>@@ -0,0 +1,96 @@
> >>+From 6b04eb39296caec717d310872c1f0acfa85c5ae7 Mon Sep 17 00:00:00 2001
> >>+From: Eric Ruei <e-ruei1@ti.com>
> >>+Date: Wed, 15 Mar 2017 09:08:13 -0400
> >>+Subject: [PATCH 1/2] 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 2e0d1f3..2b1ecaa 100644
> >>+--- a/configure.ac
> >>++++ b/configure.ac
> >>+@@ -2119,7 +2119,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
> >>+
> >>diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> >>index b5ccebf..2c903d4 100644
> >>--- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> >>+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> >>@@ -8,7 +8,6 @@ PACKAGECONFIG_append_ti43x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland',
> >> PACKAGECONFIG_append_ti33x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
> >>
> >> DEPENDS_append_omap-a15 = " \
> >>-    libdce \
> >>     libdrm \
> >> "
> >>
> >>@@ -18,10 +17,14 @@ DEPENDS_append_ti43x = " \
> >>
> >> DEPENDS_append_ti33x = " \
> >>     libdrm \
> >>+"
> >>+
> >>+SRC_URI_append_omap-a15 = " \
> >>+    file://0001-kmssink-remove-DCE-dependencies.patch \
> >> "
> >>
> >> SRC_URI_append_ti43x = " \
> >>-    file://0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch \
> >
> >This patch got dropped ^
> >If it was intentional, should mention that in the commit message.
> >
> >
> 
> Yes, it was intentional, a similar patch was covered by the commit
> ID update. Do you want me to resubmit this patch?

Yes, please. Just a short one-liner should be good enough. Thanks.


> >>+    file://0001-kmssink-remove-DCE-dependencies.patch \
> >> "
> >>
> >> SRC_URI_append_ti33x = " \
> >>@@ -38,6 +41,7 @@ SRC_URI = "git://git.ti.com/glsdk/gstreamer1-0-plugins-bad.git;protocol=git;bran
> >> S = "${WORKDIR}/git"
> >>
> >> SRCREV_omap-a15 = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
> >>+SRCREV_ti43x = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
> >> SRCREV = "d0160ca810be30bf2b2e7681f5047933402efb52"
> >>
> >> PR = "r25"
> >>--
> >>1.9.1
> >>
> >>_______________________________________________
> >>meta-arago mailing list
> >>meta-arago@arago-project.org
> >>http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies
  2017-03-16 18:46     ` Denys Dmytriyenko
@ 2017-03-16 19:09       ` Ruei, Eric
  2017-03-16 19:13         ` Denys Dmytriyenko
  0 siblings, 1 reply; 12+ messages in thread
From: Ruei, Eric @ 2017-03-16 19:09 UTC (permalink / raw)
  To: Dmytriyenko, Denys; +Cc: meta-arago@arago-project.org

Hi, Denys:

There were TI-specific changes including kmssink  made on top of Gstreamer master branch.
Some minor or major rework is usually required for each gstreamer major upgrade and therefore, my changes are not applicable directly.
However, similar enhancements will be added to gstreamer 1.8.3.

Best regards,

Eric


-----Original Message-----
From: Dmytriyenko, Denys 
Sent: Thursday, March 16, 2017 2:47 PM
To: Ruei, Eric
Cc: Ruei, Eric; meta-arago@arago-project.org
Subject: Re: [meta-arago] [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies

On Thu, Mar 16, 2017 at 02:19:07PM -0400, Ruei, Eric wrote:
> On 3/16/2017 2:02 PM, Denys Dmytriyenko wrote:
> >Thanks!
> >Do you plan to support am3?
> 
> No, the kmssink will not work on AM3 because it requires overlay DRM 
> plane. And there is no customer requirement for advanced features for 
> AM3.
> 
> >Is it applicable to morty? Any patches planned?
> No, it is not applicable to Morty because new version of gstreamer
> (1.9) is for morty.
> 
> I do plan to submit those patches for review.

morty has 1.8.3 - I meant the change in general, not specific to 1.6.3...


> >Also, see inline below.
> >
> >
> >On Thu, Mar 16, 2017 at 01:29:35PM -0400, Eric Ruei wrote:
> >>- remove DCE dependencies from kmssink
> >>- AM4(ti43x) shares the same branch as of AM5(omap-a15)
> >>
> >>Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> >>---
> >> .../0001-kmssink-remove-DCE-dependencies.patch     | 96 ++++++++++++++++++++++
> >> .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  8 +-
> >> 2 files changed, 102 insertions(+), 2 deletions(-)  create mode 
> >>100644 
> >>meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
> >>bad/0001-kmssink-remove-DCE-dependencies.patch
> >>
> >>diff --git 
> >>a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> >>s-bad/0001-kmssink-remove-DCE-dependencies.patch 
> >>b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> >>s-bad/0001-kmssink-remove-DCE-dependencies.patch
> >>new file mode 100644
> >>index 0000000..e050e08
> >>--- /dev/null
> >>+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-pl
> >>+++ ugins-bad/0001-kmssink-remove-DCE-dependencies.patch
> >>@@ -0,0 +1,96 @@
> >>+From 6b04eb39296caec717d310872c1f0acfa85c5ae7 Mon Sep 17 00:00:00 
> >>+2001
> >>+From: Eric Ruei <e-ruei1@ti.com>
> >>+Date: Wed, 15 Mar 2017 09:08:13 -0400
> >>+Subject: [PATCH 1/2] 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 2e0d1f3..2b1ecaa 
> >>+100644
> >>+--- a/configure.ac
> >>++++ b/configure.ac
> >>+@@ -2119,7 +2119,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
> >>+
> >>diff --git 
> >>a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> >>s-bad_1.6.3.bbappend 
> >>b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> >>s-bad_1.6.3.bbappend
> >>index b5ccebf..2c903d4 100644
> >>--- 
> >>a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> >>s-bad_1.6.3.bbappend
> >>+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-pl
> >>+++ ugins-bad_1.6.3.bbappend
> >>@@ -8,7 +8,6 @@ PACKAGECONFIG_append_ti43x = " 
> >>${@bb.utils.contains('DISTRO_FEATURES','wayland',
> >> PACKAGECONFIG_append_ti33x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
> >>
> >> DEPENDS_append_omap-a15 = " \
> >>-    libdce \
> >>     libdrm \
> >> "
> >>
> >>@@ -18,10 +17,14 @@ DEPENDS_append_ti43x = " \
> >>
> >> DEPENDS_append_ti33x = " \
> >>     libdrm \
> >>+"
> >>+
> >>+SRC_URI_append_omap-a15 = " \
> >>+    file://0001-kmssink-remove-DCE-dependencies.patch \
> >> "
> >>
> >> SRC_URI_append_ti43x = " \
> >>-    file://0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch \
> >
> >This patch got dropped ^
> >If it was intentional, should mention that in the commit message.
> >
> >
> 
> Yes, it was intentional, a similar patch was covered by the commit ID 
> update. Do you want me to resubmit this patch?

Yes, please. Just a short one-liner should be good enough. Thanks.


> >>+    file://0001-kmssink-remove-DCE-dependencies.patch \
> >> "
> >>
> >> SRC_URI_append_ti33x = " \
> >>@@ -38,6 +41,7 @@ SRC_URI = 
> >>"git://git.ti.com/glsdk/gstreamer1-0-plugins-bad.git;protocol=git;br
> >>an
> >> S = "${WORKDIR}/git"
> >>
> >> SRCREV_omap-a15 = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
> >>+SRCREV_ti43x = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
> >> SRCREV = "d0160ca810be30bf2b2e7681f5047933402efb52"
> >>
> >> PR = "r25"
> >>--
> >>1.9.1
> >>
> >>_______________________________________________
> >>meta-arago mailing list
> >>meta-arago@arago-project.org
> >>http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies
  2017-03-16 19:09       ` Ruei, Eric
@ 2017-03-16 19:13         ` Denys Dmytriyenko
  2017-03-16 19:23           ` Ruei, Eric
  0 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2017-03-16 19:13 UTC (permalink / raw)
  To: Ruei, Eric; +Cc: meta-arago@arago-project.org

Thanks. Do you have an ETA for those changes against gst 1.8 in morty?


On Thu, Mar 16, 2017 at 03:09:41PM -0400, Ruei, Eric wrote:
> Hi, Denys:
> 
> There were TI-specific changes including kmssink  made on top of Gstreamer master branch.
> Some minor or major rework is usually required for each gstreamer major upgrade and therefore, my changes are not applicable directly.
> However, similar enhancements will be added to gstreamer 1.8.3.
> 
> Best regards,
> 
> Eric
> 
> 
> -----Original Message-----
> From: Dmytriyenko, Denys 
> Sent: Thursday, March 16, 2017 2:47 PM
> To: Ruei, Eric
> Cc: Ruei, Eric; meta-arago@arago-project.org
> Subject: Re: [meta-arago] [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies
> 
> On Thu, Mar 16, 2017 at 02:19:07PM -0400, Ruei, Eric wrote:
> > On 3/16/2017 2:02 PM, Denys Dmytriyenko wrote:
> > >Thanks!
> > >Do you plan to support am3?
> > 
> > No, the kmssink will not work on AM3 because it requires overlay DRM 
> > plane. And there is no customer requirement for advanced features for 
> > AM3.
> > 
> > >Is it applicable to morty? Any patches planned?
> > No, it is not applicable to Morty because new version of gstreamer
> > (1.9) is for morty.
> > 
> > I do plan to submit those patches for review.
> 
> morty has 1.8.3 - I meant the change in general, not specific to 1.6.3...
> 
> 
> > >Also, see inline below.
> > >
> > >
> > >On Thu, Mar 16, 2017 at 01:29:35PM -0400, Eric Ruei wrote:
> > >>- remove DCE dependencies from kmssink
> > >>- AM4(ti43x) shares the same branch as of AM5(omap-a15)
> > >>
> > >>Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> > >>---
> > >> .../0001-kmssink-remove-DCE-dependencies.patch     | 96 ++++++++++++++++++++++
> > >> .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  8 +-
> > >> 2 files changed, 102 insertions(+), 2 deletions(-)  create mode 
> > >>100644 
> > >>meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
> > >>bad/0001-kmssink-remove-DCE-dependencies.patch
> > >>
> > >>diff --git 
> > >>a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> > >>s-bad/0001-kmssink-remove-DCE-dependencies.patch 
> > >>b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> > >>s-bad/0001-kmssink-remove-DCE-dependencies.patch
> > >>new file mode 100644
> > >>index 0000000..e050e08
> > >>--- /dev/null
> > >>+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-pl
> > >>+++ ugins-bad/0001-kmssink-remove-DCE-dependencies.patch
> > >>@@ -0,0 +1,96 @@
> > >>+From 6b04eb39296caec717d310872c1f0acfa85c5ae7 Mon Sep 17 00:00:00 
> > >>+2001
> > >>+From: Eric Ruei <e-ruei1@ti.com>
> > >>+Date: Wed, 15 Mar 2017 09:08:13 -0400
> > >>+Subject: [PATCH 1/2] 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 2e0d1f3..2b1ecaa 
> > >>+100644
> > >>+--- a/configure.ac
> > >>++++ b/configure.ac
> > >>+@@ -2119,7 +2119,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
> > >>+
> > >>diff --git 
> > >>a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> > >>s-bad_1.6.3.bbappend 
> > >>b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> > >>s-bad_1.6.3.bbappend
> > >>index b5ccebf..2c903d4 100644
> > >>--- 
> > >>a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> > >>s-bad_1.6.3.bbappend
> > >>+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-pl
> > >>+++ ugins-bad_1.6.3.bbappend
> > >>@@ -8,7 +8,6 @@ PACKAGECONFIG_append_ti43x = " 
> > >>${@bb.utils.contains('DISTRO_FEATURES','wayland',
> > >> PACKAGECONFIG_append_ti33x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
> > >>
> > >> DEPENDS_append_omap-a15 = " \
> > >>-    libdce \
> > >>     libdrm \
> > >> "
> > >>
> > >>@@ -18,10 +17,14 @@ DEPENDS_append_ti43x = " \
> > >>
> > >> DEPENDS_append_ti33x = " \
> > >>     libdrm \
> > >>+"
> > >>+
> > >>+SRC_URI_append_omap-a15 = " \
> > >>+    file://0001-kmssink-remove-DCE-dependencies.patch \
> > >> "
> > >>
> > >> SRC_URI_append_ti43x = " \
> > >>-    file://0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch \
> > >
> > >This patch got dropped ^
> > >If it was intentional, should mention that in the commit message.
> > >
> > >
> > 
> > Yes, it was intentional, a similar patch was covered by the commit ID 
> > update. Do you want me to resubmit this patch?
> 
> Yes, please. Just a short one-liner should be good enough. Thanks.
> 
> 
> > >>+    file://0001-kmssink-remove-DCE-dependencies.patch \
> > >> "
> > >>
> > >> SRC_URI_append_ti33x = " \
> > >>@@ -38,6 +41,7 @@ SRC_URI = 
> > >>"git://git.ti.com/glsdk/gstreamer1-0-plugins-bad.git;protocol=git;br
> > >>an
> > >> S = "${WORKDIR}/git"
> > >>
> > >> SRCREV_omap-a15 = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
> > >>+SRCREV_ti43x = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
> > >> SRCREV = "d0160ca810be30bf2b2e7681f5047933402efb52"
> > >>
> > >> PR = "r25"
> > >>--
> > >>1.9.1
> > >>
> > >>_______________________________________________
> > >>meta-arago mailing list
> > >>meta-arago@arago-project.org
> > >>http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> > 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies
  2017-03-16 19:13         ` Denys Dmytriyenko
@ 2017-03-16 19:23           ` Ruei, Eric
  0 siblings, 0 replies; 12+ messages in thread
From: Ruei, Eric @ 2017-03-16 19:23 UTC (permalink / raw)
  To: Dmytriyenko, Denys; +Cc: meta-arago@arago-project.org

Hi, Denys:

There is a JIRA ticket (https://jira.itg.ti.com/browse/LCPD-9347) for LTS2017.
I plan to implement the same enhancements on top of gstreamer 1.8.3 for LTS2017.01.

Best regards,

Eric
 

-----Original Message-----
From: Dmytriyenko, Denys 
Sent: Thursday, March 16, 2017 3:13 PM
To: Ruei, Eric
Cc: meta-arago@arago-project.org; Prajod, Pooja
Subject: Re: [meta-arago] [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies

Thanks. Do you have an ETA for those changes against gst 1.8 in morty?


On Thu, Mar 16, 2017 at 03:09:41PM -0400, Ruei, Eric wrote:
> Hi, Denys:
> 
> There were TI-specific changes including kmssink  made on top of Gstreamer master branch.
> Some minor or major rework is usually required for each gstreamer major upgrade and therefore, my changes are not applicable directly.
> However, similar enhancements will be added to gstreamer 1.8.3.
> 
> Best regards,
> 
> Eric
> 
> 
> -----Original Message-----
> From: Dmytriyenko, Denys
> Sent: Thursday, March 16, 2017 2:47 PM
> To: Ruei, Eric
> Cc: Ruei, Eric; meta-arago@arago-project.org
> Subject: Re: [meta-arago] [krogoth][PATCH 1/3] 
> gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies
> 
> On Thu, Mar 16, 2017 at 02:19:07PM -0400, Ruei, Eric wrote:
> > On 3/16/2017 2:02 PM, Denys Dmytriyenko wrote:
> > >Thanks!
> > >Do you plan to support am3?
> > 
> > No, the kmssink will not work on AM3 because it requires overlay DRM 
> > plane. And there is no customer requirement for advanced features 
> > for AM3.
> > 
> > >Is it applicable to morty? Any patches planned?
> > No, it is not applicable to Morty because new version of gstreamer
> > (1.9) is for morty.
> > 
> > I do plan to submit those patches for review.
> 
> morty has 1.8.3 - I meant the change in general, not specific to 1.6.3...
> 
> 
> > >Also, see inline below.
> > >
> > >
> > >On Thu, Mar 16, 2017 at 01:29:35PM -0400, Eric Ruei wrote:
> > >>- remove DCE dependencies from kmssink
> > >>- AM4(ti43x) shares the same branch as of AM5(omap-a15)
> > >>
> > >>Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> > >>---
> > >> .../0001-kmssink-remove-DCE-dependencies.patch     | 96 ++++++++++++++++++++++
> > >> .../gstreamer1.0-plugins-bad_1.6.3.bbappend        |  8 +-
> > >> 2 files changed, 102 insertions(+), 2 deletions(-)  create mode
> > >>100644
> > >>meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugin
> > >>s- bad/0001-kmssink-remove-DCE-dependencies.patch
> > >>
> > >>diff --git
> > >>a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plug
> > >>in s-bad/0001-kmssink-remove-DCE-dependencies.patch
> > >>b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plug
> > >>in s-bad/0001-kmssink-remove-DCE-dependencies.patch
> > >>new file mode 100644
> > >>index 0000000..e050e08
> > >>--- /dev/null
> > >>+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-
> > >>+++ pl ugins-bad/0001-kmssink-remove-DCE-dependencies.patch
> > >>@@ -0,0 +1,96 @@
> > >>+From 6b04eb39296caec717d310872c1f0acfa85c5ae7 Mon Sep 17 00:00:00
> > >>+2001
> > >>+From: Eric Ruei <e-ruei1@ti.com>
> > >>+Date: Wed, 15 Mar 2017 09:08:13 -0400
> > >>+Subject: [PATCH 1/2] 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 2e0d1f3..2b1ecaa
> > >>+100644
> > >>+--- a/configure.ac
> > >>++++ b/configure.ac
> > >>+@@ -2119,7 +2119,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
> > >>+
> > >>diff --git
> > >>a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plug
> > >>in
> > >>s-bad_1.6.3.bbappend
> > >>b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plug
> > >>in
> > >>s-bad_1.6.3.bbappend
> > >>index b5ccebf..2c903d4 100644
> > >>---
> > >>a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plug
> > >>in
> > >>s-bad_1.6.3.bbappend
> > >>+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-
> > >>+++ pl
> > >>+++ ugins-bad_1.6.3.bbappend
> > >>@@ -8,7 +8,6 @@ PACKAGECONFIG_append_ti43x = " 
> > >>${@bb.utils.contains('DISTRO_FEATURES','wayland',
> > >> PACKAGECONFIG_append_ti33x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
> > >>
> > >> DEPENDS_append_omap-a15 = " \
> > >>-    libdce \
> > >>     libdrm \
> > >> "
> > >>
> > >>@@ -18,10 +17,14 @@ DEPENDS_append_ti43x = " \
> > >>
> > >> DEPENDS_append_ti33x = " \
> > >>     libdrm \
> > >>+"
> > >>+
> > >>+SRC_URI_append_omap-a15 = " \
> > >>+    file://0001-kmssink-remove-DCE-dependencies.patch \
> > >> "
> > >>
> > >> SRC_URI_append_ti43x = " \
> > >>-    file://0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch \
> > >
> > >This patch got dropped ^
> > >If it was intentional, should mention that in the commit message.
> > >
> > >
> > 
> > Yes, it was intentional, a similar patch was covered by the commit 
> > ID update. Do you want me to resubmit this patch?
> 
> Yes, please. Just a short one-liner should be good enough. Thanks.
> 
> 
> > >>+    file://0001-kmssink-remove-DCE-dependencies.patch \
> > >> "
> > >>
> > >> SRC_URI_append_ti33x = " \
> > >>@@ -38,6 +41,7 @@ SRC_URI =
> > >>"git://git.ti.com/glsdk/gstreamer1-0-plugins-bad.git;protocol=git;
> > >>br
> > >>an
> > >> S = "${WORKDIR}/git"
> > >>
> > >> SRCREV_omap-a15 = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
> > >>+SRCREV_ti43x = "eb41f1c8fde05f87587c83d157835e3b2d19a298"
> > >> SRCREV = "d0160ca810be30bf2b2e7681f5047933402efb52"
> > >>
> > >> PR = "r25"
> > >>--
> > >>1.9.1
> > >>
> > >>_______________________________________________
> > >>meta-arago mailing list
> > >>meta-arago@arago-project.org
> > >>http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> > 


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-03-16 19:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16 17:29 [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Eric Ruei
2017-03-16 17:29 ` [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support Eric Ruei
2017-03-16 18:04   ` Denys Dmytriyenko
2017-03-16 18:21     ` Ruei, Eric
2017-03-16 17:29 ` [krogoth][PATCH 3/3] gstreamer1.0-plugins-bad: waylandsink: add input format I420 support Eric Ruei
2017-03-16 18:02 ` [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Denys Dmytriyenko
2017-03-16 18:19   ` Ruei, Eric
2017-03-16 18:46     ` Denys Dmytriyenko
2017-03-16 19:09       ` Ruei, Eric
2017-03-16 19:13         ` Denys Dmytriyenko
2017-03-16 19:23           ` Ruei, Eric
  -- strict thread matches above, loose matches on Subject: below --
2017-03-16 17:26 Eric Ruei
2017-03-16 17:26 ` [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support Eric Ruei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.