All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility
@ 2014-08-06 18:06 Neena Busireddy
  2014-08-06 18:21 ` Otavio Salvador
  2014-08-06 21:07 ` Fabio Estevam
  0 siblings, 2 replies; 5+ messages in thread
From: Neena Busireddy @ 2014-08-06 18:06 UTC (permalink / raw)
  To: meta-freescale

This utility is used to monitor hdmi display hot plugin and
reconfigure xserver (through exa driver)if it detects the
display change.

This utility can be disabled if the display is not
changed dynamically.

Signed-off-by: Neena Busireddy <neena.busireddy@freescale.com>
---
 .../xserver-xorg-extension-viv-hdmi/rc.local.etc   |   17 +++++
 .../xserver-xorg-extension-viv-hdmi/rc.local.init  |   36 ++++++++++
 ...server-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb |   73 ++++++++++++++++++++
 3 files changed, 126 insertions(+)
 create mode 100644 recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc
 create mode 100644 recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init
 create mode 100644 recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb

diff --git a/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc
new file mode 100644
index 0000000..3c55ef5
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+#
+# rc.local
+#
+# This script is executed at the end of each multiuser runlevel.
+# Make sure that the script will "exit 0" on success or any other
+# value on error.
+#
+# In order to enable or disable this script just change the execution
+# bits.
+#
+# By default this script does nothing.
+
+export DISPLAY=:0
+autohdmi &
+
+exit 0
diff --git a/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init
new file mode 100644
index 0000000..c897f6d
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init
@@ -0,0 +1,36 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          rc.hdmi
+# Required-Start:    $all
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:
+# Short-Description: Run /etc/rc.hdmi if it exist
+### END INIT INFO
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+do_start() {
+	if [ -x /etc/rc.hdmi ]; then
+		echo -n "Running local boot scripts (/etc/rc.hdmi)"
+		/etc/rc.hdmi
+		[ $? = 0 ] && echo "." || echo "error"
+		return $ES
+	fi
+}
+
+case "$1" in
+    start)
+	do_start
+        ;;
+    restart|reload|force-reload)
+        echo "Error: argument '$1' not supported" >&2
+        exit 3
+        ;;
+    stop)
+        ;;
+    *)
+        echo "Usage: $0 start|stop" >&2
+        exit 3
+        ;;
+esac
diff --git a/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb
new file mode 100644
index 0000000..0f17507
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb
@@ -0,0 +1,73 @@
+# Copyright (C) 2014 Freescale Semiconductor
+# Released under the MIT license (see COPYING.MIT for the terms)
+DESCRIPTION = "Freescale Extension for HDMI performance"
+LICENSE = "MIT-X"
+
+DEPENDS += "virtual/kernel xf86-video-imxfb-vivante"
+
+LIC_FILES_CHKSUM = "file://EXA/src/vivante_fbdev/vivante.h;endline=19;md5=641ac6e6d013833e36290797f4d7089c"
+
+SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \
+            file://rc.local.etc \
+            file://rc.local.init"
+
+S="${WORKDIR}/xserver-xorg-video-imx-viv-${PV}/"
+
+SRC_URI[md5sum] = "697d9a3fb244eb95eae4207bf2d9c321"
+SRC_URI[sha256sum] = "9178c6b721e55645bedf6d2cfaf836f5c6e2684673215358a6b6845c10a7a085"
+
+inherit update-rc.d autotools pkgconfig
+
+INITSCRIPT_NAME = "rc.hdmi"
+INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
+
+EXTRA_OEMAKE += "-C ${S}/util/autohdmi -f makefile.linux prefix=${D}/usr \
+                 sysroot=${STAGING_DIR_TARGET} \
+                 BUSID_HAS_NUMBER=1 \
+                 BUILD_IN_YOCTO=1 \
+                 XSERVER_GREATER_THAN_13=1"
+
+# FIXME: The Freescale provided Makefile has hardcodec include paths
+#        and this does not work in case prefix is different than /usr,
+#        sed it.
+do_configure_prepend () {
+    sed -i 's,$(sysroot)/usr/include,${STAGING_INCDIR},g' \
+            ${S}FslExt/src/makefile.linux
+}
+
+# FIXME: This is need as Freescale didn't use standard Makefile filename
+#        thus oe_runmame thinks nothing is need to be done, use ln to
+#        workaround it.
+base_do_compile () {
+    oe_runmake || die "make failed"
+}
+
+do_compile_append () {
+
+oe_runmake -C ${S}/FslExt/src 
+
+}
+
+do_install () {
+
+    install -d ${D}${libdir}
+    cp -axr ${S}/FslExt/src/libfsl_x11_ext.so ${D}${libdir}
+
+    install -d ${D}${exec_prefix}/sbin
+    cp -axr ${S}/util/autohdmi/autohdmi ${D}${exec_prefix}/sbin
+
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 755 ${WORKDIR}/rc.local.init ${D}/${sysconfdir}/init.d/rc.hdmi
+    install -m 755 ${WORKDIR}/rc.local.etc ${D}/${sysconfdir}/rc.hdmi
+
+}
+
+RDEPENDS_${PN} = "xf86-video-imxfb-vivante"
+
+REALSOLIBS := "${SOLIBS}"
+SOLIBS = "${SOLIBSDEV}"
+
+FILES_${PN} = " ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/sbin/autohdmi ${sysconfdir}/init.d ${sysconfdir}/rc.hdmi"
+
+PACKAGE_ARCH = "${MACHINE_SOCARCH}"
+COMPATIBLE_MACHINE = "(mx6)"
-- 
1.7.9.5



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

* Re: [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility
  2014-08-06 18:06 [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility Neena Busireddy
@ 2014-08-06 18:21 ` Otavio Salvador
  2014-08-06 21:07 ` Fabio Estevam
  1 sibling, 0 replies; 5+ messages in thread
From: Otavio Salvador @ 2014-08-06 18:21 UTC (permalink / raw)
  To: Neena Busireddy, Lauren Post; +Cc: meta-freescale

On Wed, Aug 6, 2014 at 3:06 PM, Neena Busireddy
<neena.busireddy@freescale.com> wrote:
> This utility is used to monitor hdmi display hot plugin and
> reconfigure xserver (through exa driver)if it detects the

Typo. Please use space between ) and if.

Hot plugin? or hotplug?

> display change.
>
> This utility can be disabled if the display is not
> changed dynamically.
>
> Signed-off-by: Neena Busireddy <neena.busireddy@freescale.com>

I think most users do not change the display dynamically in their
products (as I never saw this question here) so it should be /off/ by
default.

> ---
>  .../xserver-xorg-extension-viv-hdmi/rc.local.etc   |   17 +++++
>  .../xserver-xorg-extension-viv-hdmi/rc.local.init  |   36 ++++++++++
>  ...server-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb |   73 ++++++++++++++++++++
>  3 files changed, 126 insertions(+)
>  create mode 100644 recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc
>  create mode 100644 recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init
>  create mode 100644 recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb

Neena (Lauren in cc), I already explained that rc.local is NOT
intended to be used this way. Use rc.autohdmi

> diff --git a/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc
> new file mode 100644
> index 0000000..3c55ef5
> --- /dev/null
> +++ b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc
> @@ -0,0 +1,17 @@
> +#!/bin/sh -e
> +#
> +# rc.local

rc.autohdmi

> +# This script is executed at the end of each multiuser runlevel.
> +# Make sure that the script will "exit 0" on success or any other
> +# value on error.
> +#
> +# In order to enable or disable this script just change the execution
> +# bits.
> +#
> +# By default this script does nothing.
> +
> +export DISPLAY=:0
> +autohdmi &
> +
> +exit 0

If user runs this twice? does it fail? proper exit?

> diff --git a/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init
> new file mode 100644
> index 0000000..c897f6d
> --- /dev/null
> +++ b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init
> @@ -0,0 +1,36 @@
> +#! /bin/sh
> +### BEGIN INIT INFO
> +# Provides:          rc.hdmi
> +# Required-Start:    $all
> +# Required-Stop:
> +# Default-Start:     2 3 4 5
> +# Default-Stop:
> +# Short-Description: Run /etc/rc.hdmi if it exist
> +### END INIT INFO

rc.autohdmi

> +PATH=/sbin:/usr/sbin:/bin:/usr/bin
> +
> +do_start() {
> +       if [ -x /etc/rc.hdmi ]; then
> +               echo -n "Running local boot scripts (/etc/rc.hdmi)"
> +               /etc/rc.hdmi

rc.autohdmi and don't need two scripts. Merge the etc and init in a single one.

> +               [ $? = 0 ] && echo "." || echo "error"
> +               return $ES
> +       fi
> +}
> +
> +case "$1" in
> +    start)
> +       do_start
> +        ;;
> +    restart|reload|force-reload)
> +        echo "Error: argument '$1' not supported" >&2
> +        exit 3
> +        ;;
> +    stop)
> +        ;;
> +    *)
> +        echo "Usage: $0 start|stop" >&2
> +        exit 3
> +        ;;
> +esac
> diff --git a/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb
> new file mode 100644
> index 0000000..0f17507
> --- /dev/null
> +++ b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb
> @@ -0,0 +1,73 @@
> +# Copyright (C) 2014 Freescale Semiconductor
> +# Released under the MIT license (see COPYING.MIT for the terms)
> +DESCRIPTION = "Freescale Extension for HDMI performance"
> +LICENSE = "MIT-X"
> +
> +DEPENDS += "virtual/kernel xf86-video-imxfb-vivante"
> +
> +LIC_FILES_CHKSUM = "file://EXA/src/vivante_fbdev/vivante.h;endline=19;md5=641ac6e6d013833e36290797f4d7089c"
> +
> +SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \
> +            file://rc.local.etc \
> +            file://rc.local.init"

rc.autohdmi

> +S="${WORKDIR}/xserver-xorg-video-imx-viv-${PV}/"
> +
> +SRC_URI[md5sum] = "697d9a3fb244eb95eae4207bf2d9c321"
> +SRC_URI[sha256sum] = "9178c6b721e55645bedf6d2cfaf836f5c6e2684673215358a6b6845c10a7a085"
> +
> +inherit update-rc.d autotools pkgconfig
> +
> +INITSCRIPT_NAME = "rc.hdmi"
> +INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
> +
> +EXTRA_OEMAKE += "-C ${S}/util/autohdmi -f makefile.linux prefix=${D}/usr \
> +                 sysroot=${STAGING_DIR_TARGET} \
> +                 BUSID_HAS_NUMBER=1 \
> +                 BUILD_IN_YOCTO=1 \
> +                 XSERVER_GREATER_THAN_13=1"
> +
> +# FIXME: The Freescale provided Makefile has hardcodec include paths
> +#        and this does not work in case prefix is different than /usr,
> +#        sed it.
> +do_configure_prepend () {
> +    sed -i 's,$(sysroot)/usr/include,${STAGING_INCDIR},g' \
> +            ${S}FslExt/src/makefile.linux
> +}
> +
> +# FIXME: This is need as Freescale didn't use standard Makefile filename
> +#        thus oe_runmame thinks nothing is need to be done, use ln to
> +#        workaround it.
> +base_do_compile () {
> +    oe_runmake || die "make failed"
> +}
> +
> +do_compile_append () {
> +
> +oe_runmake -C ${S}/FslExt/src
> +
> +}
> +
> +do_install () {
> +
> +    install -d ${D}${libdir}
> +    cp -axr ${S}/FslExt/src/libfsl_x11_ext.so ${D}${libdir}
> +
> +    install -d ${D}${exec_prefix}/sbin
> +    cp -axr ${S}/util/autohdmi/autohdmi ${D}${exec_prefix}/sbin
> +
> +    install -d ${D}/${sysconfdir}/init.d
> +    install -m 755 ${WORKDIR}/rc.local.init ${D}/${sysconfdir}/init.d/rc.hdmi
> +    install -m 755 ${WORKDIR}/rc.local.etc ${D}/${sysconfdir}/rc.hdmi
> +
> +}
> +
> +RDEPENDS_${PN} = "xf86-video-imxfb-vivante"
> +
> +REALSOLIBS := "${SOLIBS}"
> +SOLIBS = "${SOLIBSDEV}"
> +
> +FILES_${PN} = " ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/sbin/autohdmi ${sysconfdir}/init.d ${sysconfdir}/rc.hdmi"
> +
> +PACKAGE_ARCH = "${MACHINE_SOCARCH}"
> +COMPATIBLE_MACHINE = "(mx6)"

Same comments of
http://article.gmane.org/gmane.linux.embedded.yocto.meta-freescale/8198/match=autohdmi

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility
  2014-08-06 18:06 [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility Neena Busireddy
  2014-08-06 18:21 ` Otavio Salvador
@ 2014-08-06 21:07 ` Fabio Estevam
  2014-08-06 21:50   ` Lauren Post
  1 sibling, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2014-08-06 21:07 UTC (permalink / raw)
  To: Neena Busireddy; +Cc: meta-freescale

On Wed, Aug 6, 2014 at 3:06 PM, Neena Busireddy
<neena.busireddy@freescale.com> wrote:
> This utility is used to monitor hdmi display hot plugin and
> reconfigure xserver (through exa driver)if it detects the
> display change.

I did not undestand the purpose of such utility. What problem is this
trying to solve?

What do you mean by "display change"? Is this a workaround for a
kernel limitation?

Please clarify.

Thanks


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

* Re: [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility
  2014-08-06 21:07 ` Fabio Estevam
@ 2014-08-06 21:50   ` Lauren Post
  2014-08-06 22:25     ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Lauren Post @ 2014-08-06 21:50 UTC (permalink / raw)
  To: Fabio Estevam, Neena Busireddy; +Cc: meta-freescale

This is to solve issues with HDMI when the display changes.

-----Original Message-----
From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-bounces@yoctoproject.org] On Behalf Of Fabio Estevam
Sent: Wednesday, August 06, 2014 4:08 PM
To: Busireddy Neena-B45787
Cc: meta-freescale@yoctoproject.org
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility

On Wed, Aug 6, 2014 at 3:06 PM, Neena Busireddy <neena.busireddy@freescale.com> wrote:
> This utility is used to monitor hdmi display hot plugin and 
> reconfigure xserver (through exa driver)if it detects the display 
> change.

I did not undestand the purpose of such utility. What problem is this trying to solve?

What do you mean by "display change"? Is this a workaround for a kernel limitation?

Please clarify.

Thanks
--
_______________________________________________
meta-freescale mailing list
meta-freescale@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale


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

* Re: [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility
  2014-08-06 21:50   ` Lauren Post
@ 2014-08-06 22:25     ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2014-08-06 22:25 UTC (permalink / raw)
  To: Lauren Post; +Cc: meta-freescale

On Wed, Aug 6, 2014 at 6:50 PM, Lauren Post <Lauren.Post@freescale.com> wrote:
> This is to solve issues with HDMI when the display changes.

What issues?


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

end of thread, other threads:[~2014-08-06 22:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 18:06 [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility Neena Busireddy
2014-08-06 18:21 ` Otavio Salvador
2014-08-06 21:07 ` Fabio Estevam
2014-08-06 21:50   ` Lauren Post
2014-08-06 22:25     ` Fabio Estevam

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.