All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John Willis" <John.Willis@Distant-earth.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: Re: [PATCH] PowerVR init script
Date: Wed, 27 May 2009 10:11:29 +0100	[thread overview]
Message-ID: <00a001c9deab$21665be0$643313a0$@Willis@Distant-earth.com> (raw)
In-Reply-To: <4A1C49B6.5050108@soundmetrics.com>

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

> Hello,
> Please review the attached patch which lets the PowerVR init script
> handle start, stop and restart.

Hi John,

I could have sworn I pushed this as a patch some time ago but it must have
got lost. 
This is the PowerVR init script we have been using for some time without
issue on the Beagle and Pandora.

It supports start/stop/restart/force-reload and modprobes the modules rather
than the insmod/find combo. 
Other than that it is comparable to your patch.

One other note is that you will need to bump the PR on the libgles-omap3_*
recipes (esp. 3.00.00.06 as that is the one in common use) so that the new
script gets baked in.

Regards,

John Willis

[-- Attachment #2: rc.pvr --]
[-- Type: application/octet-stream, Size: 989 bytes --]

#!/bin/sh

DESC="PowerVR SGX driver"
NAME="PVRSRV"


d_stop() {
	if [ -e /dev/pvrsrvkm ] ; then 
		rm -f /dev/pvrsrvkm
	fi

	if `grep -q pvrsrv /proc/modules` ; then
		rmmod omaplfb 2>/dev/null
		rmmod pvrsrvkm 2>/dev/null
	fi
}

d_start() {
	if `grep -q pvrsrv /proc/modules` ; then
		echo " ... already started."
		exit 1
	fi

	modprobe pvrsrvkm
	modprobe omaplfb

	pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`

	mknod /dev/pvrsrvkm c $pvr_maj 0 
	chmod 666 /dev/pvrsrvkm

	/usr/bin/pvrsrvinit

	# Set SGX to full speed
	# Temp fix to OMAP clocks are sorted.
	devmem2 0x48004b40 w 0
}


case "$1" in
  start)
	echo -n "Starting $DESC: $NAME"
	d_start
	echo "."
	;;
  stop)
	echo -n "Stopping $DESC: $NAME"
	d_stop
	echo "."
	;;
  restart|force-reload)
	echo -n "Restarting $DESC: $NAME"
	d_stop
	sleep 1
	d_start
	echo "."
	;;
  *)
	echo "Usage: $0 {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0

  parent reply	other threads:[~2009-05-27  9:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 19:57 [PATCH] PowerVR init script John Faith
2009-05-26 21:13 ` Koen Kooi
2009-05-26 21:55   ` John Faith
2009-05-27  9:11 ` John Willis [this message]
2009-05-27 15:28   ` John Faith
2009-05-27 18:19     ` Denys Dmytriyenko

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='00a001c9deab$21665be0$643313a0$@Willis@Distant-earth.com' \
    --to=john.willis@distant-earth.com \
    --cc=openembedded-devel@lists.openembedded.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.