All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Prasad, Ram" <x0038811@ti.com>
To: "Dmytriyenko, Denys" <denys@ti.com>
Cc: "meta-arago@arago-project.org" <meta-arago@arago-project.org>
Subject: Re: [rocko 5/9] gstreamer1.0*-bad: Enable kmssink with gst 1.12
Date: Tue, 27 Mar 2018 11:19:57 +0000	[thread overview]
Message-ID: <cabe788a75774b528c459d59eea48fa9@ti.com> (raw)
In-Reply-To: <20180326164722.GL20556@edge>

Hi Denys,
I didn't intend to disable "faad" . Now I realized, this should have been  PACKAGECONFIG += "kms"  otherwise it disables faad.
Thanks for pushing the patches to rocko-next branch with the correct fix.

Thanks
Ramprasad  


-----Original Message-----
From: Dmytriyenko, Denys 
Sent: Monday, March 26, 2018 10:17 PM
To: Prasad, Ram
Cc: meta-arago@arago-project.org
Subject: Re: [meta-arago] [rocko 5/9] gstreamer1.0*-bad: Enable kmssink with gst 1.12

Which platforms support kms? Why are you disabling faad?


On Mon, Mar 26, 2018 at 12:42:14PM -0400, Prasad, Ram wrote:
>    Hi Denys,
>    Yes, I want enable kmssink and only PACKAGECONFIG statement is enabling
>    kms. If I don't add this it won't compile kmssink.
> 
>    Ram
> 
>    -------- Original Message --------
>    From: "Dmytriyenko, Denys" <denys@ti.com>
>    Date: Mon 26 Mar, 2018, 10:06 PM
>    To: "Prasad, Ram" <x0038811@ti.com>
>    CC: meta-arago@arago-project.org
>    Subject: Re: [meta-arago] [rocko 5/9] gstreamer1.0*-bad: Enable kmssink
>    with gst 1.12
> 
>    On Mon, Mar 26, 2018 at 09:52:32AM -0400, Denys Dmytriyenko wrote:
>    > >    >  PACKAGECONFIG = "faad"
>    > >    > +PACKAGECONFIG = "kms"
>    > >
>    > >    ^^^ This doesn't look right...
>    >
>    > Just see it in the context.
> 
>    Ramprasad,
> 
>    PACKAGECONFIG is a list of enabled options. Your change replaces existing
>    "faad" option with "kms" - maybe you meant to add it instead?
> 
>    Please let me know ASAP, as I want to merge the set for testing today.
>    Thanks.
> 
>    --
>    Denys
> 
>    > On Mon, Mar 26, 2018 at 09:49:54AM -0400, Prasad, Ram wrote:
>    > >    HI Denys,
>    > >    > +PACKAGECONFIG = "kms"
>    > >    This was required to make sure kms get compiled.
>    > >    Is it required to make this platform dependent PACKAGECONFIG?
>    > >
>    > >    Ramprasad
>    > >
>    > >    -----Original Message-----
>    > >    From: Dmytriyenko, Denys
>    > >    Sent: Monday, March 26, 2018 6:41 AM
>    > >    To: Prasad, Ram
>    > >    Cc: meta-arago@arago-project.org
>    > >    Subject: Re: [meta-arago] [rocko 5/9] gstreamer1.0*-bad: Enable
>    kmssink
>    > >    with gst 1.12
>    > >
>    > >    On Thu, Mar 22, 2018 at 09:36:41AM +0530, Ramprasad N wrote:
>    > >    > Signed-off-by: Ramprasad N <x0038811@ti.com>
>    > >    > ---
>    > >    >  ...Add-omapdrm-in-the-list-of-driver-modules.patch | 165
>    > >    +++++++++++++++++++++
>    > >    >  .../gstreamer1.0-plugins-bad_1.12.2.bbappend       |   5 +-
>    > >    >  2 files changed, 169 insertions(+), 1 deletion(-)  create mode
>    100644
>    > >    >
>    meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ba
>    > >    > d/0003-kmssink-Add-omapdrm-in-the-list-of-driver-modules.patch
>    > >    >
>    > >    > diff --git
>    > >    >
>    a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
>    > >    > bad/0003-kmssink-Add-omapdrm-in-the-list-of-driver-modules.patch
>    > >    >
>    b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
>    > >    > bad/0003-kmssink-Add-omapdrm-in-the-list-of-driver-modules.patch
>    > >    > new file mode 100644
>    > >    > index 0000000..2e4965c
>    > >    > --- /dev/null
>    > >    > +++
>    b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plug
>    > >    > +++
>    ins-bad/0003-kmssink-Add-omapdrm-in-the-list-of-driver-modules.pat
>    > >    > +++ ch
>    > >    > @@ -0,0 +1,165 @@
>    > >    > +From 4ef13bc433d218f2ebcbe2e9b7853d10d7b9acbc Mon Sep 17
>    00:00:00
>    > >    > +2001
>    > >    > +From: Ramprasad N <x0038811@ti.com>
>    > >    > +Date: Tue, 6 Mar 2018 19:02:20 +0530
>    > >    > +Subject: [PATCH 3/5] kmssink: Add omapdrm in the list of driver
>    > >    > +modules
>    > >    > +
>    > >    > +In gstreamer-bad v1.12.2 kmssink plugin is available but omapdrm
>    > >    > +driver is not added in the list of driver module.
>    > >    > +
>    > >    > +DRM and DMABUF are treated differently by gstreamer eventhough
>    they
>    > >    > +are based on fd allocator.
>    > >    > +GST1.12 has many changes to dmabuf allocator and hence DRM and
>    DMABUF
>    > >    > +will be treated differently.
>    > >    > +
>    > >    > +Added support for DRM buffer importing. Without this addition,
>    there
>    > >    > +will be frame-copy happens and slows down the playback.
>    > >    > +
>    > >    > +Signed-off-by: Ramprasad N <x0038811@ti.com>
>    > >    > +---
>    > >    > + sys/kms/Makefile.am  |   1 +
>    > >    > + sys/kms/gstkmssink.c | 101
>    > >    > +++++++++++++++++++++++++++++++++++++++++++++++++++-
>    > >    > + 2 files changed, 101 insertions(+), 1 deletion(-)
>    > >    > +
>    > >    > +diff --git a/sys/kms/Makefile.am b/sys/kms/Makefile.am index
>    > >    > +a97cad1..063f5ef 100644
>    > >    > +--- a/sys/kms/Makefile.am
>    > >    > ++++ b/sys/kms/Makefile.am
>    > >    > +@@ -23,6 +23,7 @@ libgstkms_la_LIBADD =                       \
>    > >    > +      $(GST_ALLOCATORS_LIBS)                  \
>    > >    > +      $(GST_LIBS)                              \
>    > >    > +      $(KMS_DRM_LIBS)                  \
>    > >    > ++   
>    $(top_builddir)/gst-libs/gst/drm/libgstdrm-$(GST_API_VERSION).la \
>    > >    > +      $(NULL)
>    > >    > +
>    > >    > + libgstkms_la_LDFLAGS =                       \
>    > >    > +diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c index
>    > >    > +d19e19e..028bec6 100644
>    > >    > +--- a/sys/kms/gstkmssink.c
>    > >    > ++++ b/sys/kms/gstkmssink.c
>    > >    > +@@ -85,7 +85,8 @@ static int
>    > >    > + kms_open (gchar ** driver)
>    > >    > + {
>    > >    > +   static const char *drivers[] = { "i915", "radeon", "nouveau",
>    > >    "vmwgfx",
>    > >    > +-    "exynos", "amdgpu", "imx-drm", "rockchip", "atmel-hlcdc",
>    "msm"
>    > >    > ++    "exynos", "amdgpu", "imx-drm", "rockchip", "atmel-hlcdc",
>    "msm",
>    > >    > ++    "omapdrm"
>    > >    > +   };
>    > >    > +   int i, fd = -1;
>    > >    > +
>    > >    > +@@ -1041,6 +1042,100 @@ set_cached_kmsmem (GstMemory * mem,
>    GstMemory
>    > >    > +* kmsmem)  }
>    > >    > +
>    > >    > + static gboolean
>    > >    > ++gst_kms_sink_import_drmbuf (GstKMSSink * self, GstBuffer *
>    inbuf,
>    > >    > ++    GstBuffer ** outbuf)
>    > >    > ++{
>    > >    > ++  gint prime_fds[GST_VIDEO_MAX_PLANES] = { 0, };
>    > >    > ++  GstVideoMeta *meta;
>    > >    > ++  guint i, n_mem, n_planes;
>    > >    > ++  GstKMSMemory *kmsmem;
>    > >    > ++  guint mems_idx[GST_VIDEO_MAX_PLANES];
>    > >    > ++  gsize mems_skip[GST_VIDEO_MAX_PLANES];
>    > >    > ++  GstMemory *mems[GST_VIDEO_MAX_PLANES];
>    > >    > ++
>    > >    > ++  if (!self->has_prime_import)
>    > >    > ++    return FALSE;
>    > >    > ++
>    > >    > ++  /* This will eliminate most non-dmabuf out there */  if
>    > >    > ++ (!gst_is_drm_memory (gst_buffer_peek_memory (inbuf, 0)))
>    > >    > ++    return FALSE;
>    > >    > ++
>    > >    > ++  n_planes = GST_VIDEO_INFO_N_PLANES (&self->vinfo);  n_mem =
>    > >    > ++ gst_buffer_n_memory (inbuf);  meta = gst_buffer_get_video_meta
>    > >    > ++ (inbuf);
>    > >    > ++
>    > >    > ++  GST_TRACE_OBJECT (self, "Found a drmbuf with %u planes and %u
>    > >    memories",
>    > >    > ++      n_planes, n_mem);
>    > >    > ++
>    > >    > ++  /* We cannot have multiple dmabuf per plane */  if (n_mem >
>    > >    > ++ n_planes)
>    > >    > ++    return FALSE;
>    > >    > ++  g_assert (n_planes != 0);
>    > >    > ++
>    > >    > ++  /* Update video info based on video meta */  if (meta) {
>    > >    > ++    GST_VIDEO_INFO_WIDTH (&self->vinfo) = meta->width;
>    > >    > ++    GST_VIDEO_INFO_HEIGHT (&self->vinfo) = meta->height;
>    > >    > ++
>    > >    > ++    for (i = 0; i < meta->n_planes; i++) {
>    > >    > ++      GST_VIDEO_INFO_PLANE_OFFSET (&self->vinfo, i) =
>    meta->offset[i];
>    > >    > ++      GST_VIDEO_INFO_PLANE_STRIDE (&self->vinfo, i) =
>    meta->stride[i];
>    > >    > ++    }
>    > >    > ++  }
>    > >    > ++
>    > >    > ++  /* Find and validate all memories */  for (i = 0; i <
>    n_planes;
>    > >    > ++ i++) {
>    > >    > ++    guint length;
>    > >    > ++
>    > >    > ++    if (!gst_buffer_find_memory (inbuf,
>    > >    > ++            GST_VIDEO_INFO_PLANE_OFFSET (&self->vinfo, i), 1,
>    > >    > ++            &mems_idx[i], &length, &mems_skip[i]))
>    > >    > ++      return FALSE;
>    > >    > ++
>    > >    > ++    mems[i] = gst_buffer_peek_memory (inbuf, mems_idx[i]);
>    > >    > ++
>    > >    > ++    /* adjust for memory offset, in case data does not
>    > >    > ++     * start from byte 0 in the dmabuf fd */
>    > >    > ++    mems_skip[i] += mems[i]->offset;
>    > >    > ++
>    > >    > ++    /* And all memory found must be dmabuf */
>    > >    > ++    if (!gst_is_drm_memory (mems[i]))
>    > >    > ++      return FALSE;
>    > >    > ++  }
>    > >    > ++
>    > >    > ++  kmsmem = (GstKMSMemory *) get_cached_kmsmem (mems[0]);  if
>    > >    > ++ (kmsmem) {
>    > >    > ++    GST_LOG_OBJECT (self, "found KMS mem %p in DMABuf mem %p
>    with fb
>    > >    id = %d",
>    > >    > ++        kmsmem, mems[0], kmsmem->fb_id);
>    > >    > ++    goto wrap_mem;
>    > >    > ++  }
>    > >    > ++
>    > >    > ++  for (i = 0; i < n_planes; i++)
>    > >    > ++    prime_fds[i] = gst_fd_memory_get_fd (mems[i]);
>    > >    > ++
>    > >    > ++  GST_LOG_OBJECT (self, "found these prime ids: %d, %d, %d,
>    %d",
>    > >    prime_fds[0],
>    > >    > ++      prime_fds[1], prime_fds[2], prime_fds[3]);
>    > >    > ++
>    > >    > ++  kmsmem = gst_kms_allocator_dmabuf_import (self->allocator,
>    > >    prime_fds,
>    > >    > ++      n_planes, mems_skip, &self->vinfo);  if (!kmsmem)
>    > >    > ++    return FALSE;
>    > >    > ++
>    > >    > ++  GST_LOG_OBJECT (self, "setting KMS mem %p to DMABuf mem %p
>    with fb
>    > >    id = %d",
>    > >    > ++      kmsmem, mems[0], kmsmem->fb_id);  set_cached_kmsmem
>    (mems[0],
>    > >    > ++ GST_MEMORY_CAST (kmsmem));
>    > >    > ++
>    > >    > ++wrap_mem:
>    > >    > ++  *outbuf = gst_buffer_new ();
>    > >    > ++  if (!*outbuf)
>    > >    > ++    return FALSE;
>    > >    > ++  gst_buffer_append_memory (*outbuf, gst_memory_ref
>    (GST_MEMORY_CAST
>    > >    > ++(kmsmem)));
>    > >    > ++  gst_buffer_add_parent_buffer_meta (*outbuf, inbuf);
>    > >    > ++  gst_buffer_copy_into (*outbuf, inbuf,
>    GST_BUFFER_COPY_METADATA, 0,
>    > >    > ++-1);
>    > >    > ++
>    > >    > ++  return TRUE;
>    > >    > ++}
>    > >    > ++static gboolean
>    > >    > + gst_kms_sink_import_dmabuf (GstKMSSink * self, GstBuffer *
>    inbuf,
>    > >    > +     GstBuffer ** outbuf)
>    > >    > + {
>    > >    > +@@ -1151,6 +1246,10 @@ gst_kms_sink_get_input_buffer (GstKMSSink
>    *
>    > >    self, GstBuffer * inbuf)
>    > >    > +     return gst_buffer_ref (inbuf);
>    > >    > +
>    > >    > +   buf = NULL;
>    > >    > ++  if (gst_kms_sink_import_drmbuf (self, inbuf, &buf))
>    > >    > ++    return buf;
>    > >    > ++
>    > >    > ++  buf = NULL;
>    > >    > +   if (gst_kms_sink_import_dmabuf (self, inbuf, &buf))
>    > >    > +     return buf;
>    > >    > +
>    > >    > +--
>    > >    > +1.9.1
>    > >    > +
>    > >    > diff --git
>    > >    >
>    a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
>    > >    > bad_1.12.2.bbappend
>    > >    >
>    b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
>    > >    > bad_1.12.2.bbappend
>    > >    > index 437689f..f99b81d 100644
>    > >    > ---
>    > >    >
>    a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
>    > >    > bad_1.12.2.bbappend
>    > >    > +++
>    b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plug
>    > >    > +++ ins-bad_1.12.2.bbappend
>    > >    > @@ -1,6 +1,7 @@
>    > >    >  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>    > >    >
>    > >    >  PACKAGECONFIG = "faad"
>    > >    > +PACKAGECONFIG = "kms"
>    > >
>    > >    ^^^ This doesn't look right...
>    > >
>    > >    >  # gstreamer is now also included on Keystone, be mindful of any
>    > >    > Graphics dependencies
>    > >    >  PACKAGECONFIG_append_omap-a15 = "
>    > >    ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
>    > >    > @@ -22,6 +23,7 @@ DEPENDS_append_ti33x = " \ 
>    SRC_URI_append_ti43x = "
>    > >    > \
>    > >    >      file://0001-gstdrmallocator-Add-DRM-allocator-support.patch
>    \
>    > >    >      file://0002-parsers-bug-fixes-on-parsers.patch \
>    > >    > +  
>    > >    > +
>    file://0003-kmssink-Add-omapdrm-in-the-list-of-driver-modules.patch
>    > >    > + \
>    > >    >  "
>    > >    >
>    > >    >  SRC_URI_append_ti33x = " \
>    > >    > @@ -30,8 +32,9 @@ SRC_URI_append_ti33x = " \
>    > >    >  SRC_URI_append_omap-a15 = " \
>    > >    >      file://0001-gstdrmallocator-Add-DRM-allocator-support.patch
>    \
>    > >    >      file://0002-parsers-bug-fixes-on-parsers.patch \
>    > >    > +  
>    > >    > +
>    file://0003-kmssink-Add-omapdrm-in-the-list-of-driver-modules.patch
>    > >    > + \
>    > >    >  "
>    > >    >
>    > >    >  PACKAGE_ARCH = "${MACHINE_ARCH}"
>    > >    >
>    > >    > -PR = "r2"
>    > >    > +PR = "r3"
>    > >    > --
>    > >    > 1.9.1
>    > >    >
>    > >    > _______________________________________________
>    > >    > meta-arago mailing list
>    > >    > meta-arago@arago-project.org
>    > >    > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
>    > _______________________________________________
>    > meta-arago mailing list
>    > meta-arago@arago-project.org
>    > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


  reply	other threads:[~2018-03-27 11:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22  4:06 [rocko 0/9] Gstreamer1.12.2 enablement for rocko Ramprasad N
2018-03-22  4:06 ` [rocko 1/9] gstreamer1.0*-bad: Clean up gstreamer 1.8 bad patches Ramprasad N
2018-03-26  1:08   ` Denys Dmytriyenko
2018-03-26 10:38     ` Prasad, Ram
2018-03-22  4:06 ` [rocko 2/9] gstreamer1.0*-good: Increase v4l2src minimum buffers by 4 Ramprasad N
2018-03-22  4:06 ` [rocko 3/9] gstreamer1.0*-bad: Add drmallocator support Ramprasad N
2018-03-26  1:10   ` Denys Dmytriyenko
2018-03-22  4:06 ` [rocko 4/9] gstreamer1.0*-bad: Add parser specific fixes Ramprasad N
2018-03-22  4:06 ` [rocko 5/9] gstreamer1.0*-bad: Enable kmssink with gst 1.12 Ramprasad N
2018-03-26  1:11   ` Denys Dmytriyenko
2018-03-26 13:49     ` Prasad, Ram
2018-03-26 13:52       ` Denys Dmytriyenko
2018-03-26 16:36         ` Denys Dmytriyenko
2018-03-26 16:42           ` Prasad, Ram
2018-03-26 16:47             ` Denys Dmytriyenko
2018-03-27 11:19               ` Prasad, Ram [this message]
2018-03-28  2:42                 ` Denys Dmytriyenko
2018-03-22  4:06 ` [rocko 6/9] wayland-protocols: Add drm protocol to stable Ramprasad N
2018-03-22  4:06 ` [rocko 7/9] gstreamer1.0*-bad: Add DRM support to waylandsink Ramprasad N
2018-03-22  4:06 ` [rocko 8/9] gstvpe: Fix frame-copy issue with playbin Ramprasad N
2018-03-22  4:06 ` [rocko 9/9] branding-{core, processor-sdk}: re-enable mmip Ramprasad N
2018-03-22  9:03 ` [EXTERNAL] [rocko 0/9] Gstreamer1.12.2 enablement for rocko R, Karthik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cabe788a75774b528c459d59eea48fa9@ti.com \
    --to=x0038811@ti.com \
    --cc=denys@ti.com \
    --cc=meta-arago@arago-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.